All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class fr.l2f.gui.RoundButton

java.lang.Object
   |
   +----java.awt.Component
           |
           +----fr.l2f.gui.RoundButton

public class RoundButton
extends Component
implements MouseListener, GroupItem

Variable Index

 o alignment
 o CENTER
 o group
 o LEFT
 o line_ascent
 o line_height
 o line_widths
 o lines
 o margin_height
 o margin_width
 o max_width
 o num_lines
 o PRESSED
 o RELEASED
 o RIGHT

Constructor Index

 o RoundButton()
Construct a new RoundButton
 o RoundButton(String)
 o RoundButton(String, boolean, ComponentGroup)
 o RoundButton(String, boolean, ComponentGroup, int)
 o RoundButton(String, int)

Method Index

 o addActionListener(ActionListener)
The specified ActionListeners actionPerformed method will be called each time the button is clicked.
 o addNotify()
 o fireAction()
This method has the same effect as pressing the button.
 o getAlignment()
 o getComponentGroup()
 o getFontSize()
Return the current font point size.
 o getLabel()
Returns the buttons label.
 o getMarginHeight()
 o getMarginWidth()
 o getMinimumSize()
 o getPreferredSize()
 o getState()
Get the state of the button
 o getSwitched()
 o isSwitched()
 o measure()
 o minimumSize()
Deprecated.
 o mouseClicked(MouseEvent)
 o mouseEntered(MouseEvent)
 o mouseExited(MouseEvent)
 o mousePressed(MouseEvent)
 o mouseReleased(MouseEvent)
 o newLabel(String)
 o paint(Graphics)
 o preferredSize()
Deprecated.
 o removeActionListener(ActionListener)
Remove this ActionListener from the buttons internal list.
 o setAlignment(int)
 o setColor(Color)
 o setComponentGroup(ComponentGroup)
 o setFont(Font)
 o setFontSize(int)
Set the point size of the current font.
 o setLabel(String)
Set the buttons label and change it's size to fit.
 o setMarginHeight(int)
 o setMarginWidth(int)
 o setState(boolean)
Change the state of the button
 o setSwitched(boolean)

Variables

 o LEFT
 public static final int LEFT
 o CENTER
 public static final int CENTER
 o RIGHT
 public static final int RIGHT
 o RELEASED
 public static final boolean RELEASED
 o PRESSED
 public static final boolean PRESSED
 o lines
 protected String lines[]
 o num_lines
 protected int num_lines
 o margin_width
 protected int margin_width
 o margin_height
 protected int margin_height
 o line_height
 protected int line_height
 o line_ascent
 protected int line_ascent
 o line_widths
 protected int line_widths[]
 o max_width
 protected int max_width
 o alignment
 protected int alignment
 o group
 public ComponentGroup group

Constructors

 o RoundButton
 public RoundButton()
Construct a new RoundButton

 o RoundButton
 public RoundButton(String t)
 o RoundButton
 public RoundButton(String label,
                    int alignment)
 o RoundButton
 public RoundButton(String label,
                    boolean state,
                    ComponentGroup group)
 o RoundButton
 public RoundButton(String label,
                    boolean state,
                    ComponentGroup group,
                    int alignment)

Methods

 o newLabel
 protected void newLabel(String label)
 o measure
 protected void measure()
 o addNotify
 public void addNotify()
Overrides:
addNotify in class Component
 o setState
 public void setState(boolean state)
Change the state of the button

 o getState
 public boolean getState()
Get the state of the button

 o getComponentGroup
 public ComponentGroup getComponentGroup()
 o setComponentGroup
 public void setComponentGroup(ComponentGroup g)
 o paint
 public void paint(Graphics g)
Overrides:
paint in class Component
 o mouseClicked
 public void mouseClicked(MouseEvent evt)
 o mousePressed
 public void mousePressed(MouseEvent evt)
 o mouseReleased
 public void mouseReleased(MouseEvent evt)
 o mouseEntered
 public void mouseEntered(MouseEvent evt)
 o mouseExited
 public void mouseExited(MouseEvent evt)
 o addActionListener
 public synchronized void addActionListener(ActionListener l)
The specified ActionListeners actionPerformed method will be called each time the button is clicked. The ActionListener object is added to a list of ActionListeners managed by this button, it can be removed with removeActionListener. Note: the JavaBeans specification does not require ActionListeners to run in any particular order.

Parameters:
l - the ActionListener
See Also:
removeActionListener
 o removeActionListener
 public synchronized void removeActionListener(ActionListener l)
Remove this ActionListener from the buttons internal list. If the ActionListener isn't on the list, silently do nothing.

Parameters:
l - the ActionListener
See Also:
addActionListener
 o fireAction
 public void fireAction()
This method has the same effect as pressing the button.

See Also:
addActionListener
 o setFontSize
 public void setFontSize(int x)
Set the point size of the current font. This is a bound property.

 o getFontSize
 public int getFontSize()
Return the current font point size.

 o setFont
 public void setFont(Font f)
Overrides:
setFont in class Component
 o setLabel
 public void setLabel(String label)
Set the buttons label and change it's size to fit. This is a bound property.

 o getLabel
 public String getLabel()
Returns the buttons label.

 o setSwitched
 public void setSwitched(boolean b)
 o getSwitched
 public boolean getSwitched()
 o isSwitched
 public boolean isSwitched()
 o setAlignment
 public void setAlignment(int a)
 o setMarginWidth
 public void setMarginWidth(int mw)
 o setMarginHeight
 public void setMarginHeight(int mh)
 o getAlignment
 public int getAlignment()
 o getMarginWidth
 public int getMarginWidth()
 o getMarginHeight
 public int getMarginHeight()
 o getPreferredSize
 public Dimension getPreferredSize()
Overrides:
getPreferredSize in class Component
 o preferredSize
 public Dimension preferredSize()
Note: preferredSize() is deprecated. provided for backward compatibility with old layout managers.

Overrides:
preferredSize in class Component
 o getMinimumSize
 public Dimension getMinimumSize()
Overrides:
getMinimumSize in class Component
 o minimumSize
 public Dimension minimumSize()
Note: minimumSize() is deprecated. provided for backward compatibility with old layout managers.

Overrides:
minimumSize in class Component
 o setColor
 public void setColor(Color c)

All Packages  Class Hierarchy  This Package  Previous  Next  Index