Class VaadinLayoutStyle
java.lang.Object
com.vaadin.featurepack.desktop.graphics.LayoutStyle
com.vaadin.featurepack.desktop.graphics.AbstractVaadinLayoutStyle
com.vaadin.featurepack.desktop.graphics.VaadinLayoutStyle
- All Implemented Interfaces:
Serializable
An implementation of
LayoutStyle that returns 6 for related
components, otherwise 12. This class also provides helper methods for
subclasses.- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class com.vaadin.featurepack.desktop.graphics.LayoutStyle
LayoutStyle.ComponentPlacement -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidcheckPosition(int position) intgetButtonGap(com.vaadin.flow.component.Component c, int position) Ifcis a check box or radio button, and the border is not painted this returns the inset along the specified axis.protected intgetButtonGap(com.vaadin.flow.component.Component source, int position, int offset) For some look and feels check boxs and radio buttons typically don't paint the border, yet they have padding for a border.protected intgetButtonGap(com.vaadin.flow.component.Component source, com.vaadin.flow.component.Component target, int position, int offset) For some look and feels check boxs and radio buttons typically don't paint the border, yet they have padding for a border.protected intgetIndent(com.vaadin.flow.component.Component c, int position) Returns the amount to indent the specified component if it's a JCheckBox or JRadioButton.static LayoutStyleprotected booleanisLabelAndNonlabel(com.vaadin.flow.component.Component c1, com.vaadin.flow.component.Component c2, int position) Returns true if the classes identify a JLabel and a non-JLabel along the horizontal axis.Methods inherited from class com.vaadin.featurepack.desktop.graphics.AbstractVaadinLayoutStyle
flipDirection, getContainerGap, getPreferredGap
-
Constructor Details
-
VaadinLayoutStyle
public VaadinLayoutStyle()
-
-
Method Details
-
getInstance
-
isLabelAndNonlabel
protected boolean isLabelAndNonlabel(com.vaadin.flow.component.Component c1, com.vaadin.flow.component.Component c2, int position) Returns true if the classes identify a JLabel and a non-JLabel along the horizontal axis. -
getButtonGap
protected int getButtonGap(com.vaadin.flow.component.Component source, com.vaadin.flow.component.Component target, int position, int offset) For some look and feels check boxs and radio buttons typically don't paint the border, yet they have padding for a border. Look and feel guidelines generally don't include this space. Use this method to subtract this space from the specified components.- Parameters:
source- First componenttarget- Second componentposition- Position doing layout along.offset- Ideal offset, not including border/margin- Returns:
- offset - border/margin around the component.
-
getButtonGap
protected int getButtonGap(com.vaadin.flow.component.Component source, int position, int offset) For some look and feels check boxs and radio buttons typically don't paint the border, yet they have padding for a border. Look and feel guidelines generally don't include this space. Use this method to subtract this space from the specified components.- Parameters:
source- Componentposition- Position doing layout along.offset- Ideal offset, not including border/margin- Returns:
- offset - border/margin around the component.
-
getButtonGap
public int getButtonGap(com.vaadin.flow.component.Component c, int position) Ifcis a check box or radio button, and the border is not painted this returns the inset along the specified axis. -
checkPosition
protected void checkPosition(int position) - Specified by:
checkPositionin classAbstractVaadinLayoutStyle
-
getIndent
protected int getIndent(com.vaadin.flow.component.Component c, int position) Returns the amount to indent the specified component if it's a JCheckBox or JRadioButton. If the component is not a JCheckBox or JRadioButton, 0 will be returned.- Specified by:
getIndentin classAbstractVaadinLayoutStyle
-