Interface ILabelSection
- All Superinterfaces:
ISection
- All Known Implementing Classes:
AutoCompleteSection,CheckBoxSection,ComboBoxSection,ContainerAutoCompleteSection,ContainerCheckBoxSection,ContainerComboBoxSection,ContainerSpinnerSection,ContainerTextSection,CustomSection,EmfAutoCompleteSection,EmfCheckBoxSection,EmfComboBoxSection,EmfSpinnerSection,EmfTextSection,EmfViewSection,SpinnerSection,TextSection
A section whose label is aligned in width with the labels of other sections.
- Author:
- Ionov Ivan
-
Method Summary
Modifier and TypeMethodDescriptionintReturns 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.Methods inherited from interface com.amalgamasimulation.desktop.ui.editor.common.ISection
dispose, isEnabled, isVisible, updateEnabled, updateSection, updateVisible
-
Method Details
-
labelProperties
Sets the label properties.- Parameters:
labelProperties- the label properties
-
getMeasuredLabelWidth
int getMeasuredLabelWidth()Returns the width of the label text.- Returns:
- the width in pixels, or 0 if the label has its own width or skips alignment
-
labelWidth
void labelWidth(int labelWidth) Sets the label width used for alignment. Has no effect if the label has its own width.- Parameters:
labelWidth- the width in pixels
-
isAlignmentSkipped
boolean isAlignmentSkipped()Returns whether the label is left out of alignment, seeLabelProperties.skipAlignment(boolean).- Returns:
- true if the label is not aligned
-