at.spardat.xma.mdl.tree
Class TreeWMClient

java.lang.Object
  extended byat.spardat.xma.mdl.WModel
      extended byat.spardat.xma.mdl.tree.TreeWM
          extended byat.spardat.xma.mdl.tree.TreeWMClient
All Implemented Interfaces:
Descriptive, ISelectable, ITreeWM, ITreeWMClient, IWModelClient, Synchronization, Transactional

public class TreeWMClient
extends TreeWM
implements ITreeWMClient

The representation of a TreeWM at the client side of XMA.


Field Summary
 
Fields inherited from class at.spardat.xma.mdl.tree.TreeWM
selection_
 
Fields inherited from class at.spardat.xma.mdl.WModel
S_NULL
 
Fields inherited from interface at.spardat.xma.mdl.tree.ITreeWM
S_LAST, S_MULTI_SELECT
 
Constructor Summary
TreeWMClient(short id, Page pm, int style)
          Constructor
 
Method Summary
 UIDelegateClient getUIDelegate()
          Returns the UI-delegate.
 boolean handle(ModelChangeEvent event)
          All events that might change a WidgetModel are executed via this method.
 boolean isEditable()
          Returns true if this model's widget may be modified by the end-user.
 boolean isEnabled()
          Returns true, if this model's widget is enabled.
 void setEditable(boolean what)
          Sets the editable-state of this models's widget.
 void setEnabled(boolean what)
          Sets the enabled-state of this model's widget.
 void setExpanded(int depth, boolean expanded)
          Sets the expanded state of the top depth levels of the tree.
 
Methods inherited from class at.spardat.xma.mdl.tree.TreeWM
changed, clear, commit, containsKey, describe, deselect, deselectAll, equalsCS, estimateMemory, externalize, getNode, getPage, getRootCount, getRoots, getSelected, getSelectedNode, getSelection, getSelectionCount, getSelectionOrdered, internalize, isMultiSelect, isSelected, isStrict, randomlyChange, rollback, select, selectAll, size
 
Methods inherited from class at.spardat.xma.mdl.WModel
cleanUpAfterServerEvent, getId, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface at.spardat.xma.mdl.tree.ITreeWM
clear, containsKey, getNode, getRootCount, getRoots, getSelectedNode, getSelectionOrdered, selectAll, size
 
Methods inherited from interface at.spardat.xma.mdl.ISelectable
deselect, deselectAll, getSelected, getSelection, getSelectionCount, isMultiSelect, isSelected, isStrict, select
 

Constructor Detail

TreeWMClient

public TreeWMClient(short id,
                    Page pm,
                    int style)
Constructor

Parameters:
id - id of the widget model within the page
pm - the page that this widget model is part of
style - bit or combination of style constants beginning with S_ in this class or a superclass.
Method Detail

handle

public boolean handle(ModelChangeEvent event)
Description copied from class: WModel
All events that might change a WidgetModel are executed via this method.

Overrides:
handle in class TreeWM
See Also:
WModel.handle(at.spardat.xma.mdl.ModelChangeEvent)

setExpanded

public void setExpanded(int depth,
                        boolean expanded)
Description copied from interface: ITreeWMClient
Sets the expanded state of the top depth levels of the tree. If depth is 1, all root nodes are expanded/collapsed. If depth is 2, all root nodes and their childs are expanded/collapsed and so on and so forth.

Specified by:
setExpanded in interface ITreeWMClient
Parameters:
depth - number of levels to expand or collapse
See Also:
ITreeWMClient.setExpanded(int, boolean)

getUIDelegate

public UIDelegateClient getUIDelegate()
Returns the UI-delegate.

Specified by:
getUIDelegate in interface IWModelClient
Returns:
the UIDelegateClient which never is null.

isEditable

public boolean isEditable()
Description copied from interface: IWModelClient
Returns true if this model's widget may be modified by the end-user. Returns false, if the widget may not be edited, but the content of the widget should be readable and receive focus.

Specified by:
isEditable in interface IWModelClient
See Also:
IWModelClient.isEditable()

isEnabled

public boolean isEnabled()
Description copied from interface: IWModelClient
Returns true, if this model's widget is enabled. Returns false, if it is disabled. A disabled control is displayed in a greyed look and does not receive focus.

Specified by:
isEnabled in interface IWModelClient
See Also:
IWModelClient.isEnabled()

setEditable

public void setEditable(boolean what)
Description copied from interface: IWModelClient
Sets the editable-state of this models's widget. A widget which is not editable can not be modified by the end user. Unlike the disabled-state, its contents remains readable and still receives focus.

Usually, this method is called on all widget-models of a page to set the whole page to a read-only mode.

If this method is not called, the default is true.

Specified by:
setEditable in interface IWModelClient
Parameters:
what - true if the model's widget should be editable, false otherwise.
See Also:
IWModelClient.setEditable(boolean)

setEnabled

public void setEnabled(boolean what)
Description copied from interface: IWModelClient
Sets the enabled-state of this model's widget.

Specified by:
setEnabled in interface IWModelClient
Parameters:
what - the state to set.
See Also:
IWModelClient.setEnabled(boolean)