@Override protected void paintComponent (Graphics g) { if (getModel().isPressed()) { g.setColor(pressedColor); } else if (getModel().isRollover()) { g.setColor(overColor); } else { g.setColor(getBackground()); } g.fillRect(0, 0, getWidth(), getHeight()); super.paintComponent(g); } }
@Override public void paintComponent(Graphics g) { super.paintComponent(g); if (text != null) { g.setColor(Color.GRAY); int dx = 15; int dy = 17; g.setColor(Color.WHITE); if (text.length() > 5) { g.drawString(this.text, 8, dy); } else { g.drawString(this.text, dx, dy); } } }
@Override protected void paintComponent(final Graphics g) { paintBackground(g, this); super.paintComponent(g); }
protected void paintComponent(Graphics g) { Graphics2D g2 = (Graphics2D) g; Map rhints = (Map) Toolkit.getDefaultToolkit().getDesktopProperty( "awt.font.desktophints"); // NOI18N if (rhints == null && Boolean.getBoolean("swing.aatext")) { // NOI18N g2.setRenderingHint(RenderingHints.KEY_TEXT_ANTIALIASING, RenderingHints.VALUE_TEXT_ANTIALIAS_ON); } else if (rhints != null) { g2.addRenderingHints(rhints); } super.paintComponent(g2); }
@Override public void paintComponent(final Graphics g) { super.paintComponent(g); if (showMenuArrowIcon) { final Dimension size = getSize(); final Insets ins = getInsets(); int x = size.width - buttonIcon.getIconWidth() - ins.right; int y = ins.top + ((size.height - ins.top - ins.bottom - buttonIcon.getIconHeight()) / 2); buttonIcon.paintIcon(this, g, x, y); } }
@Override protected void paintComponent(Graphics graphics) { graphics.setColor(Color.WHITE); graphics.fillRect(0, 0, getWidth(), getHeight()); super.paintComponent(graphics); } };
/** * {@inheritDoc} */ @Override public void paintComponent(Graphics g) { super.paintComponent(g); final Dimension dim = getSize(); final Insets ins = getInsets(); final int x = dim.width - ins.right; final int y = ins.top + ((dim.height - ins.top - ins.bottom - buttonIcon.getIconHeight()) / 2); buttonIcon.paintIcon(this, g, x, y); }
protected void paintComponent(Graphics g) { super.paintComponent(g); g.drawImage(img, 0, 0, getWidth(), getHeight(), null); }
@Override public void paint(Graphics g) { super.paintComponent(g); if(!isEnabled()){ g.drawImage(disabledImage, 0, 0, backGround, null); } else if (isFocusPainted() && isFocusOwner() && selectedImage != null) { g.drawImage(selectedImage, 0, 0, backGround, null); } else { g.drawImage(image, 0, 0, backGround, null); } }
@Override public void paint(Graphics g) { super.paintComponent(g); if(!isEnabled()){ g.drawImage(disabledImage, 0, 0, backGround, null); } else if (isFocusPainted() && isFocusOwner() && selectedImage != null) { g.drawImage(selectedImage, 0, 0, backGround, null); } else { g.drawImage(image, 0, 0, backGround, null); } }
@Override protected void paintComponent(Graphics g) { if(isEnabled()) { if(inside) { g.setColor(Color.lightGray); g.fillRect(0, 0, getWidth(), getHeight()); g.setColor(Color.darkGray); g.drawRect(0, 0, getWidth()-1, getHeight()-1); } } super.paintComponent(g); }
public void paintComponent(Graphics graphics) { super.paintComponent(graphics); Graphics2D g2d = (Graphics2D) graphics; Color color = colorModel.getColor(); if(color == null) color = Color.BLACK; g2d.setColor(color); int w = getWidth(); int h = getHeight(); g2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON); g2d.fillRoundRect(4,4,w-9,h-9,5,5); g2d.setColor(color.darker()); g2d.drawRoundRect(4,4,w-9,h-9,5,5); }
@Override public void paintComponent( Graphics g ) { Tile tile = tileRef[0]; MultiSplitPane docker = getAncestorOfClass( MultiSplitPane.class, tile ); setIcon( docker.getMaximizedLeaf( ) == tile ? theme.unmaximizeIcon : theme.maximizeIcon ); super.paintComponent( g ); } };
protected void paintComponent(Graphics g) { Painter<JXButton> bgPainter = getBackgroundPainter(); Painter<JXButton> fgPainter = getForegroundPainter(); if (painting || (bgPainter == null && fgPainter == null)) { super.paintComponent(g); } else { invokePainter(g, bgPainter); invokePainter(g, fgPainter); } }
protected void paintComponent(Graphics g) { paintBlock(g); paintGrid(g); if (outOfMonth) { this.setForeground(COLOR_OUT_OF_MONTH_DAY); this.setFont(italicFont); } else { this.setForeground(COLOR_IN_OF_MONTH_DAY); this.setFont(boldFont); } super.paintComponent(g); }
protected void paintComponent(Graphics g) { paintBlock(g); paintGrid(g); if (outOfMonth) { this.setForeground(COLOR_OUT_OF_MONTH_DAY); this.setFont(italicFont); } else { this.setForeground(COLOR_IN_OF_MONTH_DAY); this.setFont(boldFont); } super.paintComponent(g); }
protected void paintComponent(Graphics g) { paintBlock(g); paintGrid(g); if (outOfMonth) { this.setForeground(COLOR_OUT_OF_MONTH_DAY); this.setFont(italicFont); } else { this.setForeground(COLOR_IN_OF_MONTH_DAY); this.setFont(boldFont); } super.paintComponent(g); }
protected void paintComponent(Graphics g) { ButtonModel model = this.getModel(); if (model.isSelected() || model.isArmed()) { this.setForeground(COLOR_FORGROUND_MONTH_YEAR_ROLLOVER); } else if (model.isRollover()) { this.setForeground(COLOR_FORGROUND_MONTH_YEAR_ROLLOVER); } else { this.setForeground(COLOR_FORGROUND_MONTH_YEAR_ON); } super.paintComponent(g); }
protected void paintComponent(Graphics g) { ButtonModel model = this.getModel(); if (model.isSelected() || model.isArmed()) { this.setForeground(COLOR_FORGROUND_NONE_ROLLOVER); } else if (model.isRollover()) { this.setForeground(COLOR_FORGROUND_NONE_ROLLOVER); } else { this.setForeground(COLOR_FORGROUND_NONE_ON); } super.paintComponent(g); }
protected void paintComponent(Graphics g) { ButtonModel model = this.getModel(); if (model.isSelected() || model.isArmed()) { this.setForeground(COLOR_FORGROUND_NONE_ROLLOVER); } else if (model.isRollover()) { this.setForeground(COLOR_FORGROUND_NONE_ROLLOVER); } else { this.setForeground(COLOR_FORGROUND_NONE_ON); } super.paintComponent(g); }