001/*
002 * This library is part of OpenCms -
003 * the Open Source Content Management System
004 *
005 * Copyright (c) Alkacon Software GmbH & Co. KG (http://www.alkacon.com)
006 *
007 * This library is free software; you can redistribute it and/or
008 * modify it under the terms of the GNU Lesser General Public
009 * License as published by the Free Software Foundation; either
010 * version 2.1 of the License, or (at your option) any later version.
011 *
012 * This library is distributed in the hope that it will be useful,
013 * but WITHOUT ANY WARRANTY; without even the implied warranty of
014 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
015 * Lesser General Public License for more details.
016 *
017 * For further information about Alkacon Software, please see the
018 * company website: http://www.alkacon.com
019 *
020 * For further information about OpenCms, please see the
021 * project website: http://www.opencms.org
022 *
023 * You should have received a copy of the GNU Lesser General Public
024 * License along with this library; if not, write to the Free Software
025 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
026 */
027
028package org.opencms.ui.components;
029
030import org.opencms.main.OpenCms;
031import org.opencms.util.CmsStringUtil;
032
033/**
034 * Contains the CSS style name constants used within the theme.<p>
035 */
036public final class OpenCmsTheme {
037
038    /** CSS style name. */
039    public static final String APP_BUTTON = "o-app-button";
040
041    /** CSS style name. */
042    public static final String APP_BUTTON_PADDED = "o-app-button-padded";
043
044    /** CSS style name. */
045    public static final String APP_CONTENT = "o-app-content";
046
047    /** CSS style name. */
048    public static final String APP_INFO = "o-app-info";
049
050    /** CSS style name. */
051    public static final String BOOKMARKS_PLACEHOLDER = "o-bookmarks-placeholder";
052
053    /** CSS style name. */
054    public static final String BUTTON_BLUE = "o-button-blue";
055
056    /** CSS style name. */
057    public static final String BUTTON_ICON = "o-button-icon";
058
059    /** CSS style name. */
060    public static final String BUTTON_INVISIBLE = "o-button-invisible";
061
062    /** CSS style name. */
063    public static final String BUTTON_OVERLAY = "o-button-overlay";
064
065    /** CSS style name. */
066    public static final String BUTTON_OVERLAY_BLUE = "o-button-overlay-blue";
067
068    /** CSS style name. */
069    public static final String BUTTON_OVERLAY_BLUE_INVERSE = "o-button-overlay-blue-inv";
070
071    /** CSS style name. */
072    public static final String BUTTON_OVERLAY_BLUE_LIGHT = "o-button-overlay-blue-light";
073
074    /** CSS style name. */
075    public static final String BUTTON_OVERLAY_CYAN = "o-button-overlay-cyan";
076
077    /** CSS style name. */
078    public static final String BUTTON_OVERLAY_CYAN_INVERSE = "o-button-overlay-cyan-inv";
079
080    /** CSS style name. */
081    public static final String BUTTON_OVERLAY_GRAY_LIGHT = "o-button-overlay-gray-light";
082
083    /** CSS style name. */
084    public static final String BUTTON_OVERLAY_GREEN = "o-button-overlay-green";
085
086    /** CSS style name. */
087    public static final String BUTTON_OVERLAY_ORANGE = "o-button-overlay-orange";
088
089    /** CSS style name. */
090    public static final String BUTTON_OVERLAY_RED = "o-button-overlay-red";
091
092    /** CSS style name. */
093    public static final String BUTTON_PRESSED = "o-button-pressed";
094
095    /** CSS style name. */
096    public static final String BUTTON_SITE = "o-button-site";
097
098    /** CSS style name. */
099    public static final String BUTTON_TABLE_ICON = "o-button-table-icon";
100
101    /** CSS style name. */
102    public static final String BUTTON_UNPADDED = "o-button-unpadded";
103
104    /** CSS style name. */
105    public static final String COLOR_BLUE = "o-color-blue";
106
107    /** CSS style name. */
108    public static final String COLOR_CYAN = " o-color-cyan";
109
110    /** CSS style name. */
111    public static final String COLOR_GRAY = "o-color-gray";
112
113    /** CSS style name. */
114    public static final String COLOR_ORANGE = "o-color-orange";
115
116    /** CSS style name. */
117    public static final String COLOR_RED = "o-color-red";
118
119    /** CSS style name. */
120    public static final String CRUMB_WRAPPER = "o-crumb-wrapper";
121
122    /** CSS style name. */
123    public static final String CRUMBS = "o-crumbs";
124
125    /** CSS style name. */
126    public static final String DIALOG = "o-dialog";
127
128    /** CSS style name. */
129    public static final String DIALOG_BUTTON_BAR = "o-dialog-button-bar";
130
131    /** CSS style name. */
132    public static final String DIALOG_CONTENT = "o-dialog-content";
133
134    /** CSS style name. */
135    public static final String DIALOG_CONTENT_PANEL = "o-dialog-content-panel";
136
137    /** CSS style name. */
138    public static final String DIALOG_FORM = "o-dialog-form";
139
140    /** CSS style name. */
141    public static final String DIFF_TYPE_ADDED = "diffTypeAdded";
142
143    /** CSS style name. */
144    public static final String DIFF_TYPE_CHANGED = "diffTypeChanged";
145
146    /** CSS style name. */
147    public static final String DIFF_TYPE_DELETED = "diffTypeDeleted";
148
149    /** CSS style name. */
150    public static final String DIFF_TYPE_UNCHANGED = "diffTypeUnchanged";
151
152    /** CSS style name. */
153    public static final String DISABLED = "o-disabled";
154
155    /** CSS style name. */
156    public static final String DROPDOWN = "o-dropdown";
157
158    /** CSS style name. */
159    public static final String EXPIRED = "o-expired";
160
161    /** CSS style name. */
162    public static final String FILE_TREE = "o-file-tree";
163
164    /** CSS style name. */
165    public static final String FORMLAYOUT_WORKPLACE_MAIN = "o-formlayout-workplace-main";
166
167    /** CSS style name. */
168    public static final String FULL_WIDTH_PADDING = "o-full-width-padding";
169
170    /** CSS style name. */
171    public static final String GALLERY_ALERT_IN_USE = "o-gallery-alert-in-use";
172
173    /** CSS style name. */
174    public static final String GALLERY_FORM = "o-gallery-form";
175
176    /** CSS style name. */
177    public static final String GALLERY_GRID_ROW_ODD = "o-gallery-grid-row-odd";
178
179    /** CSS style name. */
180    public static final String GALLERY_PREVIEW_IMAGE = "o-gallery-preview-image";
181
182    /** CSS style name. */
183    public static final String HIDDEN = "hidden";
184
185    /** CSS style name. */
186    public static final String HIDDEN_TOOLBAR = "o-hidden-toolbar";
187
188    /** CSS style name. */
189    public static final String HOVER_COLUMN = "o-hover-column";
190
191    /** The cache icon CSS class.*/
192    public static final String ICON_CACHE = "oc-icon-24-cache";
193
194    /** The database icon CSS class. */
195    public static final String ICON_DATABASE = "oc-icon-24-database";
196
197    /** CSS style name.*/
198    public static final String ICON_EXLPORER = "oc-icon-24-folder";
199
200    /** CSS style name.*/
201    public static final String ICON_EXLPORER_BIG = "oc-icon-32-explorer";
202
203    /** The group icon CSS class. */
204    public static final String ICON_GROUP = "oc-icon-24-group";
205
206    /** The job icon CSS class. */
207    public static final String ICON_JOB = "oc-icon-24-scheduler";
208
209    /**The Log icon. */
210    public static final String ICON_LOG = "oc-icon-24-log";
211
212    /**Icon for OUs. */
213    public static final String ICON_OU = "oc-icon-24-orgunit";
214
215    /**Icon for OUs for web user. */
216    public static final String ICON_OU_WEB = "oc-icon-24-webuser";
217
218    /** The icon for all principal option (currently used in principal select).*/
219    public static final String ICON_PRINCIPAL_ALL = "oc-icon-24-principal-all";
220
221    /** The icon for overwriting principal (currently used in principal select).*/
222    public static final String ICON_PRINCIPAL_OVERWRITE = "oc-icon-24-principal-overwrite";
223
224    /** The project icon CSS class. */
225    public static final String ICON_PROJECT = "oc-icon-24-project";
226
227    /** Path to the project current theme resource. */
228    public static final String ICON_PROJECT_CURRENT = "oc-icon-24-project_yellow";
229
230    /** Path to the project other theme resource. */
231    public static final String ICON_PROJECT_OTHER = "oc-icon-24-project_red";
232
233    /** Path to the project publish theme resource. */
234    public static final String ICON_PUBLISH = "oc-icon-24-publish";
235
236    /** The role icon CSS class.*/
237    public static final String ICON_ROLE = "oc-icon-24-role";
238
239    /**The session icon.*/
240    public static final String ICON_SESSION = "oc-icon-24-session";
241
242    /** The cache icon CSS class. */
243    public static final String ICON_SITE = "oc-icon-24-site";
244
245    /** CSS style name.*/
246    public static final String ICON_TERMINAL = "oc-icon-32-terminal";
247
248    /** CSS style name.*/
249    public static final String ICON_TOOL_1 = "oc-icon-32-tool1";
250
251    /** CSS style name.*/
252    public static final String ICON_TOOL_2 = "oc-icon-32-tool2";
253
254    /** CSS style name.*/
255    public static final String ICON_TOOL_3 = "oc-icon-32-tool3";
256
257    /** CSS style name.*/
258    public static final String ICON_TOOL_4 = "oc-icon-32-tool4";
259
260    /** CSS style name.*/
261    public static final String ICON_TOOL_5 = "oc-icon-32-tool5";
262
263    /** The user icon CSS class.*/
264    public static final String ICON_USER = "oc-icon-24-user";
265
266    /** CSS style name. */
267    public static final String IMAGE_GRADIENT = "o-image-gradient";
268
269    /** CSS style name. */
270    public static final String IMAGE_TRANSPARENT = "o-image-transparent";
271
272    /** CSS style name. */
273    public static final String IN_NAVIGATION = "o-in-navigation";
274
275    /** CSS style name. */
276    public static final String INFO = "o-info-dialog";
277
278    /** CSS style name. */
279    public static final String INFO_ELEMENT_NAME = "o-info-dialog-name";
280
281    /** CSS style name. */
282    public static final String INFO_ELEMENT_VALUE = "o-info-dialog-value";
283
284    /** CSS style name. */
285    public static final String INLINE_TEXTFIELD = "o-inline-textfield";
286
287    /** CSS style name. */
288    public static final String LABEL_ERROR = "o-label-error";
289
290    /** CSS style name. */
291    public static final String LOCK_OTHER = "o-lock-other";
292
293    /** CSS style name. */
294    public static final String LOCK_PUBLISH = "o-lock-publish";
295
296    /** CSS style name. */
297    public static final String LOCK_SHARED = "o-lock-shared";
298
299    /** CSS style name. */
300    public static final String LOCK_USER = "o-lock-user";
301
302    /** CSS style name. */
303    public static final String MAIN = "o-main";
304
305    /** CSS style name. */
306    public static final String NAVIGATOR_DROPDOWN = "o-navigator-dropdown";
307    /** CSS style name. */
308    public static final String NO_TRANSLATION_ICON = "o-notranslation";
309
310    /** Path to the OpenCms logo theme resource. */
311    public static final String OPENCMS_LOGO_PATH = "img/opencmsLogo.png";
312
313    /** CSS style name. */
314    public static final String PADDING_HORIZONTAL = "o-padding-horizontal";
315
316    /** CSS style name. */
317    public static final String POINTER = "o-pointer";
318
319    /** CSS style name. */
320    public static final String PROJECT_OTHER = "o-project-other";
321
322    /** CSS style name. */
323    public static final String REDUCED_MARGIN = "o-reduced-margin";
324
325    /** CSS style name. */
326    public static final String REDUCED_SPACING = "o-reduced-spacing";
327
328    /** CSS style name. */
329    public static final String REQUIRED_BUTTON = "o-required-button";
330
331    /** CSS style name. */
332    public static final String RESINFO_HIDDEN_ICON = "o-resinfo-hidden-icon";
333
334    /** CSS style name. */
335    public static final String RESINFO_POINTER = "o-resinfo-pointer";
336
337    /** CSS style name. */
338    public static final String RESOURCE_ICON = "o-resource-icon";
339
340    /** CSS style name. */
341    public static final String RESOURCE_INFO = "o-resource-info";
342
343    /** CSS style name. */
344    public static final String RESOURCE_INFO_DIRECTLINK = "o-resourceinfo-directlink";
345
346    /** CSS style name. */
347    public static final String RESOURCE_INFO_WEAK = "o-resourceinfo-weak";
348
349    /** CSS style name. */
350    public static final String RESPONSIVE = "o-responsive";
351
352    /** CSS style name. */
353    public static final String SECURITY = "o-security";
354
355    /** CSS style name. */
356    public static final String SECURITY_INVALID = SECURITY + "-invalid";
357
358    /** CSS style name. */
359    public static final String SECURITY_STRONG = SECURITY + "-strong";
360
361    /** CSS style name. */
362    public static final String SECURITY_WEAK = SECURITY + "-weak";
363
364    /** CSS style name. */
365    public static final String SIBLING = "o-sibling";
366
367    /** CSS style name. */
368    public static final String SIMPLE_DRAG = "o-simple-drag";
369
370    /** CSS style name. */
371    public static final String SITEMAP_LOCALE_BAR = "o-sitemap-locale-bar";
372
373    /** CSS style name. */
374    public static final String STATE_CHANGED = "o-state-changed";
375
376    /** CSS style name. */
377    public static final String STATE_DELETED = "o-state-deleted";
378
379    /** CSS style name. */
380    public static final String STATE_NEW = "o-state-new";
381
382    /** CSS style name.*/
383    public static final String TABLE_CELL_DISABLED = "o-table-cell-disabled";
384
385    /** CSS style name. */
386    public static final String TABLE_CELL_PADDING = "o-table-cell-padding";
387
388    /** CSS style name. */
389    public static final String TABLE_COLUMN_BOX_BLACK = " o-box-black";
390
391    /** CSS style name. */
392    public static final String TABLE_COLUMN_BOX_BLUE = " o-box-blue";
393
394    /** CSS style name. */
395    public static final String TABLE_COLUMN_BOX_BLUE_LIGHT = " o-box-blue-light";
396
397    /** CSS style name. */
398    public static final String TABLE_COLUMN_BOX_CYAN = " o-box-cyan";
399
400    /** CSS style name. */
401    public static final String TABLE_COLUMN_BOX_DARKGRAY = " o-box-gray-darker";
402
403    /** CSS style name. */
404    public static final String TABLE_COLUMN_BOX_DARKRED = " o-box-red-dark";
405
406    /** CSS style name. */
407    public static final String TABLE_COLUMN_BOX_GRAY = " o-box-gray";
408
409    /** CSS style name. */
410    public static final String TABLE_COLUMN_BOX_GRAY_DARKER = " o-box-gray-darker";
411
412    /** CSS style name. */
413    public static final String TABLE_COLUMN_BOX_GREEN = " o-box-green";
414
415    /** CSS style name. */
416    public static final String TABLE_COLUMN_BOX_ORANGE = " o-box-orange";
417
418    /** CSS style name. */
419    public static final String TABLE_COLUMN_BOX_ORANGE_DARK = " o-box-orange-dark";
420
421    /** CSS style name. */
422    public static final String TABLE_COLUMN_BOX_RED = " o-box-red";
423
424    /** CSS style name. */
425    public static final String TABLE_CONST_COLOR = "o-table-const-color";
426
427    /** CSS style name. */
428    public static final String TOOLABER_APP_INDICATOR = "o-toolbar-app-indicator";
429
430    /** CSS style name. */
431    public static final String TOOLABER_APP_INDICATOR_ONLINE = "o-toolbar-app-indicator-online";
432
433    /** CSS style name. */
434    public static final String TOOLBAR = "o-toolbar";
435
436    /** CSS style name. */
437    public static final String TOOLBAR_BUTTON = "o-toolbar-button";
438
439    /** CSS style name. */
440    public static final String TOOLBAR_CENTER = "o-toolbar-center";
441
442    /** CSS style name. */
443    public static final String TOOLBAR_FIELD = "o-toolbar-field";
444
445    /** CSS style name. */
446    public static final String TOOLBAR_INNER = "o-toolbar-inner";
447
448    /** CSS style name. */
449    public static final String TOOLBAR_ITEMS_LEFT = "o-toolbar-items-left";
450
451    /** CSS style name. */
452    public static final String TOOLBAR_ITEMS_RIGHT = "o-toolbar-items-right";
453
454    /** CSS style name. */
455    public static final String TOOLBAR_LOGO = "o-toolbar-logo";
456
457    /** CSS style name. */
458    public static final String TOOLS_BREADCRUMB = "o-tools-breadcrumb";
459
460    /** CSS style name. */
461    public static final String USER_IMAGE = "o-user-image";
462
463    /** CSS style name. */
464    public static final String USER_INFO = "o-user-info";
465
466    /** CSS style name. */
467    public static final String VERTICAL_MENU = "o-verticalmenu";
468
469    /** CSS style name. */
470    public static final String VERTICAL_MENU_ITEM = "o-verticalmenu-menuitem";
471
472    /** CSS style name. */
473    public static final String WORKPLACE_MAXWIDTH = "o-workplace-maxwidth";
474
475    /** CSS style name. */
476    protected static final String QUICK_LAUNCH = "o-quicklaunch";
477
478    /**
479     * Hidden default constructor.
480     */
481    private OpenCmsTheme() {
482
483        // hidden default constructor, do nothing
484    }
485
486    /**
487     * Gets the link to an image below the img-extra folder.<p>
488     *
489     * @param imagePath the image path below img-extra
490     *
491     * @return the complete image link
492     */
493    public static String getImageLink(String imagePath) {
494
495        return CmsStringUtil.joinPaths(
496            OpenCms.getSystemInfo().getContextPath(),
497            "VAADIN/themes/opencms/img-extra",
498            imagePath);
499    }
500
501}