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: TabbedPanelButtonProperties.java,v 1.3 2005/02/16 11:28:15 jesper Exp $
023: package net.infonode.tabbedpanel;
024:
025: import net.infonode.properties.gui.util.ButtonProperties;
026: import net.infonode.properties.propertymap.*;
027:
028: /**
029: * Tabbed panel button properties contains properties objects for all buttons in a tabbed panel.
030: *
031: * @author $Author: jesper $
032: * @version $Revision: 1.3 $
033: * @since ITP 1.3.0
034: */
035: public class TabbedPanelButtonProperties extends PropertyMapContainer {
036:
037: /**
038: * A property group for all button properties in a tabbed panel
039: */
040: public static final PropertyMapGroup PROPERTIES = new PropertyMapGroup(
041: "Tabbed Panel Button Properties",
042: "Properties for a Tabbed Panel's buttons.");
043:
044: /**
045: * Properties for scroll up button
046: */
047: public static final PropertyMapProperty SCROLL_UP_BUTTON_PROPERTIES = new PropertyMapProperty(
048: PROPERTIES, "Scroll Up Button Properties",
049: "Properties for scroll up button.",
050: ButtonProperties.PROPERTIES);
051:
052: /**
053: * Properties for scroll left button
054: */
055: public static final PropertyMapProperty SCROLL_LEFT_BUTTON_PROPERTIES = new PropertyMapProperty(
056: PROPERTIES, "Scroll Left Button Properties",
057: "Properties for scroll left button.",
058: ButtonProperties.PROPERTIES);
059:
060: /**
061: * Properties for scroll down button
062: */
063: public static final PropertyMapProperty SCROLL_DOWN_BUTTON_PROPERTIES = new PropertyMapProperty(
064: PROPERTIES, "Scroll Down Button Properties",
065: "Properties for scroll down button.",
066: ButtonProperties.PROPERTIES);
067:
068: /**
069: * Properties for scroll right button
070: */
071: public static final PropertyMapProperty SCROLL_RIGHT_BUTTON_PROPERTIES = new PropertyMapProperty(
072: PROPERTIES, "Scroll Right Button Properties",
073: "Properties for scroll right button.",
074: ButtonProperties.PROPERTIES);
075:
076: /**
077: * Properties for tab drop down list button
078: */
079: public static final PropertyMapProperty TAB_DROP_DOWN_LIST_BUTTON_PROPERTIES = new PropertyMapProperty(
080: PROPERTIES, "Tab Drop Down List Button Properties",
081: "Properties for the tab drop down list button.",
082: ButtonProperties.PROPERTIES);
083:
084: /**
085: * Constructs an empty TabbedPanelButtonProperties object
086: */
087: public TabbedPanelButtonProperties() {
088: super (PROPERTIES);
089: }
090:
091: /**
092: * Constructs a TabbedPanelButtonProperties object with the given object
093: * as property storage
094: *
095: * @param object object to store properties in
096: */
097: public TabbedPanelButtonProperties(PropertyMap object) {
098: super (object);
099: }
100:
101: /**
102: * Constructs a TabbedPanelButtonProperties object that inherits its properties
103: * from the given TabbedPanelButtonProperties object
104: *
105: * @param inheritFrom TabbedPanelButtonProperties object to inherit properties from
106: */
107: public TabbedPanelButtonProperties(
108: TabbedPanelButtonProperties inheritFrom) {
109: super (PropertyMapFactory.create(inheritFrom.getMap()));
110: }
111:
112: /**
113: * Adds a super object from which property values are inherited.
114: *
115: * @param superObject the object from which to inherit property values
116: * @return this
117: */
118: public TabbedPanelButtonProperties addSuperObject(
119: TabbedPanelButtonProperties super Object) {
120: getMap().addSuperMap(super Object.getMap());
121: return this ;
122: }
123:
124: /**
125: * Removes the last added super object.
126: *
127: * @return this
128: */
129: public TabbedPanelButtonProperties removeSuperObject() {
130: getMap().removeSuperMap();
131: return this ;
132: }
133:
134: /**
135: * Removes the given super object.
136: *
137: * @param superObject super object to remove
138: * @return this
139: * @since ITP 1.3.0
140: */
141: public TabbedPanelButtonProperties removeSuperObject(
142: TabbedPanelButtonProperties super Object) {
143: getMap().removeSuperMap(super Object.getMap());
144: return this ;
145: }
146:
147: /**
148: * Gets the scroll up button properties
149: *
150: * @return the scroll up button properties
151: */
152: public ButtonProperties getScrollUpButtonProperties() {
153: return new ButtonProperties(SCROLL_UP_BUTTON_PROPERTIES
154: .get(getMap()));
155: }
156:
157: /**
158: * Gets the scroll down button properties
159: *
160: * @return the scroll down button properties
161: */
162: public ButtonProperties getScrollDownButtonProperties() {
163: return new ButtonProperties(SCROLL_DOWN_BUTTON_PROPERTIES
164: .get(getMap()));
165: }
166:
167: /**
168: * Gets the scroll left button properties
169: *
170: * @return the scroll up button properties
171: */
172: public ButtonProperties getScrollLeftButtonProperties() {
173: return new ButtonProperties(SCROLL_LEFT_BUTTON_PROPERTIES
174: .get(getMap()));
175: }
176:
177: /**
178: * Gets the scroll right button properties
179: *
180: * @return the scroll right button properties
181: */
182: public ButtonProperties getScrollRightButtonProperties() {
183: return new ButtonProperties(SCROLL_RIGHT_BUTTON_PROPERTIES
184: .get(getMap()));
185: }
186:
187: /**
188: * Gets the tab drop down list button properties
189: *
190: * @return the tab drop down list button properties
191: */
192: public ButtonProperties getTabDropDownListButtonProperties() {
193: return new ButtonProperties(
194: TAB_DROP_DOWN_LIST_BUTTON_PROPERTIES.get(getMap()));
195: }
196: }
|