Package com.vaadin.server
Class ComponentSizeValidator
- java.lang.Object
-
- com.vaadin.server.ComponentSizeValidator
-
- All Implemented Interfaces:
Serializable
public class ComponentSizeValidator extends Object implements Serializable
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
ComponentSizeValidator.FileLocation
static class
ComponentSizeValidator.InvalidLayout
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static boolean
checkHeights(Component component)
static boolean
checkWidths(Component component)
static boolean
parentCanDefineHeight(Component component)
static boolean
parentCanDefineWidth(Component component)
static void
setCreationLocation(Object object)
static void
setHeightLocation(Object object)
static void
setWidthLocation(Object object)
static List<ComponentSizeValidator.InvalidLayout>
validateComponentRelativeSizes(Component component, List<ComponentSizeValidator.InvalidLayout> errors, ComponentSizeValidator.InvalidLayout parent)
Recursively checks given component and its subtree for invalid layout setups.static List<ComponentSizeValidator.InvalidLayout>
validateLayouts(UI ui)
Validates the layout and returns a collection of errors.
-
-
-
Method Detail
-
validateComponentRelativeSizes
public static List<ComponentSizeValidator.InvalidLayout> validateComponentRelativeSizes(Component component, List<ComponentSizeValidator.InvalidLayout> errors, ComponentSizeValidator.InvalidLayout parent)
Recursively checks given component and its subtree for invalid layout setups. Prints errors to std err stream.- Parameters:
component
- component to check- Returns:
- set of first level errors found
-
checkHeights
public static boolean checkHeights(Component component)
-
checkWidths
public static boolean checkWidths(Component component)
-
parentCanDefineHeight
public static boolean parentCanDefineHeight(Component component)
-
parentCanDefineWidth
public static boolean parentCanDefineWidth(Component component)
-
setCreationLocation
public static void setCreationLocation(Object object)
-
setWidthLocation
public static void setWidthLocation(Object object)
-
setHeightLocation
public static void setHeightLocation(Object object)
-
validateLayouts
public static List<ComponentSizeValidator.InvalidLayout> validateLayouts(UI ui)
Validates the layout and returns a collection of errors.- Parameters:
ui
- The UI to validate- Returns:
- A collection of errors. An empty collection if there are no errors.
- Since:
- 7.1
-
-