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
-
alignment
-
-
CENTER
-
-
group
-
-
LEFT
-
-
line_ascent
-
-
line_height
-
-
line_widths
-
-
lines
-
-
margin_height
-
-
margin_width
-
-
max_width
-
-
num_lines
-
-
PRESSED
-
-
RELEASED
-
-
RIGHT
-
-
RoundButton()
- Construct a new RoundButton
-
RoundButton(String)
-
-
RoundButton(String, boolean, ComponentGroup)
-
-
RoundButton(String, boolean, ComponentGroup, int)
-
-
RoundButton(String, int)
-
-
addActionListener(ActionListener)
- The specified ActionListeners actionPerformed method will
be called each time the button is clicked.
-
addNotify()
-
-
fireAction()
-
This method has the same effect as pressing the button.
-
getAlignment()
-
-
getComponentGroup()
-
-
getFontSize()
-
Return the current font point size.
-
getLabel()
- Returns the buttons label.
-
getMarginHeight()
-
-
getMarginWidth()
-
-
getMinimumSize()
-
-
getPreferredSize()
-
-
getState()
- Get the state of the button
-
getSwitched()
-
-
isSwitched()
-
-
measure()
-
-
minimumSize()
-
Deprecated.
-
mouseClicked(MouseEvent)
-
-
mouseEntered(MouseEvent)
-
-
mouseExited(MouseEvent)
-
-
mousePressed(MouseEvent)
-
-
mouseReleased(MouseEvent)
-
-
newLabel(String)
-
-
paint(Graphics)
-
-
preferredSize()
-
Deprecated.
-
removeActionListener(ActionListener)
-
Remove this ActionListener from the buttons internal list.
-
setAlignment(int)
-
-
setColor(Color)
-
-
setComponentGroup(ComponentGroup)
-
-
setFont(Font)
-
-
setFontSize(int)
-
Set the point size of the current font.
-
setLabel(String)
-
Set the buttons label and change it's size to fit.
-
setMarginHeight(int)
-
-
setMarginWidth(int)
-
-
setState(boolean)
- Change the state of the button
-
setSwitched(boolean)
-
LEFT
public static final int LEFT
CENTER
public static final int CENTER
RIGHT
public static final int RIGHT
RELEASED
public static final boolean RELEASED
PRESSED
public static final boolean PRESSED
lines
protected String lines[]
num_lines
protected int num_lines
margin_width
protected int margin_width
margin_height
protected int margin_height
line_height
protected int line_height
line_ascent
protected int line_ascent
line_widths
protected int line_widths[]
max_width
protected int max_width
alignment
protected int alignment
group
public ComponentGroup group
RoundButton
public RoundButton()
- Construct a new RoundButton
RoundButton
public RoundButton(String t)
RoundButton
public RoundButton(String label,
int alignment)
RoundButton
public RoundButton(String label,
boolean state,
ComponentGroup group)
RoundButton
public RoundButton(String label,
boolean state,
ComponentGroup group,
int alignment)
newLabel
protected void newLabel(String label)
measure
protected void measure()
addNotify
public void addNotify()
- Overrides:
- addNotify in class Component
setState
public void setState(boolean state)
- Change the state of the button
getState
public boolean getState()
- Get the state of the button
getComponentGroup
public ComponentGroup getComponentGroup()
setComponentGroup
public void setComponentGroup(ComponentGroup g)
paint
public void paint(Graphics g)
- Overrides:
- paint in class Component
mouseClicked
public void mouseClicked(MouseEvent evt)
mousePressed
public void mousePressed(MouseEvent evt)
mouseReleased
public void mouseReleased(MouseEvent evt)
mouseEntered
public void mouseEntered(MouseEvent evt)
mouseExited
public void mouseExited(MouseEvent evt)
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
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
fireAction
public void fireAction()
- This method has the same effect as pressing the button.
- See Also:
- addActionListener
setFontSize
public void setFontSize(int x)
- Set the point size of the current font. This is a bound property.
getFontSize
public int getFontSize()
- Return the current font point size.
setFont
public void setFont(Font f)
- Overrides:
- setFont in class Component
setLabel
public void setLabel(String label)
- Set the buttons label and change it's size to fit. This is a
bound property.
getLabel
public String getLabel()
- Returns the buttons label.
setSwitched
public void setSwitched(boolean b)
getSwitched
public boolean getSwitched()
isSwitched
public boolean isSwitched()
setAlignment
public void setAlignment(int a)
setMarginWidth
public void setMarginWidth(int mw)
setMarginHeight
public void setMarginHeight(int mh)
getAlignment
public int getAlignment()
getMarginWidth
public int getMarginWidth()
getMarginHeight
public int getMarginHeight()
getPreferredSize
public Dimension getPreferredSize()
- Overrides:
- getPreferredSize in class Component
preferredSize
public Dimension preferredSize()
- Note: preferredSize() is deprecated.
provided for backward compatibility with old layout managers.
- Overrides:
- preferredSize in class Component
getMinimumSize
public Dimension getMinimumSize()
- Overrides:
- getMinimumSize in class Component
minimumSize
public Dimension minimumSize()
- Note: minimumSize() is deprecated.
provided for backward compatibility with old layout managers.
- Overrides:
- minimumSize in class Component
setColor
public void setColor(Color c)
All Packages Class Hierarchy This Package Previous Next Index