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
    • setFont

      public ComboBoxProperties setFont(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
    • isEnable

      public boolean isEnable()
      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
    • setSectionEnable

      public void setSectionEnable(boolean sectionEnable)
      Sets the section-level enablement flag for the combo box control.
      Parameters:
      sectionEnable - true if the containing section is enabled, false otherwise
    • enable

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

      public ComboBoxProperties enable(BooleanSupplier enable)
      Sets a dynamic enablement condition supplier for the combo box control.
      Parameters:
      enable - 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