@Override public void paint(Graphics g, JComponent c) { AbstractButton button = (AbstractButton) c; ButtonModel model = button.getModel(); Dimension size = button.getSize(); if (!model.isPressed() || !model.isArmed()) { paintButtonUnpressed(g, size); } super.paint(g, button); paintBorder(g, size); }
public void paint(Graphics g, JComponent c) { super.paint(g, c); }
public void paint(Graphics g, JComponent c) { super.paint(g, c); }
public void paint(Graphics g, JComponent c) { super.paint(g, c); }
@Override public void paint(Graphics g, JComponent c) { AbstractButton button = (AbstractButton) c; GaugeButtonModel model = (GaugeButtonModel) button.getModel(); Dimension size = button.getSize(); boolean isUnpressed = !model.isPressed() || !model.isArmed(); if (isUnpressed && model.isRollover()) paintButtonUnpressed(g, size); super.paint(g, button); if(model.isRollover()) paintBorder(g, size); paintLights(model.lights(), g); }
@Override public void paint(Graphics g, JComponent c) { AbstractButton button = (AbstractButton) c; if (button.getModel().isSelected()) { Color oldColor = g.getColor(); g.setColor(SELECTED_BACKGROUND); g.fillRect(0, 0, c.getWidth(), c.getHeight()); g.setColor(oldColor); } else if (button.getModel().isRollover()) { Color oldColor = g.getColor(); g.setColor(HOVER_BACKGROUND); g.fillRect(0, 0, c.getWidth(), c.getHeight()); g.setColor(oldColor); } super.paint(g, c); } }
@Override public void paint(Graphics g, JComponent c) { g.setColor(c.getBackground()); g.fillRect(0, 0, c.getWidth(), c.getHeight()); ButtonModel m = ((AbstractButton) c).getModel(); /* PlafUtils.paintBevel(c, g, 0, 0, c.getWidth(), c.getHeight(), true /*m.isEnabled()* /, m.isPressed() & m.isArmed(), m.isSelected()); */ Border b = c.getBorder(); if (b instanceof BackdropBorder) { ((BackdropBorder) b).getBackgroundBorder().paintBorder(c, g, 0, 0, c.getWidth(), c.getHeight()); } super.paint(g, c); }
super.paint(g, c);
@Override public void paint (Graphics g, JComponent c) { AbstractButton b = (AbstractButton) c; g = MaterialDrawingUtils.getAliasedGraphics (g); if (b.isContentAreaFilled ()) { paintBackground (g, b); } super.paint (g, c); }
@Override public void paint(Graphics g, JComponent c) { AbstractButton button = (AbstractButton) c; if (button.isBorderPainted() && (c.getBorder() instanceof BackdropBorder)) { BackdropBorder bb = (BackdropBorder) c.getBorder(); bb.getBackdropBorder().paintBorder(c, g, 0, 0, c.getWidth(), c.getHeight()); } super.paint(g, c); } }
public void paint(Graphics g, JComponent c) { AbstractButton button = (AbstractButton)c; if (button.getModel().isRollover() || button.getModel().isArmed() || button.getModel().isSelected()) { Color oldColor = g.getColor(); if (button.getModel().isSelected()) { g.setColor(blueishBackgroundSelected); } else { g.setColor(blueishBackgroundOver); } g.fillRect(0, 0, c.getWidth() - 1, c.getHeight() - 1); if (button.getModel().isSelected()) { g.setColor(blueishBorderSelected); } else { g.setColor(blueishBorderOver); } g.drawRect(0, 0, c.getWidth() - 1, c.getHeight() - 1); g.setColor(oldColor); } super.paint(g, c); }
@Override public void paint(Graphics g, JComponent c) { Border border = c.getBorder(); GraphicsConfig config = GraphicsUtil.setupAAPainting(g); boolean square = isSquare(c); Graphics2D g2d = (Graphics2D) g; AbstractButton b = (AbstractButton) c; if ((c.isEnabled()) && (border != null)) { //if (!square) { g2d.setPaint(getBackgroundPaint(c)); //} if (b.isContentAreaFilled()) { int arc = 5; if (square) { arc = 3; } g.fillRoundRect(1, 1, c.getWidth() - 2, c.getHeight() - 2, arc, arc); } } super.paint(g, c); config.restore(); }
oldHints = UIUtil.setNativeRenderingHints((Graphics2D)g); super.paint(g, c); if (oldHints!=null) { ((Graphics2D)g).setRenderingHints(oldHints);
public void paint(Graphics g, JComponent c) { AbstractButton b = (AbstractButton) c; ButtonModel model = b.getModel(); if (model.isArmed() && model.isPressed()) { b.setIcon(darkerIcon); } else if (model.isRollover()) { b.setIcon(brighterIcon); } else { b.setIcon(baseIcon); } super.paint(g, c); }
super.paint(g, c);