List of usage examples for com.vaadin.ui HorizontalLayout addStyleName
@Override public void addStyleName(String style)
From source file:org.milleni.dunning.ui.prcstart.BulkDunningProcessStartPanel.java
License:Apache License
protected void initPageTitle() { HorizontalLayout layout = new HorizontalLayout(); layout.setWidth(100, UNITS_PERCENTAGE); layout.addStyleName(ExplorerLayout.STYLE_TITLE_BLOCK); layout.setSpacing(true);// ww w . j a v a 2 s. com layout.setMargin(false, false, true, false); addDetailComponent(layout); Embedded databaseImage = new Embedded(null, Images.DATABASE_50); layout.addComponent(databaseImage); Label groupName = new Label(i18nManager.getMessage(Messages.MAIN_MENU_DUNNING_PROCESS_BASLAT)); groupName.setSizeUndefined(); groupName.addStyleName(Reindeer.LABEL_H2); layout.addComponent(groupName); layout.setComponentAlignment(groupName, Alignment.MIDDLE_LEFT); layout.setExpandRatio(groupName, 1.0f); }
From source file:org.milleni.dunning.ui.prcstart.CompleteFinansTaskPanel.java
License:Apache License
protected void initPageTitle() { HorizontalLayout layout = new HorizontalLayout(); layout.setWidth(100, UNITS_PERCENTAGE); layout.addStyleName(ExplorerLayout.STYLE_TITLE_BLOCK); layout.setSpacing(true);/*from ww w.j a v a 2 s . c o m*/ layout.setMargin(false, false, true, false); addDetailComponent(layout); Embedded databaseImage = new Embedded(null, Images.DATABASE_50); layout.addComponent(databaseImage); Label groupName = new Label("Finans Task Tamamla"); groupName.setSizeUndefined(); groupName.addStyleName(Reindeer.LABEL_H2); layout.addComponent(groupName); layout.setComponentAlignment(groupName, Alignment.MIDDLE_LEFT); layout.setExpandRatio(groupName, 1.0f); yasalOrTakipCombo = new ComboBox("Yasal Surec Durumu"); yasalOrTakipCombo.addItem(yasalTakip); yasalOrTakipCombo.addItem(takipDisiBirak); }
From source file:org.milleni.dunning.ui.prcstart.DunningProcessTimingOperationsPanel.java
License:Apache License
private HorizontalLayout createHorizontalLayout() { HorizontalLayout layout = new HorizontalLayout(); layout.setWidth(100, UNITS_PERCENTAGE); layout.addStyleName(ExplorerLayout.STYLE_TITLE_BLOCK); layout.setSpacing(true);/*from ww w . j av a 2s.c o m*/ layout.setMargin(false, false, true, false); return layout; }
From source file:org.milleni.dunning.ui.prcstart.StepSelectStartDunningProcessPanel.java
License:Apache License
protected void initPageTitle() { HorizontalLayout layout = new HorizontalLayout(); layout.setWidth(100, UNITS_PERCENTAGE); layout.addStyleName(ExplorerLayout.STYLE_TITLE_BLOCK); layout.setSpacing(true);//from w w w. j a v a2s . c om layout.setMargin(false, false, true, false); addDetailComponent(layout); Embedded databaseImage = new Embedded(null, Images.DATABASE_50); layout.addComponent(databaseImage); Label groupName = new Label(i18nManager.getMessage(Messages.MAIN_MENU_DUNNING_PROCESS_BASLAT)); groupName.setSizeUndefined(); groupName.addStyleName(Reindeer.LABEL_H2); layout.addComponent(groupName); layout.setComponentAlignment(groupName, Alignment.MIDDLE_LEFT); layout.setExpandRatio(groupName, 1.0f); List<DunningPolicy> dunningPolicyList = new ArrayList<DunningPolicy>(); Iterable<DunningPolicy> dunningPolicies = DaoHelper.getInstance().getDunningPolicyRepository().findAll(); for (DunningPolicy dunningPolicy : dunningPolicies) { dunningPolicyList.add(dunningPolicy); } BeanItemContainer<DunningPolicy> objects = new BeanItemContainer(DunningPolicy.class, dunningPolicyList); policyCombo = new ComboBox(i18nManager.getMessage(Constants.DUNNING_POLICY_TYPE), objects); policyCombo.setItemCaptionPropertyId("policyName"); stepCombo = new ComboBox(i18nManager.getMessage(Constants.DUNNING_POLICY_STEP)); stepCombo.setItemCaptionPropertyId("stepText"); policyCombo.addListener(new ValueChangeListener() { @Override public void valueChange(ValueChangeEvent event) { DunningPolicy selectedDunningPolicy = (DunningPolicy) event.getProperty().getValue(); List<ProcessSteps> processSteps = DaoHelper.getInstance().getDunningPolicyRepository() .retrieveDunningProcessSteps(selectedDunningPolicy.getPolicyId()); BeanItemContainer<ProcessSteps> objects = new BeanItemContainer(ProcessSteps.class, processSteps); stepCombo.setContainerDataSource(objects); } }); stepCombo.addListener(new ValueChangeListener() { @Override public void valueChange(ValueChangeEvent event) { selectedProcessStep = (ProcessSteps) event.getProperty().getValue(); } }); }
From source file:org.opencms.ui.components.CmsBasicDialog.java
License:Open Source License
/** * Creates new instance.<p>/*from www.j av a 2 s . com*/ */ public CmsBasicDialog() { addStyleName(OpenCmsTheme.DIALOG); setMargin(true); setSpacing(true); setWidth("100%"); m_mainPanel = new VerticalLayout(); m_mainPanel.addStyleName(OpenCmsTheme.DIALOG_CONTENT); m_mainPanel.setSpacing(true); m_mainPanel.setSizeFull(); m_contentPanel = new Panel(); m_contentPanel.setSizeFull(); m_contentPanel.addStyleName("v-scrollable"); m_mainPanel.addComponent(m_contentPanel); m_mainPanel.setExpandRatio(m_contentPanel, 3); Panel panel = new Panel(); panel.setContent(m_mainPanel); panel.setSizeFull(); addComponent(panel); setExpandRatio(panel, 1); HorizontalLayout buttons = new HorizontalLayout(); buttons.setWidth("100%"); buttons.addStyleName(OpenCmsTheme.DIALOG_BUTTON_BAR); addComponent(buttons); m_buttonPanelLeft = new HorizontalLayout(); m_buttonPanelLeft.setSpacing(true); buttons.addComponent(m_buttonPanelLeft); buttons.setComponentAlignment(m_buttonPanelLeft, Alignment.MIDDLE_LEFT); m_buttonPanelLeft.setVisible(false); m_buttonPanelRight = new HorizontalLayout(); m_buttonPanelRight.setSpacing(true); buttons.addComponent(m_buttonPanelRight); buttons.setComponentAlignment(m_buttonPanelRight, Alignment.MIDDLE_RIGHT); enableMaxHeight(); }
From source file:org.opencms.ui.components.CmsToolBar.java
License:Open Source License
/** * Creates the app select drop down.<p> * * @return the drop down component//w ww .j a va 2 s.c o m */ private Component createQuickLaunchDropDown() { PopupView pv = new PopupView(new PopupView.Content() { private static final long serialVersionUID = 1L; public String getMinimizedValueAsHTML() { return getDropDownButtonHtml(FontOpenCms.APPS); } public Component getPopupComponent() { CmsObject cms = A_CmsUI.getCmsObject(); Locale locale = UI.getCurrent().getLocale(); HorizontalLayout layout = new HorizontalLayout(); layout.addStyleName(ValoTheme.LAYOUT_HORIZONTAL_WRAPPING); layout.addStyleName(OpenCmsTheme.QUICK_LAUNCH); // layout.setSpacing(true); layout.setMargin(true); for (I_CmsWorkplaceAppConfiguration config : OpenCms.getWorkplaceAppManager() .getQuickLaunchConfigurations(cms)) { layout.addComponent(CmsDefaultAppButtonProvider.createAppButton(cms, config, locale)); } return layout; } }); pv.setDescription(CmsVaadinUtils.getMessageText(Messages.GUI_QUICK_LAUNCH_TITLE_0)); pv.addStyleName(OpenCmsTheme.NAVIGATOR_DROPDOWN); pv.setHideOnMouseOut(false); return pv; }
From source file:org.opennms.features.topology.plugins.topo.bsm.info.SimulationModeEnabledPanelItem.java
License:Open Source License
@Override public Component getComponent(GraphContainer container) { Label label = new Label("Simulation Mode Enabled"); label.setDescription("Simulation Mode is enabled"); label.setIcon(FontAwesome.EXCLAMATION_TRIANGLE); label.addStyleName("warning"); HorizontalLayout layout = new HorizontalLayout(); layout.addComponent(label);//from w ww .j a v a2 s . co m layout.addStyleName("simulation"); return layout; }
From source file:org.opennms.features.topology.plugins.topo.bsm.info.SimulationModeEnabledPanelItemProvider.java
License:Open Source License
private Component createComponent() { Label label = new Label("Simulation Mode Enabled"); label.setDescription("Simulation Mode is enabled"); label.setIcon(FontAwesome.EXCLAMATION_TRIANGLE); label.addStyleName("warning"); HorizontalLayout layout = new HorizontalLayout(); layout.addComponent(label);// w w w .ja v a 2 s . c o m layout.addStyleName("simulation"); return layout; }
From source file:org.opennms.features.vaadin.dashboard.dashlets.AlarmDetailsDashlet.java
License:Open Source License
/** * Returns the component for visualising the alarms data. * * @param onmsAlarm an {@link OnmsAlarm} instance * @param onmsNode an {@link OnmsNode} instance * @return component for this alarm//from w ww.j a v a 2 s. co m */ @Deprecated public Component createAlarmComponent(OnmsAlarm onmsAlarm, OnmsNode onmsNode) { HorizontalLayout horizontalLayout = new HorizontalLayout(); horizontalLayout.setSizeFull(); horizontalLayout.addStyleName("alert-details"); horizontalLayout.addStyleName("alert-details-font"); horizontalLayout.addStyleName(onmsAlarm.getSeverity().name().toLowerCase()); VerticalLayout verticalLayout1 = new VerticalLayout(); VerticalLayout verticalLayout2 = new VerticalLayout(); horizontalLayout.addComponent(verticalLayout1); horizontalLayout.addComponent(verticalLayout2); Label lastEvent = new Label(); lastEvent.setSizeUndefined(); lastEvent.addStyleName("alert-details-font"); lastEvent.setCaption("Last event"); lastEvent.setValue(onmsAlarm.getLastEventTime().toString()); Label firstEvent = new Label(); firstEvent.setSizeUndefined(); firstEvent.addStyleName("alert-details-font"); firstEvent.setCaption("First event"); firstEvent.setValue(onmsAlarm.getFirstEventTime().toString()); verticalLayout1.addComponent(firstEvent); verticalLayout1.addComponent(lastEvent); Label nodeId = new Label(); nodeId.setSizeUndefined(); nodeId.addStyleName("alert-details-font"); nodeId.setCaption("Node Id"); if (onmsNode != null) { nodeId.setValue(onmsNode.getNodeId()); } else { nodeId.setValue("-"); } Label nodeLabel = new Label(); nodeLabel.setSizeUndefined(); nodeLabel.addStyleName("alert-details-font"); nodeLabel.setCaption("Node Label"); if (onmsNode != null) { nodeLabel.setValue(onmsNode.getLabel()); } else { nodeLabel.setValue("-"); } Label logMessage = new Label(); logMessage.addStyleName("alert-details-font"); logMessage.setSizeFull(); logMessage.setCaption("Log message"); logMessage.setValue(onmsAlarm.getLogMsg().replaceAll("<[^>]*>", "")); HorizontalLayout horizontalLayout2 = new HorizontalLayout(); horizontalLayout2.setSizeFull(); horizontalLayout2.setSpacing(true); horizontalLayout2.addComponent(nodeId); horizontalLayout2.addComponent(nodeLabel); verticalLayout2.addComponent(horizontalLayout2); verticalLayout2.addComponent(logMessage); horizontalLayout.setExpandRatio(verticalLayout1, 1.0f); horizontalLayout.setExpandRatio(verticalLayout2, 4.0f); return horizontalLayout; }
From source file:org.opennms.features.vaadin.dashboard.dashlets.AlarmsDashlet.java
License:Open Source License
/** * Returns the component for visualising the alarms data. * * @param onmsAlarm an {@link OnmsAlarm} instance * @param onmsNode an {@link OnmsNode} instance * @return component for this alarm/*www. ja v a 2s. c om*/ */ public Component createAlarmComponent(OnmsAlarm onmsAlarm, OnmsNode onmsNode) { Calendar calendar = Calendar.getInstance(); String ago = getHumanReadableFormat( (calendar.getTimeInMillis() / 1000) - (onmsAlarm.getLastEventTime().getTime() / 1000)); HorizontalLayout horizontalLayout = new HorizontalLayout(); horizontalLayout.setWidth("100%"); horizontalLayout.addStyleName("alerts"); horizontalLayout.addStyleName(onmsAlarm.getSeverity().name().toLowerCase()); Label labelAgo = new Label(); labelAgo.setSizeUndefined(); labelAgo.addStyleName("alerts-font"); labelAgo.setValue(ago); Label labelId = new Label(); labelId.setSizeUndefined(); labelId.addStyleName("alerts-font"); if (onmsNode != null) { labelId.setValue(onmsNode.getLabel() + " (" + onmsNode.getNodeId() + ")"); } else { labelId.setValue("-"); } Label labelUei = new Label(); labelUei.setSizeUndefined(); labelUei.addStyleName("alerts-font"); labelUei.setValue(onmsAlarm.getUei()); horizontalLayout.addComponent(labelAgo); horizontalLayout.addComponent(labelId); horizontalLayout.addComponent(labelUei); horizontalLayout.setExpandRatio(labelAgo, 1.0f); horizontalLayout.setExpandRatio(labelId, 3.0f); horizontalLayout.setExpandRatio(labelUei, 3.0f); return horizontalLayout; }