java.lang.Object
com.amalgamasimulation.desktop.ui.editor.sections.descriptors.ComboBoxProperties

public class ComboBoxProperties extends Object
A builder class for configuring properties of SWT Combo controls. Provides fluent interface methods to set various combo box properties including dimensions, fonts.
Author:
Ionov Ivan
  • Method Details

    • newInstance

      public static ComboBoxProperties newInstance()
      Creates a new ComboBoxProperties instance with default values.
      Returns:
      a new ComboBoxProperties instance
    • getFont

      public org.eclipse.swt.graphics.Font getFont()
      Returns the font for the combo box control.
      Returns:
      the font used for the combo box
    • font

      public ComboBoxProperties font(org.eclipse.swt.graphics.Font font)
      Sets the font for the combo box control.
      Parameters:
      font - the font to use
      Returns:
      this ComboBoxProperties instance for method chaining
    • getWidth

      public int getWidth()
      Returns the width setting for the combo box control.
      Returns:
      the width in pixels
    • width

      public ComboBoxProperties width(int width)
      Sets the width of the combo box control.
      Parameters:
      width - the width in pixels
      Returns:
      this ComboBoxProperties instance for method chaining
    • isEnabled

      public boolean isEnabled()
      Returns whether the combo box control should be enabled. Considers both the section enablement and the dynamic enable condition.
      Returns:
      true if the control should be enabled, false otherwise
    • sectionEnabled

      public ComboBoxProperties sectionEnabled(boolean sectionEnabled)
      Sets the section-level enablement flag for the combo box control.
      Parameters:
      sectionEnabled - true if the containing section is enabled, false otherwise
      Returns:
      this ComboBoxProperties instance for method chaining
    • enabled

      public ComboBoxProperties enabled(boolean enabled)
      Sets a static enablement condition for the combo box control.
      Parameters:
      enabled - true to enable the control, false to disable it
      Returns:
      this ComboBoxProperties instance for method chaining
    • enabled

      public ComboBoxProperties enabled(BooleanSupplier enabled)
      Sets a dynamic enablement condition supplier for the combo box control.
      Parameters:
      enabled - a BooleanSupplier that provides the enablement condition
      Returns:
      this ComboBoxProperties instance for method chaining
    • copy

      public void copy(ComboBoxProperties comboboxProperties)
      Copies properties from another ComboBoxProperties instance.
      Parameters:
      comboboxProperties - the source properties to copy from