Methods Summary |
---|
public static javax.swing.plaf.ComponentUI | createUI(javax.swing.JComponent b)
// ********************************
// Create PLAF
// ********************************
return motifToggleButtonUI;
|
public java.awt.Insets | getInsets(javax.swing.JComponent c)
Border border = c.getBorder();
Insets i = border != null? border.getBorderInsets(c) : new Insets(0,0,0,0);
return i;
|
protected java.awt.Color | getSelectColor()
return selectColor;
|
public void | installDefaults(javax.swing.AbstractButton b)
super.installDefaults(b);
if(!defaults_initialized) {
selectColor = UIManager.getColor(getPropertyPrefix() + "select");
defaults_initialized = true;
}
LookAndFeel.installProperty(b, "opaque", Boolean.FALSE);
|
protected void | paintButtonPressed(java.awt.Graphics g, javax.swing.AbstractButton b)
if (b.isContentAreaFilled()) {
Color oldColor = g.getColor();
Dimension size = b.getSize();
Insets insets = b.getInsets();
Insets margin = b.getMargin();
if(b.getBackground() instanceof UIResource) {
g.setColor(getSelectColor());
}
g.fillRect(insets.left - margin.left,
insets.top - margin.top,
size.width - (insets.left-margin.left) - (insets.right - margin.right),
size.height - (insets.top-margin.top) - (insets.bottom - margin.bottom));
g.setColor(oldColor);
}
|
protected void | uninstallDefaults(javax.swing.AbstractButton b)
super.uninstallDefaults(b);
defaults_initialized = false;
|