|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.google.gwt.user.client.ui.UIObject
com.google.gwt.user.client.ui.Widget
com.extjs.gxt.ui.client.widget.Component
com.extjs.gxt.ui.client.widget.BoxComponent
com.extjs.gxt.ui.client.widget.Container<T>
com.extjs.gxt.ui.client.widget.ScrollContainer<Component>
com.extjs.gxt.ui.client.widget.LayoutContainer
com.extjs.gxt.ui.client.widget.ContentPanel
com.extjs.gxt.ui.client.widget.form.FormPanel
public class FormPanel
A panel for displaying form widgets. By default, FormPanel uses a FormLayout,
but this may be overridden when using nested layouts. See FormLayout
for more documentation.
BaseEvent.setCancelled(boolean)
.
Nested Class Summary | |
---|---|
static class |
FormPanel.Encoding
Form encoding enumeration. |
static class |
FormPanel.LabelAlign
Label alignment enumeration. |
static class |
FormPanel.Method
Form method enumeration. |
Nested classes/interfaces inherited from class com.google.gwt.user.client.ui.UIObject |
---|
com.google.gwt.user.client.ui.UIObject.DebugIdImpl, com.google.gwt.user.client.ui.UIObject.DebugIdImplEnabled |
Field Summary |
---|
Fields inherited from class com.extjs.gxt.ui.client.widget.ContentPanel |
---|
bbarStyle, bodStyle, body, bwrap, bwrapStyle, collapseStyle, fbar, footerStyle, frame, head, headerStyle, headerTextStyle, tbarStyle |
Fields inherited from class com.extjs.gxt.ui.client.widget.Container |
---|
attachChildren, enableLayout, layoutExecuted, layoutNeeded, layoutOnAttach, layoutOnChange |
Fields inherited from class com.extjs.gxt.ui.client.widget.BoxComponent |
---|
adjustSize, cacheSizes, ensureVisibilityOnSizing, height, lastSize, layer, shim, width |
Fields inherited from class com.extjs.gxt.ui.client.widget.Component |
---|
afterRender, attachables, baseStyle, disabled, disabledStyle, disableTextSelection, dummy, focusable, hidden, mask, maskMessage, maskMessageStyleName, monitorWindowResize, rendered, resizeHandler, setElementRender, stateId, swallowEvents, toolTip, windowResizeDelay, windowResizeTask |
Fields inherited from class com.google.gwt.user.client.ui.UIObject |
---|
DEBUG_ID_PREFIX |
Constructor Summary | |
---|---|
FormPanel()
Creates a new form panel. |
Method Summary | |
---|---|
protected Size |
adjustBodySize()
|
void |
clear()
Clears all values from all fields. |
void |
clearDirtyFields()
Resets the dirty state for all fields by setting the original value to be equal to the current value. |
java.lang.String |
getAction()
Returns the form's action. |
FormPanel.Encoding |
getEncoding()
Returns the encoding. |
java.util.List<Field<?>> |
getFields()
Returns all of the panel's child fields. |
int |
getFieldWidth()
Returns the field width. |
boolean |
getHideLabels()
Returns true if labels are being hidden. |
FormPanel.LabelAlign |
getLabelAlign()
Returns the label alignment. |
java.lang.String |
getLabelSeparator()
Returns the label separator. |
int |
getLabelWidth()
Returns the default width. |
El |
getLayoutTarget()
Override this method to specify the element to be used by the layout as the container. |
FormPanel.Method |
getMethod()
Returns the form's method. |
int |
getPadding()
Returns the panel's padding. |
java.lang.String |
getTarget()
Gets the form's "target". |
boolean |
isDirty()
Returns true if any of the form's fields are dirty. |
boolean |
isValid()
Returns true if the form is invalid. |
boolean |
isValid(boolean preventMark)
Returns the form's valid state by querying all child fields. |
protected void |
onAttach()
|
protected void |
onDetach()
|
boolean |
onFormSubmit()
|
void |
onFrameLoad()
|
protected void |
onRender(com.google.gwt.user.client.Element target,
int index)
Subclasses must override and ensure setElement is called for lazy rendered components. |
void |
reset()
Resets all field values. |
void |
setAction(java.lang.String url)
Sets the action of the form. |
void |
setEncoding(FormPanel.Encoding encoding)
Sets the encoding used for submitting this form. |
void |
setFieldWidth(int fieldWidth)
Sets the default field width (defaults to 210). |
void |
setHideLabels(boolean hideLabels)
True to hide field labels by default (defaults to false). |
void |
setLabelAlign(FormPanel.LabelAlign align)
Sets the label alignment. |
void |
setLabelSeparator(java.lang.String labelSeparator)
Sets the label separator (defaults to ':'). |
void |
setLabelWidth(int labelWidth)
Sets the default label width. |
void |
setMethod(FormPanel.Method method)
Specifies if the form will be submitted using an HTTP Post or Get request (defaults to GET). |
void |
setPadding(int padding)
Sets the padding to be applied to the FormPanel body (defaults to 10). |
void |
setReadOnly(boolean readOnly)
Sets all of the panel's fields read only state. |
void |
submit()
Submits the form. |
Methods inherited from class com.extjs.gxt.ui.client.widget.LayoutContainer |
---|
add, add, addText, findComponent, getLayout, getWindowResizeDelay, insert, insert, isLayoutOnChange, isMonitorWindowResize, layout, layout, onBlur, onFocus, remove, removeAll, setLayout, setLayoutData, setLayoutOnChange, setMonitorWindowResize, setWindowResizeDelay |
Methods inherited from class com.extjs.gxt.ui.client.widget.ScrollContainer |
---|
addScrollListener, afterRender, getHScrollPosition, getScrollMode, getVScrollPosition, removeScrollListener, scrollIntoView, setHScrollPosition, setScrollMode, setVScrollPosition |
Methods inherited from class com.extjs.gxt.ui.client.widget.Container |
---|
add, adjustIndex, adopt, createContainerEvent, disable, doLayout, doLayout, enable, findItem, getItem, getItemByItemId, getItemCount, getItems, getWidget, indexOf, insert, isLayoutNeeded, iterator, onAfterLayout, onBeforeLayoutExcecuted, onInsert, onLayoutExcecuted, onRemove, orphan, remove, removeAll, scrollIntoView, setLayoutNeeded, wrapWidget |
Methods inherited from class com.extjs.gxt.ui.client.widget.BoxComponent |
---|
adjustPosition, adjustSize, createComponentEvent, getBounds, getHeight, getHeight, getPosition, getPositionEl, getResizeEl, getShadow, getShadowOffset, getShadowPosition, getSize, getWidth, getWidth, hideShadow, hideShim, hideUnders, isAutoHeight, isAutoWidth, isDeferHeight, isShim, onHide, onPosition, onShow, onUnload, setAutoHeight, setAutoWidth, setBounds, setBounds, setDeferHeight, setHeight, setHeight, setPagePosition, setPagePosition, setPixelSize, setPosition, setShadow, setShadowOffset, setShadowPosition, setShim, setSize, setSize, setWidth, setWidth, sync, syncSize |
Methods inherited from class com.google.gwt.user.client.ui.Widget |
---|
addAttachHandler, addBitlessDomHandler, addDomHandler, addHandler, asWidget, asWidgetOrNull, createHandlerManager, delegateEvent, fireEvent, getHandlerCount, getLayoutData, getParent, isAttached, isOrWasAttached, setLayoutData |
Methods inherited from class com.google.gwt.user.client.ui.UIObject |
---|
addStyleDependentName, ensureDebugId, ensureDebugId, ensureDebugId, getAbsoluteLeft, getAbsoluteTop, getOffsetHeight, getOffsetWidth, getStyleElement, getStyleName, getStyleName, getStylePrimaryName, getStylePrimaryName, isVisible, removeStyleDependentName, setElement, setStyleDependentName, setStyleName, setStyleName, setStyleName, setStylePrimaryName, setStylePrimaryName, setVisible, sinkBitlessEvent, unsinkEvents |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public FormPanel()
Method Detail |
---|
public void clear()
public void clearDirtyFields()
public void reset()
public java.lang.String getAction()
public FormPanel.Encoding getEncoding()
public java.util.List<Field<?>> getFields()
public int getFieldWidth()
public boolean getHideLabels()
public FormPanel.LabelAlign getLabelAlign()
public java.lang.String getLabelSeparator()
public int getLabelWidth()
public El getLayoutTarget()
LayoutContainer
getLayoutTarget
in class ContentPanel
public FormPanel.Method getMethod()
public int getPadding()
public java.lang.String getTarget()
public boolean isDirty()
public boolean isValid()
public boolean isValid(boolean preventMark)
preventMark
- true for silent validation (no invalid event and field
is not marked invalid)
public boolean onFormSubmit()
onFormSubmit
in interface com.google.gwt.user.client.ui.impl.FormPanelImplHost
public void onFrameLoad()
onFrameLoad
in interface com.google.gwt.user.client.ui.impl.FormPanelImplHost
public void setAction(java.lang.String url)
url
- the actionpublic void setEncoding(FormPanel.Encoding encoding)
encoding
- the encodingpublic void setFieldWidth(int fieldWidth)
fieldWidth
- the field widthpublic void setHideLabels(boolean hideLabels)
hideLabels
- true to hide labelspublic void setLabelAlign(FormPanel.LabelAlign align)
align
- the alignmentpublic void setLabelSeparator(java.lang.String labelSeparator)
labelSeparator
- the label separatorpublic void setLabelWidth(int labelWidth)
labelWidth
- the label widthpublic void setMethod(FormPanel.Method method)
method
- the methodpublic void setPadding(int padding)
padding
- the paddingpublic void setReadOnly(boolean readOnly)
readOnly
- true for read onlypublic void submit()
protected Size adjustBodySize()
adjustBodySize
in class ContentPanel
protected void onAttach()
onAttach
in class Container<Component>
protected void onDetach()
onDetach
in class Component
protected void onRender(com.google.gwt.user.client.Element target, int index)
Component
onRender
in class ContentPanel
target
- the target elementindex
- the insert location
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |