public boolean isRollover() {
return rollover;
}
protected void paintBackground( Graphics g) {
JTextComponent c = (JTextComponent)getComponent();
Border bb = c.getBorder();
if ( bb != null && bb instanceof NimRODBorders.NimRODGenBorder ) {
g.setColor( getComponent().getBackground());
Graphics2D g2d = (Graphics2D)g;
g2d.setRenderingHint( RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
g.fillRoundRect( 2,2, c.getWidth()-4, c.getHeight()-4, 7,7);
g2d.setRenderingHint( RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_DEFAULT);
if ( c.isEnabled() && c.isEditable() ) {
if ( focus ) {
NimRODUtils.paintFocus( g, 1,1, c.getWidth()-2, c.getHeight()-2, 2, 2, NimRODLookAndFeel.getFocusColor());
}
else if ( rollover ) {
NimRODUtils.paintFocus( g, 1,1, c.getWidth()-2, c.getHeight()-2, 2, 2, NimRODUtils.getColorAlfa( NimRODLookAndFeel.getFocusColor(), 150));
}
}
}
else {
super.paintBackground( g);