com.maryanovsky.gwtutils.client.ui
Class UiBinderLayoutSize

java.lang.Object
  extended by com.google.gwt.user.client.ui.UIObject
      extended by com.google.gwt.user.client.ui.Widget
          extended by com.maryanovsky.gwtutils.client.ui.UiBinderLayoutSize
All Implemented Interfaces:
HasAttachHandlers, HasHandlers, EventListener, HasVisibility, IsWidget

public class UiBinderLayoutSize
extends Widget

A small hack which allows one to pass size information from a UiBinder ui.xml file to the code that does the actual layout. To do this, you add a UiBinderLayoutSize into the layout in the ui.xml file with a corresponding "ui:field" attribute, then access it from the layout code. It removes itself from the container hierarchy as soon as it's attached.

Author:
Maryanovsky Alexander

Nested Class Summary
 
Nested classes/interfaces inherited from class com.google.gwt.user.client.ui.UIObject
UIObject.DebugIdImpl, UIObject.DebugIdImplEnabled
 
Field Summary
 
Fields inherited from class com.google.gwt.user.client.ui.UIObject
DEBUG_ID_PREFIX
 
Constructor Summary
UiBinderLayoutSize()
          Creates a new UiBinderLayoutSize.
 
Method Summary
 double getHeight()
          Returns the height.
 double getWidth()
          Returns the width.
 void onLoad()
          Remove ourselves from the container hierarchy.
 void setHeight(String height)
          Sets the height.
 void setWidth(String width)
          Sets the width.
 
Methods inherited from class com.google.gwt.user.client.ui.Widget
addAttachHandler, addBitlessDomHandler, addDomHandler, addHandler, asWidget, asWidgetOrNull, createHandlerManager, delegateEvent, doAttachChildren, doDetachChildren, fireEvent, getHandlerCount, getLayoutData, getParent, isAttached, isOrWasAttached, onAttach, onBrowserEvent, onDetach, 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, setPixelSize, setSize, setStyleDependentName, setStyleName, setStyleName, setStyleName, setStyleName, setStylePrimaryName, setStylePrimaryName, setTitle, setVisible, setVisible, sinkBitlessEvent, toString, unsinkEvents
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

UiBinderLayoutSize

@UiConstructor
public UiBinderLayoutSize()
Creates a new UiBinderLayoutSize.

Method Detail

setWidth

public void setWidth(String width)
Sets the width.

Overrides:
setWidth in class UIObject

setHeight

public void setHeight(String height)
Sets the height.

Overrides:
setHeight in class UIObject

getWidth

public double getWidth()
Returns the width.


getHeight

public double getHeight()
Returns the height.


onLoad

public void onLoad()
Remove ourselves from the container hierarchy.

Overrides:
onLoad in class Widget