LEONARDI Application Composer - 8.9.0.40 by W4 S.A.

leon.app.behaviorinterface
Interface LyTreeBaseBehaviorInterface

All Superinterfaces:
LyActionBehaviorInterface, LyBehaviorInterface, LyPanelBehaviorInterface
All Known Subinterfaces:
LyTreeBehaviorInterface
All Known Implementing Classes:
LyTreeBehavior

public interface LyTreeBaseBehaviorInterface
extends LyPanelBehaviorInterface

This interface defines the methods to implement in order to change the default behavior for tree controllers.

See Also:
LyTreeBaseController, LyTreeController

Field Summary
static java.lang.String __VERSION
          File version
 
Method Summary
 LyTreeNode buildTreeNode(java.lang.Object nodeObject, LyTreeBaseController controller)
          Build a view object instance from the given application object.
 void dragFinished(LyTreeController treeController, int type)
          Method called at the end of a drag-and-drop.
 void dragStart(LyTreeController treeController, LyObject sourceObject)
          Method invoked at the beginning of the given object drag.
 void drop(LyTreeController treeController, LyObject targetObject, LyObject sourceObject)
          Method called when the given dragged object is dropped on the given dropped object.
 java.lang.Object getTreeRootObject(LyTreeBaseController controller)
          Gets the tree root node.
 void updateTreeNode(java.lang.Object nodeObject, LyTreeNode treeNode, LyTreeBaseController controller)
          Updates the given tree node view object status (colors, label, border, style ...) from the gicen node object properties.
 void validityModified(LyTreeNode treeNode, LyTreeBaseController controller)
          Method invoked when a validity changed in a three state tree (valid, invalid, partially).
 
Methods inherited from interface leon.app.behaviorinterface.LyPanelBehaviorInterface
completePopupMenu, getPopupMenuActions, needRefresh, validateFilter
 
Methods inherited from interface leon.app.behaviorinterface.LyActionBehaviorInterface
endAction, getClientContext, getContextTitle, getHelpFile, getImage, getImageTooltip, getKeyValue, getMenuItemImage, getTitle, reset, startAction
 
Methods inherited from interface leon.app.behaviorinterface.LyBehaviorInterface
free, handleDemand, init
 

Field Detail

__VERSION

static final java.lang.String __VERSION
File version

See Also:
Constant Field Values
Method Detail

getTreeRootObject

java.lang.Object getTreeRootObject(LyTreeBaseController controller)
Gets the tree root node.

Parameters:
controller - current LyTreeController instance
Returns:
the object shown as the root of the tree, or null if the tree is empty

buildTreeNode

LyTreeNode buildTreeNode(java.lang.Object nodeObject,
                         LyTreeBaseController controller)
Build a view object instance from the given application object. Node status (colors, borders, ...) should be set in updateTreeNode(Object, LyTreeNode, LyTreeBaseController).

Parameters:
nodeObject - the node to build, usually LyObject instance but not mandatory
controller - current LyTreeController instance
Returns:
the built node view object.

updateTreeNode

void updateTreeNode(java.lang.Object nodeObject,
                    LyTreeNode treeNode,
                    LyTreeBaseController controller)
Updates the given tree node view object status (colors, label, border, style ...) from the gicen node object properties. The controller invokes this method when the given nodeObject is modified.

Parameters:
nodeObject - application object (reference)
treeNode - view objects (need update)
controller - current tree controller instance

validityModified

void validityModified(LyTreeNode treeNode,
                      LyTreeBaseController controller)
Method invoked when a validity changed in a three state tree (valid, invalid, partially).
Note: a tree is activated as a three state validity tree by the resource : LY_TREE_VALIDITY=true.

Parameters:
treeNode - view objects (need update)
controller - current LyTreeBaseController instance

dragStart

void dragStart(LyTreeController treeController,
               LyObject sourceObject)
Method invoked at the beginning of the given object drag.

Parameters:
treeController - Tree controller that displays the tree
sourceObject - dragged object

drop

void drop(LyTreeController treeController,
          LyObject targetObject,
          LyObject sourceObject)
Method called when the given dragged object is dropped on the given dropped object.

Parameters:
treeController - current LyTreeController instance
targetObject - object on where the dragged object is dropped
sourceObject - the dragged object

dragFinished

void dragFinished(LyTreeController treeController,
                  int type)
Method called at the end of a drag-and-drop.
The default implementation does nothing.

Parameters:
treeController - current LyMapController instance
type - drag-and-drop type (org.eclipse.swt.dnd.DND#DROP_COPY or org.eclipse.swt.dnd.DND#DROP_MOVE)

(c) January 2013 - W4 S.A.

Website: W4 S.A., contact us: support@w4global.com