use of de.catma.ui.component.IconButton in project catma by forTEXT.
the class AnnotationPanel method initComponents.
private void initComponents(Consumer<String> annotationSelectionListener) {
setSizeFull();
setSpacing(true);
currentEditableCollectionBox = new ComboBox<>("Collection currently being edited");
currentEditableCollectionBox.setWidth("100%");
currentEditableCollectionBox.setPlaceholder("Please select a Document first!");
btAddCollection = new IconButton(VaadinIcons.PLUS);
btAddCollection.setVisible(project.isAuthorizedOnProject(RBACPermission.COLLECTION_CREATE));
HorizontalLayout editableCollectionPanel = new HorizontalLayout(currentEditableCollectionBox, btAddCollection);
editableCollectionPanel.addStyleName("annotate-right-padding");
editableCollectionPanel.setWidth("100%");
editableCollectionPanel.setExpandRatio(currentEditableCollectionBox, 1.0f);
editableCollectionPanel.setComponentAlignment(btAddCollection, Alignment.BOTTOM_CENTER);
addComponent(editableCollectionPanel);
Label tagsetsLabel = new Label("Tagsets");
tagsetGrid = TreeGridFactory.createDefaultTreeGrid();
tagsetGrid.addStyleNames("flat-undecorated-icon-buttonrenderer");
tagsetGrid.setSizeFull();
tagsetGrid.setSelectionMode(SelectionMode.SINGLE);
tagsetGrid.addStyleName(MaterialTheme.GRID_BORDERLESS);
tagsetGridComponent = new ActionGridComponent<TreeGrid<TagsetTreeItem>>(tagsetsLabel, tagsetGrid);
tagsetGridComponent.setMargin(false);
rightSplitPanel = new VerticalSplitPanel();
rightSplitPanel.setSizeFull();
rightSplitPanel.setSplitPosition(90);
rightSplitPanel.setLocked(true);
addComponent(rightSplitPanel);
setExpandRatio(rightSplitPanel, 1.0f);
rightSplitPanel.addComponent(tagsetGridComponent);
btMaximizeAnnotationDetailsRibbon = new IconButton(VaadinIcons.ANGLE_DOUBLE_UP);
btMaximizeAnnotationDetailsRibbon.addStyleName("annotation-panel-button-right-align");
rightSplitPanel.addComponent(btMaximizeAnnotationDetailsRibbon);
annotationDetailsPanel = new AnnotationDetailsPanel(project, collectionManager, annotationSelectionListener, collectionId -> currentEditableCollectionBox.getValue() != null && currentEditableCollectionBox.getValue().getUuid().contentEquals(collectionId), collectionId -> handleCollectionChangeRequest(collectionId));
}
use of de.catma.ui.component.IconButton in project catma by forTEXT.
the class PagerComponent method initComponents.
private void initComponents() {
setSpacing(false);
firstPageButton = new IconButton(VaadinIcons.FAST_BACKWARD);
addComponent(firstPageButton);
previousPageButton = new IconButton(VaadinIcons.BACKWARDS);
addComponent(previousPageButton);
pageInput = new NumberField(1);
// $NON-NLS-1$
pageInput.setStyleName("pager-pageinput");
addComponent(pageInput);
lastPageNumberLabel = new Label("N/A");
addComponent(lastPageNumberLabel);
this.setComponentAlignment(lastPageNumberLabel, Alignment.MIDDLE_LEFT);
nextPageButton = new IconButton(VaadinIcons.FORWARD);
addComponent(nextPageButton);
lastPageButton = new IconButton(VaadinIcons.FAST_FORWARD);
addComponent(lastPageButton);
}
use of de.catma.ui.component.IconButton in project catma by forTEXT.
the class EditPropertyTab method initComponents.
private void initComponents() {
setSizeFull();
setSpacing(true);
setMargin(true);
ArrayList<String> valueList = new ArrayList<>(proposedValueList);
for (String value : property.getPropertyValueList()) {
if (!valueList.contains(value)) {
valueList.add(value);
}
}
valueProvider = new ListDataProvider<>(valueList);
valueGrid = new Grid<>("Assigned values", valueProvider);
valueGrid.setSelectionMode(SelectionMode.MULTI);
valueGrid.setSizeFull();
valueGrid.asMultiSelect().selectItems(property.getPropertyValueList().toArray(new String[] {}));
valueGrid.addColumn(value -> value.toString()).setCaption("Value");
addComponent(valueGrid);
VerticalLayout customValuePanel = new VerticalLayout();
customValuePanel.setSizeFull();
adhocValueArea = new TextArea("Add a custom value");
adhocValueArea.setSizeFull();
customValuePanel.addComponent(adhocValueArea);
customValuePanel.setExpandRatio(adhocValueArea, 1.0f);
btAdd = new IconButton(VaadinIcons.PLUS);
btAdd.setDescription("Add another custom value");
customValuePanel.addComponent(btAdd);
customValuePanel.setComponentAlignment(btAdd, Alignment.TOP_RIGHT);
addComponent(customValuePanel);
}
use of de.catma.ui.component.IconButton in project catma by forTEXT.
the class CatmaHeader method initComponents.
private void initComponents(IRemoteGitManagerPrivileged gitManagerPrivileged) {
addStyleName("header");
setWidth("100%");
btHome = new Button("Catma " + Version.LATEST);
btHome.addClickListener((evt) -> eventBus.post(new RouteToDashboardEvent()));
btHome.addStyleNames(ValoTheme.BUTTON_LINK, ValoTheme.LABEL_H3);
btHome.addStyleName("header-home-button");
addComponent(btHome);
setComponentAlignment(btHome, Alignment.MIDDLE_LEFT);
contextInformation.addStyleName("header__context");
addComponent(contextInformation);
setComponentAlignment(contextInformation, Alignment.MIDDLE_CENTER);
setExpandRatio(contextInformation, 1f);
IconButton btnAccount = new IconButton(VaadinIcons.USER);
btnAccount.setDescription(loginService.getAPI().getUser().getName());
ContextMenu ctxAccount = new ContextMenu(btnAccount, true);
ctxAccount.addItem("Edit Account", (item) -> {
EditAccountDialog editAccount = new EditAccountDialog(gitManagerPrivileged, loginService, eventBus);
editAccount.show();
});
ctxAccount.addItem("Get Access Token", (item) -> {
AccessTokenDialog accessTokenDialog = new AccessTokenDialog(gitManagerPrivileged, loginService);
accessTokenDialog.show();
});
ctxAccount.addItem("Sign Out", (item) -> {
loginService.logout();
});
btnAccount.addClickListener((evt) -> ctxAccount.open(evt.getClientX(), evt.getClientY()));
addComponent(btnAccount);
setComponentAlignment(btHome, Alignment.MIDDLE_RIGHT);
}
use of de.catma.ui.component.IconButton in project catma by forTEXT.
the class ProjectListView method initComponents.
protected void initComponents() {
helpWindow = new ProjectManagerHelpWindow();
addStyleName("projectlist");
projectsLayout.addStyleNames("projectlist__list");
setSizeFull();
HorizontalLayout descriptionBar = new HorizontalLayout();
Label description = new Label("All Projects");
Label title = new Label("Title");
sortButton = new IconButton(VaadinIcons.ARROW_DOWN);
descriptionBar.addComponent(description);
descriptionBar.setExpandRatio(description, 1f);
descriptionBar.addComponent(title);
descriptionBar.addComponent(sortButton);
descriptionBar.setComponentAlignment(sortButton, Alignment.MIDDLE_RIGHT);
helpButton = new IconButton(VaadinIcons.QUESTION_CIRCLE);
descriptionBar.addComponent(helpButton);
descriptionBar.setComponentAlignment(helpButton, Alignment.MIDDLE_RIGHT);
descriptionBar.setWidth("100%");
addComponent(descriptionBar);
addComponent(projectsLayout);
setExpandRatio(projectsLayout, 1f);
}
Aggregations