01: /*
02: * Copyright (C) 2004 NNL Technology AB
03: * Visit www.infonode.net for information about InfoNode(R)
04: * products and how to contact NNL Technology AB.
05: *
06: * This program is free software; you can redistribute it and/or
07: * modify it under the terms of the GNU General Public License
08: * as published by the Free Software Foundation; either version 2
09: * of the License, or (at your option) any later version.
10: *
11: * This program is distributed in the hope that it will be useful,
12: * but WITHOUT ANY WARRANTY; without even the implied warranty of
13: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14: * GNU General Public License for more details.
15: *
16: * You should have received a copy of the GNU General Public License
17: * along with this program; if not, write to the Free Software
18: * Foundation, Inc., 59 Temple Place - Suite 330, Boston,
19: * MA 02111-1307, USA.
20: */
21:
22: // $Id: TabDropDownListVisiblePolicy.java,v 1.11 2005/02/16 11:28:15 jesper Exp $
23: package net.infonode.tabbedpanel;
24:
25: import net.infonode.util.Enum;
26:
27: /**
28: * TabDropDownListVisiblePolicy tells the tabbed panel when to show a drop down
29: * list of tabs.
30: *
31: * @author $Author: jesper $
32: * @version $Revision: 1.11 $
33: * @see TabbedPanel
34: * @see TabbedPanelProperties
35: * @since ITP 1.1.0
36: */
37: public final class TabDropDownListVisiblePolicy extends Enum {
38: private static final long serialVersionUID = 1;
39:
40: /**
41: * Never drop down list policy. This means that no drop down list will be shown
42: * in the tabbed panel.
43: */
44: public static final TabDropDownListVisiblePolicy NEVER = new TabDropDownListVisiblePolicy(
45: 0, "Never");
46:
47: /**
48: * More than one tab list policy. This means that a drop down list will be shown
49: * if there are more than one tab in the tabbed panel.
50: */
51: public static final TabDropDownListVisiblePolicy MORE_THAN_ONE_TAB = new TabDropDownListVisiblePolicy(
52: 1, "More than One Tab");
53:
54: /**
55: * Tabs not visible list policy. This means that a drop down list will be shown when
56: * there are tabs are not entirely visible, i.e. scrolled out.
57: */
58: public static final TabDropDownListVisiblePolicy TABS_NOT_VISIBLE = new TabDropDownListVisiblePolicy(
59: 1, "Some Tabs Not Visible");
60:
61: private static final TabDropDownListVisiblePolicy[] DROP_DOWN_LIST_VISIBLE_POLICIES = new TabDropDownListVisiblePolicy[] {
62: NEVER, MORE_THAN_ONE_TAB, TABS_NOT_VISIBLE };
63:
64: private TabDropDownListVisiblePolicy(int value, String name) {
65: super (value, name);
66: }
67:
68: /**
69: * Gets the tab drop down list visible policies.
70: *
71: * @return the tab drop down list visible policies
72: */
73: public static TabDropDownListVisiblePolicy[] getDropDownListVisiblePolicies() {
74: return (TabDropDownListVisiblePolicy[]) DROP_DOWN_LIST_VISIBLE_POLICIES
75: .clone();
76: }
77: }
|