Browse Source

Added helper methods for setting only height or width full. (#11854)

tags/8.10.0.beta1
Anna Koskinen 4 years ago
parent
commit
08c748acff
No account linked to committer's email address

+ 14
- 0
server/src/main/java/com/vaadin/server/Sizeable.java View File

*/ */
public void setSizeFull(); public void setSizeFull();


/**
* Sets the width to 100%.
*
* @since
*/
public void setWidthFull();

/**
* Sets the height to 100%.
*
* @since
*/
public void setHeightFull();

/** /**
* Clears any size settings. * Clears any size settings.
*/ */

+ 20
- 2
server/src/main/java/com/vaadin/ui/AbstractComponent.java View File

import java.util.Set; import java.util.Set;
import java.util.StringTokenizer; import java.util.StringTokenizer;


import com.vaadin.annotations.Theme;
import com.vaadin.ui.themes.ValoTheme;
import org.jsoup.nodes.Attribute; import org.jsoup.nodes.Attribute;
import org.jsoup.nodes.Attributes; import org.jsoup.nodes.Attributes;
import org.jsoup.nodes.Element; import org.jsoup.nodes.Element;
setHeight(100, Unit.PERCENTAGE); setHeight(100, Unit.PERCENTAGE);
} }


/*
* (non-Javadoc)
*
* @see com.vaadin.server.Sizeable#setWidthFull()
*/
@Override
public void setWidthFull() {
setWidth(100, Unit.PERCENTAGE);
}

/*
* (non-Javadoc)
*
* @see com.vaadin.server.Sizeable#setHeightFull()
*/
@Override
public void setHeightFull() {
setHeight(100, Unit.PERCENTAGE);
}

/* /*
* (non-Javadoc) * (non-Javadoc)
* *

Loading…
Cancel
Save