edu.washington.cs.supple.rep.transform
Class AlternativesTransformer

java.lang.Object
  extended byedu.washington.cs.supple.rep.transform.AlternativesTransformer
All Implemented Interfaces:
UiTransformer

public class AlternativesTransformer
extends java.lang.Object
implements UiTransformer

Author:
kgajos Transforms the UI by getting rid of the alternatives nodes (and leaving the correct branches of the alternatives nodes in place)

Field Summary
protected  VetoFunction vetoFunction
           
protected  WidgetFactory widgetFactory
           
 
Constructor Summary
AlternativesTransformer(WidgetFactory widgetFactory, VetoFunction vetoFunction)
           
 
Method Summary
 UiObject transform(UiObject root)
          Transoforms a ui specification
protected  boolean transformHelper(UiObject curRoot, boolean insideAlternative)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

widgetFactory

protected WidgetFactory widgetFactory

vetoFunction

protected VetoFunction vetoFunction
Constructor Detail

AlternativesTransformer

public AlternativesTransformer(WidgetFactory widgetFactory,
                               VetoFunction vetoFunction)
Method Detail

transform

public UiObject transform(UiObject root)
Description copied from interface: UiTransformer
Transoforms a ui specification

Specified by:
transform in interface UiTransformer
Parameters:
root - the original specification
Returns:
the transformed specification

transformHelper

protected boolean transformHelper(UiObject curRoot,
                                  boolean insideAlternative)