edu.washington.cs.supple.render
Class RenderedUi

java.lang.Object
  extended byedu.washington.cs.supple.render.RenderedUi
All Implemented Interfaces:
java.lang.Cloneable

public class RenderedUi
extends java.lang.Object
implements java.lang.Cloneable

Author:
anthonyw

Constructor Summary
RenderedUi()
          Empty Constructor - Recommended
RenderedUi(java.util.Hashtable widgetsHashTable)
          Create a new RenderedUi with a pre-processed Hashtable
 
Method Summary
 void addWidget(Widget widget)
          Adds a widget to the RenderedUi data structure
 void clear()
          Removes all widgets
 java.lang.Object clone()
          Clones a new RenderedUi object
 boolean containsWidget(java.lang.String widgetName)
           
 java.util.Enumeration getWidgetNames()
           
 WidgetProperties getWidgetProperties(java.lang.String widgetName)
          Retrieves widgetProperties for the widget identified by widgetName
 void loadUI(java.io.File file)
          Loads the UI to file specified
 void loadUI(java.lang.String filename)
          Loads the UI to file to be named "filename"
 void removeWidget(java.lang.String widgetName)
          Removes widget identified by widgetName
 void saveUI(java.io.File file)
          Saves the UI to file specified
 void saveUI(java.lang.String filename)
          Saves the UI to file to be named "filename"
 int size()
           
 java.lang.String toPrettyString()
          Return String representation
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

RenderedUi

public RenderedUi()
Empty Constructor - Recommended


RenderedUi

public RenderedUi(java.util.Hashtable widgetsHashTable)
Create a new RenderedUi with a pre-processed Hashtable

Parameters:
widgetsHashTable -
Method Detail

getWidgetProperties

public WidgetProperties getWidgetProperties(java.lang.String widgetName)
Retrieves widgetProperties for the widget identified by widgetName

Parameters:
widgetName -
Returns:

clone

public java.lang.Object clone()
Clones a new RenderedUi object


getWidgetNames

public java.util.Enumeration getWidgetNames()
Returns:
names of all the widgets

containsWidget

public boolean containsWidget(java.lang.String widgetName)
Parameters:
widgetName -
Returns:
true if RenderedUi stores widget identified by widgetName

addWidget

public void addWidget(Widget widget)
Adds a widget to the RenderedUi data structure

Parameters:
widget -

removeWidget

public void removeWidget(java.lang.String widgetName)
Removes widget identified by widgetName

Parameters:
widgetName -

clear

public void clear()
Removes all widgets


size

public int size()
Returns:
number of widgets in the UI

saveUI

public void saveUI(java.lang.String filename)
            throws java.io.IOException
Saves the UI to file to be named "filename"

Parameters:
filename -
Throws:
java.io.IOException

saveUI

public void saveUI(java.io.File file)
            throws java.io.IOException
Saves the UI to file specified

Parameters:
file -
Throws:
java.io.IOException

loadUI

public void loadUI(java.lang.String filename)
            throws java.io.IOException
Loads the UI to file to be named "filename"

Parameters:
filename -
Throws:
java.io.IOException

loadUI

public void loadUI(java.io.File file)
            throws java.io.IOException
Loads the UI to file specified

Parameters:
file -
Throws:
java.io.IOException

toString

public java.lang.String toString()

toPrettyString

public java.lang.String toPrettyString()
Return String representation