public interface Component
Modifier and Type | Interface and Description |
---|---|
static class |
Component.Alignment |
static interface |
Component.BelongToFrame
Component belonging to a frame
|
static interface |
Component.Disposable |
static interface |
Component.Editable
Component supporting "editable" state.
|
static interface |
Component.Focusable
Component supporting "focusable" state.
|
static interface |
Component.HasCaption
Object having a caption.
|
static interface |
Component.HasDescription
Object having a description.
|
static interface |
Component.HasIcon
Component having an icon.
|
static interface |
Component.HasXmlDescriptor
Object having an XML descriptor attached.
|
static interface |
Component.OptionsStyleProvider
Deprecated.
|
static interface |
Component.Wrapper
Component delegating work to some "wrapped" client-specific implementation.
|
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
AUTO_SIZE |
static int |
AUTO_SIZE_PX |
static java.lang.String |
FULL_SIZE |
static int |
UNITS_PERCENTAGE
Deprecated.
@deprecated Use
SizeUnit instead. |
static int |
UNITS_PIXELS
Deprecated.
Use
SizeUnit instead. |
Modifier and Type | Method and Description |
---|---|
void |
addStyleName(java.lang.String styleName)
Adds one or more style names to this component.
|
Component.Alignment |
getAlignment() |
float |
getHeight()
Get component height in
getHeightSizeUnit() |
SizeUnit |
getHeightSizeUnit()
Gets the height property units.
|
default int |
getHeightUnits()
Deprecated.
|
java.lang.String |
getId()
Component ID as defined in
id attribute |
Component |
getParent() |
java.lang.String |
getStyleName()
Styles implementation is client-type-specific.
|
float |
getWidth()
Get component width in
getWidthUnits() |
SizeUnit |
getWidthSizeUnit()
Gets the width property units.
|
default int |
getWidthUnits()
Deprecated.
|
boolean |
isEnabled()
Is the component enabled?
Note that this method only returns the status of the component and does not take parents into account. |
default boolean |
isEnabledItself()
Deprecated.
Use {
isEnabled() instead. |
boolean |
isEnabledRecursive() |
boolean |
isResponsive()
Is the component responsive?
|
boolean |
isVisible()
Is the component visible?
A component is visible only if all its parents are also visible. |
default boolean |
isVisibleItself()
Deprecated.
Use {
isVisible() instead. |
boolean |
isVisibleRecursive() |
void |
removeStyleName(java.lang.String styleName)
Removes one or more style names from component.
|
default void |
requestFocus()
Deprecated.
Use
Component.Focusable.focus() instead. |
void |
setAlignment(Component.Alignment alignment) |
void |
setEnabled(boolean enabled)
Sets the component enabled state.
|
void |
setHeight(java.lang.String height)
Set component height in
getHeightUnits() |
default void |
setHeightAuto()
Set component height to
AUTO_SIZE |
default void |
setHeightFull()
Set component height to 100%
|
void |
setId(java.lang.String id)
Set component ID
|
void |
setParent(Component parent)
INTERNAL.
ComponentContainer.add(Component) is normally used for adding components
to a parent and the used method will call this method implicitly. |
void |
setResponsive(boolean responsive)
Sets component to be responsive by width and height.
|
default void |
setSizeAuto()
Set component width and height to
AUTO_SIZE |
default void |
setSizeFull()
Set component width and height to 100%
|
void |
setStyleName(java.lang.String styleName)
Sets one or more style names of the component, replacing any
previous styles.
|
void |
setVisible(boolean visible)
Sets visibility value for the component.
|
void |
setWidth(java.lang.String width)
Set component width in
getWidthSizeUnit() } |
default void |
setWidthAuto()
Set component width to
AUTO_SIZE |
default void |
setWidthFull()
Set component width to 100%
|
<X> X |
unwrap(java.lang.Class<X> internalComponentClass)
Get client specific component instance.
|
<X> X |
unwrapComposition(java.lang.Class<X> internalCompositionClass)
Get the outmost external container of client specific component instance.
|
@Deprecated static final int UNITS_PIXELS
SizeUnit
instead.@Deprecated static final int UNITS_PERCENTAGE
SizeUnit
instead.static final java.lang.String AUTO_SIZE
static final int AUTO_SIZE_PX
static final java.lang.String FULL_SIZE
java.lang.String getId()
id
attributevoid setId(java.lang.String id)
Component getParent()
void setParent(Component parent)
ComponentContainer.add(Component)
is normally used for adding components
to a parent and the used method will call this method implicitly.parent
- Parent componentboolean isEnabled()
void setEnabled(boolean enabled)
enabled
- enabled flagboolean isResponsive()
void setResponsive(boolean responsive)
responsive
- responsive flagboolean isVisible()
void setVisible(boolean visible)
visible
- visible flagboolean isVisibleRecursive()
boolean isEnabledRecursive()
@Deprecated default boolean isVisibleItself()
isVisible()
instead.@Deprecated default boolean isEnabledItself()
isEnabled()
instead.float getHeight()
getHeightSizeUnit()
@Deprecated default int getHeightUnits()
UNITS_PIXELS
, UNITS_PERCENTAGE
SizeUnit getHeightSizeUnit()
void setHeight(java.lang.String height)
getHeightUnits()
default void setHeightAuto()
AUTO_SIZE
default void setHeightFull()
float getWidth()
getWidthUnits()
@Deprecated default int getWidthUnits()
UNITS_PIXELS
, UNITS_PERCENTAGE
@Deprecated default void requestFocus()
Component.Focusable.focus()
instead.SizeUnit getWidthSizeUnit()
void setWidth(java.lang.String width)
getWidthSizeUnit()
}default void setWidthAuto()
AUTO_SIZE
default void setWidthFull()
default void setSizeFull()
default void setSizeAuto()
AUTO_SIZE
Component.Alignment getAlignment()
void setAlignment(Component.Alignment alignment)
java.lang.String getStyleName()
void setStyleName(java.lang.String styleName)
styleName
- one or more style names separated by space.void addStyleName(java.lang.String styleName)
styleName
- one or more style names separated by space.void removeStyleName(java.lang.String styleName)
styleName
- one or more style names separated by space.<X> X unwrap(java.lang.Class<X> internalComponentClass)
com.vaadin.ui.TextField vTextField = textField.unwrap(com.vaadin.ui.TextField.class);
X
- type of internal classinternalComponentClass
- class of underlying component implementation based on Vaadin or Swing<X> X unwrapComposition(java.lang.Class<X> internalCompositionClass)
com.vaadin.ui.Layout vLayout = table.unwrapComposition(com.vaadin.ui.Layout.class);
X
- type of internal classinternalCompositionClass
- class of underlying composition implementation based on Vaadin or Swing