Class AbstractPTWidget

  • All Implemented Interfaces:
    PTWidget
    Direct Known Subclasses:
    PTWidgetTable, PTWidgetTree

    public abstract class AbstractPTWidget
    extends java.lang.Object
    implements PTWidget
    This abstract class contains all common methods for widgets that are part of a property table
    • Field Detail

      • descriptionLabel

        protected org.eclipse.swt.custom.StyledText descriptionLabel
    • Constructor Detail

      • AbstractPTWidget

        public AbstractPTWidget()
    • Method Detail

      • buildWidget

        protected abstract void buildWidget​(org.eclipse.swt.widgets.Composite parent)
        Build the widget itself
        Parameters:
        parent -
      • buildButtons

        private void buildButtons​(org.eclipse.swt.widgets.Composite parent,
                                  boolean sorted,
                                  boolean showAsCategory,
                                  boolean showDescription)
        Build the buttons (Sort, switch category/flat list, show/hide description)
        Parameters:
        parent - parent composite
        sorted - if true, the sort button is pushed
        showAsCategory - if true, the "show as category" button is pushed
        showDescription - if true, the "description" button is pushed
      • buildSortButton

        private void buildSortButton​(org.eclipse.swt.widgets.Composite parent,
                                     boolean sorted)
        Parameters:
        parent - parent composite
        sorted - if true, the sort button is pushed
      • buildCategoryButton

        private void buildCategoryButton​(org.eclipse.swt.widgets.Composite parent,
                                         boolean showAsCategory)
        Parameters:
        parent - parent composite
        showAsCategory - if true, the "show as category" button is pushed
      • buildDescriptionButton

        private void buildDescriptionButton​(org.eclipse.swt.widgets.Composite parent,
                                            boolean showDescription)
        Parameters:
        parent - parent composite
        showDescription - if true, the "description" button is pushed
      • buildDescriptionPanel

        private void buildDescriptionPanel​(org.eclipse.swt.widgets.Composite parent)
        Build the description panel
        Parameters:
        parent - parent composite
      • dispose

        private void dispose()
        Dispose the previous widget
      • getParentPropertyTable

        protected PropertyTable getParentPropertyTable()
        Returns:
        the parent PropertyTable
      • setParentPropertyTable

        public void setParentPropertyTable​(PropertyTable table)
        Description copied from interface: PTWidget
        Inject the parent property table in the widget
        Specified by:
        setParentPropertyTable in interface PTWidget
        Parameters:
        parentPropertyTable - the parent PropertyTable to set