Class PropertyTable
- java.lang.Object
-
- org.eclipse.swt.widgets.Widget
-
- org.eclipse.swt.widgets.Control
-
- org.eclipse.swt.widgets.Scrollable
-
- org.eclipse.swt.widgets.Composite
-
- org.eclipse.nebula.widgets.opal.propertytable.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
-
-
Field Summary
Fields Modifier and Type Field Description private java.util.List<PTPropertyChangeListener>
changeListeners
private boolean
hasBeenBuilt
(package private) java.util.List<PTProperty>
properties
(package private) boolean
showButtons
(package private) boolean
showDescription
(package private) boolean
sorted
(package private) int
styleOfView
(package private) static int
VIEW_AS_CATEGORIES
(package private) static int
VIEW_AS_FLAT_LIST
private PTWidget
widget
-
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 widgetvoid
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 buttonsPropertyTable
hideDescription()
Hide descriptionprivate PropertyTable
rebuild()
Rebuild the whole tablevoid
refreshValues()
Update the component when some values has changedvoid
removeChangeListener(PTPropertyChangeListener listener)
Remove a change listenervoid
setProperties(java.util.Map<java.lang.String,java.lang.Object> newValues)
PropertyTable
showButtons()
Show all buttonsPropertyTable
showDescription()
Show descriptionPropertyTable
sort()
Sort the propertiesPropertyTable
unsort()
Show properties not sortedPropertyTable
viewAsCategories()
View the properties as categoriesPropertyTable
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
-
-
-
-
Field Detail
-
VIEW_AS_FLAT_LIST
static final int VIEW_AS_FLAT_LIST
- See Also:
- Constant Field Values
-
VIEW_AS_CATEGORIES
static final int VIEW_AS_CATEGORIES
- See Also:
- Constant Field Values
-
showButtons
boolean showButtons
-
showDescription
boolean showDescription
-
sorted
boolean sorted
-
styleOfView
int styleOfView
-
properties
final java.util.List<PTProperty> properties
-
hasBeenBuilt
private boolean hasBeenBuilt
-
changeListeners
private final java.util.List<PTPropertyChangeListener> changeListeners
-
widget
private PTWidget widget
-
-
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 theint
"|" operator) two or more of thoseSWT
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
-
-