Package com.vaadin.server
Interface Sizeable
-
- All Superinterfaces:
Serializable
- All Known Subinterfaces:
Component,Component.Focusable,ComponentContainer,DragSource,DropTarget,HasChildMeasurementHint,HasComponents,HasDataProvider<T>,HasFilterableDataProvider<T,F>,HasHierarchicalDataProvider<T>,HasItems<T>,HasValueChangeMode,Layout,LegacyComponent,SelectiveRenderer,SingleComponentContainer
- All Known Implementing Classes:
AbsoluteLayout,AbstractColorPicker,AbstractComponent,AbstractComponentContainer,AbstractDateField,AbstractEmbedded,AbstractField,AbstractFocusable,AbstractJavaScriptComponent,AbstractLayout,AbstractListing,AbstractLocalDateField,AbstractLocalDateTimeField,AbstractMedia,AbstractMultiSelect,AbstractOrderedLayout,AbstractSingleComponentContainer,AbstractSingleSelect,AbstractSplitPanel,AbstractTextField,Accordion,Audio,BrowserFrame,Button,CheckBox,CheckBoxGroup,ColorPicker,ColorPickerArea,ColorPickerGradient,ColorPickerGrid,ColorPickerHistory,ColorPickerPopup,ColorPickerPreview,ColorPickerSelect,ComboBox,Composite,CssLayout,CustomComponent,CustomField,CustomLayout,DateField,DateTimeField,DragAndDropWrapper,Embedded,FormLayout,Grid,GridLayout,HorizontalLayout,HorizontalSplitPanel,Image,InlineDateField,InlineDateTimeField,Label,LegacyWindow,Link,ListSelect,LoginForm,MenuBar,NativeButton,NativeSelect,Navigator.EmptyView,Panel,PasswordField,PopupView,ProgressBar,RadioButtonGroup,RichTextArea,Slider,TabSheet,TextArea,TextField,Tree,TreeGrid,TwinColSelect,UI,Upload,VerticalLayout,VerticalSplitPanel,Video,Window
public interface Sizeable extends Serializable
Interface to be implemented by components wishing to display some object that may be dynamically resized during runtime.- Since:
- 3.0
- Author:
- Vaadin Ltd.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static classSizeable.Unit
-
Field Summary
Fields Modifier and Type Field Description static floatSIZE_UNDEFINEDDeprecated.static Sizeable.UnitUNITS_CMDeprecated.As of 7.0, useSizeable.Unit.CMinsteadstatic Sizeable.UnitUNITS_EMDeprecated.As of 7.0, useSizeable.Unit.EMinsteadstatic Sizeable.UnitUNITS_EXDeprecated.As of 7.0, useSizeable.Unit.EXinsteadstatic Sizeable.UnitUNITS_INCHDeprecated.As of 7.0, useSizeable.Unit.INCHinsteadstatic Sizeable.UnitUNITS_MMDeprecated.As of 7.0, useSizeable.Unit.MMinsteadstatic Sizeable.UnitUNITS_PERCENTAGEDeprecated.As of 7.0, useSizeable.Unit.PERCENTAGEinsteadstatic Sizeable.UnitUNITS_PICASDeprecated.As of 7.0, useSizeable.Unit.PICASinsteadstatic Sizeable.UnitUNITS_PIXELSDeprecated.As of 7.0, useSizeable.Unit.PIXELSinsteadstatic Sizeable.UnitUNITS_POINTSDeprecated.As of 7.0, useSizeable.Unit.POINTSinstead
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description floatgetHeight()Gets the height of the object.Sizeable.UnitgetHeightUnits()Gets the height property units.floatgetWidth()Gets the width of the object.Sizeable.UnitgetWidthUnits()Gets the width property units.voidsetHeight(float height, Sizeable.Unit unit)Sets the height of the object.voidsetHeight(String height)Sets the height of the component using String presentation.voidsetHeightFull()Sets the height to 100%.voidsetHeightUndefined()Clears any defined height.voidsetSizeFull()Sets the size to 100% x 100%.voidsetSizeUndefined()Clears any size settings.voidsetWidth(float width, Sizeable.Unit unit)Sets the width of the object.voidsetWidth(String width)Sets the width of the component using String presentation.voidsetWidthFull()Sets the width to 100%.voidsetWidthUndefined()Clears any defined width.
-
-
-
Field Detail
-
UNITS_PIXELS
@Deprecated static final Sizeable.Unit UNITS_PIXELS
Deprecated.As of 7.0, useSizeable.Unit.PIXELSinstead
-
UNITS_POINTS
@Deprecated static final Sizeable.Unit UNITS_POINTS
Deprecated.As of 7.0, useSizeable.Unit.POINTSinstead
-
UNITS_PICAS
@Deprecated static final Sizeable.Unit UNITS_PICAS
Deprecated.As of 7.0, useSizeable.Unit.PICASinstead
-
UNITS_EM
@Deprecated static final Sizeable.Unit UNITS_EM
Deprecated.As of 7.0, useSizeable.Unit.EMinstead
-
UNITS_EX
@Deprecated static final Sizeable.Unit UNITS_EX
Deprecated.As of 7.0, useSizeable.Unit.EXinstead
-
UNITS_MM
@Deprecated static final Sizeable.Unit UNITS_MM
Deprecated.As of 7.0, useSizeable.Unit.MMinstead
-
UNITS_CM
@Deprecated static final Sizeable.Unit UNITS_CM
Deprecated.As of 7.0, useSizeable.Unit.CMinstead
-
UNITS_INCH
@Deprecated static final Sizeable.Unit UNITS_INCH
Deprecated.As of 7.0, useSizeable.Unit.INCHinstead
-
UNITS_PERCENTAGE
@Deprecated static final Sizeable.Unit UNITS_PERCENTAGE
Deprecated.As of 7.0, useSizeable.Unit.PERCENTAGEinstead
-
SIZE_UNDEFINED
@Deprecated static final float SIZE_UNDEFINED
Deprecated.- See Also:
- Constant Field Values
-
-
Method Detail
-
getWidth
float getWidth()
Gets the width of the object. Negative number implies unspecified size (terminal is free to set the size).- Returns:
- width of the object in units specified by widthUnits property.
-
getHeight
float getHeight()
Gets the height of the object. Negative number implies unspecified size (terminal is free to set the size).- Returns:
- height of the object in units specified by heightUnits property.
-
getWidthUnits
Sizeable.Unit getWidthUnits()
Gets the width property units.- Returns:
- units used in width property.
-
getHeightUnits
Sizeable.Unit getHeightUnits()
Gets the height property units.- Returns:
- units used in height property.
-
setHeight
void setHeight(String height)
Sets the height of the component using String presentation. String presentation is similar to what is used in Cascading Style Sheets. Size can be length or percentage of available size. The empty string ("") or null will unset the height and set the units to pixels. See CSS specification for more details.- Parameters:
height- in CSS style string representation
-
setWidth
void setWidth(float width, Sizeable.Unit unit)Sets the width of the object. Negative number implies unspecified size (terminal is free to set the size).- Parameters:
width- the width of the object.unit- the unit used for the width.
-
setHeight
void setHeight(float height, Sizeable.Unit unit)Sets the height of the object. Negative number implies unspecified size (terminal is free to set the size).- Parameters:
height- the height of the object.unit- the unit used for the width.
-
setWidth
void setWidth(String width)
Sets the width of the component using String presentation. String presentation is similar to what is used in Cascading Style Sheets. Size can be length or percentage of available size. The empty string ("") or null will unset the width and set the units to pixels. See CSS specification for more details.- Parameters:
width- in CSS style string representation, null or empty string to reset
-
setSizeFull
void setSizeFull()
Sets the size to 100% x 100%.
-
setWidthFull
void setWidthFull()
Sets the width to 100%.- Since:
- 8.11
-
setHeightFull
void setHeightFull()
Sets the height to 100%.- Since:
- 8.11
-
setSizeUndefined
void setSizeUndefined()
Clears any size settings.
-
setWidthUndefined
void setWidthUndefined()
Clears any defined width.- Since:
- 7.3
-
setHeightUndefined
void setHeightUndefined()
Clears any defined height.- Since:
- 7.3
-
-