@Override public void paint(Graphics graphics, JComponent component) { super.paint(graphics, component); Graphics2D graphics2D = DrawHelper.enableAntialiasing(graphics); if (cachedBackground == null || cachedBackground.getWidth() != component.getWidth() || cachedBackground.getHeight() != component.getHeight()) { recreateBackgroundImage(component); } graphics2D.drawImage(cachedBackground, 0, 0, component); }
@Override public void installUI(JComponent c) { super.installUI(c); c.setOpaque(false); } };
@Override public void uninstallUI(JComponent c) { super.uninstallUI(c); }
protected void paintComponentPatch(Graphics g) { Graphics2D g2 = (Graphics2D) g.create(); try { if (isPaintingBackground()) { g2.setColor(getBackground()); g2.fillRect(0, 0, getWidth(), getHeight()); } if (getBackgroundPainter() != null) { getBackgroundPainter().paint(g2, this, getWidth(), getHeight()); } fakeTransparent = true; getUI().update(g2, this); } finally { g2.dispose(); fakeTransparent = false; } }
protected void paintComponentPatch(Graphics g) { Graphics2D g2 = (Graphics2D) g.create(); try { if (isPaintingBackground()) { g2.setColor(getBackground()); g2.fillRect(0, 0, getWidth(), getHeight()); } if (getBackgroundPainter() != null) { getBackgroundPainter().paint(g2, this, getWidth(), getHeight()); } fakeTransparent = true; getUI().update(g2, this); } finally { g2.dispose(); fakeTransparent = false; } }
getUI().paint(g, this);
@Override public void installUI(JComponent c) { super.installUI(c); c.setOpaque(false); }
protected void paintComponentPatch(Graphics g) { Graphics2D g2 = (Graphics2D) g.create(); try { if (isPaintingBackground()) { g2.setColor(getBackground()); g2.fillRect(0, 0, getWidth(), getHeight()); } if (getBackgroundPainter() != null) { getBackgroundPainter().paint(g2, this, getWidth(), getHeight()); } fakeTransparent = true; getUI().update(g2, this); } finally { g2.dispose(); fakeTransparent = false; } }
public void uninstallUI(JComponent c) { super.uninstallUI(c); c.removeAncestorListener(ancestorListener); }
getUI().paint(g, this);
@Override public void installUI(JComponent c) { super.installUI(c); c.setBackground(Color.WHITE); }
protected void paintComponentPatch(Graphics g) { Graphics2D g2 = (Graphics2D) g.create(); try { if (isPaintingBackground()) { g2.setColor(getBackground()); g2.fillRect(0, 0, getWidth(), getHeight()); } if (getBackgroundPainter() != null) { getBackgroundPainter().paint(g2, this, getWidth(), getHeight()); } fakeTransparent = true; getUI().update(g2, this); } finally { g2.dispose(); fakeTransparent = false; } }
public void uninstallUI(JComponent c) { super.uninstallUI(c); uninstallDefaults(c); cleanup(); }
getUI().paint(g, this);
@Override public void installUI(JComponent c) { super.installUI(c); c.setOpaque(false); }
public void uninstallUI(JComponent c) { super.uninstallUI(c); uninstallTitleBorder(c); titleBar.removePropertyChangeListener(this); titleBar.removeAncestorListener(ancestorListener); Dockable d = titleBar.getDockable(); if(d != null) { d.getDockKey().removePropertyChangeListener(this); } }
getUI().paint(g, this);
@Override public void installUI(JComponent c) { super.installUI(c); c.setOpaque(false); }
@Override public void installUI(JComponent c) { super.installUI(c); Border b = c.getBorder(); if (b == null || b instanceof UIResource) { c.setBorder(new BorderUIResource(BorderFactory.createEmptyBorder(0, 10, 0, 10))); } Color color = c.getBackground(); if (color == null || color instanceof ColorUIResource) { c.setOpaque(true); c.setBackground(new ColorUIResource(Color.white)); } }