|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.extjs.gxt.ui.client.event.BaseObservable
com.extjs.gxt.ui.client.widget.Layout
com.extjs.gxt.ui.client.widget.layout.AnchorLayout
com.extjs.gxt.ui.client.widget.layout.FormLayout
public class FormLayout
Layout for form fields and their labels. FormLayout will only render Field subclasses. All other components will be ignored.
To add a component that is not a Field subclass, seeAdapterField
. To
add plain text see LabelField
.
Field Summary |
---|
Fields inherited from class com.extjs.gxt.ui.client.widget.Layout |
---|
activeItem, componentStyleName, container, monitorResize, renderHidden, target, targetStyleName |
Constructor Summary | |
---|---|
FormLayout()
Creates a new form layout. |
|
FormLayout(FormPanel.LabelAlign labelAlign)
Creates a new form layout. |
Method Summary | |
---|---|
protected int |
adjustHeightAnchor(int height,
Component comp)
|
protected int |
adjustWidthAnchor(int width,
Component comp)
|
int |
getDefaultWidth()
Returns the default field width. |
boolean |
getHideLabels()
Returns true if labels are being hidden. |
FormPanel.LabelAlign |
getLabelAlign()
Returns the label alignment. |
int |
getLabelPad()
Returns the label pad. |
java.lang.String |
getLabelSeparator()
Returns the label separator. |
int |
getLabelWidth()
Returns the label width. |
protected void |
initTarget()
|
protected void |
onComponentHide(Component component)
|
protected void |
onComponentShow(Component component)
|
protected void |
onLayout(Container<?> container,
El target)
|
protected void |
onRemove(Component component)
|
protected void |
renderComponent(Component component,
int index,
El target)
|
protected void |
renderField(Field<?> field,
int index,
El target)
|
void |
setContainer(Container<?> ct)
Sets the layout's container. |
void |
setDefaultWidth(int defaultWidth)
Sets the default width for fields (defaults to 200). |
void |
setHideLabels(boolean hideLabels)
True to hide field labels by default (defaults to false). |
void |
setLabelAlign(FormPanel.LabelAlign labelAlign)
Sets the label alignment. |
void |
setLabelPad(int labelPad)
The default padding in pixels for field labels (defaults to 0). |
void |
setLabelSeparator(java.lang.String labelSeparator)
Sets the label separator (defaults to ':'). |
void |
setLabelWidth(int labelWidth)
Sets the default width in pixels of field labels (defaults to 100). |
Methods inherited from class com.extjs.gxt.ui.client.widget.layout.AnchorLayout |
---|
getAnchorSize, setAnchorSize |
Methods inherited from class com.extjs.gxt.ui.client.widget.Layout |
---|
applyMargins, applyPadding, callLayout, fly, fly, getExtraStyle, getLayoutData, getResizeDelay, getSideMargins, isLayoutExecuted, isLayoutNeeded, isRenderHidden, isRunning, isValidParent, layout, layoutContainer, onAdd, onResize, renderAll, setBounds, setExtraStyle, setLayoutData, setLayoutNeeded, setLayoutOnChange, setPosition, setRenderHidden, setResizeDelay, setSize |
Methods inherited from class com.extjs.gxt.ui.client.event.BaseObservable |
---|
addListener, callListener, fireEvent, fireEvent, getFiresEvents, getListeners, hasActiveEvent, hasListeners, hasListeners, removeAllListeners, removeListener, setFiresEvents |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public FormLayout()
public FormLayout(FormPanel.LabelAlign labelAlign)
labelAlign
- the label alignmentMethod Detail |
---|
public int getDefaultWidth()
public boolean getHideLabels()
public FormPanel.LabelAlign getLabelAlign()
public int getLabelPad()
public java.lang.String getLabelSeparator()
public int getLabelWidth()
public void setContainer(Container<?> ct)
Layout
setContainer
in class Layout
ct
- the containerpublic void setDefaultWidth(int defaultWidth)
defaultWidth
- the default widthpublic void setHideLabels(boolean hideLabels)
hideLabels
- true to hide labelspublic void setLabelAlign(FormPanel.LabelAlign labelAlign)
labelAlign
- the label alignpublic void setLabelPad(int labelPad)
labelPad
- the label padpublic void setLabelSeparator(java.lang.String labelSeparator)
labelSeparator
- the label separatorpublic void setLabelWidth(int labelWidth)
labelWidth
- the label widthprotected int adjustHeightAnchor(int height, Component comp)
adjustHeightAnchor
in class AnchorLayout
protected int adjustWidthAnchor(int width, Component comp)
adjustWidthAnchor
in class AnchorLayout
protected void initTarget()
initTarget
in class Layout
protected void onComponentHide(Component component)
onComponentHide
in class Layout
protected void onComponentShow(Component component)
onComponentShow
in class Layout
protected void onLayout(Container<?> container, El target)
onLayout
in class AnchorLayout
protected void onRemove(Component component)
onRemove
in class Layout
protected void renderComponent(Component component, int index, El target)
renderComponent
in class Layout
protected void renderField(Field<?> field, int index, El target)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |