List of usage examples for com.vaadin.ui GridLayout GridLayout
public GridLayout()
From source file:org.activiti.explorer.ui.task.TaskInvolvedPeopleComponent.java
License:Apache License
protected void initPeopleGrid() { peopleGrid = new GridLayout(); peopleGrid.setColumns(2);//from w w w.j a v a 2 s. co m peopleGrid.setSpacing(true); peopleGrid.setMargin(true, false, false, false); peopleGrid.setWidth(100, UNITS_PERCENTAGE); layout.addComponent(peopleGrid); populatePeopleGrid(); }
From source file:org.agocontrol.site.viewlet.dashboard.BuildingControlPanel.java
License:Apache License
/** * Invoked when view is entered./* ww w . ja va 2s. c o m*/ * @param parameters the parameters */ public final synchronized void enter(final String parameters) { if (recordReaderThread != null) { recordReaderExitRequested = true; recordReaderThread.interrupt(); try { recordReaderThread.join(); } catch (final InterruptedException e) { LOGGER.debug("Record reader thread death wait interrupted."); } } elementLayout.removeAllComponents(); recordsLayouts.clear(); recordsQueue.clear(); recordReaderExitRequested = false; final Company company = siteContext.getObject(Company.class); if (company == null || parameters == null || parameters.length() == 0) { return; } final String buildingId = parameters; final List<Element> elements = ElementDao.getElements(entityManager, company); boolean started = false; for (final Element element : elements) { if (element.getElementId().equals(buildingId)) { started = true; continue; } if (!started) { continue; } if (element.getTreeDepth() == 0) { break; } final HorizontalLayout elementLayout = new HorizontalLayout(); this.elementLayout.addComponent(elementLayout); elementLayout.setSpacing(true); final Resource elementIcon; switch (element.getType()) { case ROOM: elementIcon = roomIcon; break; case DEVICE: elementIcon = deviceIcon; break; default: elementIcon = deviceIcon; break; } final Embedded embedded = new Embedded(null, elementIcon); elementLayout.addComponent(embedded); elementLayout.setExpandRatio(embedded, 0.1f); embedded.setWidth(32, Unit.PIXELS); embedded.setHeight(32, Unit.PIXELS); final Label label = new Label(); elementLayout.addComponent(label); elementLayout.setComponentAlignment(label, Alignment.MIDDLE_LEFT); label.setValue(element.toString()); final GridLayout recordLayout = new GridLayout(); recordLayout.setSpacing(true); recordLayout.setColumns(4); recordLayout.setRows(1); this.elementLayout.addComponent(recordLayout); recordsLayouts.put(element.getElementId(), recordLayout); } recordReaderThread = new Thread(new Runnable() { @Override public void run() { try { final EntityManager threadEntityManager = ((EntityManagerFactory) getSite().getSiteContext() .getObject(EntityManagerFactory.class)).createEntityManager(); for (final Element element : elements) { final List<RecordSet> recordSets = RecordSetDao.getRecordSets(threadEntityManager, element); if (recordsLayouts.containsKey(element.getElementId())) { for (final RecordSet recordSet : recordSets) { recordsQueue.put(RecordDao.getRecords(threadEntityManager, recordSet, 1)); if (recordReaderExitRequested) { break; } } } } Thread.sleep(10); } catch (InterruptedException e) { } } }); recordReaderThread.start(); }
From source file:org.agocontrol.site.viewlet.dashboard.DashboardViewlet.java
License:Apache License
/** * Default constructor which constructs component hierarchy. *//*from w w w.j av a2s . c o m*/ public DashboardViewlet() { site = ((AgoControlSiteUI) UI.getCurrent()).getSite(); siteContext = getSite().getSiteContext(); entityManager = siteContext.getObject(EntityManager.class); final GridLayout gridLayout = new GridLayout(); gridLayout.setSizeFull(); gridLayout.setRows(3); gridLayout.setColumns(2); gridLayout.setSpacing(true); gridLayout.setColumnExpandRatio(0, 1); gridLayout.setColumnExpandRatio(1, 0); gridLayout.setRowExpandRatio(0, 0); gridLayout.setRowExpandRatio(1, 0); gridLayout.setRowExpandRatio(2, 1); buildingSelectPanel = new BuildingSelectPanel(); //buildingSelectPanel.setCaption("Building Selection"); //buildingSelectPanel.setSizeFull(); gridLayout.addComponent(buildingSelectPanel, 0, 0, 1, 0); buildingControlPanel = new BuildingControlPanel(); //buildingControlPanel.setCaption("Control Panel"); //buildingControlPanel.setHeight(200, Unit.PIXELS); buildingControlPanel.setSizeFull(); gridLayout.addComponent(buildingControlPanel, 0, 1, 0, 2); chartPanel = new ChartPanel(); chartPanel.setSizeFull(); chartPanel.setWidth(700, Unit.PIXELS); chartPanel.setHeight(400, Unit.PIXELS); gridLayout.addComponent(chartPanel, 1, 1); eventPanel = new EventPanel(); //eventPanel.setCaption("Bus Events"); //ventPanel.setHeight(200, Unit.PIXELS); eventPanel.setSizeFull(); gridLayout.addComponent(eventPanel, 1, 2); setCompositionRoot(gridLayout); }
From source file:org.eclipse.hawkbit.ui.management.DeploymentView.java
License:Open Source License
private void createMainLayout() { mainLayout = new GridLayout(); layoutWidgets();//w ww . j a v a2 s .c om mainLayout.setSizeFull(); mainLayout.setSpacing(true); mainLayout.setRowExpandRatio(0, 1F); mainLayout.setStyleName("fullSize"); }
From source file:org.eclipse.hawkbit.ui.rollout.rollout.AddUpdateRolloutWindowLayout.java
License:Open Source License
private GridLayout createSimpleGroupDefinitionTab() { final GridLayout layout = new GridLayout(); layout.setSpacing(true);//from w w w . j av a2s . c o m layout.setColumns(3); layout.setRows(4); layout.setStyleName("marginTop"); layout.addComponent(getLabel("caption.rollout.generate.groups"), 0, 0, 2, 0); layout.addComponent(getMandatoryLabel("prompt.number.of.groups"), 0, 1); layout.addComponent(noOfGroups, 1, 1); noOfGroups.addValidator(nullValidator); layout.addComponent(groupSizeLabel, 2, 1); layout.addComponent(getMandatoryLabel("prompt.tigger.threshold"), 0, 2); layout.addComponent(triggerThreshold, 1, 2); triggerThreshold.addValidator(nullValidator); layout.addComponent(getPercentHintLabel(), 2, 2); layout.addComponent(getMandatoryLabel("prompt.error.threshold"), 0, 3); layout.addComponent(errorThreshold, 1, 3); errorThreshold.addValidator(nullValidator); layout.addComponent(errorThresholdOptionGroup, 2, 3); return layout; }
From source file:org.eclipse.skalli.view.component.MultiLinkField.java
License:Open Source License
public MultiLinkField(String caption, String buttonCaption, Collection<LinkGroup> linkGroups) { setCaption(caption);// w w w . j a va2 s . com this.buttonCaption = StringUtils.isNotBlank(buttonCaption) ? buttonCaption : "Add Link"; this.linkGroups = new OrderableGroup<LinkGroup>(linkGroups); layout = new GridLayout(); // do not change the width! otherwise right border of table is hidden in IE! layout.setWidth(100, Sizeable.UNITS_PERCENTAGE); layout.setStyleName(STYLE_LAYOUT); render(); setCompositionRoot(layout); }
From source file:org.ikasan.dashboard.ui.administration.panel.PolicyManagementPanel.java
License:BSD License
/** * //w w w . j ava 2 s .c o m */ protected void createPolicyDropPanel() { this.policyDropPanel = new Panel(); Label rolePoliciesLabel = new Label("Role/Policy Associations"); rolePoliciesLabel.setStyleName(ValoTheme.LABEL_HUGE); this.policyDropPanel.addStyleName(ValoTheme.PANEL_BORDERLESS); this.policyDropPanel.setHeight("100%"); this.policyDropPanel.setWidth("100%"); this.rolesCombo = new ComboBox("Roles"); this.rolesCombo.setWidth("90%"); this.rolesCombo.addValueChangeListener(new Property.ValueChangeListener() { public void valueChange(ValueChangeEvent event) { final Role role = (Role) event.getProperty().getValue(); if (role != null) { List<Policy> policies = securityService.getAllPoliciesWithRole(role.getName()); PolicyManagementPanel.this.policyDropTable.removeAllItems(); for (final Policy policy : policies) { Button deleteButton = new Button(); deleteButton.setIcon(VaadinIcons.TRASH); deleteButton.addStyleName(ValoTheme.BUTTON_ICON_ONLY); deleteButton.addStyleName(ValoTheme.BUTTON_BORDERLESS); deleteButton.setDescription("Remove Policy from this Role"); deleteButton.addClickListener(new Button.ClickListener() { public void buttonClick(ClickEvent event) { role.getPolicies().remove(policy); PolicyManagementPanel.this.saveRole(role); PolicyManagementPanel.this.policyDropTable.removeItem(policy.getName()); PolicyManagementPanel.this.roleTable.removeItem(role); } }); PolicyManagementPanel.this.policyDropTable .addItem(new Object[] { policy.getName(), deleteButton }, policy.getName()); } } } }); this.policyDropTable = new Table(); this.policyDropTable.addContainerProperty("Role Policies", String.class, null); this.policyDropTable.addContainerProperty("", Button.class, null); this.policyDropTable.setHeight("700px"); this.policyDropTable.setWidth("300px"); this.policyDropTable.setDragMode(TableDragMode.ROW); this.policyDropTable.setDropHandler(new DropHandler() { @Override public void drop(final DragAndDropEvent dropEvent) { // criteria verify that this is safe logger.info("Trying to drop: " + dropEvent); if (rolesCombo.getValue() == null) { // Do nothing if there is no role selected logger.info("Ignoring drop: " + dropEvent); return; } final WrapperTransferable t = (WrapperTransferable) dropEvent.getTransferable(); final AutocompleteField sourceContainer = (AutocompleteField) t.getDraggedComponent(); logger.info("sourceContainer.getText(): " + sourceContainer.getText()); Button deleteButton = new Button(); deleteButton.setIcon(VaadinIcons.TRASH); deleteButton.addStyleName(ValoTheme.BUTTON_ICON_ONLY); deleteButton.addStyleName(ValoTheme.BUTTON_BORDERLESS); deleteButton.setDescription("Remove Policy from this Role"); final Policy policy = PolicyManagementPanel.this.securityService .findPolicyByName(sourceContainer.getText()); final Role selectedRole = PolicyManagementPanel.this.securityService .findRoleByName(((Role) rolesCombo.getValue()).getName()); deleteButton.addClickListener(new Button.ClickListener() { public void buttonClick(ClickEvent event) { selectedRole.getPolicies().remove(policy); PolicyManagementPanel.this.saveRole(selectedRole); policyDropTable.removeItem(policy.getName()); roleTable.removeItem(selectedRole); } }); PolicyManagementPanel.this.policyDropTable.addItem( new Object[] { sourceContainer.getText(), deleteButton }, sourceContainer.getText()); selectedRole.getPolicies().add(policy); PolicyManagementPanel.this.saveRole(selectedRole); policy.getRoles().add(selectedRole); PolicyManagementPanel.this.roleTable.removeAllItems(); for (final Role role : policy.getRoles()) { Button roleDeleteButton = new Button(); roleDeleteButton.setIcon(VaadinIcons.TRASH); roleDeleteButton.addStyleName(ValoTheme.BUTTON_ICON_ONLY); deleteButton.addStyleName(ValoTheme.BUTTON_BORDERLESS); deleteButton.setDescription("Remove Policy from this Role"); roleDeleteButton.addClickListener(new Button.ClickListener() { public void buttonClick(ClickEvent event) { selectedRole.getPolicies().remove(policy); PolicyManagementPanel.this.saveRole(selectedRole); PolicyManagementPanel.this.roleTable.removeItem(role); PolicyManagementPanel.this.policyDropTable.removeItem(policy.getName()); } }); PolicyManagementPanel.this.roleTable.addItem(new Object[] { role.getName(), roleDeleteButton }, role); } } @Override public AcceptCriterion getAcceptCriterion() { return AcceptAll.get(); } }); GridLayout layout = new GridLayout(); layout.setSpacing(true); layout.setWidth("100%"); layout.setHeight("100%"); layout.addComponent(rolePoliciesLabel); layout.addComponent(this.rolesCombo); Label policyDropHintLabel = new Label(); policyDropHintLabel.setCaptionAsHtml(true); policyDropHintLabel.setCaption(VaadinIcons.QUESTION_CIRCLE_O.getHtml() + " Drop a policy into the table below to associate with a role."); policyDropHintLabel.addStyleName(ValoTheme.LABEL_TINY); policyDropHintLabel.addStyleName(ValoTheme.LABEL_LIGHT); layout.addComponent(policyDropHintLabel); layout.addComponent(this.policyDropTable); this.policyDropPanel.setContent(layout); }
From source file:org.ikasan.dashboard.ui.administration.panel.RoleManagementPanel.java
License:BSD License
/** * /*w w w. j a v a 2 s . co m*/ */ protected void createPolicyDropPanel() { this.policyDropPanel = new Panel(); this.policyDropPanel.setStyleName(ValoTheme.PANEL_BORDERLESS); this.policyDropPanel.setHeight("100%"); this.policyDropPanel.setWidth("100%"); this.policyTable = new Table(); this.policyTable.addContainerProperty("Role Policies", String.class, null); this.policyTable.addContainerProperty("", Button.class, null); this.policyTable.setHeight("720px"); this.policyTable.setWidth("300px"); this.policyTable.setDragMode(TableDragMode.ROW); this.policyTable.setDropHandler(new DropHandler() { @Override public void drop(final DragAndDropEvent dropEvent) { if (role == null) { // Do nothing if there is no role selected logger.info("Ignoring drop: " + dropEvent); return; } // criteria verify that this is safe logger.info("Trying to drop: " + dropEvent); final WrapperTransferable t = (WrapperTransferable) dropEvent.getTransferable(); final AutocompleteField sourceContainer = (AutocompleteField) t.getDraggedComponent(); logger.info("sourceContainer.getText(): " + sourceContainer.getText()); Button deleteButton = new Button(); deleteButton.setIcon(VaadinIcons.TRASH); deleteButton.addStyleName(ValoTheme.BUTTON_ICON_ONLY); deleteButton.addStyleName(ValoTheme.BUTTON_BORDERLESS); deleteButton.setDescription("Remove Policy from this Role"); deleteButton.addClickListener(new Button.ClickListener() { public void buttonClick(ClickEvent event) { Policy policy = RoleManagementPanel.this.securityService .findPolicyByName(sourceContainer.getText()); logger.info("Trying to remove policy: " + policy); Role selectedRole = RoleManagementPanel.this.securityService .findRoleByName(RoleManagementPanel.this.roleNameField.getText()); logger.info("From role: " + selectedRole); selectedRole.getPolicies().remove(policy); RoleManagementPanel.this.saveRole(selectedRole); RoleManagementPanel.this.policyTable.removeItem(policy.getName()); } }); Policy policy = RoleManagementPanel.this.securityService .findPolicyByName(sourceContainer.getText()); Role selectedRole = RoleManagementPanel.this.securityService .findRoleByName(RoleManagementPanel.this.roleNameField.getText()); selectedRole.getPolicies().add(policy); RoleManagementPanel.this.saveRole(selectedRole); RoleManagementPanel.this.policyTable.addItem( new Object[] { sourceContainer.getText(), deleteButton }, sourceContainer.getText()); } @Override public AcceptCriterion getAcceptCriterion() { return AcceptAll.get(); } }); GridLayout layout = new GridLayout(); layout.setSpacing(true); layout.setWidth("100%"); Label associatedPoliciesLabel = new Label("Associated Policies"); associatedPoliciesLabel.setStyleName(ValoTheme.LABEL_HUGE); Label policy1HintLabel = new Label(); policy1HintLabel.setCaptionAsHtml(true); policy1HintLabel.setCaption( VaadinIcons.QUESTION_CIRCLE_O.getHtml() + " Type into the text box below to find a policy."); policy1HintLabel.addStyleName(ValoTheme.LABEL_TINY); policy1HintLabel.addStyleName(ValoTheme.LABEL_LIGHT); layout.addComponent(associatedPoliciesLabel); layout.addComponent(policy1HintLabel); layout.addComponent(policyNameFieldWrap); Label policy2HintLabel = new Label(); policy2HintLabel.setCaptionAsHtml(true); policy2HintLabel.setCaption( VaadinIcons.QUESTION_CIRCLE_O.getHtml() + " Drag below to associate policy with current role."); policy2HintLabel.addStyleName(ValoTheme.LABEL_TINY); policy2HintLabel.addStyleName(ValoTheme.LABEL_LIGHT); layout.addComponent(policy2HintLabel); layout.addComponent(this.policyTable); this.policyDropPanel.setContent(layout); }
From source file:org.investovator.ui.nngaming.StockAnalysisView.java
License:Open Source License
private void createReportLayout() { reportLayout = new GridLayout(); reportLayout.setSpacing(true);//from www . j a va 2 s .com reportLayout.setMargin(true); reportLayout.setColumns(1); reportLayout.setWidth("100%"); reportLayout.setDefaultComponentAlignment(Alignment.MIDDLE_CENTER); reportLayout.setColumnExpandRatio(1, 1); reportLayout.setSpacing(true); }
From source file:org.lunifera.christmastree.control.DesktopControlComponent.java
License:Creative Commons License
@SuppressWarnings("deprecation") protected GridLayout buildContent() { // common part: create layout contentLayout = new GridLayout(); contentLayout.setImmediate(false);// www. j av a2 s. co m contentLayout.setMargin(false); contentLayout.setColumns(4); contentLayout.setRows(7); // button_bighter button_brighter = new Embedded(null, new ThemeResource("./images/brighter.png")); button_brighter.setCaption("Brighter"); button_brighter.setImmediate(true); button_brighter.setWidth("-1px"); button_brighter.setHeight("-1px"); button_brighter.addClickListener(listener); button_brighter.setStyleName("xmas-button-brighter"); contentLayout.addComponent(button_brighter, 0, 0); contentLayout.setComponentAlignment(button_brighter, new Alignment(48)); // button_darker button_darker = new Embedded(null, new ThemeResource("./images/darker.png")); button_darker.setCaption("Darker"); button_darker.setImmediate(true); button_darker.setWidth("-1px"); button_darker.setHeight("-1px"); button_darker.addClickListener(listener); button_darker.setStyleName("xmas-button-darker"); contentLayout.addComponent(button_darker, 1, 0); contentLayout.setComponentAlignment(button_darker, new Alignment(48)); // button_off button_off = new Embedded(null, new ThemeResource("./images/off.png")); button_off.setCaption("Off"); button_off.setImmediate(true); button_off.setWidth("-1px"); button_off.setHeight("-1px"); button_off.addClickListener(listener); button_off.setStyleName("xmas-button-off"); contentLayout.addComponent(button_off, 2, 0); contentLayout.setComponentAlignment(button_off, new Alignment(48)); // button_on button_on = new Embedded(null, new ThemeResource("./images/on.png")); button_on.setCaption("On"); button_on.setImmediate(true); button_on.setWidth("-1px"); button_on.setHeight("-1px"); button_on.addListener(listener); button_on.setStyleName("xmas-button-on"); contentLayout.addComponent(button_on, 3, 0); contentLayout.setComponentAlignment(button_on, new Alignment(48)); // button_red button_red = new Embedded(null, new ThemeResource("./images/red.png")); button_red.setCaption("red"); button_red.setImmediate(true); button_red.setWidth("-1px"); button_red.setHeight("-1px"); button_red.addListener(listener); button_red.setStyleName("xmas-button-red"); contentLayout.addComponent(button_red, 0, 1); contentLayout.setComponentAlignment(button_red, new Alignment(48)); // button_green button_green = new Embedded(null, new ThemeResource("./images/green.png")); button_green.setCaption("green"); button_green.setImmediate(true); button_green.setWidth("-1px"); button_green.setHeight("-1px"); button_green.setStyleName("xmas-button-green"); button_green.addListener(listener); contentLayout.addComponent(button_green, 1, 1); contentLayout.setComponentAlignment(button_green, new Alignment(48)); // button_blue button_blue = new Embedded(null, new ThemeResource("./images/blue.png")); button_blue.setCaption("blue"); button_blue.setImmediate(true); button_blue.setWidth("-1px"); button_blue.setHeight("-1px"); button_blue.setStyleName("xmas-button-blue"); button_blue.addListener(listener); contentLayout.addComponent(button_blue, 2, 1); contentLayout.setComponentAlignment(button_blue, new Alignment(48)); // button_white button_white = new Embedded(null, new ThemeResource("./images/white.png")); button_white.setCaption("white"); button_white.setImmediate(true); button_white.setWidth("-1px"); button_white.setHeight("-1px"); button_white.addListener(listener); button_white.setStyleName("xmas-button-white"); contentLayout.addComponent(button_white, 3, 1); contentLayout.setComponentAlignment(button_white, new Alignment(48)); // button_darkorange button_darkorange = new Embedded(null, new ThemeResource("./images/darkorange.png")); button_darkorange.setCaption("dark orange"); button_darkorange.setImmediate(true); button_darkorange.setWidth("-1px"); button_darkorange.setHeight("-1px"); button_darkorange.addListener(listener); button_darkorange.setStyleName("xmas-button-darkorange"); contentLayout.addComponent(button_darkorange, 0, 2); contentLayout.setComponentAlignment(button_darkorange, new Alignment(48)); // button_lightgreen button_lightgreen = new Embedded(null, new ThemeResource("./images/lightgreen.png")); button_lightgreen.setCaption("light green"); button_lightgreen.setImmediate(true); button_lightgreen.setWidth("-1px"); button_lightgreen.setHeight("-1px"); button_lightgreen.addListener(listener); button_lightgreen.setStyleName("xmas-button-lightgreen"); contentLayout.addComponent(button_lightgreen, 1, 2); contentLayout.setComponentAlignment(button_lightgreen, new Alignment(48)); // button_lightblue button_lightblue = new Embedded(null, new ThemeResource("./images/lightblue.png")); button_lightblue.setCaption("light blue"); button_lightblue.setImmediate(true); button_lightblue.setWidth("-1px"); button_lightblue.setHeight("-1px"); button_lightblue.addListener(listener); button_lightblue.setStyleName("xmas-button-lightblue"); contentLayout.addComponent(button_lightblue, 2, 2); contentLayout.setComponentAlignment(button_lightblue, new Alignment(48)); // button_flash button_flash = new Embedded(null, new ThemeResource("./images/flash.png")); button_flash.setCaption("Flash"); button_flash.setImmediate(true); button_flash.setWidth("-1px"); button_flash.setHeight("-1px"); button_flash.addListener(listener); button_flash.setStyleName("xmas-button-flash"); contentLayout.addComponent(button_flash, 3, 2); contentLayout.setComponentAlignment(button_flash, new Alignment(48)); // button_orange button_orange = new Embedded(null, new ThemeResource("./images/orange.png")); button_orange.setCaption("orange"); button_orange.setImmediate(true); button_orange.setWidth("-1px"); button_orange.setHeight("-1px"); button_orange.addListener(listener); button_orange.setStyleName("xmas-button-orange"); contentLayout.addComponent(button_orange, 0, 3); contentLayout.setComponentAlignment(button_orange, new Alignment(48)); // button_lightcyan button_lightcyan = new Embedded(null, new ThemeResource("./images/lightcyan.png")); button_lightcyan.setCaption("ligth cyan"); button_lightcyan.setImmediate(true); button_lightcyan.setWidth("-1px"); button_lightcyan.setHeight("-1px"); button_lightcyan.addListener(listener); button_lightcyan.setStyleName("xmas-button-lightcyan"); contentLayout.addComponent(button_lightcyan, 1, 3); contentLayout.setComponentAlignment(button_lightcyan, new Alignment(48)); // button_darkpurple button_darkpurple = new Embedded(null, new ThemeResource("./images/darkpurple.png")); button_darkpurple.setCaption("dark purple"); button_darkpurple.setImmediate(true); button_darkpurple.setWidth("-1px"); button_darkpurple.setHeight("-1px"); button_darkpurple.addListener(listener); button_darkpurple.setStyleName("xmas-button-darkpurple"); contentLayout.addComponent(button_darkpurple, 2, 3); contentLayout.setComponentAlignment(button_darkpurple, new Alignment(48)); // button_strobe button_strobe = new Embedded(null, new ThemeResource("./images/strobe.png")); button_strobe.setCaption("Strobo"); button_strobe.setImmediate(true); button_strobe.setWidth("-1px"); button_strobe.setHeight("-1px"); button_strobe.addListener(listener); button_strobe.setStyleName("xmas-button-strobe"); contentLayout.addComponent(button_strobe, 3, 3); contentLayout.setComponentAlignment(button_strobe, new Alignment(48)); // button_lightorange button_lightorange = new Embedded(null, new ThemeResource("./images/lightorange.png")); button_lightorange.setCaption("light orange"); button_lightorange.setImmediate(true); button_lightorange.setWidth("-1px"); button_lightorange.setHeight("-1px"); button_lightorange.addListener(listener); button_lightorange.setStyleName("xmas-button-lightorange"); contentLayout.addComponent(button_lightorange, 0, 4); contentLayout.setComponentAlignment(button_lightorange, new Alignment(48)); // button_cyan button_cyan = new Embedded(null, new ThemeResource("./images/cyan.png")); button_cyan.setCaption("cyan"); button_cyan.setImmediate(false); button_cyan.setWidth("-1px"); button_cyan.setHeight("-1px"); button_cyan.addListener(listener); button_cyan.setStyleName("xmas-button-cyan"); contentLayout.addComponent(button_cyan, 1, 4); contentLayout.setComponentAlignment(button_cyan, new Alignment(48)); // button_purple button_purple = new Embedded(null, new ThemeResource("./images/purple.png")); button_purple.setCaption("purple"); button_purple.setImmediate(true); button_purple.setWidth("-1px"); button_purple.setHeight("-1px"); button_purple.addListener(listener); button_purple.setStyleName("xmas-button-purple"); contentLayout.addComponent(button_purple, 2, 4); contentLayout.setComponentAlignment(button_purple, new Alignment(48)); // button_fade button_fade = new Embedded(null, new ThemeResource("./images/fade.png")); button_fade.setCaption("Fade"); button_fade.setImmediate(true); button_fade.setWidth("-1px"); button_fade.setHeight("-1px"); button_fade.addListener(listener); button_fade.setStyleName("xmas-button-fade"); contentLayout.addComponent(button_fade, 3, 4); contentLayout.setComponentAlignment(button_fade, new Alignment(48)); // button_yellow button_yellow = new Embedded(null, new ThemeResource("./images/yellow.png")); button_yellow.setCaption("yellow"); button_yellow.setImmediate(true); button_yellow.setWidth("-1px"); button_yellow.setHeight("-1px"); button_yellow.addListener(listener); button_yellow.setStyleName("xmas-button-yellow"); contentLayout.addComponent(button_yellow, 0, 5); contentLayout.setComponentAlignment(button_yellow, new Alignment(48)); // button_darkcyan button_darkcyan = new Embedded(null, new ThemeResource("./images/darkcyan.png")); button_darkcyan.setCaption("dark cyan"); button_darkcyan.setImmediate(true); button_darkcyan.setWidth("-1px"); button_darkcyan.setHeight("-1px"); button_darkcyan.addListener(listener); button_darkcyan.setStyleName("xmas-button-darkcyan"); contentLayout.addComponent(button_darkcyan, 1, 5); contentLayout.setComponentAlignment(button_darkcyan, new Alignment(48)); // button_lightpurple button_lightpurple = new Embedded(null, new ThemeResource("./images/lightpurple.png")); button_lightpurple.setCaption("light purple"); button_lightpurple.setImmediate(true); button_lightpurple.setWidth("-1px"); button_lightpurple.setHeight("-1px"); button_lightpurple.addListener(listener); button_lightpurple.setStyleName("xmas-button-lightpurple"); contentLayout.addComponent(button_lightpurple, 2, 5); contentLayout.setComponentAlignment(button_lightpurple, new Alignment(48)); // button_smooth button_smooth = new Embedded(null, new ThemeResource("./images/smooth.png")); button_smooth.setCaption("Smooth"); button_smooth.setImmediate(true); button_smooth.setWidth("-1px"); button_smooth.setHeight("-1px"); button_smooth.addListener(listener); button_smooth.setStyleName("xmas-button-smooth"); contentLayout.addComponent(button_smooth, 3, 5); contentLayout.setComponentAlignment(button_smooth, new Alignment(48)); // button_snow button_snow = new Embedded(null, new ThemeResource("./images/snowflake.png")); button_snow.setCaption("Let it snow"); button_snow.setImmediate(true); button_snow.setWidth("-1px"); button_snow.setHeight("-1px"); button_snow.addListener(listener); button_snow.setStyleName("xmas-button-snow"); contentLayout.addComponent(button_snow, 0, 6); contentLayout.setComponentAlignment(button_snow, new Alignment(48)); // button_star button_star = new Embedded(null, new ThemeResource("./images/star.png")); button_star.setCaption("Star"); button_star.setImmediate(true); button_star.setWidth("-1px"); button_star.setHeight("-1px"); button_star.addListener(listener); button_star.setStyleName("xmas-button-star"); contentLayout.addComponent(button_star, 1, 6); contentLayout.setComponentAlignment(button_star, new Alignment(48)); // button_angel button_angel = new Embedded(null, new ThemeResource("./images/angel.png")); button_angel.setCaption("Angel"); button_angel.setImmediate(true); button_angel.setWidth("-1px"); button_angel.setHeight("-1px"); button_angel.addListener(listener); button_angel.setStyleName("xmas-button-angel"); contentLayout.addComponent(button_angel, 3, 6); contentLayout.setComponentAlignment(button_angel, new Alignment(48)); return contentLayout; }