Component.Alignment, Component.BelongToFrame, Component.Disposable, Component.Editable, Component.Focusable, Component.HasCaption, Component.HasDescription, Component.HasIcon, Component.HasXmlDescriptor, Component.OptionsStyleProvider, Component.Wrapper| Modifier and Type | Field and Description |
|---|---|
protected Component |
parent |
protected java.lang.String |
text |
AUTO_SIZE, AUTO_SIZE_PX, FULL_SIZE, UNITS_PERCENTAGE, UNITS_PIXELS| Constructor and Description |
|---|
PlainTextCell(java.lang.String text) |
| 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
Component.getHeightSizeUnit() |
SizeUnit |
getHeightSizeUnit()
Gets the height property units.
|
java.lang.String |
getId()
Component ID as defined in
id attribute |
Component |
getParent() |
java.lang.String |
getStyleName()
Styles implementation is client-type-specific.
|
java.lang.String |
getText() |
float |
getWidth()
Get component width in
Component.getWidthUnits() |
SizeUnit |
getWidthSizeUnit()
Gets the width property units.
|
boolean |
isEnabled()
Is the component enabled?
Note that this method only returns the status of the component and does not take parents into account. |
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. |
boolean |
isVisibleRecursive() |
void |
removeStyleName(java.lang.String styleName)
Removes one or more style names from component.
|
void |
setAlignment(Component.Alignment alignment) |
void |
setEnabled(boolean enabled)
Sets the component enabled state.
|
void |
setHeight(java.lang.String height)
Set component height in
Component.getHeightUnits() |
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.
|
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
Component.getWidthSizeUnit()} |
<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.
|
<X> X |
unwrapCompositionOrNull(java.lang.Class<X> internalCompositionClass)
Get the outmost external container of client specific component instance.
|
<X> X |
unwrapOrNull(java.lang.Class<X> internalComponentClass)
Get client specific component instance.
|
<X> void |
withUnwrapped(java.lang.Class<X> internalComponentClass,
java.util.function.Consumer<X> action)
Performs the given
action with underlying component if it can be casted to the given
internalComponentClass. |
<X> void |
withUnwrappedComposition(java.lang.Class<X> internalCompositionClass,
java.util.function.Consumer<X> action)
Get the outmost external container of client specific component instance and performs the given
action. |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetHeightUnits, getWidthUnits, isEnabledItself, isVisibleItself, requestFocus, setHeightAuto, setHeightFull, setSizeAuto, setSizeFull, setWidthAuto, setWidthFullprotected Component parent
protected java.lang.String text
public java.lang.String getText()
public java.lang.String getId()
Componentid attributepublic void setId(java.lang.String id)
Componentpublic Component getParent()
public void setParent(Component parent)
ComponentComponentContainer.add(Component) is normally used for adding components
to a parent and the used method will call this method implicitly.public boolean isEnabled()
Componentpublic void setEnabled(boolean enabled)
ComponentsetEnabled in interface Componentenabled - enabled flagpublic boolean isResponsive()
ComponentisResponsive in interface Componentpublic void setResponsive(boolean responsive)
ComponentsetResponsive in interface Componentresponsive - responsive flagpublic boolean isVisible()
Componentpublic void setVisible(boolean visible)
ComponentsetVisible in interface Componentvisible - visible flagpublic boolean isVisibleRecursive()
isVisibleRecursive in interface Componentpublic boolean isEnabledRecursive()
isEnabledRecursive in interface Componentpublic float getHeight()
ComponentComponent.getHeightSizeUnit()public SizeUnit getHeightSizeUnit()
ComponentgetHeightSizeUnit in interface Componentpublic void setHeight(java.lang.String height)
ComponentComponent.getHeightUnits()public float getWidth()
ComponentComponent.getWidthUnits()public SizeUnit getWidthSizeUnit()
ComponentgetWidthSizeUnit in interface Componentpublic void setWidth(java.lang.String width)
ComponentComponent.getWidthSizeUnit()}public Component.Alignment getAlignment()
getAlignment in interface Componentpublic void setAlignment(Component.Alignment alignment)
setAlignment in interface Componentpublic java.lang.String getStyleName()
ComponentgetStyleName in interface Componentpublic void setStyleName(java.lang.String styleName)
ComponentsetStyleName in interface ComponentstyleName - one or more style names separated by space.public void addStyleName(java.lang.String styleName)
ComponentaddStyleName in interface ComponentstyleName - one or more style names separated by space.public void removeStyleName(java.lang.String styleName)
ComponentremoveStyleName in interface ComponentstyleName - one or more style names separated by space.public <X> X unwrap(java.lang.Class<X> internalComponentClass)
Componentcom.vaadin.ui.TextField vTextField = textField.unwrap(com.vaadin.ui.TextField.class);
@Nullable public <X> X unwrapOrNull(java.lang.Class<X> internalComponentClass)
Componentnull if underlying component cannot be casted to the given internalComponentClass.
Example:
com.vaadin.ui.TextField vTextField = textField.unwrapOrNull(com.vaadin.ui.TextField.class);
unwrapOrNull in interface ComponentX - type of internal classinternalComponentClass - class of underlying component implementation based on Vaadin or Swingpublic <X> void withUnwrapped(java.lang.Class<X> internalComponentClass,
java.util.function.Consumer<X> action)
Componentaction with underlying component if it can be casted to the given
internalComponentClass.
Example:
textField.withUnwrapped(com.vaadin.ui.TextField.class, vTextField -> {
// do something
});
withUnwrapped in interface ComponentX - type of internal classinternalComponentClass - class of underlying component implementation based on Vaadin or Swingaction - action to perform if underlying component can be casted to given classpublic <X> X unwrapComposition(java.lang.Class<X> internalCompositionClass)
Componentcom.vaadin.ui.Layout vLayout = table.unwrapComposition(com.vaadin.ui.Layout.class);
unwrapComposition in interface ComponentX - type of internal classinternalCompositionClass - class of underlying composition implementation based on Vaadin or Swing@Nullable public <X> X unwrapCompositionOrNull(java.lang.Class<X> internalCompositionClass)
ComponentinternalCompositionClass.
Example:
com.vaadin.ui.Layout vLayout = table.unwrapCompositionOrNull(com.vaadin.ui.Layout.class);
unwrapCompositionOrNull in interface ComponentX - type of internal classinternalCompositionClass - class of underlying composition implementation based on Vaadin or Swingpublic <X> void withUnwrappedComposition(java.lang.Class<X> internalCompositionClass,
java.util.function.Consumer<X> action)
Componentaction.
table.withUnwrappedComposition(com.vaadin.ui.Layout.class, vLayout -> {
// do something
});
withUnwrappedComposition in interface ComponentX - type of internal classinternalCompositionClass - class of underlying composition implementation based on Vaadin or Swingaction - to perform if underlying composition can be casted to given class