001: /*
002: * GWT-Ext Widget Library
003: * Copyright(c) 2007-2008, GWT-Ext.
004: * licensing@gwt-ext.com
005: *
006: * http://www.gwt-ext.com/license
007: */
008:
009: package com.gwtext.client.widgets.tree.event;
010:
011: import com.gwtext.client.core.EventObject;
012: import com.gwtext.client.data.Node;
013: import com.gwtext.client.data.event.NodeListener;
014:
015: public interface TreeNodeListener extends NodeListener {
016:
017: /**
018: * Fires right before the child nodes for this node are rendered.
019: *
020: * @param node the node
021: * @return false to cancel
022: */
023: boolean doBeforeChildrenRendered(Node node);
024:
025: /**
026: * Fires before click processing. Return false to cancel the default action.
027: *
028: * @param node the node
029: * @param e the event object
030: * @return false to cancel
031: */
032: boolean doBeforeClick(Node node, EventObject e);
033:
034: /**
035: * Fires before this node is collapsed, return false to cancel.
036: *
037: * @param node the node
038: * @param deep whether deep collapse
039: * @param anim whether animated
040: * @return false to cancel
041: */
042: boolean doBeforeCollapse(Node node, boolean deep, boolean anim);
043:
044: /**
045: * Fires before this node is expanded, return false to cancel.
046: *
047: * @param node the node
048: * @param deep whether deep expand
049: * @param anim whether animated
050: * @return false to cancel
051: */
052: boolean doBeforeExpand(Node node, boolean deep, boolean anim);
053:
054: /**
055: * Fires when a node with a checkbox's checked property changes.
056: *
057: * @param node the node
058: * @param checked the new checked value
059: * @return false to cancel
060: */
061: boolean doBeforeCheckChanged(Node node, boolean checked);
062:
063: /**
064: * Fires when this node is clicked.
065: *
066: * @param node the node
067: * @param e the event object
068: */
069: void onClick(Node node, EventObject e);
070:
071: /**
072: * Fires when this node is collapsed.
073: *
074: * @param node the node
075: */
076: void onCollapse(Node node);
077:
078: /**
079: * Fires when this node is right clicked.
080: *
081: * @param node the node
082: * @param e the event obejct
083: */
084: void onContextMenu(Node node, EventObject e);
085:
086: /**
087: * Fires when this node is double clicked.
088: *
089: * @param node the node
090: * @param e the event object
091: */
092: void onDblClick(Node node, EventObject e);
093:
094: /**
095: * Fires when the disabled status of this node changes.
096: *
097: * @param node the node
098: * @param disabled true if disabled
099: */
100: void onDisabledChange(Node node, boolean disabled);
101:
102: /**
103: * Fires when this node is expanded.
104: *
105: * @param node the node
106: */
107: void onExpand(Node node);
108:
109: /**
110: * Fires when the text for this node is changed.
111: *
112: * @param node the node
113: * @param text the new text
114: * @param oldText the old text
115: */
116: void onTextChange(Node node, String text, String oldText);
117: }
|