public class MustButton extends java.lang.Object implements Remotable, AppearanceModifiable, ActionInterpreter
Modifier and Type | Field and Description |
---|---|
protected java.lang.String |
actionID |
protected java.lang.String |
imageName |
protected java.lang.String |
label |
protected int |
listDependenceType |
protected java.lang.String |
todoAction |
protected java.lang.String |
toolTipText |
protected int |
type |
static int |
TYPE_BOTTOM |
static int |
TYPE_IN_SEQUENCE |
Constructor and Description |
---|
MustButton(java.lang.String label)
Constructs a new button.
|
MustButton(java.lang.String label,
int type)
Constructs a new button.
|
MustButton(java.lang.String imageName,
java.lang.String fallbackLabel) |
MustButton(java.lang.String imageName,
java.lang.String fallbackLabel,
int type) |
Modifier and Type | Method and Description |
---|---|
void |
addActionListener(java.awt.event.ActionListener l)
Sets the action listener (unique).
|
void |
buildRemoteView(ToAppletWriter out)
Build remote view.
|
void |
destroy()
Don't wait until garbage collector removed weak reference.
|
void |
fetchValuesFromRequest(GeneralizedRequest request) |
java.lang.String |
getActionID() |
static java.lang.String |
getNextActionId() |
int |
getType() |
boolean |
isEnabled()
Determines whether this button is enabled.
|
boolean |
perform(java.lang.String action)
Performs this action if the passed action ID is equal to the action ID
of the class that implements this interface.
|
void |
performAction() |
void |
sendModifiedAppearanceTo(ToAppletWriter out) |
void |
setEnabled(boolean enabled)
Enables or disables this button - to be used via
setEnabled(boolean, Vector) only
Thus, it is guaranteed responsibility to send modified state to the applet. |
void |
setEnabled(boolean enabled,
java.util.Vector<AppearanceModifiable> appearanceControlPool)
Enables or disables this button, depending on the value of the
parameter
enabled . |
void |
setListDependenceType(int newListDependenceType) |
void |
setText(java.lang.String text)
Sets the button's text.
|
void |
setToolTipText(java.lang.String toolTipText)
Sets the component's tool tip text.
|
void |
setVisible(boolean visible)
Sets the visibility of the component.
|
public static final int TYPE_IN_SEQUENCE
public static final int TYPE_BOTTOM
protected int type
protected java.lang.String todoAction
protected int listDependenceType
protected java.lang.String imageName
protected java.lang.String label
protected java.lang.String actionID
protected java.lang.String toolTipText
public MustButton(java.lang.String label)
label
- the label to be seen by the userpublic MustButton(java.lang.String label, int type)
label
- the label to be seen by the userpublic MustButton(java.lang.String imageName, java.lang.String fallbackLabel)
public MustButton(java.lang.String imageName, java.lang.String fallbackLabel, int type)
public static java.lang.String getNextActionId()
public void setListDependenceType(int newListDependenceType)
newListDependenceType
- ApplConstStd.LIST_DEPENDENCE_WITHOUT
,
ApplConstStd.LIST_DEPENDENCE_ACTIVE_SINGLE_SELECTION_ONLY
,
ApplConstStd.LIST_DEPENDENCE_ACTIVE_MULTIPLE_SELECTION
public void addActionListener(java.awt.event.ActionListener l)
l
- the listener for actionspublic void setText(java.lang.String text)
text
- the text (label) of the buttonpublic java.lang.String getActionID()
public int getType()
public boolean isEnabled()
setEnabled
method.true
if the button is enabled;
false
otherwise.setEnabled(boolean)
public void setEnabled(boolean enabled)
setEnabled(boolean, Vector)
only
Thus, it is guaranteed responsibility to send modified state to the applet.enabled
- If true
, this button is enabled;
otherwise this button is disabled.public void setEnabled(boolean enabled, java.util.Vector<AppearanceModifiable> appearanceControlPool)
enabled
. An enabled button can respond to user
input and generate events. Components are enabled initially by default.enabled
- If true
, this button is enabled;
otherwise this button is disabled.appearanceControlPool
- the pool to control change of appearance to send
the modified state to the appletpublic void setVisible(boolean visible)
visible
- whether or not the component should be visiblepublic void buildRemoteView(ToAppletWriter out)
AppletTalker
buildRemoteView
in interface AppletTalker
out
- the writer which will be read by the appletpublic void sendModifiedAppearanceTo(ToAppletWriter out)
sendModifiedAppearanceTo
in interface AppearanceModifiable
public void fetchValuesFromRequest(GeneralizedRequest request)
fetchValuesFromRequest
in interface Remotable
public void setToolTipText(java.lang.String toolTipText)
Remotable
setToolTipText
in interface Remotable
toolTipText
- the component's tool tip textpublic boolean perform(java.lang.String action)
ActionInterpreter
perform
in interface ActionInterpreter
action
- the action to performpublic void performAction()
Copyright 1998-2023 Christoph Mueller, Kaerntner Str. 56, D-70469 Stuttgart, Germany, https://www.perpus.de