use of org.activiti.explorer.ui.process.listener.ImportModelClickListener in project Activiti by Activiti.
the class EditorProcessDefinitionPage method createMenuBar.
@Override
protected ToolBar createMenuBar() {
ProcessMenuBar menuBar = new ProcessMenuBar();
Button newModelButton = new Button(ExplorerApp.get().getI18nManager().getMessage(Messages.PROCESS_NEW));
newModelButton.addListener(new NewModelClickListener());
menuBar.addButton(newModelButton);
Button importModelButton = new Button(ExplorerApp.get().getI18nManager().getMessage(Messages.PROCESS_IMPORT));
importModelButton.addListener(new ImportModelClickListener());
menuBar.addButton(importModelButton);
return menuBar;
}
use of org.activiti.explorer.ui.process.listener.ImportModelClickListener in project Activiti by Activiti.
the class EditorProcessDefinitionDetailPanel method initActions.
protected void initActions() {
newModelButton = new Button(i18nManager.getMessage(Messages.PROCESS_NEW));
newModelButton.addListener(new NewModelClickListener());
importModelButton = new Button(i18nManager.getMessage(Messages.PROCESS_IMPORT));
importModelButton.addListener(new ImportModelClickListener());
editModelButton = new Button(i18nManager.getMessage(Messages.PROCESS_EDIT));
editModelButton.addListener(new EditModelClickListener(modelData));
actionLabel = new Label(i18nManager.getMessage(Messages.MODEL_ACTION));
actionLabel.setSizeUndefined();
actionSelect = new Select();
actionSelect.addItem(i18nManager.getMessage(Messages.PROCESS_COPY));
actionSelect.addItem(i18nManager.getMessage(Messages.PROCESS_DELETE));
actionSelect.addItem(i18nManager.getMessage(Messages.PROCESS_DEPLOY));
actionSelect.addItem(i18nManager.getMessage(Messages.PROCESS_EXPORT));
actionSelect.setWidth("100px");
actionSelect.setFilteringMode(Filtering.FILTERINGMODE_OFF);
actionSelect.setImmediate(true);
actionSelect.addListener(new ValueChangeListener() {
private static final long serialVersionUID = 1L;
@Override
public void valueChange(ValueChangeEvent event) {
if (i18nManager.getMessage(Messages.PROCESS_COPY).equals(event.getProperty().getValue())) {
ExplorerApp.get().getViewManager().showPopupWindow(new CopyModelPopupWindow(modelData));
} else if (i18nManager.getMessage(Messages.PROCESS_DELETE).equals(event.getProperty().getValue())) {
ExplorerApp.get().getViewManager().showPopupWindow(new DeleteModelPopupWindow(modelData));
} else if (i18nManager.getMessage(Messages.PROCESS_DEPLOY).equals(event.getProperty().getValue())) {
deployModel();
} else if (i18nManager.getMessage(Messages.PROCESS_EXPORT).equals(event.getProperty().getValue())) {
exportModel();
}
}
});
// Clear toolbar and add 'start' button
processDefinitionPage.getToolBar().removeAllButtons();
processDefinitionPage.getToolBar().removeAllAdditionalComponents();
processDefinitionPage.getToolBar().addButton(newModelButton);
processDefinitionPage.getToolBar().addButton(importModelButton);
processDefinitionPage.getToolBar().addButton(editModelButton);
processDefinitionPage.getToolBar().addAdditionalComponent(actionLabel);
processDefinitionPage.getToolBar().setComponentAlignment(actionLabel, Alignment.MIDDLE_LEFT);
processDefinitionPage.getToolBar().addAdditionalComponent(actionSelect);
processDefinitionPage.getToolBar().setComponentAlignment(actionSelect, Alignment.MIDDLE_RIGHT);
}
Aggregations