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.event;
010:
011: import com.google.gwt.core.client.JavaScriptObject;
012: import com.gwtext.client.widgets.Component;
013:
014: /**
015: * Component Listener
016: */
017: public interface ComponentListener {
018:
019: /**
020: * Fires before the component is destroyed. Return false to stop the destroy.
021: *
022: * @param component this
023: * @return false to stop destroy
024: */
025: boolean doBeforeDestroy(Component component);
026:
027: /**
028: * Fires before the component is hidden. Return false to stop the hide.
029: *
030: * @param component this
031: * @return false to stop hide
032: */
033: boolean doBeforeHide(Component component);
034:
035: /**
036: * Fires before the component is rendered. Return false to stop the render.
037: *
038: * @param component this
039: * @return false to stop render
040: */
041: boolean doBeforeRender(Component component);
042:
043: /**
044: * Fires before the component is shown. Return false to stop the show.
045: *
046: * @param component this
047: * @return false to stop show
048: */
049: boolean doBeforeShow(Component component);
050:
051: /**
052: * Fires before the state of the component is restored. Return false to stop the restore.
053: *
054: * @param component this
055: * @param state the component state
056: * @return false to stop the restore
057: */
058: boolean doBeforeStateRestore(Component component,
059: JavaScriptObject state);
060:
061: /**
062: * Fires before the state of the component is saved to the configured state provider. Return false to stop the save.
063: *
064: * @param component this
065: * @param state the component state
066: * @return false to stop the save
067: */
068: boolean doBeforeStateSave(Component component,
069: JavaScriptObject state);
070:
071: /**
072: * Fires after the component is destroyed.
073: *
074: * @param component this
075: */
076: void onDestroy(Component component);
077:
078: /**
079: * Fires after the component is disabled.
080: *
081: * @param component this
082: */
083: void onDisable(Component component);
084:
085: /**
086: * Fires after the component is enabled.
087: *
088: * @param component this
089: */
090: void onEnable(Component component);
091:
092: /**
093: * Fires after the component is hidden.
094: *
095: * @param component this
096: */
097: void onHide(Component component);
098:
099: /**
100: * Fires after the component is rendered.
101: *
102: * @param component this
103: */
104: void onRender(Component component);
105:
106: /**
107: * Fires after the component is shown.
108: *
109: * @param component this
110: */
111: void onShow(Component component);
112:
113: /**
114: * Fires after the state of the component is restored.
115: *
116: * @param component this
117: * @param state the component state
118: */
119: void onStateRestore(Component component, JavaScriptObject state);
120:
121: /**
122: * Fires after the state of the component is saved to the configured state provider.
123: *
124: * @param component this
125: * @param state the component state
126: */
127: void onStateSave(Component component, JavaScriptObject state);
128: }
|