com.vaadin.terminal
Interface Sizeable

All Superinterfaces:
Serializable
All Known Subinterfaces:
Component, Component.Focusable, ComponentContainer, DragSource, DropTarget, Field<T>, HasComponents, Layout, Vaadin6Component
All Known Implementing Classes:
AbsoluteLayout, AbstractComponent, AbstractComponentContainer, AbstractField, AbstractJavaScriptComponent, AbstractLayout, AbstractMedia, AbstractOrderedLayout, AbstractSelect, AbstractSplitPanel, AbstractTextField, Accordion, Audio, Button, CheckBox, ComboBox, CssLayout, CustomComponent, CustomField, CustomLayout, DateField, DragAndDropWrapper, Embedded, Form, FormLayout, GridLayout, HorizontalLayout, HorizontalSplitPanel, InlineDateField, Label, Link, ListSelect, LoginForm, MenuBar, NativeButton, NativeSelect, Navigator.EmptyView, Navigator.SimpleViewDisplay, OptionGroup, Panel, PasswordField, PopupDateField, PopupView, ProgressIndicator, RichTextArea, Root, Root.LegacyWindow, Select, Slider, Table, TabSheet, TextArea, TextField, Tree, TreeTable, TwinColSelect, 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
Version:
7.0.0.alpha3
Author:
Vaadin Ltd.

Nested Class Summary
static class Sizeable.Unit
           
 
Field Summary
static float SIZE_UNDEFINED
           
static Sizeable.Unit UNITS_CM
          Deprecated. from 7.0, use Sizeable.Unit.CM instead    
static Sizeable.Unit UNITS_EM
          Deprecated. from 7.0, use Sizeable.Unit.EM instead    
static Sizeable.Unit UNITS_EX
          Deprecated. from 7.0, use Sizeable.Unit.EX instead    
static Sizeable.Unit UNITS_INCH
          Deprecated. from 7.0, use Sizeable.Unit.INCH instead    
static Sizeable.Unit UNITS_MM
          Deprecated. from 7.0, use Sizeable.Unit.MM instead    
static Sizeable.Unit UNITS_PERCENTAGE
          Deprecated. from 7.0, use Sizeable.Unit.PERCENTAGE instead    
static Sizeable.Unit UNITS_PICAS
          Deprecated. from 7.0, use Sizeable.Unit.PICAS instead    
static Sizeable.Unit UNITS_PIXELS
          Deprecated. from 7.0, use Sizeable.Unit.PIXELS instead    
static Sizeable.Unit UNITS_POINTS
          Deprecated. from 7.0, use Sizeable.Unit.POINTS instead    
 
Method Summary
 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 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.
 

Field Detail

UNITS_PIXELS

@Deprecated
static final Sizeable.Unit UNITS_PIXELS
Deprecated. from 7.0, use Sizeable.Unit.PIXELS instead    

UNITS_POINTS

@Deprecated
static final Sizeable.Unit UNITS_POINTS
Deprecated. from 7.0, use Sizeable.Unit.POINTS instead    

UNITS_PICAS

@Deprecated
static final Sizeable.Unit UNITS_PICAS
Deprecated. from 7.0, use Sizeable.Unit.PICAS instead    

UNITS_EM

@Deprecated
static final Sizeable.Unit UNITS_EM
Deprecated. from 7.0, use Sizeable.Unit.EM instead    

UNITS_EX

@Deprecated
static final Sizeable.Unit UNITS_EX
Deprecated. from 7.0, use Sizeable.Unit.EX instead    

UNITS_MM

@Deprecated
static final Sizeable.Unit UNITS_MM
Deprecated. from 7.0, use Sizeable.Unit.MM instead    

UNITS_CM

@Deprecated
static final Sizeable.Unit UNITS_CM
Deprecated. from 7.0, use Sizeable.Unit.CM instead    

UNITS_INCH

@Deprecated
static final Sizeable.Unit UNITS_INCH
Deprecated. from 7.0, use Sizeable.Unit.INCH instead    

UNITS_PERCENTAGE

@Deprecated
static final Sizeable.Unit UNITS_PERCENTAGE
Deprecated. from 7.0, use Sizeable.Unit.PERCENTAGE instead    

SIZE_UNDEFINED

static final float SIZE_UNDEFINED
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.



Copyright © 2000-2011 Vaadin Ltd. All Rights Reserved.