001: /*
002: * Copyright (C) 2004 NNL Technology AB
003: * Visit www.infonode.net for information about InfoNode(R)
004: * products and how to contact NNL Technology AB.
005: *
006: * This program is free software; you can redistribute it and/or
007: * modify it under the terms of the GNU General Public License
008: * as published by the Free Software Foundation; either version 2
009: * of the License, or (at your option) any later version.
010: *
011: * This program is distributed in the hope that it will be useful,
012: * but WITHOUT ANY WARRANTY; without even the implied warranty of
013: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
014: * GNU General Public License for more details.
015: *
016: * You should have received a copy of the GNU General Public License
017: * along with this program; if not, write to the Free Software
018: * Foundation, Inc., 59 Temple Place - Suite 330, Boston,
019: * MA 02111-1307, USA.
020: */
021:
022: // $Id: TabListener.java,v 1.10 2004/09/22 14:33:49 jesper Exp $
023: package net.infonode.tabbedpanel;
024:
025: /**
026: * <p>TabListener interface for receiving events from a TabbedPanel or a Tab.</p>
027: *
028: * <p>Adding a TabListener to a tabbed panel or a tab makes it possible to receive
029: * events when a tab component is added, removed, moved, highlighted, dehighlighted,
030: * selected, deselected, dragged, dropped or drag aborted.</p>
031: *
032: * @author $Author: jesper $
033: * @version $Revision: 1.10 $
034: * @see TabbedPanel
035: * @see Tab
036: */
037: public interface TabListener {
038: /**
039: * Called when a tab is added or inserted to a TabbedPanel
040: *
041: * @param event the event
042: */
043: void tabAdded(TabEvent event);
044:
045: /**
046: * Called when a tab is removed from a TabbedPanel
047: *
048: * @param event the event
049: */
050: void tabRemoved(TabRemovedEvent event);
051:
052: /**
053: * Called when a tab is dragged.
054: *
055: * @param event the event
056: */
057: void tabDragged(TabDragEvent event);
058:
059: /**
060: * Called when a tab is dropped.
061: *
062: * @param event the event
063: */
064: void tabDropped(TabDragEvent event);
065:
066: /**
067: * Called when an ongoing tab drag is aborted.
068: *
069: * @param event the event
070: */
071: void tabDragAborted(TabEvent event);
072:
073: /**
074: * Called when a tab is selected
075: *
076: * @param event the event
077: */
078: void tabSelected(TabStateChangedEvent event);
079:
080: /**
081: * <p>Called when a tab is deselected.</p>
082: *
083: * <p><strong>Note:</strong> The event contains information about the previously
084: * selected tab and the current selected tab.</p>
085: *
086: * @param event the event
087: */
088: void tabDeselected(TabStateChangedEvent event);
089:
090: /**
091: * Called when a tab is highlighted
092: *
093: * @param event the event
094: */
095: void tabHighlighted(TabStateChangedEvent event);
096:
097: /**
098: * <p>Called when a tab is dehighlighted.</p>
099: *
100: * <p><strong>Note:</strong> The event contains information about the previously
101: * highlighted tab and the current selected tab.</p>
102: *
103: * @param event the event
104: */
105: void tabDehighlighted(TabStateChangedEvent event);
106:
107: /**
108: * Called when a tab is moved, i.e. dragged to another position in
109: * the tab area
110: *
111: * @param event the event
112: */
113: void tabMoved(TabEvent event);
114: }
|