All Packages Class Hierarchy This Package Previous Next Index
Class ejmf.toolkit.gui.controls.BasicControlButton
java.lang.Object
|
+----java.awt.Component
|
+----java.awt.Container
|
+----com.sun.java.swing.JComponent
|
+----com.sun.java.swing.AbstractButton
|
+----com.sun.java.swing.JButton
|
+----ejmf.toolkit.gui.controls.BasicControlButton
- public abstract class BasicControlButton
- extends JButton
- implements SwingConstants
Draws basic Control Panel buttons.
Subclasses supply implementation of painIcon
to draw button icon.
This class takes care of drawing 'pressed' and 'enabled/disabled'
look of button.
-
BasicControlButton()
-
-
getMinimumSize()
- Don't let button get so small that icon
is unrecognizable.
-
getPreferredSize()
- All Control Panel buttons have same preferred size.
-
isFocusTraversable()
-
Always return false.
-
paint(Graphics)
- Paint the background and border or button component.
-
paintIcon(Graphics, int, int, int, boolean)
- Paint icon into button Component
BasicControlButton
public BasicControlButton()
paintIcon
protected abstract void paintIcon(Graphics g,
int x,
int y,
int size,
boolean isEnabled)
- Paint icon into button Component
paint
public void paint(Graphics g)
- Paint the background and border or button component.
Call out to painIcon to draw icon in button.
This method takes care of all bevellng, etc depending on
whether button is pressed of enabled/disabled.
- Overrides:
- paint in class JComponent
getPreferredSize
public Dimension getPreferredSize()
- All Control Panel buttons have same preferred size.
- Overrides:
- getPreferredSize in class JComponent
getMinimumSize
public Dimension getMinimumSize()
- Don't let button get so small that icon
is unrecognizable.
- Overrides:
- getMinimumSize in class JComponent
isFocusTraversable
public boolean isFocusTraversable()
- Always return false.
- Overrides:
- isFocusTraversable in class JComponent
All Packages Class Hierarchy This Package Previous Next Index