提交 01fe5fb7 编写于 作者: J jbarrez

ACT-696: removed Constants

上级 833faeb6
/* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.activiti.explorer;
import java.text.DateFormat;
import java.text.SimpleDateFormat;
/**
* @author Joram Barrez
*/
public class Constants {
public static final String THEME = "activiti";
public static final String LOGIN_LAYOUT = "login";
// Locations in the general layout
public static final String LOCATION_LOGIN = "login-content";
public static final String LOCATION_CONTENT = "content";
public static final String LOCATION_SEARCH = "search";
public static final String LOCATION_MAIN_MENU = "main-menu";
public static final String LOCATION_HIDDEN = "hidden";
// Css styles
public static final String STYLE_LOGIN_PAGE = "login-general";
public static final String STYLE_SMALL_TEXTFIELD = "small";
public static final String STYLE_SEARCHBOX = "searchBox";
public static final String STYLE_LOGOUT_BUTTON = "logout";
public static final String STYLE_USER_LABEL = "user";
public static final String STYLE_MENUBAR = "menubar";
public static final String STYLE_MENUBAR_BUTTON = "menu-button";
public static final String STYLE_ACTION_BAR = "action-bar";
public static final String STYLE_PROFILE_LAYOUT = "profile-layout";
public static final String STYLE_PROFILE_HEADER = "profile-header";
public static final String STYLE_PROFILE_FIELD = "profile-field";
public static final String STYLE_PROFILE_PICTURE = "profile-picture";
public static final String STYLE_LABEL_BOLD = "bold";
public static final String STYLE_TASK_LIST = "task-list";
public static final String STYLE_TASK_DETAILS = "task-details";
public static final String STYLE_TASK_DETAILS_HEADER = "task-details-header";
public static final String STYLE_TASK_COMMENT = "task-comment";
public static final String STYLE_TASK_COMMENT_AUTHOR = "task-comment-author";
public static final String STYLE_TASK_COMMENT_TIME = "task-comment-time";
public static final String STYLE_TASK_COMMENT_PICTURE = "task-comment-picture";
public static final String STYLE_PROCESS_DEFINITION_LIST = "proc-def-list";
public static final String STYLE_PROCESS_DEFINITION_DETAILS_HEADER = "proc-def-details-header";
public static final String STYLE_DATABASE_DETAILS = "database-details";
public static final String STYLE_DATABASE_TABLE_ROW = "database-table-row";
public static final String STYLE_DEPLOYMENT_DETAILS_HEADER = "deployment-details-header";
public static final String STYLE_DEPLOYMENT_UPLOAD_DESCRIPTION = "upload-description";
public static final String STYLE_DEPLOYMENT_UPLOAD_BUTTON = "upload-button";
public static final String STYLE_JOB_DETAILS_HEADER = "job-details-header";
public static final String STYLE_JOB_EXCEPTION_MESSAGE = "job-exception-message";
public static final String STYLE_JOB_EXCEPTION_TRACE = "job-exception-trace";
public static final String STYLE_FORMPROPERTY_READONLY = "formprop-readonly";
public static final String STYLE_FORMPROPERTY_LABEL = "formprop-label";
// Date formatting
public static final DateFormat DEFAULT_DATE_FORMATTER = new SimpleDateFormat("dd MMM yyyy - hh:mm");
// Default diagram image extension, when name cannot be deducted from resource name
public static final String DEFAULT_DIAGRAM_IMAGE_EXTENSION = "png";
}
......@@ -18,9 +18,9 @@ import org.activiti.engine.ProcessEngines;
import org.activiti.engine.impl.runtime.MessageEntity;
import org.activiti.engine.impl.runtime.TimerEntity;
import org.activiti.engine.runtime.Job;
import org.activiti.explorer.Constants;
import org.activiti.explorer.ExplorerApplication;
import org.activiti.explorer.Images;
import org.activiti.explorer.ui.ExplorerLayout;
import com.ocpsoft.pretty.time.PrettyTime;
import com.vaadin.ui.Alignment;
......@@ -139,7 +139,7 @@ public class JobDetailPanel extends Panel {
protected void addJobState() {
Label processDefinitionHeader = new Label("Job Execution");
processDefinitionHeader.addStyleName(Constants.STYLE_JOB_DETAILS_HEADER);
processDefinitionHeader.addStyleName(ExplorerLayout.STYLE_JOB_DETAILS_HEADER);
processDefinitionHeader.setWidth("95%");
addComponent(processDefinitionHeader);
......@@ -156,7 +156,7 @@ public class JobDetailPanel extends Panel {
// Exceptions
if(job.getExceptionMessage() != null) {
Label exceptionMessageLabel = new Label("Error during last execution: " + job.getExceptionMessage());
exceptionMessageLabel.addStyleName(Constants.STYLE_JOB_EXCEPTION_MESSAGE);
exceptionMessageLabel.addStyleName(ExplorerLayout.STYLE_JOB_EXCEPTION_MESSAGE);
layout.addComponent(exceptionMessageLabel);
// Add Exception stacktrace
......@@ -164,7 +164,7 @@ public class JobDetailPanel extends Panel {
Label stackTraceLabel = new Label(stack);
stackTraceLabel.setContentMode(Label.CONTENT_PREFORMATTED);
stackTraceLabel.addStyleName(Constants.STYLE_JOB_EXCEPTION_TRACE);
stackTraceLabel.addStyleName(ExplorerLayout.STYLE_JOB_EXCEPTION_TRACE);
stackTraceLabel.setSizeFull();
Panel stackPanel = new Panel();
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册