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: package com.gwtext.client.widgets.event;
009:
010: import com.gwtext.client.widgets.Panel;
011:
012: /**
013: * The {@link Panel} listener.
014: */
015: public interface PanelListener extends ContainerListener {
016:
017: /**
018: * Fires after the Panel has been visually activated. Note that Panels do not directly support being activated, but
019: * some Panel subclasses do (like Window). Panels which are child Components of a TabPanel fire the activate and
020: * deactivate events under the control of the TabPanel.
021: *
022: * @param panel this
023: */
024: void onActivate(Panel panel);
025:
026: /**
027: * Fires before the Panel is closed. Note that Panels do not directly support being closed, but some Panel subclasses
028: * do (like Window). This event only applies to such subclasses. A handler can return false to cancel the close.
029: *
030: * <br><br>
031: * <b>Note:</b> that if you want to capture the closing of a tab in a {@link com.gwtext.client.widgets.TabPanel},
032: * you must listner for the {@link com.gwtext.client.widgets.event.ContainerListener#doBeforeRemove(com.gwtext.client.widgets.Container, com.gwtext.client.widgets.Component)}
033: * event because closing a tab doesnt close the TabPanel, it just removes it from the parent TabPanel.
034: *
035: * @param panel this
036: * @return false to cancel
037: */
038: boolean doBeforeClose(Panel panel);
039:
040: /**
041: * Fires before the Panel is collapsed. A handler can return false to cancel the collapse.
042: *
043: * @param panel this
044: * @param animate true if collapse is animated
045: * @return false to cancel
046: */
047: boolean doBeforeCollapse(Panel panel, boolean animate);
048:
049: /**
050: * Fires before the Panel is expanded. A handler can return false to cancel the expand.
051: *
052: * @param panel this
053: * @param animate true if expand animated
054: * @return false to cancel
055: */
056: boolean doBeforeExpand(Panel panel, boolean animate);
057:
058: /**
059: * Fires after the Panel has been resized.
060: *
061: * @param panel this
062: * @param width the new width
063: * @param height the new height
064: */
065: void onBodyResize(Panel panel, String width, String height);
066:
067: /**
068: * Fires after the Panel is closed. Note that Panels do not directly support being closed, but some Panel subclasses do
069: * (like Window).
070: *
071: * <br><br>
072: * <b>Note:</b> that if you want to capture the closing of a tab in a {@link com.gwtext.client.widgets.TabPanel},
073: * you must listner for the {@link com.gwtext.client.widgets.event.ContainerListener#onRemove(com.gwtext.client.widgets.Container, com.gwtext.client.widgets.Component)}
074: * event because closing a tab doesnt close the TabPanel, it just removes it from the parent TabPanel.
075: *
076: * @param panel this
077: */
078: void onClose(Panel panel);
079:
080: /**
081: * Fires after the Panel has been collapsed.
082: *
083: * @param panel this
084: */
085: void onCollapse(Panel panel);
086:
087: /**
088: * Fires after the Panel has been visually deactivated. Note that Panels do not directly support being deactivated,
089: * but some Panel subclasses do (like Window). Panels which are child Components of a TabPanel fire the activate and
090: * deactivate events under the control of the TabPanel.
091: *
092: * @param panel this
093: */
094: void onDeactivate(Panel panel);
095:
096: /**
097: * Fires after the Panel has been expanded.
098: *
099: * @param panel this
100: */
101: void onExpand(Panel panel);
102:
103: /**
104: * Fires after the Panel title has been set or changed.
105: *
106: * @param panel this
107: * @param title the new title
108: */
109: void onTitleChange(Panel panel, String title);
110: }
|