|
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 | +--com.ultraswing.FlatButton | +--com.ultraswing.ToolBarButton
Tool bar button
Field Summary | |
static Dimension |
ICON_ONLY_SIZE
The size of button with icon only |
static int |
ICON_ONLY_STYLE
Icon only button |
static Dimension |
TEXT_ICON_HORIZONTAL_SIZE
The size of horizontal button with text and icon |
static int |
TEXT_ICON_STYLE
Button with Text and Icon |
static Dimension |
TEXT_ICON_VERTICAL_SIZE
The size of vertical button with text and icon |
static Dimension |
TEXT_ONLY_SIZE
The size of button with text only |
static int |
TEXT_ONLY_STYLE
Text only button |
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 | |
ToolBarButton()
Creates a button with no set text or icon. |
|
ToolBarButton(Icon img)
Creates a button with an icon. |
|
ToolBarButton(String text)
Creates a button with text. |
|
ToolBarButton(String text,
Icon img)
Creates a button with initial text and an icon. |
|
ToolBarButton(String text,
Icon img,
boolean isVertical)
Creates a button with initial text and an icon. |
|
ToolBarButton(String text,
Icon img,
int style,
boolean isVertical)
Creates a button with initial text and an icon. |
Method Summary | |
Dimension |
getButtonSize(int style,
boolean isVertical)
Returns the button size |
void |
mouseEntered(MouseEvent e)
|
void |
mouseExited(MouseEvent e)
|
void |
propertyChange(PropertyChangeEvent e)
|
void |
setButtonSize(int style,
boolean isVertical,
Dimension size)
Sets button size |
void |
setIcon(Icon icon)
Sets button icon |
void |
setStyle(int style)
Sets button style |
void |
setText(String text)
Sets button text |
void |
setVertical(boolean b)
Makes this button vertical or not depending on the parameter b |
Methods inherited from class com.ultraswing.FlatButton |
mouseClicked, mousePressed, mouseReleased, setBorderChangeable, setFlat, setTransparent, setVisible |
Methods inherited from class com.ultraswing.CButton |
getActionListeners, getVerticalButtonIcon, getVerticalButtonText, isVertical, paintComponent, setAntialias |
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 |
Field Detail |
public static final int ICON_ONLY_STYLE
public static final int TEXT_ONLY_STYLE
public static final int TEXT_ICON_STYLE
public static final Dimension ICON_ONLY_SIZE
public static final Dimension TEXT_ONLY_SIZE
public static final Dimension TEXT_ICON_VERTICAL_SIZE
public static final Dimension TEXT_ICON_HORIZONTAL_SIZE
Constructor Detail |
public ToolBarButton()
public ToolBarButton(String text)
text
- the text of the buttonpublic ToolBarButton(Icon img)
img
- the Icon image to display on the buttonpublic ToolBarButton(String text, Icon img)
text
- the text of the buttonimg
- the Icon image to display on the buttonpublic ToolBarButton(String text, Icon img, boolean isVertical)
text
- the text of the buttonimg
- the Icon image to display on the buttonisVertical
- if true, this button is a vertical buttonpublic ToolBarButton(String text, Icon img, int style, boolean isVertical)
text
- the text of the buttonimg
- the Icon image to display on the buttonstyle
- button style, possible values are ToolBarButton.TEXT_ONLY_STYLE, ToolBarButton.ICON_ONLY_STYLE, ToolBarButton.TEXT_ICON_STYLEisVertical
- if true, this button is a vertical buttonMethod Detail |
public void setStyle(int style)
style
- button style, possible values are ToolBarButton.TEXT_ONLY_STYLE, ToolBarButton.ICON_ONLY_STYLE, ToolBarButton.TEXT_ICON_STYLEpublic void setText(String text)
setText
in class CButton
text
- the buttons textpublic void setIcon(Icon icon)
setIcon
in class CButton
public void propertyChange(PropertyChangeEvent e)
propertyChange
in interface PropertyChangeListener
public void mouseEntered(MouseEvent e)
mouseEntered
in interface MouseListener
mouseEntered
in class FlatButton
public void mouseExited(MouseEvent e)
mouseExited
in interface MouseListener
mouseExited
in class FlatButton
public void setVertical(boolean b)
setVertical
in class FlatButton
b
- if true, show vertical buttonpublic void setButtonSize(int style, boolean isVertical, Dimension size)
public Dimension getButtonSize(int style, boolean isVertical)
|
HOME | |||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |