List of usage examples for com.vaadin.ui AbstractComponent setVisible
@Override public void setVisible(boolean visible)
From source file:com.rdonasco.security.user.controllers.UserEditorViewController.java
License:Apache License
private void hide(AbstractComponent... components) { for (AbstractComponent component : components) { component.setVisible(false); } }
From source file:com.rdonasco.security.user.controllers.UserEditorViewController.java
License:Apache License
private void show(AbstractComponent... components) { for (AbstractComponent component : components) { component.setVisible(true); } }
From source file:de.mhus.lib.vaadin.layouter.LayUtil.java
License:Apache License
public static void configure(AbstractComponent layout, ResourceNode config) throws MException { if (config.getBoolean(LayoutBuilder.FULL_SIZE, false)) layout.setSizeFull();/*from w ww . j a v a 2 s .c o m*/ else { String width = config.getString(LayoutBuilder.WIDTH, null); if (width != null) layout.setWidth(width); String height = config.getString(LayoutBuilder.HEIGHT, null); if (height != null) layout.setHeight(height); } // margin //TODO if (layout instanceof Layout && config.isProperty(LayoutBuilder.MARGIN)) // ((Layout)layout).setMargin(config.getBoolean(LayoutBuilder.MARGIN, false)); // spacing if (layout instanceof Layout.SpacingHandler && config.isProperty(LayoutBuilder.SPACING)) ((Layout.SpacingHandler) layout).setSpacing(config.getBoolean(LayoutBuilder.SPACING, false)); // styles if (config.isProperty(LayoutBuilder.STYLE)) { layout.setStyleName(config.getExtracted(LayoutBuilder.STYLE)); } // hidden if (config.getBoolean(LayoutBuilder.HIDDEN, false)) layout.setVisible(false); // split if (layout instanceof AbstractSplitPanel) { String a = config.getString(LayoutBuilder.SPLIT_MIN, null); if (a != null) { float[] s = parseStringSize(a); if (s[0] >= 0) ((AbstractSplitPanel) layout).setMinSplitPosition(s[0], Unit.values()[(int) s[1]]); } a = config.getString(LayoutBuilder.SPLIT_MAX, null); if (a != null) { float[] s = parseStringSize(a); if (s[0] >= 0) ((AbstractSplitPanel) layout).setMaxSplitPosition(s[0], Unit.values()[(int) s[1]]); } a = config.getString(LayoutBuilder.SPLIT_POS, null); if (a != null) { float[] s = parseStringSize(a); if (s[0] >= 0) ((AbstractSplitPanel) layout).setSplitPosition(s[0], Unit.values()[(int) s[1]]); } } }
From source file:nz.co.senanque.vaadinsupport.application.MaduraSessionManager.java
License:Apache License
private void setPermissions(MaduraPropertyWrapper property, AbstractComponent field) { PermissionManager permissionmanager = getPermissionManager(); if (!permissionmanager.hasPermission(property.getWritePermission())) { field.setReadOnly(true);/*from ww w .j a v a 2 s . c o m*/ } if (!permissionmanager.hasPermission(property.getReadPermission())) { field.setVisible(false); } }