Professional Documents
Culture Documents
Cheat Sheet
Website: vaadin.com Developer site: dev.vaadin.com Forum: vaadin.com/forum Manual: vaadin.com/book
commit/discard()
Sizeable focus() setWriteThrough()
setTabIndex() setReadThrough() Buffered
setWidth() Focusable
setHeight()
setFullSize()
setUndefinedSize() Event Component Field BufferedValidatable Validatable
Listener addStyleName/Listener() setRequired() addValidator()
setCaption/Icon() setRequiredError() buttonClick() isValid()
Embedded setEnabled/Visible() validate()
v-container ClickListener
getParent(), attach/detach()
ClickEvent
setTheme/Locale/LogoutURL()
ComponentPosition
TwinColSelect DefaultFieldFactory
Layout AbstractLayout AbsoluteLayout v-twincolselect
v-absolutelayout
setMargin() getPosition()
OptionGroup TableFieldFactory
CustomLayout SplitPanel GridLayout v-optiongroup createField()
v-customlayout v-splitpanel-... v-gridlayout 1
ColumnGenerator setTableFieldFactory()
CustomLayout("template") setSplitPosition/Locked() addComponent(c)/(c, col, row)/(c, c1, r1, c2, r2)
Table Container.Ordered
v-table Container.Sortable
FormLayout AbstractOrderedLayout CellStyleGenerator
v-formlayout
Tree Container.Hierarchical
v-tree
HorizontalLayout VerticalLayout
v-horizontallayout v-verticallayout The Class Diagram presents all user interface component classes
2009 IT Mill Ltd
and the most important interfaces, relationships, and methods.
Cheat Sheet For Vaadin 6.2
GWT: code.google.com/webtoolkit/
...
Widget MyWidget
Must implement
Vaadin Client-Side Integration updateFromUIDL()
to deserialize state
com.vaadin.terminal.gwt.client. from server
Paintable VMyWidget
updateFromUIDL()
n 1
Needs to call
updateVariable() to
com.vaadin.terminal.gwt.client. to serialize state to
server
ApplicationConnection
updateVariable()
Makes XMLHttpRequest
Server connection:
UIDL / JSON / HTTP(S)
Paintable VariableOwner
All images, embedded objects, and downloadable
Resources files are represented as resources.
paint() changeVariables()
Component PaintTarget
Resource ApplicationResource FileResource
addAttribute()
any URL loaded from the class path (Implements paint()) addVariable()
AbstractComponent
ExternalResource ClassResource getTag() paintContent()
Use a custom theme by setting it in the main window object: Hello, World!
mainWindow.setTheme("mytheme"); public class MyApp extends com.vaadin.Application {
public void init() {
Use images included in a team as a ThemeResource: Window main = new Window("Hello Window");
Button button = new Button("Button with Icon"); setMainWindow(main);
button.setIcon(new ThemeResource("img/myimage.png")); main.setTheme("mytheme"); // Optional
Use a HTML template having <div location="hello"/> location tags Label label = new Label("Hello, World!");
with the CustomLayout component. Add components by their location tag: main.addComponent(label);
}
CustomLayout layout = new CustomLayout("mylayout"); }
layout.addComponent(new Button("Hello"), "hello");