Class PropertyTable

  • All Implemented Interfaces:
    org.eclipse.swt.graphics.Drawable

    public class PropertyTable
    extends org.eclipse.swt.widgets.Composite
    Instances of this class are property sheets

    Styles:
    BORDER
    Events:
    PTPropertyChange

    • Constructor Summary

      Constructors 
      Constructor Description
      PropertyTable​(org.eclipse.swt.widgets.Composite parent, int style)
      Constructs a new instance of this class given its parent and a style value describing its behavior and appearance.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void addChangeListener​(PTPropertyChangeListener listener)
      Add a change listener (event fired when the value of a property is changed)
      PTProperty addProperty​(PTProperty property)
      Add a property in this widget
      void firePTPropertyChangeListeners​(PTProperty property)
      Fire the event "a value of a property has changed"
      java.util.Map<java.lang.String,​java.lang.Object> getProperties()  
      java.util.List<PTProperty> getPropertiesAsList()  
      PropertyTable hideButtons()
      Hide all buttons
      PropertyTable hideDescription()
      Hide description
      private PropertyTable rebuild()
      Rebuild the whole table
      void refreshValues()
      Update the component when some values has changed
      void removeChangeListener​(PTPropertyChangeListener listener)
      Remove a change listener
      void setProperties​(java.util.Map<java.lang.String,​java.lang.Object> newValues)  
      PropertyTable showButtons()
      Show all buttons
      PropertyTable showDescription()
      Show description
      PropertyTable sort()
      Sort the properties
      PropertyTable unsort()
      Show properties not sorted
      PropertyTable viewAsCategories()
      View the properties as categories
      PropertyTable viewAsFlatList()
      View the properties as a flat list
      • Methods inherited from class org.eclipse.swt.widgets.Composite

        changed, checkSubclass, drawBackground, getBackgroundMode, getChildren, getLayout, getLayoutDeferred, getTabList, isLayoutDeferred, layout, layout, layout, layout, layout, setBackgroundMode, setFocus, setLayout, setLayoutDeferred, setTabList
      • Methods inherited from class org.eclipse.swt.widgets.Scrollable

        computeTrim, getClientArea, getHorizontalBar, getScrollbarsMode, getVerticalBar
      • Methods inherited from class org.eclipse.swt.widgets.Control

        addControlListener, addDragDetectListener, addFocusListener, addGestureListener, addHelpListener, addKeyListener, addMenuDetectListener, addMouseListener, addMouseMoveListener, addMouseTrackListener, addMouseWheelListener, addPaintListener, addTouchListener, addTraverseListener, computeSize, computeSize, dragDetect, dragDetect, forceFocus, getAccessible, getBackground, getBackgroundImage, getBorderWidth, getBounds, getCursor, getDragDetect, getEnabled, getFont, getForeground, getLayoutData, getLocation, getMenu, getMonitor, getOrientation, getParent, getRegion, getShell, getSize, getTextDirection, getToolTipText, getTouchEnabled, getVisible, internal_dispose_GC, internal_new_GC, isAutoScalable, isEnabled, isFocusControl, isReparentable, isVisible, moveAbove, moveBelow, pack, pack, print, redraw, redraw, removeControlListener, removeDragDetectListener, removeFocusListener, removeGestureListener, removeHelpListener, removeKeyListener, removeMenuDetectListener, removeMouseListener, removeMouseMoveListener, removeMouseTrackListener, removeMouseWheelListener, removePaintListener, removeTouchListener, removeTraverseListener, requestLayout, setBackground, setBackgroundImage, setBounds, setBounds, setCapture, setCursor, setDragDetect, setEnabled, setFont, setForeground, setLayoutData, setLocation, setLocation, setMenu, setOrientation, setParent, setRedraw, setRegion, setSize, setSize, setTextDirection, setToolTipText, setTouchEnabled, setVisible, toControl, toControl, toDisplay, toDisplay, traverse, traverse, traverse, update
      • Methods inherited from class org.eclipse.swt.widgets.Widget

        addDisposeListener, addListener, checkWidget, dispose, getData, getData, getDisplay, getListeners, getStyle, isAutoDirection, isDisposed, isListening, notifyListeners, removeDisposeListener, removeListener, removeListener, reskin, setData, setData, toString
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Field Detail

      • showButtons

        boolean showButtons
      • showDescription

        boolean showDescription
      • sorted

        boolean sorted
      • styleOfView

        int styleOfView
      • properties

        final java.util.List<PTProperty> properties
      • hasBeenBuilt

        private boolean hasBeenBuilt
    • Constructor Detail

      • PropertyTable

        public PropertyTable​(org.eclipse.swt.widgets.Composite parent,
                             int style)
        Constructs a new instance of this class given its parent and a style value describing its behavior and appearance.

        The style value is either one of the style constants defined in class SWT which is applicable to instances of this class, or must be built by bitwise OR'ing together (that is, using the int "|" operator) two or more of those SWT style constants. The class description lists the style constants that are applicable to the class. Style bits are also inherited from superclasses.

        Parameters:
        parent - a composite control which will be the parent of the new instance (cannot be null)
        style - the style of control to construct
        Throws:
        java.lang.IllegalArgumentException -
        • ERROR_NULL_ARGUMENT - if the parent is null
        org.eclipse.swt.SWTException -
        • ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the parent
    • Method Detail

      • addChangeListener

        public void addChangeListener​(PTPropertyChangeListener listener)
        Add a change listener (event fired when the value of a property is changed)
        Parameters:
        listener -
      • addProperty

        public PTProperty addProperty​(PTProperty property)
        Add a property in this widget
        Parameters:
        property - property to add
        Returns:
        the property
      • firePTPropertyChangeListeners

        public void firePTPropertyChangeListeners​(PTProperty property)
        Fire the event "a value of a property has changed"
        Parameters:
        property - property which value has changed
      • getProperties

        public java.util.Map<java.lang.String,​java.lang.Object> getProperties()
        Returns:
        the values stored in this object in a map. Keys are property's name, values are values stored in a the property.
      • getPropertiesAsList

        public java.util.List<PTProperty> getPropertiesAsList()
        Returns:
        the properties stored in a list
      • hideButtons

        public PropertyTable hideButtons()
        Hide all buttons
        Returns:
        this property table
      • hideDescription

        public PropertyTable hideDescription()
        Hide description
        Returns:
        this property table
      • rebuild

        private PropertyTable rebuild()
        Rebuild the whole table
        Returns:
        this property table
      • refreshValues

        public void refreshValues()
        Update the component when some values has changed
      • removeChangeListener

        public void removeChangeListener​(PTPropertyChangeListener listener)
        Remove a change listener
        Parameters:
        listener - listener to remove
      • setProperties

        public void setProperties​(java.util.Map<java.lang.String,​java.lang.Object> newValues)
        Parameters:
        newValues -
      • showButtons

        public PropertyTable showButtons()
        Show all buttons
        Returns:
        this property table
      • showDescription

        public PropertyTable showDescription()
        Show description
        Returns:
        this property table
      • sort

        public PropertyTable sort()
        Sort the properties
        Returns:
        this property table
      • unsort

        public PropertyTable unsort()
        Show properties not sorted
        Returns:
        this property table
      • viewAsCategories

        public PropertyTable viewAsCategories()
        View the properties as categories
        Returns:
        this property table
      • viewAsFlatList

        public PropertyTable viewAsFlatList()
        View the properties as a flat list
        Returns:
        this property table