home *** CD-ROM | disk | FTP | other *** search
Java Source | 1996-08-14 | 3.4 KB | 132 lines |
- /*---------------------------------------------------------------------------
-
- Written by the Personal Journal developers of Dow Jones & Company, Inc.
-
- Dow Jones makes no representations or warranties about
- the suitability of this software, either express or
- implied, including but not limited to the implied warranties
- of merchantability, fitness for a particular purpose,
- or non-infringement. Dow Jones will not be liable for
- any damages suffered by a user as a result of using,
- modifying or distributing this software or its derivatives.
-
-
- TabBar.java
-
- A navigational accessory of a notebook.
-
-
- Authors:
-
- rphall Rick Hall
-
-
- Version Ident:
-
- $Header$
-
-
- History:
-
- 10-dec-1995 rphall Initial Creation
-
-
- ---------------------------------------------------------------------------*/
-
- package pj.awt;
-
- import pj.awt.TabSpec;
-
- import collections.ImplementationError;
- import java.lang.String;
-
- /**
- * A TabBar is a navigational accessory of a Notebook. A TabBar is composed
- * of set of tab components that cooperate as a group so that when one is
- * selected, others are deselected.
- * <P>
- * When implemented, tab components should have two visual presentations:
- * enabled vs. disabled and selected vs. deselected. Java provides default
- * visuals for enabled vs. disabled components. Java does not provide
- * default visuals for selection. The main requirement on selection visuals
- * is that only one tab at a time should appear selected. One
- * implementation of selection would be to bold text and darken borders of a
- * selected tab.
- *
- * @see TabSpec
- * @see Notebook
- * @version 0.00 03-Jan-96
- * @author Rick Hall
- */
- public interface TabBar
- {
-
- // --- Public operations
-
- /**
- * Append a tab and conditionally select it.
- *
- * @param tab The tab to add.
- * @param selected True to make the new tab the selected tab,
- * false otherwise.
- * @exception ImplementationError thrown if tab violates some
- * implementation-dependent precondition
- */
- public void appendTab(TabSpec tab, boolean selected)
- throws ImplementationError;
-
- /**
- * Append a tab but do not select it.
- * @param tab The tab to append.
- * @exception ImplementationError thrown if tab violates some
- * implementation-dependent precondition
- */
- public void appendTab(TabSpec tab)
- throws ImplementationError;
-
- /**
- * Enable a tab.
- *
- * @param name The name of the tab to enable.
- */
- public void enableTab(String name);
-
- /**
- * Enable all tabs.
- */
- public void enableTabs();
-
- /**
- * Disable a tab.
- *
- * @param name The name of the tab to disable.
- */
- public void disableTab(String name);
-
- /**
- * Disable all tabs.
- */
- public void disableTabs();
-
- /**
- * @return A specification for the currently selected tab. If no
- * tab is selected, returns null.
- */
- public TabSpec currentTabSpec();
-
- /**
- * Make a tab appear selected.
- *
- * @param name The name of the tab that should appear selected.
-
- public void selectTab(String name);
-
- /**
- * Make a tab appear deselected.
- *
- * @param name The name of the tab that should appear deselected.
- */
- public void deselectTab(String name);
-
- } // TabBar
-