Class FxComboBoxDelegate

All Implemented Interfaces:
Function<javafx.scene.control.TextFormatter.Change,javafx.scene.control.TextFormatter.Change>, UnaryOperator<javafx.scene.control.TextFormatter.Change>, ErrorPopupSupported, FxComponent, FxControl, FxTextComponent, InfoPopupSupported

public class FxComboBoxDelegate extends FxTextComponentDelegate
Delegate for FxComboBox.
Author:
harald
  • Constructor Details

    • FxComboBoxDelegate

      public FxComboBoxDelegate(FxComboBox<?> component)
      Creates the delegate.
      Parameters:
      component - the component
  • Method Details

    • getComponent

      public FxComboBox<?> getComponent()
      Description copied from class: FxComponentDelegate
      Gets the component of this delegate.
      Specified by:
      getComponent in class FxComponentDelegate
      Returns:
      the component
    • getParentContainer

      public FxContainer getParentContainer()
      Description copied from interface: FxControl
      Gets the parent container.
      Specified by:
      getParentContainer in interface FxControl
      Overrides:
      getParentContainer in class FxComponentDelegate
      Returns:
      the parent, null if not a component of a container
    • setColumns

      public void setColumns(int columns)
      Description copied from interface: FxTextComponent
      Sets the number of columns in this component.
      The visible width is adjusted according to the current font.
      Parameters:
      columns - the number of columns ≥ 0
    • getColumns

      public int getColumns()
      Description copied from interface: FxTextComponent
      Gets the columns.
      Returns:
      the columns
    • setType

      public void setType(Class<?> type)
      Description copied from interface: FxComponent
      Sets the type for this component.

      Notice that the type can be applied only once. This is because previously installed listeners could cause memory leaks.

      Specified by:
      setType in interface FxComponent
      Overrides:
      setType in class FxTextComponentDelegate
      Parameters:
      type - the type
    • getViewObject

      public Object getViewObject()
      Description copied from interface: FxComponent
      Retrieves the internal native object of the component.
      Returns:
      the component's object
    • setViewObject

      public void setViewObject(Object viewObject)
      Description copied from interface: FxComponent
      Sets the internal native object of the component.
      Parameters:
      viewObject - the internal object
    • setViewValue

      public void setViewValue(Object value)
      Description copied from interface: FxComponent
      Sets a value in this component.
      The value's type is that of the model.
      Specified by:
      setViewValue in interface FxComponent
      Overrides:
      setViewValue in class FxComponentDelegate
      Parameters:
      value - is the value to set
    • getViewValue

      public <V> V getViewValue()
      Description copied from interface: FxComponent
      Retrieves the value from this component.
      The value's type is that of the model.
      Specified by:
      getViewValue in interface FxComponent
      Overrides:
      getViewValue in class FxComponentDelegate
      Type Parameters:
      V - the value's type
      Returns:
      the value shown by the component
    • mapErrorOffsetToCaretPosition

      public void mapErrorOffsetToCaretPosition()
      Description copied from interface: FxTextComponent
      Sets the caret position according to the error offset.
      Does nothing if error offset is null.
    • isDeselectAllowed

      public boolean isDeselectAllowed()
      Returns whether deselect is allowed.
      Returns:
      true if allowed
    • autoSelect

      public void autoSelect()
      Description copied from interface: FxTextComponent
      Selects or deselects all text in the text input.
      Specified by:
      autoSelect in interface FxTextComponent
      Overrides:
      autoSelect in class FxTextComponentDelegate
      See Also: