public void paintBorder(Component c, Graphics g, int x, int y, int w, int h) { if (c.isEnabled()) { MetalUtils.drawFlush3DBorder(g, x, y, w, h); } else { MetalUtils.drawDisabledBorder(g, x, y, w, h); } }
public void paintBorder(Component c, Graphics g, int x, int y, int w, int h) { if (!(c instanceof JTextComponent)) { // special case for non-text components (bug ID 4144840) if (c.isEnabled()) { MetalUtils.drawFlush3DBorder(g, x, y, w, h); } else { MetalUtils.drawDisabledBorder(g, x, y, w, h); } return; } if (c.isEnabled() && ((JTextComponent) c).isEditable()) { MetalUtils.drawFlush3DBorder(g, x, y, w, h); } else { MetalUtils.drawDisabledBorder(g, x, y, w, h); } }
public void paintBorder(Component c, Graphics g, int x, int y, int w, int h) { AbstractButton button = (AbstractButton) c; ButtonModel model = button.getModel(); if (MetalLookAndFeel.usingOcean()) { if (model.isArmed() || !button.isEnabled()) { super.paintBorder(c, g, x, y, w, h); } else { g.setColor(MetalLookAndFeel.getControlDarkShadow()); g.drawRect(0, 0, w - 1, h - 1); } return; } if (!c.isEnabled()) { MetalUtils.drawDisabledBorder(g, x, y, w - 1, h - 1); } else { if (model.isPressed() && model.isArmed()) { MetalUtils.drawPressed3DBorder(g, x, y, w, h); } else if (model.isSelected()) { MetalUtils.drawDark3DBorder(g, x, y, w, h); } else { MetalUtils.drawFlush3DBorder(g, x, y, w, h); } } }