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_RED = "o-button-red";
097
098    /** CSS style name. */
099    public static final String BUTTON_SITE = "o-button-site";
100
101    /** CSS style name. */
102    public static final String BUTTON_TABLE_ICON = "o-button-table-icon";
103
104    /** CSS style name. */
105    public static final String BUTTON_UNPADDED = "o-button-unpadded";
106
107    /** CSS style name. */
108    public static final String COLOR_BLUE = "o-color-blue";
109
110    /** CSS style name. */
111    public static final String COLOR_CYAN = " o-color-cyan";
112
113    /** CSS style name. */
114    public static final String COLOR_GRAY = "o-color-gray";
115
116    /** CSS style name. */
117    public static final String COLOR_ORANGE = "o-color-orange";
118
119    /** CSS style name. */
120    public static final String COLOR_RED = "o-color-red";
121
122    /** CSS style name. */
123    public static final String CRUMB_WRAPPER = "o-crumb-wrapper";
124
125    /** CSS style name. */
126    public static final String CRUMBS = "o-crumbs";
127
128    /** CSS style name.*/
129    public static final String DELETE_UNUSED = "oc-icon-32-delete-unused";
130
131    /** CSS style name. */
132    public static final String DIALOG = "o-dialog";
133
134    /** CSS style name. */
135    public static final String DIALOG_BUTTON_BAR = "o-dialog-button-bar";
136
137    /** CSS style name. */
138    public static final String DIALOG_CONTENT = "o-dialog-content";
139
140    /** CSS style name. */
141    public static final String DIALOG_CONTENT_PANEL = "o-dialog-content-panel";
142
143    /** CSS style name. */
144    public static final String DIALOG_FORM = "o-dialog-form";
145
146    /** CSS style name. */
147    public static final String DIFF_TYPE_ADDED = "diffTypeAdded";
148
149    /** CSS style name. */
150    public static final String DIFF_TYPE_CHANGED = "diffTypeChanged";
151
152    /** CSS style name. */
153    public static final String DIFF_TYPE_DELETED = "diffTypeDeleted";
154
155    /** CSS style name. */
156    public static final String DIFF_TYPE_UNCHANGED = "diffTypeUnchanged";
157
158    /** CSS style name. */
159    public static final String DISABLED = "o-disabled";
160
161    /** CSS style name. */
162    public static final String DROPDOWN = "o-dropdown";
163
164    /** CSS style name. */
165    public static final String EXPIRED = "o-expired";
166
167    /** CSS style name. */
168    public static final String FILE_TREE = "o-file-tree";
169
170    /** CSS style name. */
171    public static final String FORMLAYOUT_WORKPLACE_MAIN = "o-formlayout-workplace-main";
172
173    /** CSS style name. */
174    public static final String FULL_WIDTH_PADDING = "o-full-width-padding";
175
176    /** CSS style name. */
177    public static final String GALLERY_ALERT_IN_USE = "o-gallery-alert-in-use";
178
179    /** CSS style name. */
180    public static final String GALLERY_FORM = "o-gallery-form";
181
182    /** CSS style name. */
183    public static final String GALLERY_GRID_ROW_ODD = "o-gallery-grid-row-odd";
184
185    /** CSS style name. */
186    public static final String GALLERY_PREVIEW_IMAGE = "o-gallery-preview-image";
187
188    /** CSS style name. */
189    public static final String HIDDEN = "hidden";
190
191    /** CSS style name. */
192    public static final String HIDDEN_TOOLBAR = "o-hidden-toolbar";
193
194    /** CSS style name. */
195    public static final String HOVER_COLUMN = "o-hover-column";
196
197    /** The cache icon CSS class.*/
198    public static final String ICON_CACHE = "oc-icon-24-cache";
199
200    /** The database icon CSS class. */
201    public static final String ICON_DATABASE = "oc-icon-24-database";
202
203    /** CSS class for the date search app icon. */
204    public static final String ICON_DATE_SEARCH = "oc-icon-32-date-search";
205
206    /** CSS style name.*/
207    public static final String ICON_EXLPORER = "oc-icon-24-folder";
208
209    /** CSS style name.*/
210    public static final String ICON_EXLPORER_BIG = "oc-icon-32-explorer";
211
212    /** The group icon CSS class. */
213    public static final String ICON_GROUP = "oc-icon-24-group";
214
215    /** The job icon CSS class. */
216    public static final String ICON_JOB = "oc-icon-24-scheduler";
217
218    /**The Log icon. */
219    public static final String ICON_LOG = "oc-icon-24-log";
220
221    /** CSS class for a newsletter app icon (app is not part of core). */
222    public static final String ICON_NEWSLETTER = "oc-icon-32-newsletter";
223
224    /**Icon for OUs. */
225    public static final String ICON_OU = "oc-icon-24-orgunit";
226
227    /**Icon for OUs for web user. */
228    public static final String ICON_OU_WEB = "oc-icon-24-webuser";
229
230    /** CSS style name.*/
231    public static final String ICON_PERSON_DATA = "oc-icon-32-person-data";
232
233    /** CSS class for a redirect app icon (app is not part of core). */
234    public static final String ICON_REDIRECT = "oc-icon-32-redirect";
235
236    /** The icon for all principal option (currently used in principal select).*/
237    public static final String ICON_PRINCIPAL_ALL = "oc-icon-24-principal-all";
238
239    /** The icon for overwriting principal (currently used in principal select).*/
240    public static final String ICON_PRINCIPAL_OVERWRITE = "oc-icon-24-principal-overwrite";
241
242    /** The project icon CSS class. */
243    public static final String ICON_PROJECT = "oc-icon-24-project";
244
245    /** Path to the project current theme resource. */
246    public static final String ICON_PROJECT_CURRENT = "oc-icon-24-project_yellow";
247
248    /** Path to the project other theme resource. */
249    public static final String ICON_PROJECT_OTHER = "oc-icon-24-project_red";
250
251    /** Path to the project publish theme resource. */
252    public static final String ICON_PUBLISH = "oc-icon-24-publish";
253
254    /** CSS style name.*/
255    public static final String ICON_RESOURCE_TYPES = "oc-icon-32-resource-types";
256
257    /** The role icon CSS class.*/
258    public static final String ICON_ROLE = "oc-icon-24-role";
259
260    /** The search icon. */
261    public static final String ICON_SEARCH = "oc-icon-32-search";
262
263    /**The session icon.*/
264    public static final String ICON_SESSION = "oc-icon-24-session";
265
266    /** The cache icon CSS class. */
267    public static final String ICON_SITE = "oc-icon-24-site";
268
269    /** CSS style name.*/
270    public static final String ICON_TERMINAL = "oc-icon-32-terminal";
271
272    /** CSS style name.*/
273    public static final String ICON_TOOL_1 = "oc-icon-32-tool1";
274
275    /** CSS style name.*/
276    public static final String ICON_TOOL_2 = "oc-icon-32-tool2";
277
278    /** CSS style name.*/
279    public static final String ICON_TOOL_3 = "oc-icon-32-tool3";
280
281    /** CSS style name.*/
282    public static final String ICON_TOOL_4 = "oc-icon-32-tool4";
283
284    /** CSS style name.*/
285    public static final String ICON_TOOL_5 = "oc-icon-32-tool5";
286
287    /** The user icon CSS class.*/
288    public static final String ICON_USER = "oc-icon-24-user";
289
290    /** CSS style name. */
291    public static final String IMAGE_GRADIENT = "o-image-gradient";
292
293    /** CSS style name. */
294    public static final String IMAGE_TRANSPARENT = "o-image-transparent";
295
296    /** CSS style name. */
297    public static final String IN_NAVIGATION = "o-in-navigation";
298
299    /** CSS style name. */
300    public static final String INFO = "o-info-dialog";
301
302    /** CSS style name. */
303    public static final String INFO_ELEMENT_NAME = "o-info-dialog-name";
304
305    /** CSS style name. */
306    public static final String INFO_ELEMENT_VALUE = "o-info-dialog-value";
307
308    /** CSS style name. */
309    public static final String INLINE_TEXTFIELD = "o-inline-textfield";
310
311    /** CSS style name. */
312    public static final String LABEL_ERROR = "o-label-error";
313
314    /** CSS style name. */
315    public static final String LOCK_OTHER = "o-lock-other";
316
317    /** CSS style name. */
318    public static final String LOCK_PUBLISH = "o-lock-publish";
319
320    /** CSS style name. */
321    public static final String LOCK_SHARED = "o-lock-shared";
322
323    /** CSS style name. */
324    public static final String LOCK_USER = "o-lock-user";
325
326    /** CSS style name. */
327    public static final String MAIN = "o-main";
328
329    /** CSS style name. */
330    public static final String NAVIGATOR_DROPDOWN = "o-navigator-dropdown";
331
332    /** CSS style name. */
333    public static final String NO_TRANSLATION_ICON = "o-notranslation";
334
335    /** Path to the OpenCms logo theme resource. */
336    public static final String OPENCMS_LOGO_PATH = "img/opencmsLogo.png";
337    /** CSS style name. */
338    public static final String PADDING_HORIZONTAL = "o-padding-horizontal";
339
340    /** CSS style name. */
341    public static final String POINTER = "o-pointer";
342
343    /** CSS style name. */
344    public static final String PROJECT_OTHER = "o-project-other";
345
346    /** CSS style name. */
347    public static final String QUICK_LAUNCH_EDITOR = "o-quicklaunch-editor";
348
349    /** CSS style name. */
350    public static final String REDUCED_MARGIN = "o-reduced-margin";
351
352    /** CSS style name. */
353    public static final String REDUCED_SPACING = "o-reduced-spacing";
354
355    /** CSS style name. */
356    public static final String REQUIRED_BUTTON = "o-required-button";
357
358    /** CSS style name. */
359    public static final String RESINFO_HIDDEN_ICON = "o-resinfo-hidden-icon";
360
361    /** CSS style name. */
362    public static final String RESINFO_POINTER = "o-resinfo-pointer";
363
364    /** CSS style name. */
365    public static final String RESOURCE_ICON = "o-resource-icon";
366
367    /** CSS style name. */
368    public static final String RESOURCE_INFO = "o-resource-info";
369
370    /** CSS style name. */
371    public static final String RESOURCE_INFO_DIRECTLINK = "o-resourceinfo-directlink";
372
373    /** CSS style name. */
374    public static final String RESOURCE_INFO_WEAK = "o-resourceinfo-weak";
375
376    /** CSS style name. */
377    public static final String RESPONSIVE = "o-responsive";
378
379    /** CSS style name. */
380    public static final String SECURITY = "o-security";
381
382    /** CSS style name. */
383    public static final String SECURITY_INVALID = SECURITY + "-invalid";
384
385    /** CSS style name. */
386    public static final String SECURITY_STRONG = SECURITY + "-strong";
387
388    /** CSS style name. */
389    public static final String SECURITY_WEAK = SECURITY + "-weak";
390
391    /** CSS style name. */
392    public static final String SIBLING = "o-sibling";
393
394    /** CSS style name. */
395    public static final String SIMPLE_DRAG = "o-simple-drag";
396
397    /** CSS style name. */
398    public static final String SITEMAP_LOCALE_BAR = "o-sitemap-locale-bar";
399
400    /** CSS style name. */
401    public static final String STATE_CHANGED = "o-state-changed";
402
403    /** CSS style name. */
404    public static final String STATE_DELETED = "o-state-deleted";
405
406    /** CSS style name. */
407    public static final String STATE_NEW = "o-state-new";
408
409    /** CSS style name.*/
410    public static final String TABLE_CELL_DISABLED = "o-table-cell-disabled";
411
412    /** CSS style name. */
413    public static final String TABLE_CELL_PADDING = "o-table-cell-padding";
414
415    /** CSS style name. */
416    public static final String TABLE_COLUMN_BOX_BLACK = " o-box-black";
417
418    /** CSS style name. */
419    public static final String TABLE_COLUMN_BOX_BLUE = " o-box-blue";
420
421    /** CSS style name. */
422    public static final String TABLE_COLUMN_BOX_BLUE_LIGHT = " o-box-blue-light";
423
424    /** CSS style name. */
425    public static final String TABLE_COLUMN_BOX_CYAN = " o-box-cyan";
426
427    /** CSS style name. */
428    public static final String TABLE_COLUMN_BOX_DARKGRAY = " o-box-gray-darker";
429
430    /** CSS style name. */
431    public static final String TABLE_COLUMN_BOX_DARKRED = " o-box-red-dark";
432
433    /** CSS style name. */
434    public static final String TABLE_COLUMN_BOX_GRAY = " o-box-gray";
435
436    /** CSS style name. */
437    public static final String TABLE_COLUMN_BOX_GRAY_DARKER = " o-box-gray-darker";
438
439    /** CSS style name. */
440    public static final String TABLE_COLUMN_BOX_GREEN = " o-box-green";
441
442    /** CSS style name. */
443    public static final String TABLE_COLUMN_BOX_ORANGE = " o-box-orange";
444
445    /** CSS style name. */
446    public static final String TABLE_COLUMN_BOX_ORANGE_DARK = " o-box-orange-dark";
447
448    /** CSS style name. */
449    public static final String TABLE_COLUMN_BOX_RED = " o-box-red";
450
451    /** CSS style name. */
452    public static final String TABLE_CONST_COLOR = "o-table-const-color";
453
454    /** CSS style name. */
455    public static final String TOOLABER_APP_INDICATOR = "o-toolbar-app-indicator";
456
457    /** CSS style name. */
458    public static final String TOOLABER_APP_INDICATOR_ONLINE = "o-toolbar-app-indicator-online";
459
460    /** CSS style name. */
461    public static final String TOOLBAR = "o-toolbar";
462
463    /** CSS style name. */
464    public static final String TOOLBAR_BUTTON = "o-toolbar-button";
465
466    /** CSS style name. */
467    public static final String TOOLBAR_CENTER = "o-toolbar-center";
468
469    /** CSS style name. */
470    public static final String TOOLBAR_FIELD = "o-toolbar-field";
471
472    /** CSS style name. */
473    public static final String TOOLBAR_INNER = "o-toolbar-inner";
474
475    /** CSS style name. */
476    public static final String TOOLBAR_ITEMS_LEFT = "o-toolbar-items-left";
477
478    /** CSS style name. */
479    public static final String TOOLBAR_ITEMS_RIGHT = "o-toolbar-items-right";
480
481    /** CSS style name. */
482    public static final String TOOLBAR_LOGO = "o-toolbar-logo";
483
484    /** CSS style name. */
485    public static final String TOOLS_BREADCRUMB = "o-tools-breadcrumb";
486
487    /** CSS style name. */
488    public static final String TYPE_FILTER_BUTTON = "o-type-filter-button";
489
490    /** CSS style name. */
491    public static final String TYPE_FILTER_BUTTON_ACTIVE = "o-type-filter-button-active";
492
493    /** CSS style name. */
494    public static final String TYPE_SELECT = "o-type-select-box";
495
496    /** CSS style name. */
497    public static final String USER_IMAGE = "o-user-image";
498
499    /** CSS style name. */
500    public static final String USER_INFO = "o-user-info";
501
502    /** CSS style name. */
503    public static final String VERTICAL_MENU = "o-verticalmenu";
504
505    /** CSS style name. */
506    public static final String VERTICAL_MENU_ITEM = "o-verticalmenu-menuitem";
507
508    /** CSS style name. */
509    public static final String WORKPLACE_MAXWIDTH = "o-workplace-maxwidth";
510
511    /** CSS style name. */
512    protected static final String QUICK_LAUNCH = "o-quicklaunch";
513
514    /**
515     * Hidden default constructor.
516     */
517    private OpenCmsTheme() {
518
519        // hidden default constructor, do nothing
520    }
521
522    /**
523     * Gets the link to an image below the img-extra folder.<p>
524     *
525     * @param imagePath the image path below img-extra
526     *
527     * @return the complete image link
528     */
529    public static String getImageLink(String imagePath) {
530
531        return CmsStringUtil.joinPaths(
532            OpenCms.getSystemInfo().getContextPath(),
533            "VAADIN/themes/opencms/img-extra",
534            imagePath);
535    }
536
537}