|
EchoPoint API - 3.0.0b5 App Webcontainer |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnextapp.echo.app.Component
echopoint.internal.AbstractContainer
echopoint.PushButton
public class PushButton
A button component that by default appears like the system and browser
default. Style configuration allows it to appear more like a Button (although without supporting a background image).
The following code shows sample usage of this component.
import echopoint.PushButton;
...
final PushButton button = new PushButton( "Push Button" );
button.setToolTipText( "Push button to see effect." );
button.setWidth( 200 );
button.setActionCommand( "buttonClicked" );
button.addActionListener( ... );
final Column column = new Columnn();
column.add( button );
| Field Summary | |
|---|---|
static String |
PROPERTY_ACTION_COMMAND
The property for storing the action command associated with an action event for the image. |
static String |
PROPERTY_TEXT
The property for the text displayed in the button. |
static String |
PROPERTY_TOOL_TIP_TEXT
The property for the tooltip displayed when hovering over the button. |
| Fields inherited from class echopoint.internal.AbstractContainer |
|---|
ACTION_COMMAND_PROPERTY, ACTION_LISTENERS_CHANGED_PROPERTY, INPUT_ACTION, PROPERTY_ALIGNMENT, PROPERTY_BACKGROUND_IMAGE, PROPERTY_BORDER, PROPERTY_HEIGHT, PROPERTY_INSETS, PROPERTY_WIDTH |
| Constructor Summary | |
|---|---|
PushButton()
Default constructor. |
|
PushButton(String text)
Create a new button instance with the specified text. |
|
| Method Summary | |
|---|---|
void |
addActionListener(ActionListener listener)
Add the specified action listener to this component. |
String |
getActionCommand()
Return the value of PROPERTY_ACTION_COMMAND property. |
ImageReference |
getBackgroundImage()
Over-ridden to always return null since this component does not
support background images. |
String |
getText()
Return the value of PROPERTY_TEXT property used to display
text in the button. |
String |
getToolTipText()
Return the value of PROPERTY_TOOL_TIP_TEXT property used to display
text in the button. |
boolean |
isValidChild(Component component)
Always returns false since push button does not allow child
components. |
void |
processInput(String inputName,
Object inputValue)
|
void |
removeActionListener(ActionListener listener)
Remove the specified action listener from the component. |
void |
setActionCommand(String command)
Set the value of PROPERTY_ACTION_COMMAND property. |
void |
setBackgroundImage(ImageReference backgroundImage)
Over-ridden to not do anything since this component does not support background images. |
void |
setText(String command)
Set the value of PROPERTY_TEXT property. |
void |
setToolTipText(String command)
Set the value of PROPERTY_TOOL_TIP_TEXT property. |
| Methods inherited from class echopoint.internal.AbstractContainer |
|---|
fireActionPerformed, getAlignment, getBorder, getHeight, getInsets, getWidth, hasActionListeners, setAlignment, setBorder, setHeight, setInsets, setWidth |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String PROPERTY_ACTION_COMMAND
public static final String PROPERTY_TEXT
public static final String PROPERTY_TOOL_TIP_TEXT
| Constructor Detail |
|---|
public PushButton()
public PushButton(String text)
text - The text to display in the button.| Method Detail |
|---|
public String getActionCommand()
PROPERTY_ACTION_COMMAND property.
public void setActionCommand(String command)
PROPERTY_ACTION_COMMAND property.
command - The action command value to set.public String getText()
PROPERTY_TEXT property used to display
text in the button.
public void setText(String command)
PROPERTY_TEXT property.
command - The action command value to set.public String getToolTipText()
PROPERTY_TOOL_TIP_TEXT property used to display
text in the button.
public void setToolTipText(String command)
PROPERTY_TOOL_TIP_TEXT property.
command - The action command value to set.public ImageReference getBackgroundImage()
null since this component does not
support background images.
getBackgroundImage in class AbstractContainernull.public void setBackgroundImage(ImageReference backgroundImage)
setBackgroundImage in class AbstractContainerbackgroundImage - The backgroundImage style to apply.public boolean isValidChild(Component component)
false since push button does not allow child
components.
isValidChild in class Componentcomponent - The component to check.
false.public void addActionListener(ActionListener listener)
addActionListener in class AbstractContainerlistener - The action listener to add.Component.firePropertyChange(String, Object, Object)public void removeActionListener(ActionListener listener)
removeActionListener in class AbstractContainerlistener - The listener that is to be removed.Component.firePropertyChange(String, Object, Object)
public void processInput(String inputName,
Object inputValue)
processInput in class Component
|
EchoPoint API - 3.0.0b5 App Webcontainer |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||