|
HOME | |||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--java.awt.Component | +--java.awt.Container | +--javax.swing.JComponent | +--javax.swing.AbstractButton | +--javax.swing.JButton | +--com.ultraswing.CButton
An extension of JButton. New features include vertical button and anti-aliasing text.
Field Summary |
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 | |
CButton()
Creates a button with no set text or icon. |
|
CButton(Action a)
Creates a button where properties are taken from the Action supplied. |
|
CButton(Icon icon)
Creates a button with an icon. |
|
CButton(String text)
Creates a button with text. |
|
CButton(String text,
boolean isVertical)
Creates a button with text. |
|
CButton(String text,
Icon icon)
Creates a button with initial text and an icon. |
|
CButton(String text,
Icon icon,
boolean isVertical)
Creates a button with initial text and an icon. |
Method Summary | |
ActionListener[] |
getActionListeners()
Returns an array of all the ActionListener s added
to this AbstractButton with addActionListener(). |
Icon |
getVerticalButtonIcon()
Return the Icon of this button when it's vertical |
String |
getVerticalButtonText()
Returns the button's text when it's vertical |
boolean |
isVertical()
Returns true if this button is vertical. |
void |
paintComponent(Graphics g)
|
void |
setAntialias(boolean b)
Sets true to make text anti-aliasing |
void |
setIcon(Icon icon)
Sets the button's default icon. |
void |
setText(String text)
Sets the button's text. |
void |
setVertical(boolean b)
Makes this button vertical or not depending on the parameter b |
Methods inherited from class javax.swing.JButton |
configurePropertiesFromAction, getAccessibleContext, getUIClassID, isDefaultButton, isDefaultCapable, paramString, removeNotify, setDefaultCapable, updateUI |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public CButton()
public CButton(String text)
text
- the text of the buttonpublic CButton(Icon icon)
icon
- the Icon image to display on the buttonpublic CButton(String text, boolean isVertical)
text
- the text of the buttonisVertical
- if true, this button is a vertical buttonpublic CButton(String text, Icon icon)
text
- the text of the buttonicon
- the Icon image to display on the buttonpublic CButton(String text, Icon icon, boolean isVertical)
text
- the text of the buttonicon
- the Icon image to display on the buttonisVertical
- if true, this button is a vertical buttonpublic CButton(Action a)
Action
supplied.
a
- the Action
used to specify the new buttonMethod Detail |
public void setIcon(Icon icon)
setIcon
in class AbstractButton
public Icon getVerticalButtonIcon()
public void setText(String text)
setText
in class AbstractButton
text
- the buttons textpublic String getVerticalButtonText()
public boolean isVertical()
public void setVertical(boolean b)
b
- if true, show vertical buttonpublic void paintComponent(Graphics g)
paintComponent
in class JComponent
public void setAntialias(boolean b)
public ActionListener[] getActionListeners()
ActionListener
s added
to this AbstractButton with addActionListener().
getActionListeners
in class AbstractButton
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 |