public class IlxWButton extends IlxWComponent
<input type="submit"> element.IlxWComponent.DynamicStyleMaplistenerList| Constructor and Description |
|---|
IlxWButton()
Constructs an empty button, with no text.
|
IlxWButton(java.lang.String text)
Constructs a button with the given caption.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addActionListener(java.awt.event.ActionListener listener)
Adds the specified action listener.
|
protected IlxWAction |
createDefaultAction()
Create the default action.
|
protected void |
doPrint(IlxWPort port) |
protected void |
fireActionPerformed()
Notifies all action listeners than an action has been triggered, using the text of the button as the name
of the event command.
|
IlxWAction |
getAction()
Gets the action which will be called when the user clicks on the
button.
|
java.lang.String |
getText()
Gets the text displayed in the button
|
boolean |
isEnabled()
Specifies whether the component is enabled or not.
|
protected void |
printComponent(IlxWPort port)
Prints the HTML code that will display the graphical
representation of this component.
|
void |
removeActionListener(java.awt.event.ActionListener listener)
Removes the specified action listener.
|
void |
setAction(IlxWAction action)
Sets the action which will be called when the user clicks on this button.
|
void |
setEnabled(boolean enabled)
Sets the component as enabled or disabled.
|
void |
setText(java.lang.String text)
Sets the text to display in the button.
|
addPropertyChangeListener, addPropertyChangeListener, detach, firePropertyChange, firePropertyChange, getName, getRealHtmlTagName, getStyle, invalidate, isInvalidated, notifyDependencies, print, removePropertyChangeListener, removePropertyChangeListener, setName, validateadd, add, getAttribute, getAttributeNames, getComponent, getComponentCount, getComponentNamed, getComponents, getManager, getParent, getUserAgentRules, indexOf, isAncestorOf, remove, remove, removeAll, removeAttribute, setAttribute, setAuthorRules, setFinalizerpublic IlxWButton()
public IlxWButton(java.lang.String text)
text - The text to display in the button.public void setText(java.lang.String text)
text - any stringpublic java.lang.String getText()
public void setEnabled(boolean enabled)
enabled - enabled flag valuepublic boolean isEnabled()
true if the button is enabled.public void setAction(IlxWAction action)
action - The action to perform when the user clicks on the button.getAction()public IlxWAction getAction()
By default, this action is a Java action (IlxWJavaAction)
of which the perform method calls
fireActionPerformed on the button.
setAction(ilog.webui.dhtml.components.IlxWAction)protected IlxWAction createDefaultAction()
perform
method simply calls fireActionPerformed.protected void doPrint(IlxWPort port) throws java.io.IOException
doPrint in class IlxWComponentjava.io.IOExceptionprotected void printComponent(IlxWPort port) throws java.io.IOException
IlxWComponentIlxWComponent.print(ilog.webui.dhtml.IlxWPort) method.printComponent in class IlxWComponentjava.io.IOExceptionport - The port on which the component will be printed.IlxWComponent.print(ilog.webui.dhtml.IlxWPort)public void addActionListener(java.awt.event.ActionListener listener)
listener - the action listenerpublic void removeActionListener(java.awt.event.ActionListener listener)
listener - the action listenerprotected void fireActionPerformed()
© Copyright IBM Corp. 1987, 2017