|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectde.mguennewig.pobjform.AbstractFormElement
de.mguennewig.pobjform.AbstractValueElement
de.mguennewig.pobjform.AbstractInputElement
de.mguennewig.pobjform.swing.SwingInputElement
de.mguennewig.pobjform.swing.SwingStringElement
public class SwingStringElement
Class description goes here.
| Field Summary |
|---|
| Fields inherited from interface de.mguennewig.pobjform.InputElement |
|---|
MAX_INPUT_SIZE, RENDER_AS_DISABLED, RENDER_AS_HIDDEN, RENDER_AS_HIDDEN_WITH_LABEL, RENDER_AS_INPUT, RENDER_AS_TEXT |
| Constructor Summary | |
|---|---|
SwingStringElement(PObjSwingForm form,
InputEntry entry)
Creates a new SwingStringElement. |
|
| Method Summary | |
|---|---|
void |
actionPerformed(java.awt.event.ActionEvent e)
|
javax.swing.JComponent |
getComponent()
Returns the Swing component for the input element. |
java.lang.String |
getCurrentString()
Returns the string representation of the current object. |
int |
getMaxLength()
|
java.lang.Object |
getObject()
Returns the current object. |
MapItem[] |
getRestrictTo()
Returns the current allowed set of values. |
int |
getSize()
|
java.lang.String |
getVisualString()
Returns the human readable textual representation of the current value. |
boolean |
isEditable()
|
boolean |
isStaticIfOneOption()
Tests whether the input element will be rendered as static if the number of non-null options is exactly one. |
boolean |
removeOption(java.lang.Object value)
Removes the given option from the current set of allowed values. |
void |
setEditable(boolean editable)
|
void |
setMaxLength(int maxLength)
|
void |
setObject(java.lang.Object obj)
Sets the current object to the new value. |
void |
setProperty(java.lang.String property)
Sets the property to a new value, and propagates the change to all child elements. |
void |
setRestrictTo(MapItem[] restrictTo)
Sets the set of allowed values. |
void |
setRightAligned(boolean rightAligned)
Sets whether the data should be right aligned. |
void |
setSize(int size)
|
void |
setStaticIfOneOption(boolean staticIfOneOption)
Sets whether the input element will be rendered as static if the number on non-null options is exactly one. |
void |
setVisualString(java.lang.String visual)
|
| Methods inherited from class de.mguennewig.pobjform.swing.SwingInputElement |
|---|
getErrorComponent, getInitialObject, getInitialString, getLabelComponent, hasChanged, setCurrentAsInitialState, setInitialString, setLabel, setRenderAs, updateErrorComponent |
| Methods inherited from class de.mguennewig.pobjform.AbstractInputElement |
|---|
addChangeListener, getChangeListeners, getInputEntry, getRenderAs, getType, isHiddenInput, isMandatory, isRightAligned, isVisible, removeChangeListener, setMandatory, setVisible, validate |
| Methods inherited from class de.mguennewig.pobjform.AbstractFormElement |
|---|
appendToList, getContainer, getEntry, getForm, getLabel, getProperty, getPullInPrefix, isPulledIn, omitRowHeader, setPullInPrefix, startsNewCell |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface de.mguennewig.pobjform.InputElement |
|---|
addChangeListener, getInputEntry, getRenderAs, getType, isHiddenInput, isMandatory, isRightAligned, isVisible, removeChangeListener, setMandatory, setRenderAs |
| Methods inherited from interface de.mguennewig.pobjform.ValueElement |
|---|
getInitialObject, getInitialString, setCurrentAsInitialState |
| Methods inherited from interface de.mguennewig.pobjform.FormElement |
|---|
appendToList, getContainer, getEntry, getForm, getLabel, getProperty, getPullInPrefix, hasChanged, isPulledIn, omitRowHeader, setLabel, setPullInPrefix, setVisible, startsNewCell, validate |
| Constructor Detail |
|---|
public SwingStringElement(PObjSwingForm form,
InputEntry entry)
| Method Detail |
|---|
public void setProperty(java.lang.String property)
setProperty in interface FormElementsetProperty in class AbstractFormElementpublic void setRightAligned(boolean rightAligned)
setRightAligned in interface InputElementsetRightAligned in class AbstractInputElementpublic java.lang.Object getObject()
getObject in interface ValueElementgetObject in class AbstractInputElementpublic final void setObject(java.lang.Object obj)
setObject in interface ValueElementsetObject in class AbstractInputElementpublic final java.lang.String getCurrentString()
ValueElement
getCurrentString in interface ValueElementpublic java.lang.String getVisualString()
This is the value used to write the current value into the UI element.
It is never null.
getVisualString in interface InputElementgetVisualString in class AbstractInputElementpublic void setVisualString(java.lang.String visual)
public final int getSize()
getSize in interface StringElementpublic void setSize(int size)
setSize in interface StringElementpublic final int getMaxLength()
getMaxLength in interface StringElementpublic void setMaxLength(int maxLength)
setMaxLength in interface StringElementpublic final MapItem[] getRestrictTo()
StringElement
getRestrictTo in interface StringElementpublic void setRestrictTo(MapItem[] restrictTo)
StringElementThis only restricts the visual options by using a selection box with these values.
setRestrictTo in interface StringElementpublic boolean removeOption(java.lang.Object value)
removeOption in interface StringElementtrue if the value has been found in the current set
of allowed values and removed, otherwise false.StringElement.getRestrictTo(),
StringElement.setRestrictTo(MapItem[])public final boolean isEditable()
public void setEditable(boolean editable)
public javax.swing.JComponent getComponent()
SwingFormElement
getComponent in interface SwingFormElementpublic final boolean isStaticIfOneOption()
isStaticIfOneOption in interface StringElementStringElement.setStaticIfOneOption(boolean)public void setStaticIfOneOption(boolean staticIfOneOption)
setStaticIfOneOption in interface StringElementpublic void actionPerformed(java.awt.event.ActionEvent e)
actionPerformed in interface java.awt.event.ActionListener
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||