|
|||||||||||
| 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.CopyOfSwtAttributeTable
This class is a SWT implementation of the AttributeTable
definition.
It is a and it internally
uses an instance of Composite in order
to display attribute values.
Table
| Nested Class Summary | |
static class |
CopyOfSwtAttributeTable.CustomMappedComparator
Custom attribute comparator. |
| Field Summary |
| Fields inherited from class org.eclipse.swt.widgets.Control |
handle |
| Fields inherited from interface com.tensegrity.gui.component.AttributeEditor |
hiddenPrefix, SORT_ASCENDING, SORT_DESCENDING, SORT_NONE |
| Constructor Summary | |
CopyOfSwtAttributeTable(UIManager uiManager,
org.eclipse.swt.widgets.Composite parent,
int style,
boolean editable)
Constructs an attribute table. |
|
| Method Summary | |
void |
applyEvList()
Tells the component to apply its UIItemEvaluationList. |
void |
attributesChanged(AttributableOnSetEvent attributableOnSetEvent)
Invoked when an attribute in an AttributableOnSet object
has changed. |
void |
cancelEditing()
Cancels editing and discards changes. |
void |
foldCategories()
Folds the categories |
AttributableOnSet |
getAttributableOnSet()
Returns the current AttributableOnSet. |
AttributeSet |
getCurrentAttributeSet()
Returns the AttributeSet currently displayed in the
table. |
AttributeEditorProperties |
getEditorProperties()
This method returns an instance of the currently used AttributeTableProperties instance. |
int |
getHeight()
Returns the height of the component in pixels. |
BasicComponent |
getParentComponent()
Returns the parent Component of this instance. |
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 |
isEditable()
Returns the editable flag |
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 |
rehash()
Reloads the AttributeSet from the
AttributableOnSet and refreshes the view. |
void |
repaint()
Triggers a repaint. |
void |
scrollToAttribute(java.lang.String path)
Makes an attribute visible by scrolling to it. |
void |
setAttributableOnSet(AttributableOnSet attributable)
Associates a new attributeset with the attributetable's model. |
void |
setEditable(boolean editable)
Sets the editable flag. if false, then table is read-only. |
AttributeEditorProperties |
setEditorProperties(AttributeEditorProperties editorProperties)
This method sets an instance of the AttributeTableProperties to be used. |
void |
showAttribute(java.lang.String name)
Toggles the hidden flag for an attribute identified by the given name. |
void |
sort(int mode)
Sorts the table. |
boolean |
stopEditing()
Stops the editing of an Attribute and saves the current value. |
void |
unfoldCategories()
Unfolds the categories |
| 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, addMouseListener, 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 |
| Constructor Detail |
public CopyOfSwtAttributeTable(UIManager uiManager,
org.eclipse.swt.widgets.Composite parent,
int style,
boolean editable)
Constructs an attribute table.
uiManager - a UIManager instance used for
localization of Stringsparent - the parent Composite for this tablestyle - the SWT style used to create this
Compositeeditable - flag for editing, if set to true, then the table is editable,
otherwise it is not.| Method Detail |
public void applyEvList()
EvaluableUIItemEvaluationList.
applyEvList in interface EvaluableEvaluable.applyEvList()public void installEvList()
Evaluable
installEvList in interface EvaluableEvaluable.installEvList()public void attributesChanged(AttributableOnSetEvent attributableOnSetEvent)
AttributableOnSetListenerAttributableOnSet object
has changed.
attributesChanged in interface AttributableOnSetListenerattributableOnSetEvent - the event carrying information.AttributableOnSetListener.attributesChanged(com.tensegrity.generic.attribute.event.AttributableOnSetEvent)public void cancelEditing()
AttributeEditor
cancelEditing in interface AttributeEditorAttributeEditor.cancelEditing()public AttributableOnSet getAttributableOnSet()
AttributeEditorAttributableOnSet. This might be null.
getAttributableOnSet in interface AttributeEditorAttributableOnSet or null, if the editor
is empty.AttributeEditor.getAttributableOnSet()public void rehash()
AttributeEditorAttributeSet from the
AttributableOnSet and refreshes the view.
rehash in interface AttributeEditorAttributeEditor.rehash()public boolean stopEditing()
AttributeEditorAttribute and saves the current value.
stopEditing in interface AttributeEditorAttributeEditor.stopEditing()public BasicComponent getParentComponent()
BasicComponent
getParentComponent in interface BasicComponentnull if no parent exists.BasicComponent.getParentComponent()public int getHeight()
BasicComponent
getHeight in interface BasicComponentBasicComponent.getHeight()public int getWidth()
BasicComponent
getWidth in interface BasicComponentBasicComponent.getWidth()public void repaint()
BasicComponent
repaint in interface BasicComponentBasicComponent.repaint()public void setAttributableOnSet(AttributableOnSet attributable)
setAttributableOnSet in interface AttributeEditorattributable - the AttributableOnSet to set.public AttributeSet getCurrentAttributeSet()
AttributeSet currently displayed in the
table.
getCurrentAttributeSet in interface AttributeEditorAttributeSet of the
tablepublic void sort(int mode)
mode - one the constants defined in this class.public void unfoldCategories()
public void foldCategories()
public boolean isEditable()
public void setEditable(boolean editable)
editable - The editable to setpublic void scrollToAttribute(java.lang.String path)
Makes an attribute visible by scrolling to it.
path - the path of the attribute to showpublic 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.AttributeEditor.hideAttribute(String)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.AttributeEditor.showAttribute(String)public AttributeEditorProperties getEditorProperties()
AttributeEditorAttributeTableProperties instance.
getEditorProperties in interface AttributeEditorAttributeEditor.getEditorProperties()public 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 AttributeEditorProperties setEditorProperties(AttributeEditorProperties editorProperties)
AttributeEditorAttributeTableProperties to be used.
setEditorProperties in interface AttributeEditoreditorProperties - The properties instance that should
be used by this editor
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||