public class MustTextField extends MustInputField implements ActionInterpreter
Modifier and Type | Field and Description |
---|---|
protected java.lang.String |
additionalTagFragments |
protected boolean |
capitalization |
protected java.lang.String |
className |
protected ContentChangeListener |
contentChangeListener |
protected boolean |
controlLength |
protected java.lang.String |
enterAction |
protected static int |
maxColumns |
protected int |
maxlength |
protected boolean |
registerFlag |
protected boolean |
required |
protected int |
size |
context, editable, enabled, lastEditability, lastVisibility, name, nonstandardPanel, nonstandardPosition, sessionData, toolTipText, visible
Constructor and Description |
---|
MustTextField(SessionData sessionData)
Constructs a new text field with a default length of 20 characters.
|
MustTextField(SessionData sessionData,
int length)
Constructs a new text field with the length as specified.
|
MustTextField(SessionData sessionData,
int size,
int maxlength)
Constructs a new text field with the specified size and max length.
|
MustTextField(SessionData sessionData,
int size,
int maxlength,
boolean controlLength)
Constructs a new text field with length, max chars and length control as specified.
|
Modifier and Type | Method and Description |
---|---|
void |
addContentChangeListener(ContentChangeListener l)
Sets the contentChangeListener - package private, access via e.g.
|
protected void |
addMoreCreationAspects(ToAppletWriter out)
Override to add more creation aspects in inherited class.
|
void |
buildRemoteView(ToAppletWriter out)
Build remote view.
|
void |
fetchValuesFromRequest(GeneralizedRequest request)
Causes the component to read user input by calling request.getParameter and
update the internal mirrored value.
|
java.lang.String |
getApplication() |
protected java.lang.String |
getCreateTagElement() |
java.lang.String |
getText()
Return the text of the text field.
|
java.lang.String |
getTextOrNullIfEmpty()
Return the text of the field or null if the text field is empty or
contains spaces only.
|
boolean |
hasFocus() |
boolean |
isFilled() |
boolean |
isModified()
Indicates whether the component's value differs from its initial value.
|
boolean |
isRequirementUnfulfilled()
Returns true if the component's value is mandatory but not filled.
|
boolean |
isValid()
Returns true the text field is valid.
|
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 |
setApplication(java.lang.String application) |
void |
setCapitalization(boolean capitalization) |
void |
setColumns(int columns)
Sets the number of columns.
|
void |
setEditable(boolean editable)
Sets the specified boolean to indicate whether or not this component
should be editable.
|
void |
setEnterAction(java.lang.String enterAction) |
void |
setOnChoice(java.lang.String table,
java.lang.String column) |
void |
setRegisterFlag(boolean registerFlag)
Sets the flag that this field is to be registered by id.
|
void |
setRequired(boolean required)
Sets the fact that user input is requested (mandatory)
|
void |
setText(java.lang.String newText)
Sets the text.
|
void |
setTextAsUserInput(java.lang.String newText)
Sets the text as if it was entered by user to force modified flag for data saving.
|
void |
setValues(ToAppletWriter out) |
destroy
beginAction, endAction, free, getContext, getName, getTranslation, isEnabled, isVisible, register, requestFocusInWindow, resetLastStatus, selectAll, setEnabled, setToolTipText, setVisible
protected static final int maxColumns
protected java.lang.String className
protected java.lang.String additionalTagFragments
protected int size
protected int maxlength
protected boolean controlLength
protected boolean capitalization
protected boolean required
protected boolean registerFlag
protected ContentChangeListener contentChangeListener
protected java.lang.String enterAction
public MustTextField(SessionData sessionData)
public MustTextField(SessionData sessionData, int length)
sessionData
- session datalength
- the length of the text fieldpublic MustTextField(SessionData sessionData, int size, int maxlength)
size
- rendering relevant size of the text fieldmaxlength
- input control relevant max length of the text fieldpublic MustTextField(SessionData sessionData, int size, int maxlength, boolean controlLength)
sessionData
- session datasize
- the length (size) of the text fieldmaxlength
- the max characters to be insertedcontrolLength
- if true, characters are removed, if they exceed the
max char specification abovepublic void setApplication(java.lang.String application)
public java.lang.String getApplication()
public void setRegisterFlag(boolean registerFlag)
registerFlag
- whether or not this field is to be registered by idpublic void setCapitalization(boolean capitalization)
public void setEditable(boolean editable)
setEditable
in class RemoteElement
editable
- indicates whether or not this component is editable#setEditableForUserTyping
public void setColumns(int columns)
columns
- the number of columns >= 0public void setEnterAction(java.lang.String enterAction)
public void setOnChoice(java.lang.String table, java.lang.String column)
public void addContentChangeListener(ContentChangeListener l)
UniversalCenterGUI.addContentChangeListener(MustTextField, de.must.util.Callback)
(package private)l
- the listener for content changepublic void fetchValuesFromRequest(GeneralizedRequest request)
fetchValuesFromRequest
in interface Remotable
request
- the current requestpublic boolean hasFocus()
public java.lang.String getText()
public java.lang.String getTextOrNullIfEmpty()
public void setText(java.lang.String newText)
newText
- the new textpublic void setTextAsUserInput(java.lang.String newText)
newText
- the new textpublic void setRequired(boolean required)
required
- whether this input is mandatory or not.public void buildRemoteView(ToAppletWriter out)
AppletTalker
buildRemoteView
in interface AppletTalker
buildRemoteView
in class RemoteElement
out
- the writer which will be read by the appletprotected void addMoreCreationAspects(ToAppletWriter out)
protected java.lang.String getCreateTagElement()
public void setValues(ToAppletWriter out)
setValues
in interface RemoteContent
setValues
in class RemoteElement
public boolean isFilled()
public boolean isValid()
public boolean isRequirementUnfulfilled()
public boolean isModified()
public boolean perform(java.lang.String action)
ActionInterpreter
perform
in interface ActionInterpreter
action
- the action to performCopyright 1998-2023 Christoph Mueller, Kaerntner Str. 56, D-70469 Stuttgart, Germany, https://www.perpus.de