|
|||||||||||
| 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.skeleton.swt.container.AbstractSwtToolContainer
com.tensegrity.skeleton.container.swt.SwtAttributeTreeContainer
This is the SWT implementation of the
AttributeTreeContainer interface.
This Composite is initialized in the
init() method with a GridLayout.
This container internally holds an instance of
SwtAttributeTree which
can be accessed by means of the getAttributeTree() and
getAttributeEditor() methods.
It is important to notice that since no assumption can be made upon which
type of Layout is set on the parent of this
AbstractSwtToolContainer, it is the caller's responsability to set
its layout data.
Refer to the
method for more information.
Widget.dispose()
| Field Summary |
| Fields inherited from class com.tensegrity.skeleton.swt.container.AbstractSwtToolContainer |
isSelected |
| 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 | |
SwtAttributeTreeContainer(ApplicationFrame applicationFrame,
org.eclipse.swt.widgets.Composite parent,
int style)
This constructor simply forwards its call to the constructor of the parent class. |
|
| Method Summary | |
void |
cancelEditing()
Cancels editing and discards changes. |
AttributableOnSet |
getAttributableOnSet()
Returns the current AttributableOnSet. |
AttributeEditor |
getAttributeEditor()
Each AttributeTableContainer should be based on a AttributeEditor
implementation. |
AttributeTree |
getAttributeTree()
Each AttributeTreeContainer should be based on a AttributeTree
implementation. |
AttributeSet |
getCurrentAttributeSet()
Returns the currently active AttributeSet. |
AttributeEditorProperties |
getEditorProperties()
This method returns an instance of the currently used AttributeTableProperties instance. |
java.lang.String |
getName()
A container has a name. |
void |
hideAttribute(java.lang.String name)
Hides the attribute identified by the given name. |
void |
init()
Subclasses implement this method to start their initialization code. |
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 |
setAttributableOnSet(AttributableOnSet attributable)
Sets the AttributableOnSet that should be shown in the
editor. |
AttributeEditorProperties |
setEditorProperties(AttributeEditorProperties editorProperties)
This method sets an instance of the AttributeTableProperties to be used. |
void |
setName(java.lang.String s)
Sets the name of this container. |
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 com.tensegrity.skeleton.swt.container.AbstractSwtToolContainer |
getApplicationFrame, getHeight, getUiManager, getWidth, repaint, setSelected, setUiManager |
| 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 |
| Methods inherited from interface com.tensegrity.gui.container.Container |
getApplicationFrame, setSelected |
| Constructor Detail |
public SwtAttributeTreeContainer(ApplicationFrame applicationFrame,
org.eclipse.swt.widgets.Composite parent,
int style)
This constructor simply forwards its call to the constructor of the parent class.
applicationFrame - Enclosing ApplicationFrameparent - a widget which will be the parent of the new instance (cannot be null)style - the style of widget to construct| Method Detail |
public void init()
AbstractSwtToolContainer
init in class AbstractSwtToolContainerpublic java.lang.String getName()
Container
getName in interface Containerpublic 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 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 rehash()
AttributeEditorAttributeSet from the
AttributableOnSet and refreshes the view.
rehash 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 AttributeTree getAttributeTree()
AttributeTreeContainerAttributeTree
implementation. Thus this instance is returned by this method.
getAttributeTree in interface AttributeTreeContainerpublic AttributeEditor getAttributeEditor()
AttributeEditorContainerAttributeEditor
implementation. Thus this instance is returned by this method.
getAttributeEditor in interface AttributeEditorContainerpublic void setName(java.lang.String s)
Container
setName in interface ContainersetName in class AbstractSwtToolContainers - the new name for this container.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 AttributeEditorAttributeTree
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||