Package com.vaadin.server
Interface Sizeable
-
- All Superinterfaces:
Serializable
- All Known Subinterfaces:
Component
,Component.Focusable
,ComponentContainer
,DragSource
,DropTarget
,Field<T>
,HasChildMeasurementHint
,HasComponents
,Layout
,LegacyComponent
,SelectiveRenderer
,SingleComponentContainer
- All Known Implementing Classes:
AbsoluteLayout
,AbstractColorPicker
,AbstractComponent
,AbstractComponentContainer
,AbstractEmbedded
,AbstractField
,AbstractFocusable
,AbstractJavaScriptComponent
,AbstractLayout
,AbstractMedia
,AbstractOrderedLayout
,AbstractSelect
,AbstractSingleComponentContainer
,AbstractSplitPanel
,AbstractTextField
,Accordion
,Audio
,BrowserFrame
,Button
,Calendar
,CheckBox
,ColorPicker
,ColorPickerArea
,ColorPickerGradient
,ColorPickerGrid
,ColorPickerHistory
,ColorPickerPopup
,ColorPickerPreview
,ColorPickerSelect
,ComboBox
,CssLayout
,CustomComponent
,CustomField
,CustomLayout
,DateField
,DragAndDropWrapper
,Embedded
,Flash
,Form
,FormLayout
,Grid
,GridLayout
,HorizontalLayout
,HorizontalSplitPanel
,Image
,InlineDateField
,Label
,LegacyWindow
,Link
,ListSelect
,LoginForm
,MenuBar
,NativeButton
,NativeSelect
,Navigator.EmptyView
,OptionGroup
,Panel
,PasswordField
,PopupDateField
,PopupView
,ProgressBar
,ProgressIndicator
,RichTextArea
,Select
,Slider
,Table
,TabSheet
,TextArea
,TextField
,Tree
,TreeTable
,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 class
Sizeable.Unit
-
Field Summary
Fields Modifier and Type Field Description static float
SIZE_UNDEFINED
Deprecated.static Sizeable.Unit
UNITS_CM
Deprecated.As of 7.0, useSizeable.Unit.CM
insteadstatic Sizeable.Unit
UNITS_EM
Deprecated.As of 7.0, useSizeable.Unit.EM
insteadstatic Sizeable.Unit
UNITS_EX
Deprecated.As of 7.0, useSizeable.Unit.EX
insteadstatic Sizeable.Unit
UNITS_INCH
Deprecated.As of 7.0, useSizeable.Unit.INCH
insteadstatic Sizeable.Unit
UNITS_MM
Deprecated.As of 7.0, useSizeable.Unit.MM
insteadstatic Sizeable.Unit
UNITS_PERCENTAGE
Deprecated.As of 7.0, useSizeable.Unit.PERCENTAGE
insteadstatic Sizeable.Unit
UNITS_PICAS
Deprecated.As of 7.0, useSizeable.Unit.PICAS
insteadstatic Sizeable.Unit
UNITS_PIXELS
Deprecated.As of 7.0, useSizeable.Unit.PIXELS
insteadstatic Sizeable.Unit
UNITS_POINTS
Deprecated.As of 7.0, useSizeable.Unit.POINTS
instead
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description float
getHeight()
Gets the height of the object.Sizeable.Unit
getHeightUnits()
Gets the height property units.float
getWidth()
Gets the width of the object.Sizeable.Unit
getWidthUnits()
Gets the width property units.void
setHeight(float height, Sizeable.Unit unit)
Sets the height of the object.void
setHeight(String height)
Sets the height of the component using String presentation.void
setHeightUndefined()
Clears any defined heightvoid
setSizeFull()
Sets the size to 100% x 100%.void
setSizeUndefined()
Clears any size settings.void
setWidth(float width, Sizeable.Unit unit)
Sets the width of the object.void
setWidth(String width)
Sets the width of the component using String presentation.void
setWidthUndefined()
Clears any defined width
-
-
-
Field Detail
-
UNITS_PIXELS
@Deprecated static final Sizeable.Unit UNITS_PIXELS
Deprecated.As of 7.0, useSizeable.Unit.PIXELS
instead
-
UNITS_POINTS
@Deprecated static final Sizeable.Unit UNITS_POINTS
Deprecated.As of 7.0, useSizeable.Unit.POINTS
instead
-
UNITS_PICAS
@Deprecated static final Sizeable.Unit UNITS_PICAS
Deprecated.As of 7.0, useSizeable.Unit.PICAS
instead
-
UNITS_EM
@Deprecated static final Sizeable.Unit UNITS_EM
Deprecated.As of 7.0, useSizeable.Unit.EM
instead
-
UNITS_EX
@Deprecated static final Sizeable.Unit UNITS_EX
Deprecated.As of 7.0, useSizeable.Unit.EX
instead
-
UNITS_MM
@Deprecated static final Sizeable.Unit UNITS_MM
Deprecated.As of 7.0, useSizeable.Unit.MM
instead
-
UNITS_CM
@Deprecated static final Sizeable.Unit UNITS_CM
Deprecated.As of 7.0, useSizeable.Unit.CM
instead
-
UNITS_INCH
@Deprecated static final Sizeable.Unit UNITS_INCH
Deprecated.As of 7.0, useSizeable.Unit.INCH
instead
-
UNITS_PERCENTAGE
@Deprecated static final Sizeable.Unit UNITS_PERCENTAGE
Deprecated.As of 7.0, useSizeable.Unit.PERCENTAGE
instead
-
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%.
-
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
-
-