public void paintMenuItem( Graphics g, JComponent c, Icon checkIcon, Icon arrowIcon, Color background, Color foreground, int defaultTextIconGap) { PlastikColorTheme colorTheme = PlastikLookAndFeel.getTheme().getColorTheme(); selectionForeground = colorTheme.getColor( PlastikColorTheme.MENU_ITEM | PlastikColorTheme.FOREGROUND_TEXT | PlastikColorTheme.ROLLOVER); super.paintMenuItem(g, c, checkIcon, arrowIcon, background, foreground, defaultTextIconGap); }
public void paint(Graphics g, JComponent c) { Graphics2D g2d = (Graphics2D) g; // storing original anitalising flag Object state = null; if (PlastikLookAndFeel.isTextAntialiasing()) { state = g2d.getRenderingHint(RenderingHints.KEY_TEXT_ANTIALIASING); if (state != RenderingHints.VALUE_TEXT_ANTIALIAS_ON) { g2d.setRenderingHint( RenderingHints.KEY_TEXT_ANTIALIASING, RenderingHints.VALUE_TEXT_ANTIALIAS_ON); } } super.paint(g, c); // restoring antialising flag if (state != null) { g2d.setRenderingHint(RenderingHints.KEY_TEXT_ANTIALIASING, state); } }