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.


Constructor Index

 o BasicControlButton()

Method Index

 o getMinimumSize()
Don't let button get so small that icon is unrecognizable.
 o getPreferredSize()
All Control Panel buttons have same preferred size.
 o isFocusTraversable()
Always return false.
 o paint(Graphics)
Paint the background and border or button component.
 o paintIcon(Graphics, int, int, int, boolean)
Paint icon into button Component

Constructors

 o BasicControlButton
 public BasicControlButton()

Methods

 o paintIcon
 protected abstract void paintIcon(Graphics g,
                                   int x,
                                   int y,
                                   int size,
                                   boolean isEnabled)
Paint icon into button Component

 o 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
 o getPreferredSize
 public Dimension getPreferredSize()
All Control Panel buttons have same preferred size.

Overrides:
getPreferredSize in class JComponent
 o getMinimumSize
 public Dimension getMinimumSize()
Don't let button get so small that icon is unrecognizable.

Overrides:
getMinimumSize in class JComponent
 o isFocusTraversable
 public boolean isFocusTraversable()
Always return false.

Overrides:
isFocusTraversable in class JComponent

All Packages  Class Hierarchy  This Package  Previous  Next  Index