public class Slot
extends com.google.gwt.user.client.ui.SimplePanel
| Modifier and Type | Field and Description |
|---|---|
static String |
SLOT_CLASSNAME |
| Constructor and Description |
|---|
Slot()
Constructs a slot.
|
Slot(VAbstractOrderedLayout layout,
com.google.gwt.user.client.ui.Widget widget)
Deprecated.
use
GWT.create(Class), setWidget(Widget) and
setLayout(VAbstractOrderedLayout) instead |
| Modifier and Type | Method and Description |
|---|---|
AlignmentInfo |
getAlignment()
Returns the alignment for the slot
|
com.google.gwt.user.client.Element |
getCaptionElement()
Get the slots caption element
|
CaptionPosition |
getCaptionPosition()
Get the position of the caption relative to the slot
|
ElementResizeListener |
getCaptionResizeListener() |
protected com.google.gwt.user.client.Element |
getContainerElement() |
double |
getExpandRatio()
Get the expand ratio for the slot.
|
protected int |
getHorizontalSpacing()
Get the horizontal amount of pixels of the spacing
|
com.google.gwt.user.client.Element |
getSpacingElement()
Get the element which is added to make the spacing
|
ElementResizeListener |
getSpacingResizeListener() |
protected int |
getVerticalSpacing()
Get the vertical amount in pixels of the spacing
|
ElementResizeListener |
getWidgetResizeListener() |
boolean |
hasCaption()
Does the slot have a caption
|
boolean |
hasRelativeHeight() |
boolean |
hasRelativeWidth() |
boolean |
hasSpacing()
Does the slot have spacing
|
boolean |
isRelativeInDirection(boolean vertical) |
protected void |
onAttach() |
void |
onBrowserEvent(com.google.gwt.user.client.Event event) |
protected void |
onDetach() |
boolean |
remove(com.google.gwt.user.client.ui.Widget w) |
void |
setAlignment(AlignmentInfo alignment)
Sets how the widget is aligned inside the slot
|
void |
setCaption(String captionText,
Icon icon,
List<String> styles,
String error,
boolean showError,
boolean required,
boolean enabled)
Set the caption of the slot as text
|
void |
setCaption(String captionText,
Icon icon,
List<String> styles,
String error,
boolean showError,
boolean required,
boolean enabled,
boolean captionAsHtml)
Set the caption of the slot
|
void |
setCaption(String captionText,
String iconUrl,
List<String> styles,
String error,
boolean showError,
boolean required,
boolean enabled)
Deprecated.
|
void |
setCaptionPosition(CaptionPosition captionPosition)
Set the position of the caption relative to the slot
|
void |
setCaptionResizeListener(ElementResizeListener captionResizeListener) |
void |
setExpandRatio(double expandRatio)
Set how the slot should be expanded relative to the other slots.
|
void |
setLayout(VAbstractOrderedLayout layout)
Set the layout in which this slot is.
|
void |
setRelativeHeight(boolean relativeHeight)
Set if the slot has a relative height
|
void |
setRelativeWidth(boolean relativeWidth)
Set if the slot has a relative width
|
void |
setSpacing(boolean spacing)
Set the spacing for the slot.
|
void |
setSpacingResizeListener(ElementResizeListener spacingResizeListener) |
protected void |
setStyleNames(String... stylenames)
Sets the style names for the slot containing the widget
|
void |
setWidget(com.google.gwt.user.client.ui.Widget w) |
void |
setWidgetResizeListener(ElementResizeListener widgetResizeListener) |
add, getWidget, iterator, setWidgetadd, adopt, clear, doAttachChildren, doDetachChildren, orphan, removeaddAttachHandler, addBitlessDomHandler, addDomHandler, addHandler, asWidget, asWidgetOrNull, createHandlerManager, delegateEvent, fireEvent, getHandlerCount, getLayoutData, getParent, isAttached, isOrWasAttached, onLoad, onUnload, removeFromParent, setLayoutData, sinkEvents, unsinkEventsaddStyleDependentName, addStyleName, ensureDebugId, ensureDebugId, ensureDebugId, getAbsoluteLeft, getAbsoluteTop, getElement, getOffsetHeight, getOffsetWidth, getStyleElement, getStyleName, getStyleName, getStylePrimaryName, getStylePrimaryName, getTitle, isVisible, isVisible, onEnsureDebugId, removeStyleDependentName, removeStyleName, resolvePotentialElement, setElement, setElement, setHeight, setPixelSize, setSize, setStyleDependentName, setStyleName, setStyleName, setStyleName, setStyleName, setStylePrimaryName, setStylePrimaryName, setTitle, setVisible, setVisible, setWidth, sinkBitlessEvent, toStringclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitforEach, spliteratorpublic static final String SLOT_CLASSNAME
public Slot()
@Deprecated public Slot(VAbstractOrderedLayout layout, com.google.gwt.user.client.ui.Widget widget)
GWT.create(Class), setWidget(Widget) and
setLayout(VAbstractOrderedLayout) insteadlayout - The layout to which this slot belongswidget - The widget to put in the slotpublic void setLayout(VAbstractOrderedLayout layout)
VAbstractOrderedLayout.createSlot(Widget).layout - the layout containing the slotpublic boolean remove(com.google.gwt.user.client.ui.Widget w)
remove in interface com.google.gwt.user.client.ui.HasWidgetsremove in class com.google.gwt.user.client.ui.SimplePanelpublic void setWidget(com.google.gwt.user.client.ui.Widget w)
setWidget in interface com.google.gwt.user.client.ui.HasOneWidgetsetWidget in class com.google.gwt.user.client.ui.SimplePanelpublic ElementResizeListener getCaptionResizeListener()
public void setCaptionResizeListener(ElementResizeListener captionResizeListener)
public ElementResizeListener getWidgetResizeListener()
public void setWidgetResizeListener(ElementResizeListener widgetResizeListener)
public ElementResizeListener getSpacingResizeListener()
public void setSpacingResizeListener(ElementResizeListener spacingResizeListener)
public AlignmentInfo getAlignment()
protected void setStyleNames(String... stylenames)
stylenames - The style names for the slotpublic void setAlignment(AlignmentInfo alignment)
alignment - The alignment inside the slotpublic void setExpandRatio(double expandRatio)
expandRatio - The ratio of the space the slot should occupypublic double getExpandRatio()
setExpandRatio(double)public void setSpacing(boolean spacing)
spacing - Should spacing be enabledpublic com.google.gwt.user.client.Element getSpacingElement()
public boolean hasSpacing()
protected int getVerticalSpacing()
protected int getHorizontalSpacing()
public void setCaptionPosition(CaptionPosition captionPosition)
captionPosition - The position of the captionpublic CaptionPosition getCaptionPosition()
@Deprecated public void setCaption(String captionText, String iconUrl, List<String> styles, String error, boolean showError, boolean required, boolean enabled)
setCaption(String, Icon, List, String, boolean, boolean, boolean)
insteadcaptionText - The text of the captioniconUrl - The icon URL, must already be run trough translateVaadinUri()styles - The style nameserror - The error messageshowError - Should the error message be shownrequired - Is the (field) requiredenabled - Is the component enabledpublic void setCaption(String captionText, Icon icon, List<String> styles, String error, boolean showError, boolean required, boolean enabled)
captionText - The text of the captionicon - The iconstyles - The style nameserror - The error messageshowError - Should the error message be shownrequired - Is the (field) requiredenabled - Is the component enabledpublic void setCaption(String captionText, Icon icon, List<String> styles, String error, boolean showError, boolean required, boolean enabled, boolean captionAsHtml)
captionText - The text of the captionicon - The iconstyles - The style nameserror - The error messageshowError - Should the error message be shownrequired - Is the (field) requiredenabled - Is the component enabledcaptionAsHtml - true if the caption should be rendered as HTML, false
otherwisepublic boolean hasCaption()
public com.google.gwt.user.client.Element getCaptionElement()
public void setRelativeWidth(boolean relativeWidth)
relativeWidth - True if slot uses relative width, false if the slot has a
static widthpublic boolean hasRelativeWidth()
public void setRelativeHeight(boolean relativeHeight)
relativeHeight - True if the slot uses a relative height, false if the slot has
a static heightpublic boolean hasRelativeHeight()
public void onBrowserEvent(com.google.gwt.user.client.Event event)
onBrowserEvent in interface com.google.gwt.user.client.EventListeneronBrowserEvent in class com.google.gwt.user.client.ui.Widgetprotected com.google.gwt.user.client.Element getContainerElement()
getContainerElement in class com.google.gwt.user.client.ui.SimplePanelprotected void onDetach()
onDetach in class com.google.gwt.user.client.ui.Widgetprotected void onAttach()
onAttach in class com.google.gwt.user.client.ui.Widgetpublic boolean isRelativeInDirection(boolean vertical)
Copyright © 2016 Vaadin Ltd. All rights reserved.