Class Table.PlainTextCell

java.lang.Object
io.jmix.ui.component.Table.PlainTextCell
All Implemented Interfaces:
Component
Enclosing interface:
Table<E>

public static class Table.PlainTextCell extends Object implements 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.
  • Field Details

  • Constructor Details

    • PlainTextCell

      public PlainTextCell(String text)
  • Method Details

    • getText

      public String getText()
    • getId

      @Nullable public String getId()
      Description copied from interface: Component
      Component ID as defined in id attribute
      Specified by:
      getId in interface Component
    • setId

      public void setId(@Nullable String id)
      Description copied from interface: Component
      Set component ID
      Specified by:
      setId in interface Component
    • getParent

      @Nullable public Component getParent()
      Specified by:
      getParent in interface Component
      Returns:
      parent of component.
    • setParent

      public void setParent(@Nullable Component parent)
      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.
      Specified by:
      setParent in interface Component
      Parameters:
      parent - Parent component
    • 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.
      Specified by:
      isEnabled in interface Component
      Returns:
      true if the component enabled flag is set to true
    • 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 interface Component
      Parameters:
      enabled - enabled flag
    • isResponsive

      public boolean isResponsive()
      Description copied from interface: Component
      Is the component responsive?
      Specified by:
      isResponsive in interface Component
      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 interface Component
      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.
      Specified by:
      isVisible in interface Component
      Returns:
      true if the component visibility is set to true
    • 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 interface Component
      Parameters:
      visible - visible flag
    • isVisibleRecursive

      public boolean isVisibleRecursive()
      Specified by:
      isVisibleRecursive in interface Component
      Returns:
      true if the component and all its parent components are visible
    • isEnabledRecursive

      public boolean isEnabledRecursive()
      Specified by:
      isEnabledRecursive in interface Component
      Returns:
      true if the component and all its parent components are enabled
    • getHeight

      public float getHeight()
      Description copied from interface: Component
      Get component height in Component.getHeightSizeUnit()
      Specified by:
      getHeight in interface Component
    • getHeightSizeUnit

      public SizeUnit getHeightSizeUnit()
      Description copied from interface: Component
      Gets the height property units.
      Specified by:
      getHeightSizeUnit in interface Component
      Returns:
      units used in height property.
    • setHeight

      public void setHeight(@Nullable String height)
      Description copied from interface: Component
      Set component height in Component.getHeightSizeUnit()
      Specified by:
      setHeight in interface Component
    • getWidth

      public float getWidth()
      Description copied from interface: Component
      Get component width in Component.getWidthSizeUnit()
      Specified by:
      getWidth in interface Component
    • getWidthSizeUnit

      public SizeUnit getWidthSizeUnit()
      Description copied from interface: Component
      Gets the width property units.
      Specified by:
      getWidthSizeUnit in interface Component
      Returns:
      units used in the width property.
    • setWidth

      public void setWidth(@Nullable String width)
      Description copied from interface: Component
      Set component width in Component.getWidthSizeUnit()}
      Specified by:
      setWidth in interface Component
    • getAlignment

      public Component.Alignment getAlignment()
      Specified by:
      getAlignment in interface Component
    • setAlignment

      public void setAlignment(Component.Alignment alignment)
      Specified by:
      setAlignment in interface Component
    • getStyleName

      public String getStyleName()
      Description copied from interface: Component
      Styles implementation is client-type-specific.
      Specified by:
      getStyleName in interface Component
      Returns:
      current style name.
    • setStyleName

      public void setStyleName(@Nullable String styleName)
      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 interface Component
      Parameters:
      styleName - one or more style names separated by space.
    • addStyleName

      public void addStyleName(String styleName)
      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 interface Component
      Parameters:
      styleName - one or more style names separated by space.
    • removeStyleName

      public void removeStyleName(String styleName)
      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 interface Component
      Parameters:
      styleName - one or more style names separated by space.
    • unwrap

      public <X> X unwrap(Class<X> internalComponentClass)
      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);
       
      Specified by:
      unwrap in interface Component
      Type Parameters:
      X - type of internal class
      Parameters:
      internalComponentClass - class of underlying component implementation based on Vaadin or Swing
      Returns:
      internal client specific component
    • unwrapOrNull

      @Nullable public <X> X unwrapOrNull(Class<X> internalComponentClass)
      Description copied from interface: Component
      Get client specific component instance. Can be used in client module to simplify invocation of underlying API.
      Returns null if underlying component cannot be casted to the given internalComponentClass. Example:
       com.vaadin.ui.TextField vTextField = textField.unwrapOrNull(com.vaadin.ui.TextField.class);
       
      Specified by:
      unwrapOrNull in interface Component
      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

      public <X> void withUnwrapped(Class<X> internalComponentClass, Consumer<X> action)
      Description copied from interface: Component
      Performs the given action with underlying component if it can be casted to the given internalComponentClass. Example:
       textField.withUnwrapped(com.vaadin.ui.TextField.class, vTextField -> {
           // do something
       });
       
      Specified by:
      withUnwrapped in interface Component
      Type Parameters:
      X - type of internal class
      Parameters:
      internalComponentClass - class of underlying component implementation based on Vaadin or Swing
      action - action to perform if underlying component can be casted to given class
    • unwrapComposition

      public <X> X unwrapComposition(Class<X> internalCompositionClass)
      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 interface Component
      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

      @Nullable public <X> X unwrapCompositionOrNull(Class<X> internalCompositionClass)
      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 given internalCompositionClass. Example:
       com.vaadin.ui.Layout vLayout = table.unwrapCompositionOrNull(com.vaadin.ui.Layout.class);
       
      Specified by:
      unwrapCompositionOrNull in interface Component
      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

      public <X> void withUnwrappedComposition(Class<X> internalCompositionClass, Consumer<X> action)
      Description copied from interface: Component
      Get the outmost external container of client specific component instance and performs the given action.
      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 interface Component
      Type Parameters:
      X - type of internal class
      Parameters:
      internalCompositionClass - class of underlying composition implementation based on Vaadin or Swing
      action - to perform if underlying composition can be casted to given class