1 /*
2 * EL4J, the Extension Library for the J2EE, adds incremental enhancements to
3 * the spring framework, http://el4j.sf.net
4 * Copyright (C) 2008 by ELCA Informatique SA, Av. de la Harpe 22-24,
5 * 1000 Lausanne, Switzerland, http://www.elca.ch
6 *
7 * EL4J is published under the GNU Lesser General Public License (LGPL)
8 * Version 2.1. See http://www.gnu.org/licenses/
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU Lesser General Public License for more details.
14 *
15 * For alternative licensing, please contact info@elca.ch
16 */
17 package ch.elca.el4j.services.gui.swing.frames;
18
19 import javax.swing.Icon;
20 import javax.swing.JComponent;
21
22 import org.noos.xing.mydoggy.Content;
23 import org.noos.xing.mydoggy.ContentManager;
24 import org.noos.xing.mydoggy.ToolWindowTab;
25
26 /**
27 * A descriptor of a {@link Content} or {@link ToolWindowTab}.
28 * This is used to specify a docking frame before it gets created.
29 *
30 * @svnLink $Revision: 3873 $;$Date: 2009-08-04 13:59:45 +0200 (Di, 04. Aug 2009) $;$Author: swismer $;$URL: https://el4j.svn.sourceforge.net/svnroot/el4j/branches/el4j_3_1/el4j/framework/modules/swing/src/main/java/ch/elca/el4j/services/gui/swing/frames/ContentConfiguration.java $
31 *
32 * @author Stefan Wismer (SWI)
33 */
34 public class ContentConfiguration {
35 /**
36 * @see Content#getId()
37 */
38 protected String m_id;
39
40 /**
41 * @see Content#getTitle()
42 */
43 protected String m_title;
44
45 /**
46 * @see Content#getIcon()
47 */
48 protected Icon m_icon;
49
50 /**
51 * @see Content#getComponent()
52 */
53 protected JComponent m_component;
54
55 /**
56 * @see Content#getToolTipText()
57 */
58 protected String m_toolTip;
59
60 /**
61 * @see Content
62 */
63 protected Object[] m_constraints;
64
65 /**
66 * @see ContentManager#addContent(String, String, Icon, java.awt.Component)
67 */
68 public ContentConfiguration(String id, String title, Icon icon, JComponent component) {
69 this(id, title, icon, component, null);
70 }
71
72 /**
73 * @see ContentManager#addContent(String, String, Icon, java.awt.Component, String, Object...)
74 */
75 public ContentConfiguration(String id, String title, Icon icon, JComponent component, String tip,
76 Object... constraints) {
77
78 m_id = id;
79 m_title = title;
80 m_icon = icon;
81 m_component = component;
82 m_toolTip = tip;
83 m_constraints = constraints;
84
85 }
86 /**
87 * @return Returns the id.
88 */
89 public String getId() {
90 return m_id;
91 }
92 /**
93 * @param id Is the id to set.
94 */
95 public void setId(String id) {
96 m_id = id;
97 }
98 /**
99 * @return Returns the title.
100 */
101 public String getTitle() {
102 return m_title;
103 }
104 /**
105 * @param title Is the title to set.
106 */
107 public void setTitle(String title) {
108 m_title = title;
109 }
110 /**
111 * @return Returns the icon.
112 */
113 public Icon getIcon() {
114 return m_icon;
115 }
116 /**
117 * @param icon Is the icon to set.
118 */
119 public void setIcon(Icon icon) {
120 m_icon = icon;
121 }
122 /**
123 * @return Returns the component.
124 */
125 public JComponent getComponent() {
126 return m_component;
127 }
128 /**
129 * @param component Is the component to set.
130 */
131 public void setComponent(JComponent component) {
132 m_component = component;
133 }
134 /**
135 * @return Returns the toolTip.
136 */
137 public String getToolTip() {
138 return m_toolTip;
139 }
140 /**
141 * @param toolTip Is the toolTip to set.
142 */
143 public void setToolTip(String toolTip) {
144 m_toolTip = toolTip;
145 }
146 /**
147 * @return Returns the constraints.
148 */
149 public Object[] getConstraints() {
150 return m_constraints;
151 }
152 /**
153 * @param constraints Is the constraints to set.
154 */
155 public void setConstraints(Object[] constraints) {
156 m_constraints = constraints;
157 }
158 }