Class ComboBoxProperties
java.lang.Object
com.amalgamasimulation.desktop.ui.editor.sections.descriptors.ComboBoxProperties
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 Summary
Modifier and TypeMethodDescriptionvoidcopy(ComboBoxProperties comboboxProperties) Copies properties from another ComboBoxProperties instance.enable(boolean enable) Sets a static enablement condition for the combo box control.enable(BooleanSupplier enable) Sets a dynamic enablement condition supplier for the combo box control.org.eclipse.swt.graphics.FontgetFont()Returns the font for the combo box control.intgetWidth()Returns the width setting for the combo box control.booleanisEnable()Returns whether the combo box control should be enabled.static ComboBoxPropertiesCreates a new ComboBoxProperties instance with default values.setFont(org.eclipse.swt.graphics.Font font) Sets the font for the combo box control.voidsetSectionEnable(boolean sectionEnable) Sets the section-level enablement flag for the combo box control.width(int width) Sets the width of the combo box control.
-
Method Details
-
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
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
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
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
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
Copies properties from another ComboBoxProperties instance.- Parameters:
comboboxProperties- the source properties to copy from
-