|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.eclipse.swt.widgets.Widget
org.eclipse.swt.widgets.Control
org.eclipse.swt.widgets.Scrollable
org.eclipse.swt.widgets.Composite
com.tensegrity.gui.swt.control.attributetree.SwtAttributeTree
SwtAttributeTree is the SWT counterpart to the
SwingAttributeTree
class. It is used to display and edit the attributes of one or more
selected VisualGraphObject instances. The attributes themselves
are organized in a treelike fashion while different editors are used to assist
users in changing their values.
During a multiple selection, the tree tries to combine common attributes. If this is not possible, for example in the case of disparate values, each attribute is listed individually.
Please refer to
SwingAttributeTree
for a list of supported AttributeEditorProperties.
Similar to the Swing-based class, the SWT version is based on an implementation
of the AttributeTreeModel. For more information please refer to class
SwtAttributeTreeModel.
| Field Summary | |
static java.lang.String |
COL_WIDTH_KEY
Key for column width. |
static boolean |
DEBUG
Debug flag. |
| Fields inherited from class org.eclipse.swt.widgets.Control |
handle |
| Fields inherited from interface com.tensegrity.gui.component.AttributeTree |
PROPERTYNAME_ENABLE_WRITEPROTECTION, PROPERTYNAME_MERGEELEMENTTYPES, PROPERTYNAME_RENAMINGALLOWED, PROPERTYNAME_SHOWCATEGORIES |
| Fields inherited from interface com.tensegrity.gui.component.AttributeEditor |
hiddenPrefix, SORT_ASCENDING, SORT_DESCENDING, SORT_NONE |
| Constructor Summary | |
SwtAttributeTree(org.eclipse.swt.widgets.Composite parent,
UIManager uiManager)
Constructs a new SwtAttributeTree instance |
|
| Method Summary | |
void |
addMouseListener(org.eclipse.swt.events.MouseListener listener)
This adds the specified listener to the internally used table, so that this listener gets notified whenever a mouse click occurs on the table. |
void |
applyEvList()
Tells the component to apply its UIItemEvaluationList. |
void |
cancelEditing()
Cancels editing and discards changes. |
void |
enableMergeElementTypes(boolean enabled)
Enabled / Disables the merging of the element types. |
AttributableOnSet |
getAttributableOnSet()
Returns the current AttributableOnSet. |
AttributeEditorStateManager |
getAttributeEditorStateManager()
Returns the currently set state manager |
AttributeSet |
getCurrentAttributeSet()
Returns the currently active AttributeSet. |
AttributeEditorProperties |
getEditorProperties()
This method returns an instance of the currently used AttributeTableProperties instance. |
AttributeTableEditorSupplier |
getEditorSupplier()
Returns the AttributeTableEditorSupplier which is used
to provide an editor control for the currently selected tree item. |
int |
getHeight()
Returns the height of the component in pixels. |
BasicComponent |
getParentComponent()
Returns the parent Component of this instance. |
AttributeTableItem |
getSelectedItem()
Returns the currently selected AttributeTableItem
or null, if none is selected |
org.eclipse.swt.widgets.Table |
getTable()
For backward compatibility only |
org.eclipse.jface.viewers.TableTreeViewer |
getTableTreeViewer()
Returns the currently used table tree viewer |
int |
getWidth()
Returns the width of the component in pixels. |
void |
hideAttribute(java.lang.String name)
Hides the attribute identified by the given name. |
void |
installEvList()
Tells the component to setup its internal state. |
boolean |
isMergingElementTypes()
Returns whether element type merging is used or not |
boolean |
isTree()
Returns true, if this editor is displaying an AttributeTree and will
call get/setAttributesTree() instead of get/setAttributes(). |
void |
propertiesChanged()
Called from the AttributeEditorProperties when a setting
changed. |
void |
refresh()
Refreshes the attribute tree completely with information freshly obtained from the attribute tree's model |
void |
rehash()
Reloads the AttributeSet from the
AttributableOnSet and refreshes the view. |
void |
repaint()
Triggers a repaint. |
void |
setAttributableOnSet(AttributableOnSet attributable)
Sets the AttributableOnSet that should be shown in the
editor. |
void |
setAttributeEditorStateManager(AttributeEditorStateManager manager)
Sets the manager that is used to store and restore the state of the editor depending on the selected item. |
void |
setDefaultState()
Sets the look of the AttributeTree to its default state, i.e. the default expanding level and the default column width. |
AttributeEditorProperties |
setEditorProperties(AttributeEditorProperties editorProperties)
This method sets an instance of the AttributeTableProperties to be used. |
void |
setInput(AttributeTableItem rootItem)
Sets the input of the AttributeTree, by specifing the root item. |
void |
showAttribute(java.lang.String name)
Toggles the hidden flag for an attribute identified by the given name. |
boolean |
stopEditing()
Stops the editing of an Attribute and saves the current value. |
| Methods inherited from class org.eclipse.swt.widgets.Composite |
checkSubclass, computeSize, getChildren, getLayout, getTabList, layout, layout, setFocus, setLayout, setTabList |
| Methods inherited from class org.eclipse.swt.widgets.Scrollable |
computeTrim, getClientArea, getHorizontalBar, getVerticalBar |
| Methods inherited from class org.eclipse.swt.widgets.Control |
addControlListener, addFocusListener, addHelpListener, addKeyListener, addMouseMoveListener, addMouseTrackListener, addPaintListener, addTraverseListener, computeSize, forceFocus, getAccessible, getBackground, getBorderWidth, getBounds, getEnabled, getFont, getForeground, getLayoutData, getLocation, getMenu, getMonitor, getParent, getShell, getSize, getToolTipText, getVisible, internal_dispose_GC, internal_new_GC, isEnabled, isFocusControl, isReparentable, isVisible, moveAbove, moveBelow, pack, pack, redraw, redraw, removeControlListener, removeFocusListener, removeHelpListener, removeKeyListener, removeMouseListener, removeMouseMoveListener, removeMouseTrackListener, removePaintListener, removeTraverseListener, setBackground, setBounds, setBounds, setCapture, setCursor, setEnabled, setFont, setForeground, setLayoutData, setLocation, setLocation, setMenu, setParent, setRedraw, setSize, setSize, setToolTipText, setVisible, toControl, toControl, toDisplay, toDisplay, traverse, update |
| Methods inherited from class org.eclipse.swt.widgets.Widget |
addDisposeListener, addListener, checkWidget, dispose, getData, getData, getDisplay, getStyle, isDisposed, isListening, notifyListeners, removeDisposeListener, removeListener, removeListener, setData, setData, toString |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
public static final java.lang.String COL_WIDTH_KEY
TableColumn#getData()
public static final boolean DEBUG
| Constructor Detail |
public SwtAttributeTree(org.eclipse.swt.widgets.Composite parent,
UIManager uiManager)
parent - the Composite to add this SwtAttributeTree touiManager - the UIManager to use for internationalization| Method Detail |
public void setAttributableOnSet(AttributableOnSet attributable)
AttributeEditorAttributableOnSet that should be shown in the
editor. The parameter may be null in which case the editor will be empty.
setAttributableOnSet in interface AttributeEditorattributable - the AttributableOnSet to set.public final void setDefaultState()
public final AttributeTableEditorSupplier getEditorSupplier()
AttributeTableEditorSupplier which is used
to provide an editor control for the currently selected tree item.
AttributeTableEditorSupplierpublic AttributableOnSet getAttributableOnSet()
AttributeEditorAttributableOnSet. This might be null.
getAttributableOnSet in interface AttributeEditorAttributableOnSet or null, if the editor
is empty.public AttributeSet getCurrentAttributeSet()
AttributeEditorAttributeSet. This set is the
instance that is currently shown in the editor, while retrieving the
AttributableOnSet and calling
AttributableOnSet.getAttributes() or
AttributableOnSet.getAttributesTree() might return a clone of
the AttributeSet.
Note: Changes to the AttributeSet will not have an effect
on the AttributableOnSet and changes in the structure will
not be visible in the editor. Changes will be discarded when an event
occurrs that requires reloading the AttributeSet from the
AttributableOnSet.
getCurrentAttributeSet in interface AttributeEditorAttributeSet that is currently
shown in the editor.public boolean stopEditing()
AttributeEditorAttribute and saves the current value.
stopEditing in interface AttributeEditorpublic void cancelEditing()
AttributeEditor
cancelEditing in interface AttributeEditorpublic void hideAttribute(java.lang.String name)
AttributeEditorGEOMETRY.X or COMPOSITE.name.
This method will just forward the call to
AttributeEditorProperties.setVisible(String, boolean)
hideAttribute in interface AttributeEditorname - the full name of the attribute.public void showAttribute(java.lang.String name)
AttributeEditorhideAttribute(String), this
name describes the full path to the attribute.
This method will just forward the call to
AttributeEditorProperties.setVisible(String, boolean)
showAttribute in interface AttributeEditorname - the full name of the attribute.public AttributeEditorProperties getEditorProperties()
AttributeEditorAttributeTableProperties instance.
getEditorProperties in interface AttributeEditorpublic AttributeEditorProperties setEditorProperties(AttributeEditorProperties editorProperties)
AttributeEditorAttributeTableProperties to be used.
setEditorProperties in interface AttributeEditoreditorProperties - The properties instance that should
be used by this editor
public void rehash()
AttributeEditorAttributeSet from the
AttributableOnSet and refreshes the view.
rehash in interface AttributeEditorpublic void propertiesChanged()
AttributeEditorAttributeEditorProperties when a setting
changed. The editor implementation should rehash the attributes whenever
this method is called.
propertiesChanged in interface AttributeEditorpublic boolean isTree()
AttributeEditorAttributeTree and will
call get/setAttributesTree() instead of get/setAttributes().
isTree in interface AttributeEditorAttributeTreepublic int getWidth()
BasicComponent
getWidth in interface BasicComponentpublic int getHeight()
BasicComponent
getHeight in interface BasicComponentpublic void repaint()
BasicComponent
repaint in interface BasicComponentpublic BasicComponent getParentComponent()
BasicComponent
getParentComponent in interface BasicComponentnull if no parent exists.public void installEvList()
Evaluable
installEvList in interface Evaluablepublic void applyEvList()
EvaluableUIItemEvaluationList.
applyEvList in interface Evaluablepublic org.eclipse.swt.widgets.Table getTable()
public final org.eclipse.jface.viewers.TableTreeViewer getTableTreeViewer()
public void enableMergeElementTypes(boolean enabled)
enabled - True, to enable mergingpublic boolean isMergingElementTypes()
public void addMouseListener(org.eclipse.swt.events.MouseListener listener)
public final AttributeTableItem getSelectedItem()
AttributeTableItem
or null, if none is selected
AttributeTableItem or null;public void setAttributeEditorStateManager(AttributeEditorStateManager manager)
AttributeTree
setAttributeEditorStateManager in interface AttributeTreemanager - The manager to setpublic AttributeEditorStateManager getAttributeEditorStateManager()
AttributeTree
getAttributeEditorStateManager in interface AttributeTreepublic final void refresh()
public final void setInput(AttributeTableItem rootItem)
rootItem - the AttributeTableItem to which all other items are
directly or indirectly connected.
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||