|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.ObjectSimplePanel
com.vaadin.client.ui.orderedlayout.Slot
public final class Slot
Represents a slot which contains the actual widget in the layout.
| Field Summary | |
|---|---|
static java.lang.String |
SLOT_CLASSNAME
|
| Constructor Summary | |
|---|---|
Slot(VAbstractOrderedLayout layout,
Widget widget)
Constructs a slot. |
|
| Method Summary | |
|---|---|
com.vaadin.shared.ui.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(Event event)
|
protected void |
onDetach()
|
boolean |
remove(Widget w)
|
void |
setAlignment(com.vaadin.shared.ui.AlignmentInfo alignment)
Sets how the widget is aligned inside the slot |
void |
setCaption(java.lang.String captionText,
Icon icon,
java.util.List<java.lang.String> styles,
java.lang.String error,
boolean showError,
boolean required,
boolean enabled)
Set the caption of the slot |
void |
setCaption(java.lang.String captionText,
java.lang.String iconUrl,
java.util.List<java.lang.String> styles,
java.lang.String error,
boolean showError,
boolean required,
boolean enabled)
Deprecated. Use setCaption(String, Icon, List, String, boolean, boolean, boolean)
instead |
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 |
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(java.lang.String... stylenames)
Sets the style names for the slot containing the widget |
void |
setWidget(Widget w)
|
void |
setWidgetResizeListener(ElementResizeListener widgetResizeListener)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final java.lang.String SLOT_CLASSNAME
| Constructor Detail |
|---|
public Slot(VAbstractOrderedLayout layout,
Widget widget)
layout - The layout to which this slot belongswidget - The widget to put in the slot| Method Detail |
|---|
public boolean remove(Widget w)
public void setWidget(Widget w)
public ElementResizeListener getCaptionResizeListener()
public void setCaptionResizeListener(ElementResizeListener captionResizeListener)
public ElementResizeListener getWidgetResizeListener()
public void setWidgetResizeListener(ElementResizeListener widgetResizeListener)
public ElementResizeListener getSpacingResizeListener()
public void setSpacingResizeListener(ElementResizeListener spacingResizeListener)
public com.vaadin.shared.ui.AlignmentInfo getAlignment()
protected void setStyleNames(java.lang.String... stylenames)
stylenames - The style names for the slotpublic void setAlignment(com.vaadin.shared.ui.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(java.lang.String captionText,
java.lang.String iconUrl,
java.util.List<java.lang.String> styles,
java.lang.String error,
boolean showError,
boolean required,
boolean enabled)
setCaption(String, Icon, List, String, boolean, boolean, boolean)
instead
captionText - 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 enabled
public void setCaption(java.lang.String captionText,
Icon icon,
java.util.List<java.lang.String> styles,
java.lang.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 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(Event event)
protected com.google.gwt.user.client.Element getContainerElement()
protected void onDetach()
protected void onAttach()
public boolean isRelativeInDirection(boolean vertical)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||