com.vaadin.terminal.gwt.client.ui.customlayout
Class VCustomLayout

java.lang.Object
  extended by com.google.gwt.user.client.ui.UIObject
      extended by com.google.gwt.user.client.ui.Widget
          extended by com.google.gwt.user.client.ui.Panel
              extended by com.google.gwt.user.client.ui.ComplexPanel
                  extended by com.vaadin.terminal.gwt.client.ui.customlayout.VCustomLayout
All Implemented Interfaces:
com.google.gwt.event.logical.shared.HasAttachHandlers, com.google.gwt.event.shared.HasHandlers, com.google.gwt.user.client.EventListener, com.google.gwt.user.client.ui.HasVisibility, com.google.gwt.user.client.ui.HasWidgets, com.google.gwt.user.client.ui.HasWidgets.ForIsWidget, com.google.gwt.user.client.ui.IndexedPanel, com.google.gwt.user.client.ui.IndexedPanel.ForIsWidget, com.google.gwt.user.client.ui.IsWidget, Iterable<com.google.gwt.user.client.ui.Widget>

public class VCustomLayout
extends com.google.gwt.user.client.ui.ComplexPanel

Custom Layout implements complex layout defined with HTML template.

Author:
Vaadin Ltd

Nested Class Summary
 
Nested classes/interfaces inherited from class com.google.gwt.user.client.ui.UIObject
com.google.gwt.user.client.ui.UIObject.DebugIdImpl, com.google.gwt.user.client.ui.UIObject.DebugIdImplEnabled
 
Nested classes/interfaces inherited from interface com.google.gwt.user.client.ui.IndexedPanel
com.google.gwt.user.client.ui.IndexedPanel.ForIsWidget
 
Nested classes/interfaces inherited from interface com.google.gwt.user.client.ui.HasWidgets
com.google.gwt.user.client.ui.HasWidgets.ForIsWidget
 
Field Summary
static String CLASSNAME
           
 
Fields inherited from class com.google.gwt.user.client.ui.UIObject
DEBUG_ID_PREFIX
 
Constructor Summary
VCustomLayout()
           
 
Method Summary
 void add(com.google.gwt.user.client.ui.Widget w)
          Adding widget without specifying location is not supported
 void clear()
          Clear all widgets from the layout
 String getLocation(com.google.gwt.user.client.ui.Widget w)
          Get the location of an widget
 void initializeHTML(String template, String themeUri)
          Initialize HTML-layout.
 void notifyChildrenOfSizeChange()
          This method is published to JS side with the same name into first DOM node of custom layout.
 void onBrowserEvent(com.google.gwt.user.client.Event event)
           
 void onDetach()
           
 boolean remove(com.google.gwt.user.client.ui.Widget w)
          Removes given widget from the layout
 void setWidget(com.google.gwt.user.client.ui.Widget widget, String location)
          Sets widget to given location.
 void updateCaption(ComponentConnector paintable)
          Update caption for given widget
 
Methods inherited from class com.google.gwt.user.client.ui.ComplexPanel
add, adjustIndex, checkIndexBoundsForAccess, checkIndexBoundsForInsertion, getChildren, getWidget, getWidgetCount, getWidgetIndex, getWidgetIndex, insert, insert, iterator, remove
 
Methods inherited from class com.google.gwt.user.client.ui.Panel
add, adopt, adopt, disown, doAttachChildren, doDetachChildren, orphan, remove
 
Methods inherited from class com.google.gwt.user.client.ui.Widget
addAttachHandler, addBitlessDomHandler, addDomHandler, addHandler, asWidget, asWidgetOrNull, createHandlerManager, delegateEvent, fireEvent, getHandlerCount, getLayoutData, getParent, isAttached, isOrWasAttached, onAttach, onLoad, onUnload, removeFromParent, setLayoutData, sinkEvents
 
Methods inherited from class com.google.gwt.user.client.ui.UIObject
addStyleDependentName, addStyleName, ensureDebugId, ensureDebugId, ensureDebugId, getAbsoluteLeft, getAbsoluteTop, getElement, getOffsetHeight, getOffsetWidth, getStyleElement, getStyleName, getStyleName, getStylePrimaryName, getStylePrimaryName, getTitle, isVisible, isVisible, onEnsureDebugId, removeStyleDependentName, removeStyleName, resolvePotentialElement, setElement, setElement, setHeight, setPixelSize, setSize, setStyleDependentName, setStyleName, setStyleName, setStyleName, setStyleName, setStylePrimaryName, setStylePrimaryName, setTitle, setVisible, setVisible, setWidth, sinkBitlessEvent, toString, unsinkEvents
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

CLASSNAME

public static final String CLASSNAME
See Also:
Constant Field Values
Constructor Detail

VCustomLayout

public VCustomLayout()
Method Detail

setWidget

public void setWidget(com.google.gwt.user.client.ui.Widget widget,
                      String location)
Sets widget to given location. If location already contains a widget it will be removed.

Parameters:
widget - Widget to be set into location.
location - location name where widget will be added
Throws:
IllegalArgumentException - if no such location is found in the layout.

initializeHTML

public void initializeHTML(String template,
                           String themeUri)
Initialize HTML-layout.


updateCaption

public void updateCaption(ComponentConnector paintable)
Update caption for given widget


getLocation

public String getLocation(com.google.gwt.user.client.ui.Widget w)
Get the location of an widget


remove

public boolean remove(com.google.gwt.user.client.ui.Widget w)
Removes given widget from the layout

Specified by:
remove in interface com.google.gwt.user.client.ui.HasWidgets
Overrides:
remove in class com.google.gwt.user.client.ui.ComplexPanel

add

public void add(com.google.gwt.user.client.ui.Widget w)
Adding widget without specifying location is not supported

Specified by:
add in interface com.google.gwt.user.client.ui.HasWidgets
Overrides:
add in class com.google.gwt.user.client.ui.Panel

clear

public void clear()
Clear all widgets from the layout

Specified by:
clear in interface com.google.gwt.user.client.ui.HasWidgets
Overrides:
clear in class com.google.gwt.user.client.ui.Panel

notifyChildrenOfSizeChange

public void notifyChildrenOfSizeChange()
This method is published to JS side with the same name into first DOM node of custom layout. This way if one implements some resizeable containers in custom layout he/she can notify children after resize.


onDetach

public void onDetach()
Overrides:
onDetach in class com.google.gwt.user.client.ui.Widget

onBrowserEvent

public void onBrowserEvent(com.google.gwt.user.client.Event event)
Specified by:
onBrowserEvent in interface com.google.gwt.user.client.EventListener
Overrides:
onBrowserEvent in class com.google.gwt.user.client.ui.Widget


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