List of usage examples for com.vaadin.ui Component isEnabled
public boolean isEnabled();
From source file:com.foc.web.unitTesting.FocUnitTestingCommand.java
License:Apache License
private void component_AssertEnabled(FocXMLGuiComponent component, String fieldNameForMessage, boolean assertEnabled) throws Exception { //Editable/* w ww .j a v a 2 s . c o m*/ if (component != null && component instanceof Component) { Component componentToCheck = (Component) component; if (componentToCheck instanceof FVWrapperLayout) { componentToCheck = ((FVWrapperLayout) component).getFormField(); } //If we are not in assertOnly this means the component has to be enabled if (componentToCheck.isEnabled() != assertEnabled) { getLogger().addFailure("Component " + fieldNameForMessage + " enable status: " + componentToCheck.isEnabled() + " different then expected: " + assertEnabled); } else { getLogger().addInfo("Component " + fieldNameForMessage + " enable status: " + componentToCheck.isEnabled() + " as expected"); } } else { getLogger().addFailure("Faild to check component " + fieldNameForMessage + " enabled because either null or not instanceof Component"); } }
From source file:com.mymita.vaadlets.VaadletsBuilder.java
License:Apache License
private static void setComponentAttributes(final com.vaadin.ui.Component vaadinComponent, final com.mymita.vaadlets.core.Component c) { vaadinComponent.setCaption(c.getCaption()); vaadinComponent.setEnabled(c.isEnabled()); vaadinComponent.setReadOnly(c.isReadonly()); vaadinComponent.setVisible(c.isVisible()); if (c.getHeight() != null) { vaadinComponent.setHeight(c.getHeight()); }// w w w . j a va 2s . c o m if (c.getWidth() != null) { vaadinComponent.setWidth(c.getWidth()); } if (c.isSizeUndefined() != null && c.isSizeUndefined().booleanValue()) { vaadinComponent.setSizeUndefined(); } if (c.isSizeFull() != null && c.isSizeFull().booleanValue()) { vaadinComponent.setSizeFull(); } }