/** * Turns on the more window for the given editor */ private void activate() { JRootPane root = SwingUtilities.getRootPane(myEditor.getContentComponent()); myOldGlass = (JComponent)root.getGlassPane(); if (myOldGlass != null) { myOldLayout = myOldGlass.getLayout(); myWasOpaque = myOldGlass.isOpaque(); myOldGlass.setLayout(null); myOldGlass.setOpaque(false); myOldGlass.add(this); myOldGlass.addComponentListener(myAdapter); } setFontForElements(); positionPanel(); if (myOldGlass != null) { myOldGlass.setVisible(true); } myActive = true; UiHelper.requestFocus(myText); }
oldGlass = (JComponent)root.getGlassPane(); oldLayout = oldGlass.getLayout(); wasOpaque = oldGlass.isOpaque(); oldGlass.setLayout(null); oldGlass.setOpaque(false);
this.oldOpaque = parent.isOpaque(); this.oldBorder = parent.getBorder(); parent.setOpaque(false);
if (isOpaque()) { g2d.setColor(getBackground()); g2d.fillRect(0, 0, getWidth(), getHeight());
@Override boolean isBorderNeeded(JComponent c) { return !c.isOpaque() && myTrackAnimator.myValue > 0 && myThumbAnimator.myValue > 0; }
public void paintStatusBarBackground(JComponent c, Graphics g, Rectangle rect, int orientation, int state) { if (c.isOpaque()) { paintContentBackground(c, g, rect, orientation, state); } }
public void paintDockableFrameBackground(JComponent c, Graphics g, Rectangle rect, int orientation, int state) { if (!c.isOpaque()) { return; } g.setColor(UIDefaultsLookup.getColor("DockableFrame.background")); g.fillRect(rect.x, rect.y, rect.width, rect.height); }
private Color getRealBackgroundColor(JComponent c) { Color back = c.getBackground(); if (c.isOpaque()) { if (back == null) { back = Color.WHITE; } // Remove Alpha back = new Color(back.getRGB()); } return back; }
public void update(Graphics g, JComponent c) { if (c.isOpaque()) { g.setColor(c.getBackground()); g.fillRect(0, 0, c.getWidth(),c.getHeight()); } paint(g, c); }
/** {@inheritDoc} */ @Override public void update(final Graphics g, final JComponent c) { if (c.isOpaque()) { g.setColor(c.getBackground()); g.fillRect(0, 0, c.getWidth(), c.getHeight()); } this.paint(g, c); }
public void paintBackground(Graphics g, JComponent c) { if (c.isOpaque()) { if (c.getBackground() instanceof ColorUIResource) { g.setColor(AbstractLookAndFeel.getBackgroundColor()); } else { g.setColor(c.getBackground()); } g.fillRect(0, 0, c.getWidth(), c.getHeight()); } }
public void update(Graphics g, JComponent c) { if (c.isOpaque()) { Object backgroundTexture = c.getClientProperty("backgroundTexture"); if (backgroundTexture instanceof Icon) { JTattooUtilities.fillComponent(g, c, (Icon)backgroundTexture); } else { g.setColor(c.getBackground()); g.fillRect(0, 0, c.getWidth(), c.getHeight()); } } }
public void paintBackground(Graphics g, JComponent c) { if (c.isOpaque()) { if ((c.getBackground() instanceof ColorUIResource) && c.getBackground().equals(AbstractLookAndFeel.getBackgroundColor())) { BernsteinUtils.fillComponent(g, c); } else { g.setColor(c.getBackground()); g.fillRect(0, 0, c.getWidth(), c.getHeight()); } } } }
public void paintBackground(Graphics g, JComponent c) { if (c.isOpaque()) { if ((c.getBackground() instanceof ColorUIResource) && c.getBackground().equals(AbstractLookAndFeel.getBackgroundColor())) { McWinUtils.fillComponent(g, c); } else { g.setColor(c.getBackground()); g.fillRect(0, 0, c.getWidth(), c.getHeight()); } } } }
@Override public void paintDockableFrameBackground(JComponent c, Graphics g, Rectangle rect, int orientation, int state) { if (!c.isOpaque()) { return; } Graphics2D g2d = (Graphics2D) g; JideSwingUtilities.fillGradient(g2d, new Rectangle(rect.x, rect.y, rect.width, rect.height), getCurrentTheme().getColor("DockableFrame.backgroundLt"), getCurrentTheme().getColor("DockableFrame.backgroundDk"), orientation == SwingConstants.HORIZONTAL); }
@Override void paintThumb(Graphics2D g, int x, int y, int width, int height, JComponent c) { if (c.isOpaque()) { RegionPainter<Float> p = ScrollColorProducer.isDark(c) ? ScrollPainter.Thumb.Mac.DARCULA : ScrollPainter.Thumb.Mac.DEFAULT; paint(p, g, x, y, width, height, c, myThumbAnimator.myValue, true); } else if (myThumbAnimator.myValue > 0) { RegionPainter<Float> p = ScrollColorProducer.isDark(c) ? ScrollPainter.Thumb.Mac.Overlay.DARCULA : ScrollPainter.Thumb.Mac.Overlay.DEFAULT; paint(p, g, x, y, width, height, c, myThumbAnimator.myValue, false); } }
public void update(Graphics g, JComponent c) { if (c.isOpaque() && c.getBackground() instanceof ColorUIResource && c.getClientProperty("backgroundTexture") == null) { BernsteinUtils.fillComponent(g, c); } else { super.update(g, c); } } }
/** * Apply the opacity, background color, foreground color and border properties of {@code source} to * {@code destination}. * @param source The source component. * @param destination The destination component. */ public static void copyComponentStyle(JComponent source, JComponent destination) { destination.setOpaque(source.isOpaque()); destination.setBackground(source.getBackground()); destination.setForeground(source.getForeground()); destination.setBorder(source.getBorder()); }
public void update( Graphics g, JComponent c) { oldOpaque = c.isOpaque(); if ( c.getParent() instanceof JToolBar ) { super.update( g,c); } else { c.setOpaque( false); super.update( g,c); c.setOpaque( oldOpaque); } }
protected void copySettings( JComponent from, JComponent to ) { to.setForeground( from.getForeground( ) ); to.setBackground( from.getBackground( ) ); to.setEnabled( from.isEnabled( ) ); to.setFont( from.getFont( ) ); to.setOpaque( from.isOpaque( ) ); }