de.mguennewig.pobjform
Interface StringElement

All Superinterfaces:
FormElement, InputElement, ValueElement
All Known Implementing Classes:
HtmlStringElement, SwingStringElement

public interface StringElement
extends InputElement

Class description goes here.

Author:
Michael Günnewig

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
 
Method Summary
 int getMaxLength()
           
 MapItem[] getRestrictTo()
          Returns the current allowed set of values.
 int getSize()
           
 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 setMaxLength(int maxLength)
           
 void setRestrictTo(MapItem[] restrictTo)
          Sets the set of allowed values.
 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.
 
Methods inherited from interface de.mguennewig.pobjform.InputElement
addChangeListener, getInputEntry, getRenderAs, getType, getVisualString, isHiddenInput, isMandatory, isRightAligned, isVisible, removeChangeListener, setMandatory, setRenderAs, setRightAligned
 
Methods inherited from interface de.mguennewig.pobjform.ValueElement
getCurrentString, getInitialObject, getInitialString, getObject, setCurrentAsInitialState, setObject
 
Methods inherited from interface de.mguennewig.pobjform.FormElement
appendToList, getContainer, getEntry, getForm, getLabel, getProperty, getPullInPrefix, hasChanged, isPulledIn, omitRowHeader, setLabel, setProperty, setPullInPrefix, setVisible, startsNewCell, validate
 

Method Detail

getSize

int getSize()

setSize

void setSize(int size)

getMaxLength

int getMaxLength()

setMaxLength

void setMaxLength(int maxLength)

getRestrictTo

MapItem[] getRestrictTo()
Returns the current allowed set of values.


setRestrictTo

void setRestrictTo(MapItem[] restrictTo)
Sets the set of allowed values.

This only restricts the visual options by using a selection box with these values.


removeOption

boolean removeOption(java.lang.Object value)
Removes the given option from the current set of allowed values.

Returns:
true if the value has been found in the current set of allowed values and removed, otherwise false.
Throws:
java.lang.IllegalStateException - if no restriction is currently in place
See Also:
getRestrictTo(), setRestrictTo(MapItem[])

isStaticIfOneOption

boolean isStaticIfOneOption()
Tests whether the input element will be rendered as static if the number of non-null options is exactly one.

Throws:
java.lang.IllegalStateException - if no restriction is currently in place.
See Also:
setStaticIfOneOption(boolean)

setStaticIfOneOption

void setStaticIfOneOption(boolean staticIfOneOption)
Sets whether the input element will be rendered as static if the number on non-null options is exactly one.

Throws:
java.lang.IllegalStateException - if no restriction is currently in place.