List of usage examples for com.vaadin.ui.themes ValoTheme LABEL_BOLD
String LABEL_BOLD
To view the source code for com.vaadin.ui.themes ValoTheme LABEL_BOLD.
Click Source Link
From source file:org.jpos.qi.minigl.AccountsView.java
License:Open Source License
private Panel createEntriesPanel() { Panel entriesPanel = new Panel(getCaptionFromId("entries")); entriesPanel.setIcon(VaadinIcons.EXCHANGE); entriesPanel.addStyleName("color1"); entriesPanel.addStyleName("margin-top-panel"); VerticalLayout layout = new VerticalLayout(); layout.setMargin(true);// ww w .j ava2s. co m layout.setSpacing(true); Panel filterPanel = new Panel(); filterPanel.addStyleName("v-panel-well"); journals = new JournalsCombo(true); rangeLabelTitle = new Label(); rangeLabelTitle.addStyleName(ValoTheme.LABEL_BOLD); dateRangeComponent = new DateRangeComponent(DateRange.ALL_TIME, true) { @Override protected Button.ClickListener createRefreshListener() { return event -> { refreshDetails(); }; } }; VerticalLayout detailsLayout = new VerticalLayout(); entryGrid = new EntryGrid(null, false); formatEntriesGrid(); detailsLayout.addComponent(entryGrid); detailsLayout.setMargin(false); HorizontalLayout layersLayout = new HorizontalLayout(); layersLayout.setSizeFull(); layersLayout.setSpacing(true); layersCheckBox = new CheckBoxGroup<>(getCaptionFromId("layers").toUpperCase()); layersCheckBox.setItemCaptionGenerator(item -> item.getId() + " - " + item.getName()); layersCheckBox.addValueChangeListener(listener -> refreshDetails()); layersLayout.addComponentsAndExpand(layersCheckBox); VerticalLayout vbar = new VerticalLayout(journals, dateRangeComponent, layersLayout); vbar.setSpacing(true); vbar.setMargin(true); filterPanel.setContent(vbar); layout.addComponents(rangeLabelTitle, detailsLayout, filterPanel); entriesPanel.setContent(layout); refreshDetails(); return entriesPanel; }
From source file:org.opencms.ui.contextmenu.CmsResourceContextMenuBuilder.java
License:Open Source License
/** * Creates a context menu item.<p> * * @param parent the parent (either the context menu itself, or a parent item) * @param node the node which should be added as a context menu item * @param context the dialog context/* ww w . j a va2 s . c om*/ * @param defaultAction the default action item if available * * @return the created item */ private ContextMenuItem createItem(Object parent, CmsTreeNode<I_CmsContextMenuItem> node, final I_CmsDialogContext context, I_CmsContextMenuItem defaultAction) { final I_CmsContextMenuItem data = node.getData(); ContextMenuItem guiMenuItem = null; if (parent instanceof CmsContextMenu) { guiMenuItem = ((CmsContextMenu) parent).addItem(getTitle(data)); } else { guiMenuItem = ((ContextMenuItem) parent).addItem(getTitle(data)); } if (m_treeBuilder.getVisibility(data).isInActive()) { guiMenuItem.setEnabled(false); String key = m_treeBuilder.getVisibility(data).getMessageKey(); if (CmsStringUtil.isNotEmptyOrWhitespaceOnly(key)) { guiMenuItem.setDescription(CmsVaadinUtils.getMessageText(key)); } } if (node.getChildren().size() > 0) { for (CmsTreeNode<I_CmsContextMenuItem> childNode : node.getChildren()) { createItem(guiMenuItem, childNode, context, defaultAction); } } else { guiMenuItem.addItemClickListener(new ContextMenuItemClickListener() { public void contextMenuItemClicked(ContextMenuItemClickEvent event) { data.executeAction(context); } }); } // highlight the default action if (data.equals(defaultAction)) { guiMenuItem.addStyleName(ValoTheme.LABEL_BOLD); } return guiMenuItem; }