|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.wings.SComponent
org.wings.SAbstractIconTextCompound
org.wings.SAbstractButton
public abstract class SAbstractButton
Base class for components with button functionality, ie. the need to handle ActionListener notification.
| Field Summary | |
|---|---|
protected String |
actionCommand
|
static String |
CHECKBOX
|
static String |
IMAGE_BUTTON
|
static String |
RADIOBUTTON
|
static String |
RESET_BUTTON
|
static String |
SUBMIT_BUTTON
|
| Fields inherited from class org.wings.SAbstractIconTextCompound |
|---|
changeEvent, changeListener, DISABLED_ICON, DISABLED_SELECTED_ICON, ENABLED_ICON, ICON_COUNT, PRESSED_ICON, ROLLOVER_ICON, ROLLOVER_SELECTED_ICON, SELECTED_ICON, SELECTOR_SELECTED |
| Fields inherited from class org.wings.SComponent |
|---|
DONE_RENDERING, dynamicStyles, enabled, propertyChangeSupport, SELECTOR_ALL, START_RENDERING, visible, WHEN_FOCUSED_OR_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_IN_FOCUSED_FRAME |
| Constructor Summary | |
|---|---|
SAbstractButton()
Creates a new submit button |
|
SAbstractButton(Action action)
|
|
SAbstractButton(String text)
Create a button with given text. |
|
SAbstractButton(String text,
String type)
Creates a new Button with the given Text and the given Type. |
|
| Method Summary | |
|---|---|
void |
addActionListener(ActionListener listener)
Adds an ActionListener to the button. |
protected void |
configurePropertiesFromAction(Action a)
|
protected PropertyChangeListener |
createActionPropertyChangeListener(Action a)
|
void |
doClick()
Simulates an click on the Button |
protected void |
fireActionPerformed(ActionEvent event)
Fire an ActionEvent at each registered listener. |
void |
fireFinalEvents()
Internal event trigger used by CGs. |
void |
fireIntermediateEvents()
fire events which describes a "in progress" state change, like TreeWillExpand, or ListSelectionEvent with getIsAdjusting() true, ... |
Action |
getAction()
Returns the action for this ActionEvent source, or null
if no Action is set. |
String |
getActionCommand()
Returns the action command for this button. |
ActionListener[] |
getActionListeners()
Returns an array of all the ActionListeners added
to this AbstractButton with addActionListener(). |
String |
getDeselectionParameter()
|
String |
getEventTarget()
|
SButtonGroup |
getGroup()
Return the Button group where this button lies in |
String |
getMnemonic()
|
String |
getSelectionParameter()
|
String |
getToggleSelectionParameter()
|
String |
getType()
Delifers the Button Type |
boolean |
isEpochCheckEnabled()
Asks the low-level event listener if epoch checking should be perfomed on it. |
boolean |
isWordWrap()
Determiens if the label text word wrap inside the browser. |
protected boolean |
parseSelectionToggle(String toggleParameter)
|
void |
processLowLevelEvent(String action,
String[] values)
Deliver low level/http events (parameters). |
void |
removeActionListener(ActionListener listener)
Removes the supplied Listener from the listener list |
void |
setAction(Action a)
Sets the action for the ActionEvent source. |
void |
setActionCommand(String ac)
Sets the action command for this button. |
void |
setCG(ButtonCG cg)
|
void |
setEpochCheckEnabled(boolean epochCheckEnabled)
|
void |
setEventTarget(String target)
|
protected void |
setGroup(SButtonGroup g)
Add this button to a button group. |
void |
setMnemonic(String mnemonic)
|
protected void |
setParentFrame(SFrame f)
Sets the parent frame. |
void |
setSelected(boolean b)
Sets the state of the button. |
void |
setType(String t)
Sets the button type. |
void |
setWordWrap(boolean wordWrap)
Defines if the label is allowed to wrap. |
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface org.wings.LowLevelEventListener |
|---|
getLowLevelEventId, getName, isEnabled |
| Field Detail |
|---|
public static final String SUBMIT_BUTTON
public static final String RESET_BUTTON
public static final String IMAGE_BUTTON
public static final String CHECKBOX
public static final String RADIOBUTTON
protected String actionCommand
| Constructor Detail |
|---|
public SAbstractButton(String text)
text - the button textpublic SAbstractButton(Action action)
public SAbstractButton(String text,
String type)
text - the button texttype - the button typesetType(java.lang.String)public SAbstractButton()
| Method Detail |
|---|
public void setActionCommand(String ac)
ac - the action command for this buttonpublic final String getActionCommand()
public final SButtonGroup getGroup()
protected void setParentFrame(SFrame f)
SComponent
setParentFrame in class SComponentf - the frameprotected void setGroup(SButtonGroup g)
public void addActionListener(ActionListener listener)
listener - the ActionListener to be addedpublic void removeActionListener(ActionListener listener)
public ActionListener[] getActionListeners()
ActionListeners added
to this AbstractButton with addActionListener().
ActionListeners added or an empty
array if no listeners have been addedprotected void fireActionPerformed(ActionEvent event)
event - supplied ActionEventpublic void setType(String t)
public final String getType()
public void doClick()
public void setSelected(boolean b)
setSelected in class SAbstractIconTextCompoundb - true if the button is selected, otherwise false
public void processLowLevelEvent(String action,
String[] values)
LowLevelEventListener
processLowLevelEvent in interface LowLevelEventListenerprocessLowLevelEvent in class SComponentaction - the name-value-pair's namevalues - the name-value-pair's valuespublic void fireIntermediateEvents()
LowLevelEventListener
fireIntermediateEvents in interface LowLevelEventListenerfireIntermediateEvents in class SAbstractIconTextCompoundpublic void fireFinalEvents()
SComponent
fireFinalEvents in interface LowLevelEventListenerfireFinalEvents in class SAbstractIconTextCompoundpublic final String getEventTarget()
public void setEventTarget(String target)
protected boolean parseSelectionToggle(String toggleParameter)
public String getToggleSelectionParameter()
public String getSelectionParameter()
public String getDeselectionParameter()
public void setAction(Action a)
a - the Action for the AbstractButton,public Action getAction()
null
if no Action is set.
Action for this ActionEvent
source, or nullpublic void setCG(ButtonCG cg)
protected void configurePropertiesFromAction(Action a)
protected PropertyChangeListener createActionPropertyChangeListener(Action a)
public void setMnemonic(String mnemonic)
public String getMnemonic()
public boolean isEpochCheckEnabled()
LowLevelEventListenertrue the Dispatcher will ignore request originating from old views
(typically iniated by triggering browser back and clicking somewhere.)
isEpochCheckEnabled in interface LowLevelEventListenertrue if epoch checking should be perfomed, false
if all request for this component should be processed.LowLevelEventListener.isEpochCheckEnabled()public void setEpochCheckEnabled(boolean epochCheckEnabled)
LowLevelEventListener.isEpochCheckEnabled()public boolean isWordWrap()
false (Swing).
false if the label should not word wrap an be in line as in Swing.public void setWordWrap(boolean wordWrap)
wordWrap - Set to true if you want labels to allow to break into more lines than passed.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||