KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > opencms > widgets > I_CmsWidgetDialog


1 /*
2  * File : $Source: /usr/local/cvs/opencms/src/org/opencms/widgets/I_CmsWidgetDialog.java,v $
3  * Date : $Date: 2006/09/22 15:17:03 $
4  * Version: $Revision: 1.11 $
5  *
6  * This library is part of OpenCms -
7  * the Open Source Content Mananagement System
8  *
9  * Copyright (c) 2005 Alkacon Software GmbH (http://www.alkacon.com)
10  *
11  * This library is free software; you can redistribute it and/or
12  * modify it under the terms of the GNU Lesser General Public
13  * License as published by the Free Software Foundation; either
14  * version 2.1 of the License, or (at your option) any later version.
15  *
16  * This library is distributed in the hope that it will be useful,
17  * but WITHOUT ANY WARRANTY; without even the implied warranty of
18  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
19  * Lesser General Public License for more details.
20  *
21  * For further information about Alkacon Software GmbH, please see the
22  * company website: http://www.alkacon.com
23  *
24  * For further information about OpenCms, please see the
25  * project website: http://www.opencms.org
26  *
27  * You should have received a copy of the GNU Lesser General Public
28  * License along with this library; if not, write to the Free Software
29  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
30  */

31
32 package org.opencms.widgets;
33
34 import org.opencms.i18n.CmsMessages;
35
36 import java.util.Locale JavaDoc;
37 import java.util.Set JavaDoc;
38
39 /**
40  * Describes a widget enabled dialog.<p>
41  *
42  * @author Alexander Kandzior
43  * @author Andreas Zahner
44  *
45  * @version $Revision: 1.11 $
46  *
47  * @since 6.0.0
48  */

49 public interface I_CmsWidgetDialog {
50
51     /**
52      * Generates a button for the widget dialog.<p>
53      *
54      * @param href the href link for the button, if none is given the button will be disabled
55      * @param target the href link target for the button, if none is given the target will be same window
56      * @param image the image name for the button, skin path will be automattically added as prefix
57      * @param label the label for the text of the button
58      * @param type 0: image only (default), 1: image and text, 2: text only
59      *
60      * @return a button for the OpenCms workplace
61      *
62      * @see org.opencms.workplace.CmsWorkplace#button(String, String, String, String, int)
63      */

64     String JavaDoc button(String JavaDoc href, String JavaDoc target, String JavaDoc image, String JavaDoc label, int type);
65
66     /**
67      * Returns the html for a button bar.<p>
68      *
69      * @param segment the HTML segment (START / END)
70      *
71      * @return a button bar html start / end segment
72      */

73     String JavaDoc buttonBar(int segment);
74
75     /**
76      * Generates a horizontal button bar separator line with maximum width.<p>
77      *
78      * @return a horizontal button bar separator line
79      */

80     String JavaDoc buttonBarHorizontalLine();
81
82     /**
83      * Generates a button bar separator.<p>
84      *
85      * @param leftPixel the amount of pixel left to the separator
86      * @param rightPixel the amount of pixel right to the separator
87      *
88      * @return a button bar separator
89      */

90     String JavaDoc buttonBarSeparator(int leftPixel, int rightPixel);
91
92     /**
93      * Returns the html for an invisible spacer between button bar contents like buttons, labels, etc.<p>
94      *
95      * @param width the width of the invisible spacer
96      * @return the html for the invisible spacer
97      *
98      * @see org.opencms.workplace.CmsWorkplace#buttonBarSpacer(int)
99      */

100     String JavaDoc buttonBarSpacer(int width);
101
102     /**
103      * Generates a button bar starter tab.<p>
104      *
105      * @param leftPixel the amount of pixel left to the starter
106      * @param rightPixel the amount of pixel right to the starter
107      *
108      * @return a button bar starter tab
109      */

110     String JavaDoc buttonBarStartTab(int leftPixel, int rightPixel);
111
112     /**
113      * Builds an invisible horiziontal spacer with the specified width.<p>
114      *
115      * @param width the width of the spacer in pixels
116      * @return an invisible horiziontal spacer with the specified width
117      *
118      * @see org.opencms.workplace.CmsDialog#dialogHorizontalSpacer(int)
119      */

120     String JavaDoc dialogHorizontalSpacer(int width);
121
122     /**
123      * Returns the style setting to use when generating buttons for this widget dialog.<p>
124      *
125      * @return the style setting to use when generating buttons for this widget dialog
126      *
127      * @see org.opencms.db.CmsUserSettings#getEditorButtonStyle()
128      */

129     int getButtonStyle();
130
131     /**
132      * Returns a set of help messages ids that are already included on the widget dialog.<p>
133      *
134      * This is used to prevent the occurence of multiple html <code>div</code> id's with the same
135      * value when generating the help texts. For valid html, each id can be used only once.<p>
136      *
137      * @return a set of help messages ids that are already included on the widget dialog
138      */

139     Set JavaDoc getHelpMessageIds();
140
141     /**
142      * Returns the current users locale setting.<p>
143      *
144      * @return the current users locale setting
145      *
146      * @see org.opencms.workplace.CmsWorkplace#getLocale()
147      * @see org.opencms.file.CmsRequestContext#getLocale()
148      */

149     Locale JavaDoc getLocale();
150
151     /**
152      * Returns a messages object used to render localized keys for the widget dialog.<p>
153      *
154      * @return a messages object used to render localized keys for the widget dialog
155      */

156     CmsMessages getMessages();
157
158     /**
159      * Returns the "user-agent" of the current request, or <code>null</code> in case no
160      * request is available.<p>
161      *
162      * @return the "user-agent" of the current request
163      */

164     String JavaDoc getUserAgent();
165
166     /**
167      * Tests if we are working with the new administration dialog style.<p>
168      *
169      * This param is not intended for external use.<p>
170      *
171      * @return <code>true</code> if using the new style
172      */

173     boolean useNewStyle();
174 }
175
Popular Tags