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: WindowTabStateProperties.java,v 1.14 2005/12/04 13:46:04 jesper Exp $
023: package net.infonode.docking.properties;
024:
025: import net.infonode.properties.propertymap.*;
026:
027: /**
028: * Properties and property values for the window tab buttons.
029: *
030: * @author $Author: jesper $
031: * @version $Revision: 1.14 $
032: */
033: public class WindowTabStateProperties extends PropertyMapContainer {
034: /**
035: * Property group containing all window tab state properties.
036: */
037: public static final PropertyMapGroup PROPERTIES = new PropertyMapGroup(
038: "State Properties", "");
039:
040: /**
041: * The minimize button property values.
042: */
043: public static final PropertyMapProperty MINIMIZE_BUTTON_PROPERTIES = new PropertyMapProperty(
044: PROPERTIES, "Minimize Button Properties",
045: "The minimize button property values.",
046: WindowTabButtonProperties.PROPERTIES);
047:
048: /**
049: * The restore button property values.
050: */
051: public static final PropertyMapProperty RESTORE_BUTTON_PROPERTIES = new PropertyMapProperty(
052: PROPERTIES, "Restore Button Properties",
053: "The restore button property values.",
054: WindowTabButtonProperties.PROPERTIES);
055:
056: /**
057: * The close button property values.
058: */
059: public static final PropertyMapProperty CLOSE_BUTTON_PROPERTIES = new PropertyMapProperty(
060: PROPERTIES, "Close Button Properties",
061: "The close button property values.",
062: WindowTabButtonProperties.PROPERTIES);
063:
064: /**
065: * The undock button property values.
066: *
067: * @since IDW 1.4.0
068: */
069: public static final PropertyMapProperty UNDOCK_BUTTON_PROPERTIES = new PropertyMapProperty(
070: PROPERTIES, "Undock Button Properties",
071: "The undock button property values.",
072: WindowTabButtonProperties.PROPERTIES);
073:
074: /**
075: * The dock button property values.
076: *
077: * @since IDW 1.4.0
078: */
079: public static final PropertyMapProperty DOCK_BUTTON_PROPERTIES = new PropertyMapProperty(
080: PROPERTIES, "Dock Button Properties",
081: "The dock button property values.",
082: WindowTabButtonProperties.PROPERTIES);
083:
084: /**
085: * Creates an empty property object.
086: */
087: public WindowTabStateProperties() {
088: super (PROPERTIES);
089: }
090:
091: /**
092: * Creates a property object containing the map.
093: *
094: * @param map the property map
095: */
096: public WindowTabStateProperties(PropertyMap map) {
097: super (map);
098: }
099:
100: /**
101: * Creates a property object that inherit values from another property object.
102: *
103: * @param inheritFrom the object from which to inherit property values
104: */
105: public WindowTabStateProperties(WindowTabStateProperties inheritFrom) {
106: super (PropertyMapFactory.create(inheritFrom.getMap()));
107: }
108:
109: /**
110: * Adds a super object from which property values are inherited.
111: *
112: * @param properties the object from which to inherit property values
113: * @return this
114: */
115: public WindowTabStateProperties addSuperObject(
116: WindowTabStateProperties properties) {
117: getMap().addSuperMap(properties.getMap());
118: return this ;
119: }
120:
121: /**
122: * Removes the last added super object.
123: *
124: * @return this
125: * @since IDW 1.1.0
126: * @deprecated Use {@link #removeSuperObject(WindowTabStateProperties)} instead.
127: */
128: public WindowTabStateProperties removeSuperObject() {
129: getMap().removeSuperMap();
130: return this ;
131: }
132:
133: /**
134: * Removes a super object.
135: *
136: * @param superObject the super object to remove
137: * @return this
138: * @since IDW 1.3.0
139: */
140: public WindowTabStateProperties removeSuperObject(
141: WindowTabStateProperties super Object) {
142: getMap().removeSuperMap(super Object.getMap());
143: return this ;
144: }
145:
146: /**
147: * Returns the minimize button property values.
148: *
149: * @return the minimize button property values
150: */
151: public WindowTabButtonProperties getMinimizeButtonProperties() {
152: return new WindowTabButtonProperties(MINIMIZE_BUTTON_PROPERTIES
153: .get(getMap()));
154: }
155:
156: /**
157: * Returns the restore button property values.
158: *
159: * @return the restore button property values
160: */
161: public WindowTabButtonProperties getRestoreButtonProperties() {
162: return new WindowTabButtonProperties(RESTORE_BUTTON_PROPERTIES
163: .get(getMap()));
164: }
165:
166: /**
167: * Returns the close button property values.
168: *
169: * @return the close button property values
170: */
171: public WindowTabButtonProperties getCloseButtonProperties() {
172: return new WindowTabButtonProperties(CLOSE_BUTTON_PROPERTIES
173: .get(getMap()));
174: }
175:
176: /**
177: * Returns the undock button property values.
178: *
179: * @return the undock button property values
180: * @since IDW 1.4.0
181: */
182: public WindowTabButtonProperties getUndockButtonProperties() {
183: return new WindowTabButtonProperties(UNDOCK_BUTTON_PROPERTIES
184: .get(getMap()));
185: }
186:
187: /**
188: * Returns the dock button property values.
189: *
190: * @return the dock button property values
191: * @since IDW 1.4.0
192: */
193: public WindowTabButtonProperties getDockButtonProperties() {
194: return new WindowTabButtonProperties(DOCK_BUTTON_PROPERTIES
195: .get(getMap()));
196: }
197: }
|