|
HOME | |||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.JLabel
com.ultraswing.LabelButton
A flat button implementation based on JLabel
class
Nested Class Summary |
Nested classes inherited from class javax.swing.JLabel |
JLabel.AccessibleJLabel |
Nested classes inherited from class javax.swing.JComponent |
JComponent.AccessibleJComponent |
Nested classes inherited from class java.awt.Container |
Container.AccessibleAWTContainer |
Nested classes inherited from class java.awt.Component |
Component.AccessibleAWTComponent, Component.BltBufferStrategy, Component.FlipBufferStrategy |
Field Summary |
Fields inherited from class javax.swing.JLabel |
labelFor |
Fields inherited from class javax.swing.JComponent |
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW |
Fields inherited from class java.awt.Component |
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT |
Fields inherited from interface javax.swing.SwingConstants |
BOTTOM, CENTER, EAST, HORIZONTAL, LEADING, LEFT, NEXT, NORTH, NORTH_EAST, NORTH_WEST, PREVIOUS, RIGHT, SOUTH, SOUTH_EAST, SOUTH_WEST, TOP, TRAILING, VERTICAL, WEST |
Fields inherited from interface java.awt.image.ImageObserver |
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
Constructor Summary | |
LabelButton()
Creates a button |
|
LabelButton(Icon img)
Creates a button with initial icon |
|
LabelButton(String text)
Creates a button with text. |
|
LabelButton(String text,
Icon img)
Creates a button with initial text and an icon |
|
LabelButton(String text,
int width,
int height)
Creates a button with text. |
Method Summary | |
void |
addActionListener(ActionListener l)
adds an ActionListener to the button |
protected void |
fireActionPerformed(ActionEvent event)
|
ActionListener[] |
getActionListeners()
Returns an array of all the ActionListener s added
to this AbstractButton with addActionListener(). |
void |
mouseClicked(MouseEvent e)
|
void |
mouseEntered(MouseEvent e)
|
void |
mouseExited(MouseEvent e)
|
void |
mousePressed(MouseEvent e)
|
void |
mouseReleased(MouseEvent e)
|
void |
removeActionListener(ActionListener l)
removes an ActionListener from the button |
void |
setBorderChangeable(boolean b)
|
void |
setFlat()
Sets the button flat |
void |
setTransparent(boolean b)
Sets this button transparent or not |
void |
setVisible(boolean b)
Shows or hides this component depending on the value of parameter b. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public LabelButton()
public LabelButton(String text)
text
- the text of the buttonpublic LabelButton(String text, int width, int height)
text
- the text of the buttonwidth
- initial widthheight
- initial heightpublic LabelButton(String text, Icon img)
text
- the text of the buttonimg
- the Icon image to display on the buttonpublic LabelButton(Icon img)
img
- the Icon image to display on the buttonMethod Detail |
public void setTransparent(boolean b)
public void setFlat()
public void setVisible(boolean b)
public void mousePressed(MouseEvent e)
mousePressed
in interface MouseListener
public void mouseClicked(MouseEvent e)
mouseClicked
in interface MouseListener
public void mouseReleased(MouseEvent e)
mouseReleased
in interface MouseListener
public void mouseEntered(MouseEvent e)
mouseEntered
in interface MouseListener
public void mouseExited(MouseEvent e)
mouseExited
in interface MouseListener
public void setBorderChangeable(boolean b)
public void addActionListener(ActionListener l)
public void removeActionListener(ActionListener l)
protected void fireActionPerformed(ActionEvent event)
public ActionListener[] getActionListeners()
ActionListener
s added
to this AbstractButton with addActionListener().
ActionListener
s added or an empty
array if no listeners have been added
|
HOME | |||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |