Package io.jmix.ui.component
Class Table.PlainTextCell
java.lang.Object
io.jmix.ui.component.Table.PlainTextCell
- All Implemented Interfaces:
Component
Special component for generated columns which will be rendered as simple text cell.
Very useful for heavy tables to decrease rendering time in browser.
-
Nested Class Summary
Nested classes/interfaces inherited from interface io.jmix.ui.component.Component
Component.Alignment, Component.BelongToFrame, Component.Disposable, Component.Editable, Component.Focusable, Component.HasCaption, Component.HasDescription, Component.HasIcon, Component.HasXmlDescriptor, Component.Wrapper
-
Field Summary
Fields inherited from interface io.jmix.ui.component.Component
AUTO_SIZE, AUTO_SIZE_PX, FULL_SIZE
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addStyleName
(String styleName) Adds one or more style names to this component.float
Get component height inComponent.getHeightSizeUnit()
Gets the height property units.getId()
Component ID as defined inid
attributeStyles implementation is client-type-specific.getText()
float
getWidth()
Get component width inComponent.getWidthSizeUnit()
Gets the width property units.boolean
Is the component enabled?
Note that this method only returns the status of the component and does not take parents into account.boolean
boolean
Is the component responsive?boolean
Is the component visible?
A component is visible only if all its parents are also visible.boolean
void
removeStyleName
(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
Set component height inComponent.getHeightSizeUnit()
void
Set component IDvoid
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
(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
Set component width inComponent.getWidthSizeUnit()
}<X> X
Get client specific component instance.<X> X
unwrapComposition
(Class<X> internalCompositionClass) Get the outmost external container of client specific component instance.<X> X
unwrapCompositionOrNull
(Class<X> internalCompositionClass) Get the outmost external container of client specific component instance.<X> X
unwrapOrNull
(Class<X> internalComponentClass) Get client specific component instance.<X> void
withUnwrapped
(Class<X> internalComponentClass, Consumer<X> action) Performs the givenaction
with underlying component if it can be casted to the giveninternalComponentClass
.<X> void
withUnwrappedComposition
(Class<X> internalCompositionClass, Consumer<X> action) Get the outmost external container of client specific component instance and performs the givenaction
.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface io.jmix.ui.component.Component
setHeightAuto, setHeightFull, setSizeAuto, setSizeFull, setWidthAuto, setWidthFull
-
Field Details
-
parent
-
text
-
-
Constructor Details
-
PlainTextCell
-
-
Method Details
-
getText
-
getId
Description copied from interface:Component
Component ID as defined inid
attribute -
setId
Description copied from interface:Component
Set component ID -
getParent
-
setParent
Description copied from interface:Component
INTERNAL.
ComponentContainer.add(Component)
is normally used for adding components to a parent and the used method will call this method implicitly. -
isEnabled
public boolean isEnabled()Description copied from interface:Component
Is the component enabled?
Note that this method only returns the status of the component and does not take parents into account. Even though this method returns true the component can be disabled to the user if a parent is disabled. -
setEnabled
public void setEnabled(boolean enabled) Description copied from interface:Component
Sets the component enabled state.
The user can not interact with disabled components, which are shown with a style that indicates the status. Components are enabled by default.- Specified by:
setEnabled
in interfaceComponent
- Parameters:
enabled
- enabled flag
-
isResponsive
public boolean isResponsive()Description copied from interface:Component
Is the component responsive?- Specified by:
isResponsive
in interfaceComponent
- Returns:
- true if the component applies conditional CSS rules for width / height sizes.
-
setResponsive
public void setResponsive(boolean responsive) Description copied from interface:Component
Sets component to be responsive by width and height.
If responsive flag is true then you can use conditional CSS rules that respond to size changes in the browser. You can set specific rules using "width-range" or "height-range" properties in CSS files.- Specified by:
setResponsive
in interfaceComponent
- Parameters:
responsive
- responsive flag
-
isVisible
public boolean isVisible()Description copied from interface:Component
Is the component visible?
A component is visible only if all its parents are also visible. This is not checked by this method though, so even if this method returns true, the component can be hidden from the user because a parent is set to invisible. -
setVisible
public void setVisible(boolean visible) Description copied from interface:Component
Sets visibility value for the component.
Visible components are drawn in the user interface, while invisible ones are not. The effect is not a cosmetic CSS change - no information about an invisible component will be sent to the client. The effect is thus the same as removing the component from its parent.- Specified by:
setVisible
in interfaceComponent
- Parameters:
visible
- visible flag
-
isVisibleRecursive
public boolean isVisibleRecursive()- Specified by:
isVisibleRecursive
in interfaceComponent
- Returns:
- true if the component and all its parent components are visible
-
isEnabledRecursive
public boolean isEnabledRecursive()- Specified by:
isEnabledRecursive
in interfaceComponent
- Returns:
- true if the component and all its parent components are enabled
-
getHeight
public float getHeight()Description copied from interface:Component
Get component height inComponent.getHeightSizeUnit()
-
getHeightSizeUnit
Description copied from interface:Component
Gets the height property units.- Specified by:
getHeightSizeUnit
in interfaceComponent
- Returns:
- units used in height property.
-
setHeight
Description copied from interface:Component
Set component height inComponent.getHeightSizeUnit()
-
getWidth
public float getWidth()Description copied from interface:Component
Get component width inComponent.getWidthSizeUnit()
-
getWidthSizeUnit
Description copied from interface:Component
Gets the width property units.- Specified by:
getWidthSizeUnit
in interfaceComponent
- Returns:
- units used in the width property.
-
setWidth
Description copied from interface:Component
Set component width inComponent.getWidthSizeUnit()
} -
getAlignment
- Specified by:
getAlignment
in interfaceComponent
-
setAlignment
- Specified by:
setAlignment
in interfaceComponent
-
getStyleName
Description copied from interface:Component
Styles implementation is client-type-specific.- Specified by:
getStyleName
in interfaceComponent
- Returns:
- current style name.
-
setStyleName
Description copied from interface:Component
Sets one or more style names of the component, replacing any previous styles. Multiple styles can be specified as a space-separated list of style names. Styles implementation is client-type-specific.- Specified by:
setStyleName
in interfaceComponent
- Parameters:
styleName
- one or more style names separated by space.
-
addStyleName
Description copied from interface:Component
Adds one or more style names to this component. Multiple styles can be specified as a space-separated list of style names.- Specified by:
addStyleName
in interfaceComponent
- Parameters:
styleName
- one or more style names separated by space.
-
removeStyleName
Description copied from interface:Component
Removes one or more style names from component. Multiple styles can be specified as a space-separated list of style names.- Specified by:
removeStyleName
in interfaceComponent
- Parameters:
styleName
- one or more style names separated by space.
-
unwrap
Description copied from interface:Component
Get client specific component instance. Can be used in client module to simplify invocation of underlying API.
Example:com.vaadin.ui.TextField vTextField = textField.unwrap(com.vaadin.ui.TextField.class);
-
unwrapOrNull
Description copied from interface:Component
Get client specific component instance. Can be used in client module to simplify invocation of underlying API.
Returnsnull
if underlying component cannot be casted to the giveninternalComponentClass
. Example:com.vaadin.ui.TextField vTextField = textField.unwrapOrNull(com.vaadin.ui.TextField.class);
- Specified by:
unwrapOrNull
in interfaceComponent
- Type Parameters:
X
- type of internal class- Parameters:
internalComponentClass
- class of underlying component implementation based on Vaadin or Swing- Returns:
- internal client specific component or null if it cannot be casted to given class
-
withUnwrapped
Description copied from interface:Component
Performs the givenaction
with underlying component if it can be casted to the giveninternalComponentClass
. Example:textField.withUnwrapped(com.vaadin.ui.TextField.class, vTextField -> { // do something });
- Specified by:
withUnwrapped
in interfaceComponent
- Type Parameters:
X
- type of internal class- Parameters:
internalComponentClass
- class of underlying component implementation based on Vaadin or Swingaction
- action to perform if underlying component can be casted to given class
-
unwrapComposition
Description copied from interface:Component
Get the outmost external container of client specific component instance. Can be used in client module to simplify invocation of underlying API.
Example:com.vaadin.ui.Layout vLayout = table.unwrapComposition(com.vaadin.ui.Layout.class);
- Specified by:
unwrapComposition
in interfaceComponent
- Type Parameters:
X
- type of internal class- Parameters:
internalCompositionClass
- class of underlying composition implementation based on Vaadin or Swing- Returns:
- internal client specific component
-
unwrapCompositionOrNull
Description copied from interface:Component
Get the outmost external container of client specific component instance. Can be used in client module to simplify invocation of underlying API.
Returns null if composition cannot be casted to giveninternalCompositionClass
. Example:com.vaadin.ui.Layout vLayout = table.unwrapCompositionOrNull(com.vaadin.ui.Layout.class);
- Specified by:
unwrapCompositionOrNull
in interfaceComponent
- Type Parameters:
X
- type of internal class- Parameters:
internalCompositionClass
- class of underlying composition implementation based on Vaadin or Swing- Returns:
- internal client specific component or null if cannot be casted to given class
-
withUnwrappedComposition
Description copied from interface:Component
Get the outmost external container of client specific component instance and performs the givenaction
.
Can be used in client module to simplify invocation of underlying API.
Example:table.withUnwrappedComposition(com.vaadin.ui.Layout.class, vLayout -> { // do something });
- Specified by:
withUnwrappedComposition
in interfaceComponent
- Type Parameters:
X
- type of internal class- Parameters:
internalCompositionClass
- class of underlying composition implementation based on Vaadin or Swingaction
- to perform if underlying composition can be casted to given class
-