public class CmsFieldSet extends com.google.gwt.user.client.ui.Composite implements com.google.gwt.event.logical.shared.HasOpenHandlers<CmsFieldSet>, com.google.gwt.event.logical.shared.HasCloseHandlers<CmsFieldSet>, com.google.gwt.user.client.ui.HasWidgets, I_CmsTruncable
限定符和类型 | 类和说明 |
---|---|
protected static interface |
CmsFieldSet.I_CmsFieldSetUiBinder
The ui-binder interface for this composite.
|
限定符和类型 | 字段和说明 |
---|---|
static int |
DEFAULT_ANIMATION_DURATION
Default animation duration.
|
protected com.google.gwt.user.client.ui.FlowPanel |
m_content
The content of the fieldset.
|
protected com.google.gwt.user.client.ui.FlowPanel |
m_fieldset
The wrapping panel for this fieldset.
|
protected com.google.gwt.user.client.ui.Image |
m_image
The image for the top and bottom arrow.
|
protected CmsLabel |
m_legend
The legend of the fieldset.
|
protected boolean |
m_opened
Signals whether the fieldset is opened.
|
protected com.google.gwt.user.client.ui.FlowPanel |
m_wrapper
The legend of the fieldset.
|
构造器和说明 |
---|
CmsFieldSet()
Default constructor.
|
限定符和类型 | 方法和说明 |
---|---|
void |
add(com.google.gwt.user.client.ui.Widget widget) |
com.google.gwt.event.shared.HandlerRegistration |
addCloseHandler(com.google.gwt.event.logical.shared.CloseHandler<CmsFieldSet> handler) |
void |
addContent(com.google.gwt.user.client.ui.Widget w)
Adds a widget to this field set.
|
com.google.gwt.event.shared.HandlerRegistration |
addOpenHandler(com.google.gwt.event.logical.shared.OpenHandler<CmsFieldSet> handler) |
void |
clear() |
com.google.gwt.user.client.ui.FlowPanel |
getContentPanel()
Returns the content panel.
|
int |
getWidgetCount()
Returns the count of widgets inside this fieldset.
|
com.google.gwt.user.client.ui.FlowPanel |
getWrapper()
Returns the wrapper.
|
protected void |
handleClick(com.google.gwt.event.dom.client.ClickEvent e)
Adds a click handler to the image icon of this fieldset.
|
boolean |
isOpen()
Returns if the fieldset is opened.
|
java.util.Iterator<com.google.gwt.user.client.ui.Widget> |
iterator() |
boolean |
remove(com.google.gwt.user.client.ui.Widget widget) |
void |
setAnimationDuration(int animDuration)
Sets the animation duration.
|
void |
setLegend(java.lang.String legendText)
Sets the text for the legend of this field set.
|
void |
setOpen(boolean open)
Sets the fieldset open, showing the content.
|
void |
truncate(java.lang.String textMetricsKey,
int clientWidth)
Truncates long text and sets the original text to the title attribute.
|
claimElement, getWidget, initializeClaimedElement, initWidget, isAttached, onAttach, onBrowserEvent, onDetach, render, render, resolvePotentialElement, setWidget
addAttachHandler, addBitlessDomHandler, addDomHandler, addHandler, asWidget, asWidgetOrNull, createHandlerManager, delegateEvent, doAttachChildren, doDetachChildren, fireEvent, getHandlerCount, getLayoutData, getParent, isOrWasAttached, onLoad, onUnload, removeFromParent, setLayoutData, sinkEvents
addStyleDependentName, addStyleName, ensureDebugId, ensureDebugId, ensureDebugId, getAbsoluteLeft, getAbsoluteTop, getElement, getOffsetHeight, getOffsetWidth, getStyleElement, getStyleName, getStyleName, getStylePrimaryName, getStylePrimaryName, getTitle, isVisible, isVisible, onEnsureDebugId, removeStyleDependentName, removeStyleName, setElement, setElement, setHeight, setPixelSize, setSize, setStyleDependentName, setStyleName, setStyleName, setStyleName, setStyleName, setStylePrimaryName, setStylePrimaryName, setTitle, setVisible, setVisible, setWidth, sinkBitlessEvent, toString, unsinkEvents
public static final int DEFAULT_ANIMATION_DURATION
@UiField protected com.google.gwt.user.client.ui.FlowPanel m_content
@UiField protected com.google.gwt.user.client.ui.FlowPanel m_fieldset
@UiField protected com.google.gwt.user.client.ui.Image m_image
@UiField protected CmsLabel m_legend
protected boolean m_opened
@UiField protected com.google.gwt.user.client.ui.FlowPanel m_wrapper
public CmsFieldSet()
Because this class has a default constructor, it can be used as a binder template. In other words, it can be used in other *.ui.xml files:
public void add(com.google.gwt.user.client.ui.Widget widget)
add
在接口中 com.google.gwt.user.client.ui.HasWidgets
HasWidgets.add(com.google.gwt.user.client.ui.Widget)
public com.google.gwt.event.shared.HandlerRegistration addCloseHandler(com.google.gwt.event.logical.shared.CloseHandler<CmsFieldSet> handler)
addCloseHandler
在接口中 com.google.gwt.event.logical.shared.HasCloseHandlers<CmsFieldSet>
HasCloseHandlers.addCloseHandler(com.google.gwt.event.logical.shared.CloseHandler)
public void addContent(com.google.gwt.user.client.ui.Widget w)
w
- the widget to addpublic com.google.gwt.event.shared.HandlerRegistration addOpenHandler(com.google.gwt.event.logical.shared.OpenHandler<CmsFieldSet> handler)
addOpenHandler
在接口中 com.google.gwt.event.logical.shared.HasOpenHandlers<CmsFieldSet>
HasOpenHandlers.addOpenHandler(com.google.gwt.event.logical.shared.OpenHandler)
public void clear()
clear
在接口中 com.google.gwt.user.client.ui.HasWidgets
HasWidgets.clear()
public com.google.gwt.user.client.ui.FlowPanel getContentPanel()
public int getWidgetCount()
public com.google.gwt.user.client.ui.FlowPanel getWrapper()
public boolean isOpen()
true
if the fieldset is openedpublic java.util.Iterator<com.google.gwt.user.client.ui.Widget> iterator()
iterator
在接口中 com.google.gwt.user.client.ui.HasWidgets
iterator
在接口中 java.lang.Iterable<com.google.gwt.user.client.ui.Widget>
HasWidgets.iterator()
public boolean remove(com.google.gwt.user.client.ui.Widget widget)
remove
在接口中 com.google.gwt.user.client.ui.HasWidgets
HasWidgets.remove(com.google.gwt.user.client.ui.Widget)
public void setAnimationDuration(int animDuration)
animDuration
- the animation durationpublic void setLegend(java.lang.String legendText)
legendText
- the legend textpublic void setOpen(boolean open)
open
- true
to open the fieldsetpublic void truncate(java.lang.String textMetricsKey, int clientWidth)
I_CmsTruncable
truncate
在接口中 I_CmsTruncable
textMetricsKey
- the key identifying the text metrics to useclientWidth
- the width to use in pixelsI_CmsTruncable.truncate(java.lang.String, int)
@UiHandler(value="m_image") protected void handleClick(com.google.gwt.event.dom.client.ClickEvent e)
On click the
e
- the event