|
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.AbstractButton
javax.swing.JButton
com.ultraswing.ToggleButton
com.ultraswing.FlatToggleButton
com.ultraswing.ToolBarToggleButton
Toggle button on toolbar
Nested Class Summary |
Nested classes inherited from class javax.swing.JButton |
JButton.AccessibleJButton |
Nested classes inherited from class javax.swing.AbstractButton |
AbstractButton.AccessibleAbstractButton, AbstractButton.ButtonChangeListener |
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 | |
static Dimension |
ICON_ONLY_SIZE
|
static int |
ICON_ONLY_STYLE
|
static Dimension |
TEXT_ICON_HORIZONTAL_SIZE
|
static int |
TEXT_ICON_STYLE
|
static Dimension |
TEXT_ICON_VERTICAL_SIZE
|
static Dimension |
TEXT_ONLY_SIZE
|
static int |
TEXT_ONLY_STYLE
|
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 | |
ToolBarToggleButton()
Creates a button with no set text or icon. |
|
ToolBarToggleButton(String text)
Creates a button with text. |
|
ToolBarToggleButton(String text,
Icon img)
Creates a button with initial text and an icon. |
|
ToolBarToggleButton(String text,
Icon img,
boolean isVertical)
Creates a button with initial text and an icon. |
|
ToolBarToggleButton(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)
|
Icon |
getIcon()
Returns the icon |
void |
mouseEntered(MouseEvent e)
|
void |
mouseExited(MouseEvent e)
|
void |
propertyChange(PropertyChangeEvent e)
|
void |
setButtonSize(int style,
boolean isVertical,
Dimension 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.FlatToggleButton |
getState, getVerticalButtonIcon, getVerticalButtonText, mouseClicked, mousePressed, mouseReleased, paintComponent, setAntialias, setBorderChangeable, setState |
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 ToolBarToggleButton()
public ToolBarToggleButton(String text)
text
- the text of the buttonpublic ToolBarToggleButton(String text, Icon img)
text
- the text of the buttonimg
- the Icon image to display on the buttonpublic ToolBarToggleButton(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 ToolBarToggleButton(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 ToolBarToggleButton.TEXT_ONLY_STYLE, ToolBarToggleButton.ICON_ONLY_STYLE, ToolBarToggleButton.TEXT_ICON_STYLEisVertical
- if true, this button is a vertical buttonMethod Detail |
public void setStyle(int style)
style
- button style, possible values are ToolBarToggleButton.TEXT_ONLY_STYLE, ToolBarToggleButton.ICON_ONLY_STYLE, ToolBarToggleButton.TEXT_ICON_STYLEpublic void setText(String text)
public void setIcon(Icon icon)
public Icon getIcon()
public void propertyChange(PropertyChangeEvent e)
propertyChange
in interface PropertyChangeListener
public void mouseEntered(MouseEvent e)
mouseEntered
in interface MouseListener
mouseEntered
in class FlatToggleButton
public void mouseExited(MouseEvent e)
mouseExited
in interface MouseListener
mouseExited
in class FlatToggleButton
public void setVertical(boolean b)
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 |