com.sage.swt.client.widget
Class SwtWidgetTransformer

java.lang.Object
  extended by com.sage.swt.client.widget.SwtWidgetTransformer
All Implemented Interfaces:
TransformsWidget
Direct Known Subclasses:
SwtContextMenuWidgetTransformer, SwtLayoutWidgetTransformer, SwtMenuWidgetTransformer

public class SwtWidgetTransformer
extends java.lang.Object
implements TransformsWidget

Default class for transforming a SwtWidget to and from declarative layout (XML) format.


Constructor Summary
SwtWidgetTransformer(SwtWidgetCreator widgetCreator, SwtErrorStack errorStack)
          Constructor.
 
Method Summary
 void addAdditionalInfoToWidgetLayout(com.google.gwt.xml.client.Document doc, com.google.gwt.user.client.ui.Widget w, com.google.gwt.xml.client.Element widgetElem, java.lang.String widgetIndent)
          Adds additional information (not covered by the property bag) to the widget's element in the declarative layout (DOM) XML.
 com.google.gwt.user.client.ui.Widget generateWidgetFromLayout(java.lang.String formID, com.google.gwt.xml.client.Element widgetElem, InstanceLoader instanceLoader, java.util.List<DelayedPropertyInfo> delayedProperties, PropertyChangeHandler propertyHandler)
          Generates a widget from its element in the declarative layout XML (DOM).
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SwtWidgetTransformer

public SwtWidgetTransformer(SwtWidgetCreator widgetCreator,
                            SwtErrorStack errorStack)
Constructor.

Parameters:
widgetCreator - The SwtWidgetCreator that will be used to create the widget.
errorStack - The SwtErrorStack that stores the list of UI errors.
Method Detail

addAdditionalInfoToWidgetLayout

public void addAdditionalInfoToWidgetLayout(com.google.gwt.xml.client.Document doc,
                                            com.google.gwt.user.client.ui.Widget w,
                                            com.google.gwt.xml.client.Element widgetElem,
                                            java.lang.String widgetIndent)
Adds additional information (not covered by the property bag) to the widget's element in the declarative layout (DOM) XML.

Specified by:
addAdditionalInfoToWidgetLayout in interface TransformsWidget
Parameters:
doc - The Document that contains the declarative layout.
w - The widget.
widgetElem - The widget's element in the declarative layout XML (DOM).
widgetIndent - The indenting to use when inserting this element in the XML (DOM).

generateWidgetFromLayout

public com.google.gwt.user.client.ui.Widget generateWidgetFromLayout(java.lang.String formID,
                                                                     com.google.gwt.xml.client.Element widgetElem,
                                                                     InstanceLoader instanceLoader,
                                                                     java.util.List<DelayedPropertyInfo> delayedProperties,
                                                                     PropertyChangeHandler propertyHandler)
Generates a widget from its element in the declarative layout XML (DOM).

Specified by:
generateWidgetFromLayout in interface TransformsWidget
Parameters:
formID - The UI's (or popup form's) ID. For now, the main UI's ID is "". Note that this ID isn't stored in the layout file.
widgetElem - The widget's element in the declarative layout XML (DOM).
instanceLoader - The InstanceLoader for the UI.
delayedProperties - The widget's properties to be applied later.
propertyHandler - The PropertyChangeHandler that will listen to this widget's property changes. This parameter is optional and can be null.
Returns:
The widget generated from its declarative layout information.


Copyright © 2011 Sage Software, Inc. All rights reserved.