use of com.vaadin.ui.HorizontalLayout in project Activiti by Activiti.
the class DatabaseDetailPanel method addTableName.
protected void addTableName() {
HorizontalLayout header = new HorizontalLayout();
header.setWidth(100, UNITS_PERCENTAGE);
header.addStyleName(ExplorerLayout.STYLE_TITLE_BLOCK);
header.setSpacing(true);
// TODO: use right image
Embedded image = new Embedded(null, Images.DATABASE_50);
header.addComponent(image);
header.setComponentAlignment(image, Alignment.MIDDLE_LEFT);
header.setMargin(false, false, true, false);
Label name = new Label(tableName);
name.addStyleName(Reindeer.LABEL_H2);
header.addComponent(name);
header.setExpandRatio(name, 1.0f);
header.setComponentAlignment(name, Alignment.MIDDLE_LEFT);
addDetailComponent(header);
Label spacer = new Label();
spacer.setWidth(100, UNITS_PERCENTAGE);
spacer.addStyleName(ExplorerLayout.STYLE_DETAIL_BLOCK);
addDetailComponent(spacer);
}
use of com.vaadin.ui.HorizontalLayout in project Activiti by Activiti.
the class DeleteDeploymentPopupWindow method addDeleteWarning.
protected void addDeleteWarning() {
List<ProcessDefinition> processDefinitions = repositoryService.createProcessDefinitionQuery().deploymentId(deployment.getId()).list();
int nrOfProcessInstances = 0;
for (ProcessDefinition processDefinition : processDefinitions) {
nrOfProcessInstances += runtimeService.createProcessInstanceQuery().processDefinitionId(processDefinition.getId()).count();
}
if (nrOfProcessInstances == 0) {
Label noInstancesLabel = new Label(i18nManager.getMessage(Messages.DEPLOYMENT_NO_INSTANCES));
noInstancesLabel.addStyleName(Reindeer.LABEL_SMALL);
addComponent(noInstancesLabel);
} else {
HorizontalLayout warningLayout = new HorizontalLayout();
warningLayout.setSpacing(true);
addComponent(warningLayout);
Embedded warningIcon = new Embedded(null, Images.WARNING);
warningIcon.setType(Embedded.TYPE_IMAGE);
warningLayout.addComponent(warningIcon);
Label warningLabel = new Label(i18nManager.getMessage(Messages.DEPLOYMENT_DELETE_POPUP_WARNING, nrOfProcessInstances), Label.CONTENT_XHTML);
warningLabel.setSizeUndefined();
warningLabel.addStyleName(Reindeer.LABEL_SMALL);
warningLayout.addComponent(warningLabel);
}
// Some empty space
Label emptySpace = new Label(" ", Label.CONTENT_XHTML);
addComponent(emptySpace);
}
use of com.vaadin.ui.HorizontalLayout in project Activiti by Activiti.
the class AdminRunningInstancesPanel method initDefinitions.
protected void initDefinitions() {
HorizontalLayout definitionsHeader = new HorizontalLayout();
definitionsHeader.setSpacing(true);
definitionsHeader.setWidth(100, UNITS_PERCENTAGE);
definitionsHeader.addStyleName(ExplorerLayout.STYLE_DETAIL_BLOCK);
addDetailComponent(definitionsHeader);
initDefinitionTitle(definitionsHeader);
definitionsLayout = new HorizontalLayout();
definitionsLayout.setWidth(100, UNITS_PERCENTAGE);
addDetailComponent(definitionsLayout);
initDefinitionsTable();
}
use of com.vaadin.ui.HorizontalLayout in project Activiti by Activiti.
the class AdminRunningInstancesPanel method initInstances.
protected void initInstances() {
HorizontalLayout instancesHeader = new HorizontalLayout();
instancesHeader.setSpacing(true);
instancesHeader.setWidth(100, UNITS_PERCENTAGE);
instancesHeader.addStyleName(ExplorerLayout.STYLE_DETAIL_BLOCK);
addDetailComponent(instancesHeader);
initInstancesTitle(instancesHeader);
instancesLayout = new HorizontalLayout();
instancesLayout.setWidth(100, UNITS_PERCENTAGE);
addDetailComponent(instancesLayout);
initInstancesTable();
}
use of com.vaadin.ui.HorizontalLayout in project Activiti by Activiti.
the class EventOverviewPanel method initEvents.
protected void initEvents() {
HorizontalLayout eventsHeader = new HorizontalLayout();
eventsHeader.setSpacing(true);
eventsHeader.setWidth(80, UNITS_PERCENTAGE);
eventsHeader.addStyleName(ExplorerLayout.STYLE_DETAIL_BLOCK);
addDetailComponent(eventsHeader);
initEventTitle(eventsHeader);
stepButton = new Button(i18nManager.getMessage(Messages.CRYSTALBALL_BUTTON_NEXTEVENT));
stepButton.setEnabled(false);
stepButton.addListener(new ClickListener() {
private static final long serialVersionUID = 1L;
@Override
public void buttonClick(ClickEvent event) {
if (!SimulationRunContext.getEventCalendar().getEvents().isEmpty()) {
simulationDebugger.step();
refreshEvents();
}
}
});
eventsHeader.addComponent(stepButton);
eventsHeader.setComponentAlignment(stepButton, Alignment.MIDDLE_LEFT);
showProcessInstanceButton = new Button();
showProcessInstanceButton.addStyleName(Reindeer.BUTTON_LINK);
showProcessInstanceButton.addListener(new ClickListener() {
private static final long serialVersionUID = 1L;
public void buttonClick(ClickEvent event) {
if (replayHistoricInstance != null) {
ExplorerApp.get().getViewManager().showMyProcessInstancesPage(replayHistoricInstance.getId());
}
}
});
eventsHeader.addComponent(showProcessInstanceButton);
eventsHeader.setComponentAlignment(showProcessInstanceButton, Alignment.MIDDLE_LEFT);
eventLayout = new HorizontalLayout();
eventLayout.setWidth(100, UNITS_PERCENTAGE);
addDetailComponent(eventLayout);
initEventsTable();
}
Aggregations