|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnextapp.echo.AbstractComponent
nextapp.echo.AbstractButton
public abstract class AbstractButton
A base class from which various types of buttons (simple buttons, radio buttons, checkboxes, etc.) are derived.
Field Summary | |
---|---|
static java.lang.String |
ACTION_COMMAND_CHANGED_PROPERTY
|
static java.lang.String |
CSS_CLASS_CHANGED_PROPERTY
|
static java.lang.String |
DISABLED_CSS_CLASS_CHANGED_PROPERTY
|
static java.lang.String |
HORIZONTAL_ALIGNMENT_CHANGED_PROPERTY
|
static java.lang.String |
HORIZONTAL_TEXT_POSITION_CHANGED_PROPERTY
|
static java.lang.String |
ICON_CHANGED_PROPERTY
|
static java.lang.String |
ICON_TEXT_MARGIN_CHANGED_PROPERTY
|
static java.lang.String |
MODEL_CHANGED_PROPERTY
|
static java.lang.String |
NOTABSTOP_CHANGED_PROPERTY
|
static java.lang.String |
ROLLOVER_BACKGROUND_CHANGED_PROPERTY
|
static java.lang.String |
ROLLOVER_ENABLED_CHANGED_PROPERTY
|
static java.lang.String |
ROLLOVER_FONT_CHANGED_PROPERTY
|
static java.lang.String |
ROLLOVER_FOREGROUND_CHANGED_PROPERTY
|
static java.lang.String |
ROLLOVER_ICON_CHANGED_PROPERTY
|
static java.lang.String |
ROLLOVER_SELECTED_ICON_CHANGED_PROPERTY
|
static java.lang.String |
SELECTED_CHANGED_PROPERTY
|
static java.lang.String |
SELECTED_ICON_CHANGED_PROPERTY
|
static java.lang.String |
STYLE_HORIZONTAL_ALIGNMENT
A style constant for the Horizontal Alignment property. |
static java.lang.String |
STYLE_HORIZONTAL_TEXT_POSITION
A style constant for the Horizontal Text Position property. |
static java.lang.String |
STYLE_ICON_TEXT_MARGIN
A style constant for the Icon-Text Margin property. |
static java.lang.String |
STYLE_ROLLOVER_BACKGROUND
A style constant for the Rollover Background property. |
static java.lang.String |
STYLE_ROLLOVER_ENABLED
A style constant for the Rollover Enabled property. |
static java.lang.String |
STYLE_ROLLOVER_FONT
A style constant for the Rollover Font property. |
static java.lang.String |
STYLE_ROLLOVER_FOREGROUND
A style constant for the Rollover Foreground property. |
static java.lang.String |
STYLE_VERTICAL_ALIGNMENT
A style constant for the Vertical Alignment property. |
static java.lang.String |
STYLE_VERTICAL_TEXT_POSITION
A style constant for the Vertical Text Position property. |
static java.lang.String |
TEXT_CHANGED_PROPERTY
|
static java.lang.String |
VERTICAL_ALIGNMENT_CHANGED_PROPERTY
|
static java.lang.String |
VERTICAL_TEXT_POSITION_CHANGED_PROPERTY
|
Fields inherited from interface nextapp.echo.ToolTipSupport |
---|
TOOL_TIP_TEXT_CHANGED_PROPERTY |
Constructor Summary | |
---|---|
AbstractButton()
Default constructor. |
Method Summary | |
---|---|
void |
addActionListener(ActionListener l)
Adds an ActionListener to the button. |
void |
addChangeListener(ChangeListener l)
Adds a ChangeListener to the button. |
void |
addItemListener(ItemListener l)
Adds a ItemListener to the button. |
void |
applyStyle(Style style)
Sets stylistic properties of this component based on a Style
object. |
void |
doAction()
Programmatically performs a click/activation of the button. |
void |
fireActionPerformed(ActionEvent e)
Notifies all listeners that have registered for this event type. |
void |
fireItemStateChanged(ItemEvent e)
Notifies all listeners that have registered for this event type. |
void |
fireStateChanged()
Notifies all listeners that have registered for this event type. |
java.lang.String |
getActionCommand()
Returns the action command for this button. |
java.lang.String |
getCssClass()
|
java.lang.String |
getCssClassDisabled()
|
int |
getHorizontalAlignment()
Returns the horizontal alignment of the text relative to the icon. |
int |
getHorizontalTextPosition()
Returns the horizontal position of the text relative to the icon. |
ImageReference |
getIcon()
Returns the icon. |
int |
getIconTextMargin()
Returns the size of the margin to be displayed between the icon and text The margin is only drawn if both icon and text are present. |
ButtonModel |
getModel()
Returns the model that this button represents. |
Color |
getRolloverBackground()
Returns the rollover background color of the button. |
Font |
getRolloverFont()
Returns the rollover font of the button. |
Color |
getRolloverForeground()
Returns the rollover foreground color of the button. |
ImageReference |
getRolloverIcon()
Returns the rollover icon. |
ImageReference |
getRolloverSelectedIcon()
Returns the rollover selected icon. |
ImageReference |
getSelectedIcon()
Returns the selected icon. |
java.lang.String |
getText()
Returns the text. |
java.lang.String |
getToolTipText()
Returns the default tool tip text. |
int |
getVerticalAlignment()
Returns the vertical alignment of the text relative to the icon. |
int |
getVerticalTextPosition()
Returns the vertical position of the text relative to the icon. |
boolean |
hasActionListeners()
Returns true if the button has one or more action listeners. |
boolean |
isAsync()
|
boolean |
isNoTabStop()
|
boolean |
isRolloverEnabled()
Returns whether rollovers are enabled. |
boolean |
isSelected()
Returns the button's selection state. |
void |
removeActionListener(ActionListener l)
Removes an ActionListener from the button. |
void |
removeChangeListener(ChangeListener l)
Removes a ChangeListener from the button. |
void |
removeItemListener(ItemListener l)
Removes a ItemListener from the button. |
void |
setActionCommand(java.lang.String newValue)
Sets the button's action command. |
void |
setAsync(boolean async)
|
void |
setCssClass(java.lang.String cssClass)
|
void |
setCssClassDisabled(java.lang.String cssClass)
|
void |
setHorizontalAlignment(int newValue)
Sets the horizontal alignment of the text relative to the icon. |
void |
setHorizontalTextPosition(int newValue)
Sets the horizontal position of the text relative to the icon. |
void |
setIcon(ImageReference newValue)
Sets the default icon. |
void |
setIconTextMargin(int newValue)
Sets the size of the margin to be displayed between the icon and text. |
void |
setModel(ButtonModel newValue)
Sets the model that this button represents. |
void |
setNoTabStop(boolean newValue)
|
void |
setRolloverBackground(Color newValue)
Sets the rollover background. |
void |
setRolloverEnabled(boolean newValue)
Sets whether rollovers are enabled. |
void |
setRolloverFont(Font newValue)
Sets the rollover font. |
void |
setRolloverForeground(Color newValue)
Sets the rollover foreground. |
void |
setRolloverIcon(ImageReference newValue)
Sets the rollover icon. |
void |
setRolloverSelectedIcon(ImageReference newValue)
Sets the rollover selected icon. |
void |
setSelected(boolean newValue)
Sets the button's selection state. |
void |
setSelectedIcon(ImageReference newValue)
Sets the selected icon. |
void |
setText(java.lang.String newValue)
Sets the text. |
void |
setToolTipText(java.lang.String newValue)
Sets the default tool tip text. |
void |
setVerticalAlignment(int newValue)
Sets the vertical alignment of the text relative to the icon. |
void |
setVerticalTextPosition(int newValue)
Sets the vertical position of the text relative to the icon. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String STYLE_HORIZONTAL_ALIGNMENT
public static final java.lang.String STYLE_HORIZONTAL_TEXT_POSITION
public static final java.lang.String STYLE_ICON_TEXT_MARGIN
public static final java.lang.String STYLE_ROLLOVER_BACKGROUND
public static final java.lang.String STYLE_ROLLOVER_ENABLED
public static final java.lang.String STYLE_ROLLOVER_FONT
public static final java.lang.String STYLE_ROLLOVER_FOREGROUND
public static final java.lang.String STYLE_VERTICAL_ALIGNMENT
public static final java.lang.String STYLE_VERTICAL_TEXT_POSITION
public static final java.lang.String ACTION_COMMAND_CHANGED_PROPERTY
public static final java.lang.String HORIZONTAL_ALIGNMENT_CHANGED_PROPERTY
public static final java.lang.String HORIZONTAL_TEXT_POSITION_CHANGED_PROPERTY
public static final java.lang.String ICON_CHANGED_PROPERTY
public static final java.lang.String ICON_TEXT_MARGIN_CHANGED_PROPERTY
public static final java.lang.String MODEL_CHANGED_PROPERTY
public static final java.lang.String ROLLOVER_BACKGROUND_CHANGED_PROPERTY
public static final java.lang.String ROLLOVER_ENABLED_CHANGED_PROPERTY
public static final java.lang.String ROLLOVER_FONT_CHANGED_PROPERTY
public static final java.lang.String ROLLOVER_FOREGROUND_CHANGED_PROPERTY
public static final java.lang.String ROLLOVER_ICON_CHANGED_PROPERTY
public static final java.lang.String ROLLOVER_SELECTED_ICON_CHANGED_PROPERTY
public static final java.lang.String SELECTED_CHANGED_PROPERTY
public static final java.lang.String SELECTED_ICON_CHANGED_PROPERTY
public static final java.lang.String TEXT_CHANGED_PROPERTY
public static final java.lang.String VERTICAL_ALIGNMENT_CHANGED_PROPERTY
public static final java.lang.String VERTICAL_TEXT_POSITION_CHANGED_PROPERTY
public static final java.lang.String NOTABSTOP_CHANGED_PROPERTY
public static final java.lang.String CSS_CLASS_CHANGED_PROPERTY
public static final java.lang.String DISABLED_CSS_CLASS_CHANGED_PROPERTY
Constructor Detail |
---|
public AbstractButton()
Method Detail |
---|
public void addActionListener(ActionListener l)
ActionListener
to the button.
l
- The ActionListener
to be added.public void addChangeListener(ChangeListener l)
ChangeListener
to the button.
l
- The ChangeListener
to be added.public void addItemListener(ItemListener l)
ItemListener
to the button.
l
- The ItemListener
to be added.public void applyStyle(Style style)
Component
Style
object. The version of this method in Component
will set
foreground and background colors and the font from the style if they are
present. Components should override this method if they allow more
properties to be set from a style object, and should call
super.applyStyle() if necessary.
applyStyle
in interface Component
applyStyle
in class AbstractComponent
style
- The style object from which to retrieve properties for this
Component
.Component.applyStyle(Style)
public void doAction()
public void fireActionPerformed(ActionEvent e)
e
- The ActionEvent
to send.public void fireItemStateChanged(ItemEvent e)
e
- The ItemEvent
to send.public void fireStateChanged()
public java.lang.String getActionCommand()
public int getHorizontalAlignment()
public int getHorizontalTextPosition()
public ImageReference getIcon()
public int getIconTextMargin()
public ButtonModel getModel()
public Color getRolloverBackground()
public Font getRolloverFont()
public Color getRolloverForeground()
public ImageReference getRolloverIcon()
public ImageReference getRolloverSelectedIcon()
public ImageReference getSelectedIcon()
public java.lang.String getText()
public java.lang.String getToolTipText()
ToolTipSupport
getToolTipText
in interface ToolTipSupport
ToolTipSupport.getToolTipText()
public int getVerticalAlignment()
public int getVerticalTextPosition()
public boolean hasActionListeners()
public boolean isRolloverEnabled()
public boolean isSelected()
public void removeActionListener(ActionListener l)
ActionListener
from the button.
l
- The ActionListener
to be removed.public void removeChangeListener(ChangeListener l)
ChangeListener
from the button.
l
- The ChangeListener
to be removed.public void removeItemListener(ItemListener l)
ItemListener
from the button.
l
- The ItemListener
to be removed.public void setActionCommand(java.lang.String newValue)
newValue
- The new action command for this button.public void setHorizontalAlignment(int newValue)
newValue
- The horizontal alignment of the text relative to the icon,
one of the following values:
public void setHorizontalTextPosition(int newValue)
newValue
- The horizontal position of the text relative to the icon,
one of the following values.
public void setIcon(ImageReference newValue)
newValue
- The default icon.public void setIconTextMargin(int newValue)
newValue
- The size of the margin between the icon and text, in
pixels.public void setModel(ButtonModel newValue)
newValue
- The new model for this button.public void setRolloverBackground(Color newValue)
newValue
- The rollover background.public void setRolloverEnabled(boolean newValue)
newValue
- True if rollovers should be enabled.public void setRolloverFont(Font newValue)
newValue
- The rollover font.public void setRolloverForeground(Color newValue)
newValue
- The rollover foreground.public void setRolloverIcon(ImageReference newValue)
newValue
- The rollover icon.public void setRolloverSelectedIcon(ImageReference newValue)
newValue
- The rollover selected icon.public void setSelected(boolean newValue)
newValue
- The new selection state of this button.public void setSelectedIcon(ImageReference newValue)
newValue
- The selected icon.public void setText(java.lang.String newValue)
newValue
- The text.public void setToolTipText(java.lang.String newValue)
ToolTipSupport
setToolTipText
in interface ToolTipSupport
newValue
- The new tool tip text.ToolTipSupport.setToolTipText(String)
public void setVerticalAlignment(int newValue)
newValue
- The vertical alignment of the text relative to the icon,
one of the following values:
public void setVerticalTextPosition(int newValue)
newValue
- The vertical position of the text relative to the icon,
one of the following values.
public boolean isNoTabStop()
public void setNoTabStop(boolean newValue)
public java.lang.String getCssClass()
public void setCssClass(java.lang.String cssClass)
public java.lang.String getCssClassDisabled()
public void setCssClassDisabled(java.lang.String cssClass)
public boolean isAsync()
public void setAsync(boolean async)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |