|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.pivot.wtk.Component
org.apache.pivot.wtk.Container
org.apache.pivot.wtk.Form
public class Form
A container that arranges field components in a form layout. Each field has an optional text label associated with it and may be flagged as requiring attention using one of several flag types and an optional flag message (for use during form validation, for example).
Nested Class Summary | |
---|---|
static class |
Form.Flag
Represents an message alert associated with a form field. |
static class |
Form.Section
Class representing a form section. |
class |
Form.SectionSequence
Section sequence implementation. |
Nested classes/interfaces inherited from class org.apache.pivot.wtk.Component |
---|
Component.DecoratorSequence, Component.StyleDictionary, Component.UserDataDictionary |
Nested classes/interfaces inherited from interface org.apache.pivot.collections.Sequence |
---|
Sequence.Tree<T> |
Constructor Summary | |
---|---|
Form()
Creates a new form. |
Method Summary | |
---|---|
static Form.Flag |
getFlag(Component component)
|
int |
getFlaggedFieldCount(MessageType messageType)
Returns the number of fields that are flagged with a given flag type. |
ListenerList<FormAttributeListener> |
getFormAttributeListeners()
Returns the form attribute listener list. |
ListenerList<FormListener> |
getFormListeners()
Returns the form listener list. |
static String |
getLabel(Component component)
|
static Form.Section |
getSection(Component component)
|
Form.SectionSequence |
getSections()
Returns the form's field sequence. |
static boolean |
isRequired(Component component)
|
Sequence<Component> |
remove(int index,
int count)
Removes one or more items from the sequence. |
void |
scrollFirstFlagToVisible(MessageType messageType)
Ensures that the first field with the given flag type is visible. |
static void |
setFlag(Component component,
Form.Flag flag)
|
static void |
setFlag(Component component,
String flag)
|
static void |
setLabel(Component component,
String label)
|
static void |
setRequired(Component component,
boolean required)
|
Methods inherited from class org.apache.pivot.wtk.Container |
---|
add, clear, containsFocus, descendantAdded, descendantGainedFocus, descendantLostFocus, descendantRemoved, get, getComponentAt, getContainerListeners, getContainerMouseListeners, getDescendantAt, getFocusTraversalPolicy, getLength, indexOf, insert, isAncestor, iterator, layout, load, mouseClick, mouseDown, mouseMove, mouseOut, mouseUp, mouseWheel, move, paint, remove, removeAll, requestFocus, setFocusTraversalPolicy, setParent, setVisible, store, transferFocus, update |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public Form()
Method Detail |
---|
public Form.SectionSequence getSections()
public int getFlaggedFieldCount(MessageType messageType)
messageType
- The message type to count, or null to return the count of all
flagged fields regardless of message type.public void scrollFirstFlagToVisible(MessageType messageType)
messageType
- The message type, or null to scroll the first flag of any
type to visible.public Sequence<Component> remove(int index, int count)
Sequence
remove
in interface Sequence<Component>
remove
in class Container
index
- The starting index to remove.count
- The number of items to remove, beginning with index.
public ListenerList<FormListener> getFormListeners()
public ListenerList<FormAttributeListener> getFormAttributeListeners()
public static Form.Section getSection(Component component)
public static String getLabel(Component component)
public static void setLabel(Component component, String label)
public static boolean isRequired(Component component)
public static void setRequired(Component component, boolean required)
public static Form.Flag getFlag(Component component)
public static void setFlag(Component component, Form.Flag flag)
public static final void setFlag(Component component, String flag)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |