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 (package private) java.util.List<PTProperty>properties(package private) booleanshowButtons(package private) booleanshowDescription(package private) booleansorted(package private) intstyleOfView(package private) static intVIEW_AS_CATEGORIES(package private) static intVIEW_AS_FLAT_LIST -
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
Modifier and Type Method Description voidaddChangeListener(PTPropertyChangeListener listener)Add a change listener (event fired when the value of a property is changed)PTPropertyaddProperty(PTProperty property)Add a property in this widgetPropertyTablediscardChanges()Discard all changes that happened in that tablevoidfirePTPropertyChangeListeners(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()PropertyTablehideButtons()Hide all buttonsPropertyTablehideDescription()Hide description(package private) PropertyTablerebuild()Rebuild the whole tablevoidrefreshValues()Update the component when some values has changedvoidremoveChangeListener(PTPropertyChangeListener listener)Remove a change listenervoidsetProperties(java.util.Map<java.lang.String,java.lang.Object> newValues)PropertyTableshowButtons()Show all buttonsPropertyTableshowDescription()Show descriptionPropertyTablesort()Sort the propertiesPropertyTableunsort()Show properties not sortedPropertyTableviewAsCategories()View the properties as categoriesPropertyTableviewAsFlatList()View the properties as a flat listMethods 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, toStringMethods inherited from class org.eclipse.swt.widgets.Scrollable
computeTrim, getClientArea, getHorizontalBar, getScrollbarsMode, getVerticalBarMethods 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, 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, updateMethods 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
-
Field Details
-
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
-
-
Constructor Details
-
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
SWTwhich 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 thoseSWTstyle 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 Details
-
addChangeListener
Add a change listener (event fired when the value of a property is changed)- Parameters:
listener-
-
addProperty
Add a property in this widget- Parameters:
property- property to add- Returns:
- the property
-
firePTPropertyChangeListeners
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
- Returns:
- the properties stored in a list
-
hideButtons
Hide all buttons- Returns:
- this property table
-
hideDescription
Hide description- Returns:
- this property table
-
rebuild
PropertyTable rebuild()Rebuild the whole table- Returns:
- this property table
-
refreshValues
public void refreshValues()Update the component when some values has changed -
removeChangeListener
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
Show all buttons- Returns:
- this property table
-
showDescription
Show description- Returns:
- this property table
-
sort
Sort the properties- Returns:
- this property table
-
unsort
Show properties not sorted- Returns:
- this property table
-
viewAsCategories
View the properties as categories- Returns:
- this property table
-
viewAsFlatList
View the properties as a flat list- Returns:
- this property table
-
discardChanges
Discard all changes that happened in that table- Returns:
- this property table
-