java.lang.Object
com.amalgamasimulation.desktop.ui.editor.sections.internal.Section
com.amalgamasimulation.desktop.ui.editor.sections.TextSection<V>
All Implemented Interfaces:
ILabelSection, ISection, ITextSection<V>
Direct Known Subclasses:
AutoCompleteSection, ContainerTextSection

public class TextSection<V> extends com.amalgamasimulation.desktop.ui.editor.sections.internal.Section implements ITextSection<V>, ILabelSection
  • Field Details

    • internalLabel

      protected com.amalgamasimulation.desktop.ui.editor.internal.InternalLabel internalLabel
    • internalText

      protected com.amalgamasimulation.desktop.ui.editor.internal.InternalText<V> internalText
    • buttons

      protected List<InternalButton> buttons
    • textDataBinding

      protected AbstractTextDataBinding<V> textDataBinding
  • Constructor Details

    • TextSection

      public TextSection()
  • Method Details

    • isAlignmentSkipped

      public boolean isAlignmentSkipped()
      Description copied from interface: ILabelSection
      Returns whether the label is left out of alignment, see LabelProperties.skipAlignment(boolean).
      Specified by:
      isAlignmentSkipped in interface ILabelSection
      Returns:
      true if the label is not aligned
    • getDataBinding

      public AbstractTextDataBinding<V> getDataBinding()
    • getText

      public org.eclipse.swt.widgets.Text getText()
      Specified by:
      getText in interface ITextSection<V>
    • updateEnabled

      public void updateEnabled()
      Description copied from interface: ISection
      Enables or disables the section controls according to ISection.isEnabled().
      Specified by:
      updateEnabled in interface ISection
      Overrides:
      updateEnabled in class com.amalgamasimulation.desktop.ui.editor.sections.internal.Section
    • getColumnCount

      protected int getColumnCount()
      Overrides:
      getColumnCount in class com.amalgamasimulation.desktop.ui.editor.sections.internal.Section
    • labelProperties

      public void labelProperties(LabelProperties labelProperties)
      Description copied from interface: ILabelSection
      Sets the label properties.
      Specified by:
      labelProperties in interface ILabelSection
      Parameters:
      labelProperties - the label properties
    • textProperties

      public void textProperties(TextProperties textProperties)
    • addButton

      public void addButton(IButtonProperties buttonProperties)
    • createButton

      protected InternalButton createButton(IButtonProperties buttonProperties)
    • addButton

      public void addButton(IButtonProperties buttonProperties, int index)
    • getMeasuredLabelWidth

      public int getMeasuredLabelWidth()
      Description copied from interface: ILabelSection
      Returns the width of the label text.
      Specified by:
      getMeasuredLabelWidth in interface ILabelSection
      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: ILabelSection
      Sets the label width used for alignment. Has no effect if the label has its own width.
      Specified by:
      labelWidth in interface ILabelSection
      Parameters:
      labelWidth - the width in pixels