Class SpinnerSection<V>
java.lang.Object
com.amalgamasimulation.desktop.ui.editor.sections.internal.Section
com.amalgamasimulation.desktop.ui.editor.sections.SpinnerSection<V>
- All Implemented Interfaces:
ILabelSection,ISection,ISpinnerSection<V>
- Direct Known Subclasses:
ContainerSpinnerSection
public class SpinnerSection<V>
extends com.amalgamasimulation.desktop.ui.editor.sections.internal.Section
implements ISpinnerSection<V>, ILabelSection
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected List<InternalButton> protected com.amalgamasimulation.desktop.ui.editor.internal.InternalLabelprotected com.amalgamasimulation.desktop.ui.editor.internal.InternalSpinner<V> protected AbstractSpinnerDataBinding<V> Fields inherited from class com.amalgamasimulation.desktop.ui.editor.sections.internal.Section
compositeForSection, elements, eventBroker -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddButton(IButtonProperties buttonProperties) voidaddButton(IButtonProperties buttonProperties, int index) protected InternalButtoncreateButton(IButtonProperties buttonProperties) protected intintReturns the width of the label text.booleanReturns whether the label is left out of alignment, seeLabelProperties.skipAlignment(boolean).voidlabelProperties(LabelProperties labelProperties) Sets the label properties.voidlabelWidth(int labelWidth) Sets the label width used for alignment.voidspinnerProperties(SpinnerProperties<V> spinnerProperties) voidEnables or disables the section controls according toISection.isEnabled().Methods inherited from class com.amalgamasimulation.desktop.ui.editor.sections.internal.Section
createSection, dispose, enabled, getCompositeSection, isEnabled, isPageEnabled, isVisible, moveBelow, pageEnabled, setEventBroker, setParent, updateSection, updateVisible, visibleMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.amalgamasimulation.desktop.ui.editor.common.ISection
dispose, isEnabled, isVisible, updateSection, updateVisible
-
Field Details
-
internalLabel
protected com.amalgamasimulation.desktop.ui.editor.internal.InternalLabel internalLabel -
internalSpinner
-
buttons
-
spinnerDataBinding
-
-
Constructor Details
-
SpinnerSection
public SpinnerSection()
-
-
Method Details
-
getDataBinding
-
updateEnabled
public void updateEnabled()Description copied from interface:ISectionEnables or disables the section controls according toISection.isEnabled().- Specified by:
updateEnabledin interfaceISection- Overrides:
updateEnabledin classcom.amalgamasimulation.desktop.ui.editor.sections.internal.Section
-
getColumnCount
protected int getColumnCount()- Overrides:
getColumnCountin classcom.amalgamasimulation.desktop.ui.editor.sections.internal.Section
-
labelProperties
Description copied from interface:ILabelSectionSets the label properties.- Specified by:
labelPropertiesin interfaceILabelSection- Parameters:
labelProperties- the label properties
-
spinnerProperties
-
addButton
-
addButton
-
createButton
-
isAlignmentSkipped
public boolean isAlignmentSkipped()Description copied from interface:ILabelSectionReturns whether the label is left out of alignment, seeLabelProperties.skipAlignment(boolean).- Specified by:
isAlignmentSkippedin interfaceILabelSection- Returns:
- true if the label is not aligned
-
getMeasuredLabelWidth
public int getMeasuredLabelWidth()Description copied from interface:ILabelSectionReturns the width of the label text.- Specified by:
getMeasuredLabelWidthin interfaceILabelSection- Returns:
- the width in pixels, or 0 if the label has its own width or skips alignment
-
labelWidth
public void labelWidth(int labelWidth) Description copied from interface:ILabelSectionSets the label width used for alignment. Has no effect if the label has its own width.- Specified by:
labelWidthin interfaceILabelSection- Parameters:
labelWidth- the width in pixels
-