<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array">
    <added>
      <filename>README</filename>
    </added>
    <added>
      <filename>beachhouse/Makefile</filename>
    </added>
    <added>
      <filename>run.sh</filename>
    </added>
  </added>
  <modified type="array">
    <modified>
      <diff>@@ -1,19 +1,19 @@
-Copyright (c) 2008 Rudolf Olah
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the &quot;Software&quot;), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED &quot;AS IS&quot;, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+Copyright (c) 2008 Rudolf Olah
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the &quot;Software&quot;), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED &quot;AS IS&quot;, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
 THE SOFTWARE.
\ No newline at end of file</diff>
      <filename>COPYING</filename>
    </modified>
    <modified>
      <diff>@@ -1,48 +1,70 @@
-package beachhouse;
-
-import java.awt.*;
-import java.util.Observable;
-import java.util.Observer;
-import javax.swing.JFrame;
-import beachhouse.Flow;
-import beachhouse.BeachStyle;
-import beachhouse.util.Colors;
-
-public class AppWindow extends JFrame implements Observer {
-    public BeachStyle style;
-
-    public AppWindow() {
-	super(&quot;Sandals&quot;);
-	setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
-	style = new BeachStyle(this);
-	style.reset();
-    }
-
-    public void update(Observable o, Object arg) {
-	this.update((String)arg);
-    }
-
-    public void update(String key) {
-	//System.out.println(&quot;update with: &quot; + key);
-	if (key.equals(&quot;resizable&quot;))
-	    setResizable(style.isResizable());
-	else if (key.equals(&quot;background&quot;))
-	    getContentPane().setBackground(style.getBackgroundColor());
-	else if (key.equals(&quot;color&quot;))
-	    getContentPane().setForeground(style.getColor());
-	else if (key.equals(&quot;opacity&quot;))
-	    setVisible(style.getOpacity() &gt; 0.0);
-	else if (key.equals(&quot;width&quot;))
-	    setMinimumSize(new Dimension(style.getWidth(), 100));
-	getContentPane().repaint();
-    }
-
-    public void go() {
-	pack();
-	// Magic re-sizing based on contents :o
-	setMinimumSize(new Dimension(style.getWidth(), 100));
-	if (style.getHeight() &gt; 0)
-	    setPreferredSize(new Dimension(style.getWidth(), style.getHeight()));
-	setVisible(true);
-    }
+package beachhouse;
+
+import java.awt.*;
+import java.util.Observable;
+import java.util.Observer;
+import javax.swing.JFrame;
+import beachhouse.Flow;
+import beachhouse.BeachStyle;
+import beachhouse.util.Colors;
+
+public class AppWindow extends JFrame implements Observer {
+    public BeachStyle style;
+    private boolean started;
+
+    public AppWindow() {
+	super(&quot;Sandals&quot;);
+	System.out.println(&quot;Building Beach House...&quot;);
+	setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
+	style = new BeachStyle(this);
+	style.reset();
+	style.setWidth(500);
+	style.setHeight(600);
+	style.setBackgroundColor(&quot;grey&quot;);
+	style.setColor(&quot;black&quot;);
+	style.setResizable(true);
+	started = false;
+    }
+
+    public boolean hasStarted () {
+	return started;
+    }
+
+    public void setName(String x) {
+	this.setTitle(x);
+    }
+
+    public String getName() {
+	return getTitle();
+    }
+
+    public String getCurrentDirectory() {
+	return System.getProperty(&quot;user.dir&quot;);
+    }
+
+    public void update(Observable o, Object arg) {
+	this.update((String)arg);
+    }
+
+    public void update(String key) {
+	//System.out.println(&quot;update with: &quot; + key);
+	if (key.equals(&quot;resizable&quot;))
+	    setResizable(style.isResizable());
+	else if (key.equals(&quot;background&quot;))
+	    getContentPane().setBackground(style.getBackgroundColor());
+	else if (key.equals(&quot;color&quot;))
+	    getContentPane().setForeground(style.getColor());
+	else if (key.equals(&quot;opacity&quot;))
+	    setVisible(style.getOpacity() &gt; 0.0);
+	else if (key.equals(&quot;width&quot;))
+	    setMinimumSize(new Dimension(style.getWidth(), 100));
+	getContentPane().repaint();
+    }
+
+    public void go() {
+	//pack();
+	setVisible(true);
+	System.out.println(&quot;Beach House built! Enjoy the sand and sun :-)&quot;);
+	this.started = true;
+    }
 }
\ No newline at end of file</diff>
      <filename>beachhouse/AppWindow.java</filename>
    </modified>
    <modified>
      <diff>@@ -1,187 +1,193 @@
-package beachhouse;
-
-import java.awt.Color;
-import java.util.Hashtable;
-import java.util.Observable;
-import java.util.Observer;
-import javax.swing.text.Style;
-import javax.swing.text.StyleConstants;
-import beachhouse.util.*;
-
-/** Based on _why's Shoes style properties and follows the CSS3
- * working drafts in some ways.
- */
-public class BeachStyle extends Observable {
-
-    private Hashtable&lt;String, Object&gt; properties;
-    
-    public BeachStyle() {
-	super();
-	properties = new Hashtable&lt;String, Object&gt;();
-    }
-
-    public BeachStyle(Observer o) {
-	super();
-	properties = new Hashtable&lt;String, Object&gt;();
-	addObserver(o);
-    }
-
-    public void reset() {
-	put(&quot;background-image&quot;, &quot;&quot;);
-	setBackgroundColor(&quot;transparent&quot;);
-	put(&quot;background-repeat&quot;, &quot;repeat&quot;); // Can be repeat-x, repeat-y, repeat, no-repeat, space
-	setColor(&quot;black&quot;);
-	setOpacity(1.0f); // range from 0.0 to 1.0
-	setUnderline(false);
-	setBold(false);
-	setItalic(false);
-	setResizable(true);
-	setFontSize(12); // in points
-	setWidth(320);   // in pixels
-	setHeight(0);    // in pixels
-    }
-
-    /** Associates a key ``k'' with a value ``v'' in the
-     * ``properties'' Hashtable. Notifies any observers that the value
-     * of the key ``k'' has changed.
-     * @param k style property name
-     * @param v new value for the style property
-     * @return the new value that the style property was set to
-     */
-    private Object put(String k, Object v) {
-	setChanged();
-	properties.put(k, v);
-	notifyObservers((Object)k);
-	return v;
-    }
-
-    /** Returns the value associated with a particular style property.
-     * @param k style property name
-     * @return value of the style property
-     */
-    private Object get(String k) {
-	return properties.get(k);
-    }
-
-    /** Sets the opacity to a new value between 0.0 and 1.0. Includes
-     * bounds checking.
-     * @param value the new value of the opacity
-     * @return new value
-     */
-    public float setOpacity(float value) throws IllegalArgumentException {
-	if (value &lt; 0.0 || value &gt; 1.0)
-	    throw new IllegalArgumentException(&quot;Opacity must be set to a value between 0.0 and 1.0, and &quot; + value + &quot; is invalid.&quot;);
-	put(&quot;opacity&quot;, value);
-	return value;
-    }
-    public float setOpacity(double value) throws IllegalArgumentException {
-	return setOpacity(new Float(value));
-    }
-    public float getOpacity() {
-	return ((Float)get(&quot;opacity&quot;)).floatValue();
-    }
-
-    public boolean setUnderline(boolean value) {
-	put(&quot;underline&quot;, value);
-	return value;
-    }
-    public boolean isUnderline() {
-	return ((Boolean)get(&quot;underline&quot;)).booleanValue();
-    }
-
-    public boolean setBold(boolean value) {
-	put(&quot;bold&quot;, value);
-	return value;
-    }
-    public boolean isBold() {
-	return ((Boolean)get(&quot;bold&quot;)).booleanValue();
-    }
-
-    public boolean setItalic(boolean value) {
-	put(&quot;italic&quot;, value);
-	return value;
-    }
-    public boolean isItalic() {
-	return ((Boolean)get(&quot;italic&quot;)).booleanValue();
-    }
-
-    public boolean setResizable(boolean value) {
-	put(&quot;resizable&quot;, value);
-	return value;
-    }
-    public boolean isResizable() {
-	return ((Boolean)get(&quot;resizable&quot;)).booleanValue();
-    }
-
-    public String setColor(String value) {
-	put(&quot;color&quot;, ColorMaker.parseColor(value));
-	return value;
-    }
-    public Color getColor() {
-	return (Color)get(&quot;color&quot;);
-    }
-
-    public String setBackground(String value) {
-	// Todo: add parsing for other background properties
-	// Make it more like CSS :)
-	return setBackgroundColor(value);
-    }
-
-    public String setBackgroundColor(String value) {
-	put(&quot;background-color&quot;, ColorMaker.parseColor(value));
-	return value;
-    }
-    public Color getBackgroundColor() {
-	return (Color)get(&quot;background-color&quot;);
-    }
-
-    /** Sets the size of the font. Font size is measured in points.
-     * @param value new font size
-     * @return new font size
-     */
-    public int setFontSize(int value) throws IllegalArgumentException {
-	if (value &lt; 0)
-	    throw new IllegalArgumentException(&quot;Font size must be set to a value more than or equal to 0 , and &quot; + value + &quot; is invalid.&quot;);
-	put(&quot;font-size&quot;, value);
-	return value;
-    }
-    public int getFontSize() {
-	return ((Integer)get(&quot;font-size&quot;)).intValue();
-    }
-
-    /** Sets the preferred width. This is measured in pixels. If the
-     * width is 0, there is no preferred width.
-     * @param value new preferred width
-     * @return new preferred width
-     */
-    public int setWidth(int value) {
-	put(&quot;width&quot;, value);
-	return value;
-    }
-    public int getWidth() {
-	return ((Integer)get(&quot;width&quot;)).intValue();
-    }
-
-    /** Sets the preferred height. This is measured in pixels. If the
-     * height is 0, there is no preferred height.
-     * @param value new preferred height
-     * @return new preferred height
-     */
-    public int setHeight(int value) {
-	put(&quot;height&quot;, value);
-	return value;
-    }
-    public int getHeight() {
-	return ((Integer)get(&quot;height&quot;)).intValue();
-    }
-
-    /** Converts this style to a Java which contains text attibutes.
-     * @return a Style which is used in a JTextPane's styled document.
-     */
-    public Style toTextAttributes(Style s) {
-	StyleConstants.setFontSize(s, getFontSize());
-	StyleConstants.setBold(s, isBold());
-	StyleConstants.setItalic(s, isItalic());
-	return s;
-    }
+package beachhouse;
+
+import java.awt.Color;
+import java.util.Hashtable;
+import java.util.Observable;
+import java.util.Observer;
+import java.util.StringTokenizer;
+import javax.swing.text.Style;
+import javax.swing.text.StyleConstants;
+import beachhouse.util.*;
+
+/** Based on _why's Shoes style properties and follows the CSS3
+ * working drafts in some ways.
+ */
+public class BeachStyle extends Observable {
+
+    private Hashtable&lt;String, Object&gt; properties;
+    
+    public BeachStyle() {
+	super();
+	properties = new Hashtable&lt;String, Object&gt;();
+    }
+
+    public BeachStyle(Observer o) {
+	super();
+	properties = new Hashtable&lt;String, Object&gt;();
+	addObserver(o);
+    }
+
+    public void reset() {
+	put(&quot;background-image&quot;, &quot;&quot;);
+	setBackgroundColor(&quot;transparent&quot;);
+	put(&quot;background-repeat&quot;, &quot;repeat&quot;); // Can be repeat-x, repeat-y, repeat, no-repeat, space
+	setStroke(&quot;black&quot;);
+	setOpacity(1.0f); // range from 0.0 to 1.0
+	setStrikethrough(false);
+	setUnderline(false);
+	setBold(false);
+	setItalic(false);
+	setResizable(true);
+	setFontSize(12); // in points
+	setWidth(320);   // in pixels
+	setHeight(0);    // in pixels
+    }
+
+    /** Associates a key ``k'' with a value ``v'' in the
+     * ``properties'' Hashtable. Notifies any observers that the value
+     * of the key ``k'' has changed.
+     * @param k style property name
+     * @param v new value for the style property
+     * @return the new value that the style property was set to
+     */
+    private Object put(String k, Object v) {
+	setChanged();
+	properties.put(k, v);
+	notifyObservers((Object)k);
+	return v;
+    }
+
+    /** Returns the value associated with a particular style property.
+     * @param k style property name
+     * @return value of the style property
+     */
+    private Object get(String k) {
+	return properties.get(k);
+    }
+
+    /** Sets the opacity to a new value between 0.0 and 1.0. Includes
+     * bounds checking.
+     * @param value the new value of the opacity
+     */
+    public float setOpacity(float value) throws IllegalArgumentException {
+	if (value &lt; 0.0 || value &gt; 1.0)
+	    throw new IllegalArgumentException(&quot;Opacity must be set to a value between 0.0 and 1.0, and &quot; + value + &quot; is invalid.&quot;);
+	put(&quot;opacity&quot;, value);
+	return value;
+    }
+    public float setOpacity(double value) throws IllegalArgumentException {
+	return setOpacity(new Float(value));
+    }
+    public float getOpacity() {
+	return ((Float)get(&quot;opacity&quot;)).floatValue();
+    }
+
+    public void setStrikethrough(boolean value) {
+	put(&quot;strikethrough&quot;, value);
+    }
+
+    public boolean isStrikethrough() {
+	return ((Boolean)get(&quot;strikethrough&quot;)).booleanValue();
+    }
+
+    public void setUnderline(boolean value) {
+	put(&quot;underline&quot;, value);
+    }
+    public boolean isUnderline() {
+	return ((Boolean)get(&quot;underline&quot;)).booleanValue();
+    }
+
+    public void setBold(boolean value) {
+	put(&quot;bold&quot;, value);
+    }
+    public boolean isBold() {
+	return ((Boolean)get(&quot;bold&quot;)).booleanValue();
+    }
+
+    public void setItalic(boolean value) {
+	put(&quot;italic&quot;, value);
+    }
+    public boolean isItalic() {
+	return ((Boolean)get(&quot;italic&quot;)).booleanValue();
+    }
+
+    public void setResizable(boolean value) {
+	put(&quot;resizable&quot;, value);
+    }
+    public boolean isResizable() {
+	return ((Boolean)get(&quot;resizable&quot;)).booleanValue();
+    }
+
+    public void setStroke(String value) {
+	this.setColor(value);
+    }
+
+    public void setColor(String value) {
+	put(&quot;color&quot;, ColorMaker.parseColor(value));
+    }
+    public Color getColor() {
+	return (Color)get(&quot;color&quot;);
+    }
+
+    public void setBackground(String value) {
+	// Todo: add parsing for other background properties
+	// Make it more like CSS :)
+	StringTokenizer x = new StringTokenizer(value);
+	while (x.hasMoreTokens()) {
+	    String token = x.nextToken();
+	    setBackgroundColor(token);
+	}
+    }
+
+    public void setBackgroundColor(String value) {
+	put(&quot;background-color&quot;, ColorMaker.parseColor(value));
+    }
+    public Color getBackgroundColor() {
+	return (Color)get(&quot;background-color&quot;);
+    }
+
+    /** Sets the size of the font. Font size is measured in points.
+     * @param value new font size
+     * @return new font size
+     */
+    public void setFontSize(int value) throws IllegalArgumentException {
+	if (value &lt; 0)
+	    throw new IllegalArgumentException(&quot;Font size must be set to a value more than or equal to 0 , and &quot; + value + &quot; is invalid.&quot;);
+	put(&quot;font-size&quot;, value);
+    }
+    public int getFontSize() {
+	return ((Integer)get(&quot;font-size&quot;)).intValue();
+    }
+
+    /** Sets the preferred width. This is measured in pixels. If the
+     * width is 0, there is no preferred width.
+     * @param value new preferred width
+     */
+    public void setWidth(int value) {
+	put(&quot;width&quot;, value);
+    }
+    public int getWidth() {
+	return ((Integer)get(&quot;width&quot;)).intValue();
+    }
+
+    /** Sets the preferred height. This is measured in pixels. If the
+     * height is 0, there is no preferred height.
+     * @param value new preferred height
+     */
+    public void setHeight(int value) {
+	put(&quot;height&quot;, value);
+    }
+    public int getHeight() {
+	return ((Integer)get(&quot;height&quot;)).intValue();
+    }
+
+    /** Converts this style to a Java which contains text attibutes.
+     * @return a Style which is used in a JTextPane's styled document.
+     */
+    public Style toTextAttributes(Style s) {
+	StyleConstants.setFontSize(s, getFontSize());
+	StyleConstants.setBold(s, isBold());
+	StyleConstants.setItalic(s, isItalic());
+	return s;
+    }
 }
\ No newline at end of file</diff>
      <filename>beachhouse/BeachStyle.java</filename>
    </modified>
    <modified>
      <diff>@@ -1,34 +1,34 @@
-package beachhouse;
-
-import java.awt.Component;
-import java.awt.FlowLayout;
-import beachhouse.LayoutWidget;
-
-public class Flow extends LayoutWidget {
-    /* What a flow looks like:
-       +--------------------------+
-       | item | item | ... | item |
-       +--------------------------+
-
-       A flow has a maximum width that it can reach before the items
-       begin to wrap:
-       +-------------+
-       | item | item |
-       | ...  | item |
-       +-------------+
-
-       _why has said, &quot;in Shoes (and Sandals), just as on the web,
-                       width is generally fixed. While height goes on
-                       and on.&quot;
-    */
-
-    public Flow() {
-	super();
-	setLayout(new FlowLayout(FlowLayout.LEFT, 5, 5));
-    }
-
-    public Flow(Component comp) {
-	super(comp);
-	setLayout(new FlowLayout(FlowLayout.LEFT, 5, 5));
-    }
+package beachhouse;
+
+import java.awt.Component;
+import java.awt.FlowLayout;
+import beachhouse.LayoutWidget;
+
+public class Flow extends LayoutWidget {
+    /* What a flow looks like:
+       +--------------------------+
+       | item | item | ... | item |
+       +--------------------------+
+
+       A flow has a maximum width that it can reach before the items
+       begin to wrap:
+       +-------------+
+       | item | item |
+       | ...  | item |
+       +-------------+
+
+       _why has said, &quot;in Shoes (and Sandals), just as on the web,
+                       width is generally fixed. While height goes on
+                       and on.&quot;
+    */
+
+    public Flow() {
+	super();
+	setLayout(new FlowLayout(FlowLayout.LEFT, 5, 5));
+    }
+
+    public Flow(Component comp) {
+	super(comp);
+	setLayout(new FlowLayout(FlowLayout.LEFT, 5, 5));
+    }
 }
\ No newline at end of file</diff>
      <filename>beachhouse/Flow.java</filename>
    </modified>
    <modified>
      <diff>@@ -1,37 +1,37 @@
-package beachhouse;
-
-import java.awt.Component;
-import java.util.Observable;
-import java.util.Observer;
-import javax.swing.JPanel;
-import beachhouse.BeachStyle;
-
-public class LayoutWidget extends JPanel implements Observer {
-    public BeachStyle style;
-
-    public LayoutWidget() {
-	super();
-	style = new BeachStyle(this);
-	style.reset();
-    }
-
-    public LayoutWidget(Component comp) {
-	super();
-	style = new BeachStyle(this);
-	style.reset();
-	add(comp);
-    }
-
-    public void update(Observable o, Object arg) {
-	this.update((String)arg);
-    }
-
-    public void update(String key) {
-	if (key.equals(&quot;background&quot;))
-	    setBackground(style.getBackgroundColor());
-	else if (key.equals(&quot;color&quot;))
-	    setForeground(style.getColor());
-	else if (key.equals(&quot;opacity&quot;))
-	    setOpaque(style.getOpacity() &gt; 0.0);
-    }
+package beachhouse;
+
+import java.awt.Component;
+import java.util.Observable;
+import java.util.Observer;
+import javax.swing.JPanel;
+import beachhouse.BeachStyle;
+
+public class LayoutWidget extends JPanel implements Observer {
+    public BeachStyle style;
+
+    public LayoutWidget() {
+	super();
+	style = new BeachStyle(this);
+	style.reset();
+    }
+
+    public LayoutWidget(Component comp) {
+	super();
+	style = new BeachStyle(this);
+	style.reset();
+	add(comp);
+    }
+
+    public void update(Observable o, Object arg) {
+	this.update((String)arg);
+    }
+
+    public void update(String key) {
+	if (key.equals(&quot;background&quot;))
+	    setBackground(style.getBackgroundColor());
+	else if (key.equals(&quot;color&quot;))
+	    setForeground(style.getColor());
+	else if (key.equals(&quot;opacity&quot;))
+	    setOpaque(style.getOpacity() &gt; 0.0);
+    }
 }
\ No newline at end of file</diff>
      <filename>beachhouse/LayoutWidget.java</filename>
    </modified>
    <modified>
      <diff>@@ -1,93 +1,100 @@
-package beachhouse;
-
-import java.util.Observable;
-import java.util.Observer;
-import javax.swing.JTextPane;
-import beachhouse.BeachStyle;
-
-public class TextBlock extends JTextPane implements Observer {
-    public BeachStyle style;
-
-    public static TextBlock Banner(String text) {
-	TextBlock t = new TextBlock(text);
-	t.style.setFontSize(48);
-	return t;
-    }
-
-    public static TextBlock Title(String text) {
-	TextBlock t = new TextBlock(text);
-	t.style.setFontSize(34);
-	return t;
-    }
-
-    public static TextBlock Subtitle(String text) {
-	TextBlock t = new TextBlock(text);
-	t.style.setFontSize(26);
-	return t;
-    }
-
-    public static TextBlock Tagline(String text) {
-	TextBlock t = new TextBlock(text);
-	t.style.setFontSize(18);
-	return t;
-    }
-
-    public static TextBlock Caption(String text) {
-	TextBlock t = new TextBlock(text);
-	t.style.setFontSize(14);
-	return t;
-    }
-
-    public static TextBlock Para(String text) {
-	TextBlock t = new TextBlock(text);
-	t.style.setFontSize(12);
-	return t;
-    }
-
-    public static TextBlock Inscription(String text) {
-	TextBlock t = new TextBlock(text);
-	t.style.setFontSize(10);
-	return t;
-    }
-
-    public TextBlock() {
-	super();
-	setEnabled(false);
-	style = new BeachStyle(this);
-	style.reset();
-    }
-
-    public TextBlock(String text) {
-	super();
-	setText(text);
-	setEnabled(false);
-	style = new BeachStyle(this);
-	style.reset();
-    }
-
-    /** Sets the Style for a region of text in the StyledDocument. It
-     * replaces the previous style of the characters there.
-     */
-    public BeachStyle setRegionStyle(int offset, int length, BeachStyle attrs) {
-	getStyledDocument().setCharacterAttributes(offset, length,
-						   attrs.toTextAttributes(addStyle(null, null)),
-						   true);
-	return attrs;
-    }
-
-    public void update(Observable o, Object arg) {
-	this.update((String)arg);
-    }
-
-    public void update(String key) {
-	//System.out.println(&quot;update with: &quot; + key);
-	if (key.equals(&quot;background-color&quot;))
-	    setBackground(style.getBackgroundColor());
-	else if (key.equals(&quot;color&quot;))
-	    setDisabledTextColor(style.getColor());
-	else if (key.equals(&quot;opacity&quot;))
-	    setVisible(style.getOpacity() &gt; 0.0);
-	repaint();
-    }
-
+package beachhouse;
+
+import java.util.Observable;
+import java.util.Observer;
+import javax.swing.JTextPane;
+import beachhouse.BeachStyle;
+
+public class TextBlock extends JTextPane implements Observer {
+    public BeachStyle style;
+
+    public static TextBlock Banner(String text) {
+	TextBlock t = new TextBlock(text);
+	t.style.setFontSize(48);
+	return t;
+    }
+
+    public static TextBlock Title(String text) {
+	TextBlock t = new TextBlock(text);
+	t.style.setFontSize(34);
+	return t;
+    }
+
+    public static TextBlock Subtitle(String text) {
+	TextBlock t = new TextBlock(text);
+	t.style.setFontSize(26);
+	return t;
+    }
+
+    public static TextBlock Tagline(String text) {
+	TextBlock t = new TextBlock(text);
+	t.style.setFontSize(18);
+	return t;
+    }
+
+    public static TextBlock Caption(String text) {
+	TextBlock t = new TextBlock(text);
+	t.style.setFontSize(14);
+	return t;
+    }
+
+    public static TextBlock Para(String text) {
+	TextBlock t = new TextBlock(text);
+	t.style.setFontSize(12);
+	return t;
+    }
+
+    public static TextBlock Inscription(String text) {
+	TextBlock t = new TextBlock(text);
+	t.style.setFontSize(10);
+	return t;
+    }
+
+    public TextBlock() {
+	super();
+	setText(&quot;&quot;);
+	setEnabled(false);
+	style = new BeachStyle(this);
+	style.reset();
+    }
+
+    public TextBlock(String text) {
+	super();
+	setText(text);
+	setEnabled(false);
+	style = new BeachStyle(this);
+	style.reset();
+    }
+
+    public void appendText(String text, BeachStyle s) {
+	int offset = getText().length();
+	setText(getText() + text);
+	setRegionStyle(offset, text.length(), s);
+    }
+
+    /** Sets the Style for a region of text in the StyledDocument. It
+     * replaces the previous style of the characters there.
+     */
+    public BeachStyle setRegionStyle(int offset, int length, BeachStyle attrs) {
+	getStyledDocument().setCharacterAttributes(offset, length,
+						   attrs.toTextAttributes(addStyle(null, null)),
+						   true);
+	return attrs;
+    }
+
+    public void update(Observable o, Object arg) {
+	this.update((String)arg);
+    }
+
+    public void update(String key) {
+	//System.out.println(&quot;update with: &quot; + key);
+	if (key.equals(&quot;background-color&quot;))
+	    setBackground(style.getBackgroundColor());
+	else if (key.equals(&quot;color&quot;))
+	    setDisabledTextColor(style.getColor());
+	else if (key.equals(&quot;opacity&quot;))
+	    setVisible(style.getOpacity() &gt; 0.0);
+	repaint();
+    }
+
 }
\ No newline at end of file</diff>
      <filename>beachhouse/TextBlock.java</filename>
    </modified>
    <modified>
      <diff>@@ -1,71 +1,71 @@
-package beachhouse.util;
-
-import java.awt.Color;
-import java.lang.Float;
-import java.lang.Integer;
-import java.util.regex.Matcher;
-import java.util.regex.Pattern;
-
-/**
- * Converts a string that specifies a color into a Java AWT Color
- * object. The accepted forms of string color specification are:
- * &quot;#f08&quot;, &quot;#ff0088&quot;, &quot;rgb(255,0,128)&quot;, &quot;rgb(100%, 0%, 50%)&quot; and
- * &quot;color-name&quot;.
- */
-public class ColorMaker {
-    // RGB short-hand to long-hand co-efficient (calculated by 10
-    // thousand long-bearded wizards in a dark, damp room.)
-    // http://en.wikipedia.org/wiki/Xyzzy
-    final static float xyzzy = 17;
-    // RGB long-hand
-    final static Pattern rrggbb_re = Pattern.compile(&quot;^#([a-f0-9]{2}){3}$&quot;);
-    // RGB short-hand
-    final static Pattern rgb_re = Pattern.compile(&quot;^#([a-f0-9]){3}$&quot;);
-    // Integer range (RGB or RGBA)
-    final static Pattern range_re = Pattern.compile(&quot;^rgb\\((\\d+)(?:,(\\d+)){2,3}\\)$&quot;);
-    // X11 color name
-    final static Pattern color_name_re = Pattern.compile(&quot;^[a-z]+$&quot;);
-
-    public static Color parseColor(String s) {
-	Matcher m;
-	m = rrggbb_re.matcher(s);
-	if (m.matches())
-	    return new Color(Integer.parseInt(m.group(1), 16),
-			     Integer.parseInt(m.group(2), 16),
-			     Integer.parseInt(m.group(3), 16));
-	m = rgb_re.matcher(s);
-	if (m.matches())
-	    return new Color(Integer.parseInt(m.group(1), 16) * xyzzy,
-			     Integer.parseInt(m.group(2), 16) * xyzzy,
-			     Integer.parseInt(m.group(3), 16) * xyzzy);
-	m = range_re.matcher(s);
-	if (m.matches()) {
-	    if (m.groupCount() == 3)
-		return new Color(Integer.parseInt(m.group(1)),
-				 Integer.parseInt(m.group(2)),
-				 Integer.parseInt(m.group(3)));
-	    else if (m.groupCount() == 4)
-		return new Color(Integer.parseInt(m.group(1)),
-				 Integer.parseInt(m.group(2)),
-				 Integer.parseInt(m.group(3)),
-				 Integer.parseInt(m.group(4)));
-	}
-	m = color_name_re.matcher(s);
-	if (m.matches())
-	    try {
-		return (Color)Colors.class.getField(s).get(null);
-	    } catch (IllegalAccessException e) {
-		// No idea when this will come up...stupid Java
-	    } catch (NoSuchFieldException e) {
-		// No such color name
-
-		// A way to be helpful is to examine the list of
-		// fields and use a regular expression to see which
-		// ones match closely. It could be a spelling mistake
-		// problem after all!
-		return Color.black;
-	    }
-	// Todo: Throw an exception
-	return Color.red;
-    }
+package beachhouse.util;
+
+import java.awt.Color;
+import java.lang.Float;
+import java.lang.Integer;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+/**
+ * Converts a string that specifies a color into a Java AWT Color
+ * object. The accepted forms of string color specification are:
+ * &quot;#f08&quot;, &quot;#ff0088&quot;, &quot;rgb(255,0,128)&quot;, &quot;rgb(100%, 0%, 50%)&quot; and
+ * &quot;color-name&quot;.
+ */
+public class ColorMaker {
+    // RGB short-hand to long-hand co-efficient (calculated by 10
+    // thousand long-bearded wizards in a dark, damp room.)
+    // http://en.wikipedia.org/wiki/Xyzzy
+    final static float xyzzy = 17;
+    // RGB long-hand
+    final static Pattern rrggbb_re = Pattern.compile(&quot;^#([a-f0-9]{2}){3}$&quot;);
+    // RGB short-hand
+    final static Pattern rgb_re = Pattern.compile(&quot;^#([a-f0-9]){3}$&quot;);
+    // Integer range (RGB or RGBA)
+    final static Pattern range_re = Pattern.compile(&quot;^rgb\\((\\d+)(?:,(\\d+)){2,3}\\)$&quot;);
+    // X11 color name
+    final static Pattern color_name_re = Pattern.compile(&quot;^[a-z]+$&quot;);
+
+    public static Color parseColor(String s) {
+	Matcher m;
+	m = rrggbb_re.matcher(s);
+	if (m.matches())
+	    return new Color(Integer.parseInt(m.group(1), 16),
+			     Integer.parseInt(m.group(2), 16),
+			     Integer.parseInt(m.group(3), 16));
+	m = rgb_re.matcher(s);
+	if (m.matches())
+	    return new Color(Integer.parseInt(m.group(1), 16) * xyzzy,
+			     Integer.parseInt(m.group(2), 16) * xyzzy,
+			     Integer.parseInt(m.group(3), 16) * xyzzy);
+	m = range_re.matcher(s);
+	if (m.matches()) {
+	    if (m.groupCount() == 3)
+		return new Color(Integer.parseInt(m.group(1)),
+				 Integer.parseInt(m.group(2)),
+				 Integer.parseInt(m.group(3)));
+	    else if (m.groupCount() == 4)
+		return new Color(Integer.parseInt(m.group(1)),
+				 Integer.parseInt(m.group(2)),
+				 Integer.parseInt(m.group(3)),
+				 Integer.parseInt(m.group(4)));
+	}
+	m = color_name_re.matcher(s);
+	if (m.matches())
+	    try {
+		return (Color)Colors.class.getField(s).get(null);
+	    } catch (IllegalAccessException e) {
+		// No idea when this will come up...stupid Java
+	    } catch (NoSuchFieldException e) {
+		// No such color name
+
+		// A way to be helpful is to examine the list of
+		// fields and use a regular expression to see which
+		// ones match closely. It could be a spelling mistake
+		// problem after all!
+		return Color.black;
+	    }
+	// Todo: Throw an exception
+	return Color.red;
+    }
 }
\ No newline at end of file</diff>
      <filename>beachhouse/util/ColorMaker.java</filename>
    </modified>
    <modified>
      <diff>@@ -1,99 +1,156 @@
-package beachhouse.util;
-
-import java.awt.Color;
-
-// Taken from http://www.w3.org/TR/css3-color/#svg-color
-
-public class Colors {
-    public static Color aliceblue = new Color(240, 248, 255);
-    public static Color antiquewhite = new Color(250, 235, 215);
-    public static Color aqua = Color.cyan;
-    public static Color aquamarine = new Color(127, 255, 212);
-    public static Color azure = new Color(240, 255, 255);
-    public static Color beige = new Color(245, 245, 220);
-    public static Color bisque = new Color(255, 228, 196);
-    public static Color black = Color.black;
-    public static Color blanchedalmond = new Color(255, 235, 205);
-    public static Color blue = Color.blue;
-    public static Color blueviolet = new Color(138, 43, 226);
-    public static Color brown = new Color(165, 42, 42);
-    public static Color burlywood = new Color(222, 184, 135);
-    public static Color cadetblue = new Color(95, 158, 160);
-    public static Color chartreuse = new Color(127, 255, 0);
-    public static Color chocolate = new Color(210, 105, 30);
-    public static Color coral = new Color(255, 127, 80);
-    public static Color cornflowerblue = new Color(100, 149, 237);
-    public static Color cornsilk = new Color(255, 248, 220);
-    public static Color crimson = new Color(220, 20, 60);
-    public static Color cyan = Color.cyan;
-    public static Color darkblue = new Color(0, 0, 139);
-    public static Color darkcyan = new Color(0, 139, 139);
-    public static Color darkgoldenrod = new Color(184, 134, 11);
-    public static Color darkgray = new Color(169, 169, 169);
-    public static Color darkgreen = new Color(0, 100, 0);
-    public static Color darkgrey = darkgray;
-    public static Color darkkhaki = new Color(189, 183, 107);
-    public static Color darkmagenta = new Color(139, 0, 139);
-    public static Color darkolivegreen = new Color(85, 107, 47);
-    public static Color darkorange = new Color(255, 140, 0);
-    public static Color darkorchid = new Color(153, 50, 204);
-    public static Color darkred = new Color(139, 0, 0);
-    public static Color darksalmon = new Color(233, 150, 122);
-    public static Color darkseagreen = new Color(143, 188, 143);
-    public static Color darkslateblue = new Color(72, 61, 139);
-    public static Color darkslategray = new Color(47, 79, 79);
-    public static Color darkslategrey = darkslategray;
-    public static Color darkturquoise = new Color(0, 206, 209);
-    public static Color darkviolet = new Color(148, 0, 211);
-    public static Color deeppink = new Color(255, 20, 147);
-    public static Color deepskyblue = new Color(0, 191, 255);
-    public static Color dimgray = new Color(105, 105, 105);
-    public static Color dimgrey = dimgray;
-    public static Color dodgerblue = new Color(30, 144, 255);
-    public static Color firebrick = new Color(178, 34, 34);
-    public static Color floralwhite = new Color(255, 250, 240);
-    public static Color forestgreen = new Color(34, 139, 34);
-    public static Color fuchsia = new Color(255, 0, 255);
-    public static Color gainsboro = new Color(220, 220, 220);
-    public static Color ghostwhite = new Color(248, 248, 255);
-    public static Color gold = new Color(255, 215, 0);
-    public static Color goldenrod = new Color(218, 165, 32);
-    public static Color gray = new Color(128, 128, 128);
-    public static Color green = new Color(0, 128, 0);
-    public static Color greenyellow = new Color(173, 255, 47);
-    public static Color grey = gray;
-    public static Color honeydew = new Color(240, 255, 240);
-    public static Color hotpink = new Color(255, 105, 180);
-    public static Color indianred = new Color(205, 92, 92);
-    public static Color indigo = new Color(75, 0, 130);
-    public static Color ivory = new Color(255, 255, 240);
-    public static Color khaki = new Color(240, 230, 140);
-    public static Color lavender = new Color(230, 230, 250);
-    public static Color lavenderblush = new Color(255, 240, 245);
-    public static Color lawngreen = new Color(124, 252, 0);
-    public static Color lemonchiffon = new Color(255, 250, 205);
-    public static Color lightblue = new Color(173, 216, 230);
-    public static Color lightcoral = new Color(240, 128, 128);
-    public static Color lightcyan = new Color(224, 255, 255);
-    public static Color lightgoldenrodyellow = new Color(250, 250, 210);
-    public static Color lightgray = new Color(211, 211, 211);
-    public static Color lightgreen = new Color(144, 238, 144);
-    public static Color lightgrey = lightgray;
-    /*
-    public static Color lightpink = new Color(, , );
-    public static Color lightsalmon = new Color(, , );
-    public static Color lightseagreen = new Color(, , );
-    public static Color lightskyblue = new Color(, , );
-    public static Color lightslategray = new Color(, , );
-    public static Color lightslategrey = new Color(, , );
-    public static Color lightsteelblue = new Color(, , );
-    public static Color lightyellow = new Color(, , );
-    public static Color lime = new Color(, , );
-    public static Color limegreen = new Color(, , );
-    public static Color linen = new Color(, , );
-    public static Color magenta = Color.magenta;
-    public static Color maroon = new Color(, , );
-    public static Color mediumaquamarine = new Color(, , );
-    */
-    public static Color white = Color.white;
+package beachhouse.util;
+
+import java.awt.Color;
+
+// Taken from http://www.w3.org/TR/css3-color/#svg-color
+// Also borrowed from the Shoes Manual
+
+public class Colors {
+    public static Color aliceblue = new Color(240, 248, 255);
+    public static Color antiquewhite = new Color(250, 235, 215);
+    public static Color aqua = Color.cyan;
+    public static Color aquamarine = new Color(127, 255, 212);
+    public static Color azure = new Color(240, 255, 255);
+    public static Color beige = new Color(245, 245, 220);
+    public static Color bisque = new Color(255, 228, 196);
+    public static Color black = Color.black;
+    public static Color blanchedalmond = new Color(255, 235, 205);
+    public static Color blue = Color.blue;
+    public static Color blueviolet = new Color(138, 43, 226);
+    public static Color brown = new Color(165, 42, 42);
+    public static Color burlywood = new Color(222, 184, 135);
+    public static Color cadetblue = new Color(95, 158, 160);
+    public static Color chartreuse = new Color(127, 255, 0);
+    public static Color chocolate = new Color(210, 105, 30);
+    public static Color coral = new Color(255, 127, 80);
+    public static Color cornflowerblue = new Color(100, 149, 237);
+    public static Color cornsilk = new Color(255, 248, 220);
+    public static Color crimson = new Color(220, 20, 60);
+    public static Color cyan = Color.cyan;
+    public static Color darkblue = new Color(0, 0, 139);
+    public static Color darkcyan = new Color(0, 139, 139);
+    public static Color darkgoldenrod = new Color(184, 134, 11);
+    public static Color darkgray = new Color(169, 169, 169);
+    public static Color darkgreen = new Color(0, 100, 0);
+    public static Color darkgrey = darkgray;
+    public static Color darkkhaki = new Color(189, 183, 107);
+    public static Color darkmagenta = new Color(139, 0, 139);
+    public static Color darkolivegreen = new Color(85, 107, 47);
+    public static Color darkorange = new Color(255, 140, 0);
+    public static Color darkorchid = new Color(153, 50, 204);
+    public static Color darkred = new Color(139, 0, 0);
+    public static Color darksalmon = new Color(233, 150, 122);
+    public static Color darkseagreen = new Color(143, 188, 143);
+    public static Color darkslateblue = new Color(72, 61, 139);
+    public static Color darkslategray = new Color(47, 79, 79);
+    public static Color darkslategrey = darkslategray;
+    public static Color darkturquoise = new Color(0, 206, 209);
+    public static Color darkviolet = new Color(148, 0, 211);
+    public static Color deeppink = new Color(255, 20, 147);
+    public static Color deepskyblue = new Color(0, 191, 255);
+    public static Color dimgray = new Color(105, 105, 105);
+    public static Color dimgrey = dimgray;
+    public static Color dodgerblue = new Color(30, 144, 255);
+    public static Color firebrick = new Color(178, 34, 34);
+    public static Color floralwhite = new Color(255, 250, 240);
+    public static Color forestgreen = new Color(34, 139, 34);
+    public static Color fuchsia = new Color(255, 0, 255);
+    public static Color gainsboro = new Color(220, 220, 220);
+    public static Color ghostwhite = new Color(248, 248, 255);
+    public static Color gold = new Color(255, 215, 0);
+    public static Color goldenrod = new Color(218, 165, 32);
+    public static Color gray = new Color(128, 128, 128);
+    public static Color green = new Color(0, 128, 0);
+    public static Color greenyellow = new Color(173, 255, 47);
+    public static Color grey = gray;
+    public static Color honeydew = new Color(240, 255, 240);
+    public static Color hotpink = new Color(255, 105, 180);
+    public static Color indianred = new Color(205, 92, 92);
+    public static Color indigo = new Color(75, 0, 130);
+    public static Color ivory = new Color(255, 255, 240);
+    public static Color khaki = new Color(240, 230, 140);
+    public static Color lavender = new Color(230, 230, 250);
+    public static Color lavenderblush = new Color(255, 240, 245);
+    public static Color lawngreen = new Color(124, 252, 0);
+    public static Color lemonchiffon = new Color(255, 250, 205);
+    public static Color lightblue = new Color(173, 216, 230);
+    public static Color lightcoral = new Color(240, 128, 128);
+    public static Color lightcyan = new Color(224, 255, 255);
+    public static Color lightgoldenrodyellow = new Color(250, 250, 210);
+    public static Color lightgray = new Color(211, 211, 211);
+    public static Color lightgreen = new Color(144, 238, 144);
+    public static Color lightgrey = lightgray;
+    public static Color lightpink = new Color(255, 182, 193);
+    public static Color lightsalmon = new Color(255, 160, 122);
+    public static Color lightseagreen = new Color(32, 178, 170);
+    public static Color lightskyblue = new Color(135, 206, 250);
+    public static Color lightslategray = new Color(119, 136, 153);
+    public static Color lightslategrey = lightslategray;
+    public static Color lightsteelblue = new Color(176, 196, 222);
+    public static Color lightyellow = new Color(255, 255, 224);
+    public static Color lime = new Color(0, 255, 0);
+    public static Color limegreen = new Color(50, 205, 50);
+    public static Color linen = new Color(250, 240, 224);
+    public static Color magenta = Color.magenta;
+    public static Color maroon = new Color(128, 0, 0);
+    public static Color mediumaquamarine = new Color(102, 205, 170);
+    public static Color mediumblue = new Color(0, 0, 205);
+    public static Color mediumorchid = new Color(186, 85, 211);
+    public static Color mediumpurple = new Color(147, 112, 219);
+    public static Color mediumseagreen = new Color(60, 179, 113);
+    public static Color mediumslateblue = new Color(123, 104, 238);
+    public static Color mediumspringgreen = new Color(0, 250, 154);
+    public static Color mediumturquoise = new Color(72, 209, 204);
+    public static Color mediumvioletred = new Color(199, 21, 133);
+    public static Color midnightblue = new Color(25, 25, 112);
+    public static Color mintcream = new Color(245, 255, 250);
+    public static Color mistyrose = new Color(255, 228, 225);
+    public static Color moccasin = new Color(255, 228, 181);
+    public static Color navajowhite = new Color(255, 222, 173);
+    public static Color navy = new Color(0, 0, 128);
+    public static Color oldlace = new Color(253, 245, 230);
+    public static Color olive = new Color(128, 128, 0);
+    public static Color olivedrab = new Color(107, 142, 35);
+    public static Color orange = new Color(255, 165, 0);
+    public static Color orangered = new Color(255, 69, 0);
+    public static Color orchid = new Color(218, 112, 214);
+    public static Color palegoldenrod = new Color(238, 232, 170);
+    public static Color palegreen = new Color(152, 251, 152);
+    public static Color paleturquoise = new Color(175, 238, 238);
+    public static Color palevioletred = new Color(219, 112, 147);
+    public static Color papayawhip = new Color(255, 239, 213);
+    public static Color peachpuff = new Color(255, 218, 185);
+    public static Color peru = new Color(205, 133, 63);
+    public static Color pink = new Color(255, 192, 203);
+    public static Color plum = new Color(221, 160, 221);
+    public static Color powderblue = new Color(176, 224, 230);
+    public static Color purple = new Color(128, 0, 128);
+    public static Color red = new Color(255, 0, 0);
+    public static Color rosybrown = new Color(188, 143, 143);
+    public static Color royalblue = new Color(65, 105, 225);
+    public static Color saddlebrown = new Color(139, 69, 19);
+    public static Color salmon = new Color(250, 128, 114);
+    public static Color sandybrown = new Color(244, 164, 96);
+    public static Color seagreen = new Color(46, 139, 87);
+    public static Color seashell = new Color(255, 245, 238);
+    public static Color sienna = new Color(160, 82, 45);
+    public static Color silver = new Color(192, 192, 192);
+    public static Color skyblue = new Color(135, 206, 235);
+    public static Color slateblue = new Color(106, 90, 205);
+    public static Color slategray = new Color(112, 128, 144);
+    public static Color slategrey = slategray;
+    public static Color snow = new Color(255, 250, 250);
+    public static Color springgreen = new Color(0, 255, 127);
+    public static Color steelblue = new Color(70, 130, 180);
+    public static Color tan = new Color(210, 180, 140);
+    public static Color teal = new Color(0, 128, 128);
+    public static Color thistle = new Color(216, 191, 216);
+    public static Color tomato = new Color(255, 99, 71);
+    public static Color turquoise = new Color(64, 224, 208);
+    public static Color violet = new Color(238, 130, 238);
+    public static Color wheat = new Color(245, 222, 179);
+    public static Color white = Color.white;
+    public static Color whitesmoke = new Color(245, 245, 245);
+    public static Color yellow = Color.yellow;
+    public static Color yellowgreen = new Color(154, 205, 50);
 }
\ No newline at end of file</diff>
      <filename>beachhouse/util/Colors.java</filename>
    </modified>
    <modified>
      <diff>@@ -1,170 +1,157 @@
-/* Sandals - a JavaScript/Rhino version of _why's Shoes library
- *           for Ruby that uses Java's Swing library
- * Copyright (C) 2008, Rudolf Olah
- */
-
-importPackage(java.awt);
-importPackage(javax.swing);
-importPackage(javax.swing.text);
-importPackage(Packages.beachhouse);
-importPackage(Packages.beachhouse.util);
-
-/*** STYLE STUFF ***/
-function inherit_style (parent, child) {
-  var name = '';
-  var merged = new Object();
-  for (name in parent)
-    merged[name] = parent[name];
-  for (name in child)
-    merged[name] = child[name];
-  return merged;
-}
-
-function has_style (args, position) {
-  var x = position &gt;= 0 ? args[position] : args[args.length + position];
-  if (x instanceof Object)
-    return x;
-  return false;
-}
-
-function extract_style (default_style, args, position) {
-  var user_style = has_style(args, position);
-  if (user_style)
-    return inherit_style(default_style, user_style);
-  return default_style;
-}
-
-function js_to_beach_style (js, bs) {
-  if (&quot;color&quot; in js)
-    bs.setColor(js.color);
-  if (&quot;background&quot; in js)
-    bs.setBackground(js.background);
-  bs.setResizable(&quot;resizable&quot; in js &amp;&amp; js.resizable ? true : false);
-  bs.setBold(&quot;bold&quot; in js &amp;&amp; js.bold ? true : false);
-  bs.setItalic(&quot;italic&quot; in js &amp;&amp; js.italic ? true : false);
-  bs.setUnderline(&quot;underline&quot; in js &amp;&amp; js.underline ? true : false);
-  bs.setFontSize(&quot;size&quot; in js ? js.size : 12);
-}
-
-/*** STYLED TEXT ***/
-function StyledText (text) {
-  if (arguments.length == 0 || arguments.length &gt; 2)
-    throw Error(&quot;Too many arguments.&quot;);
-  this.style = (arguments.length == 2 ? arguments[1] : new Object() );
-  if (text instanceof StyledText) {
-    this.text = text.text;
-    this.style = inherit_style(this.style, text.style);
-  } else {
-    this.text = text;
-  }
-}
-
-/*** SANDAL STUFF ***/
-var Sandals = new Object();
-Sandals.RELEASE_NAME = &quot;Rootbeer&quot;;
-Sandals.RELEASE_ID = 0;
-
-Sandals.app = function () {
-  if (arguments.length == 0)
-    throw Error(&quot;Sandals requires style, or things to display&quot;);
-  this.style = extract_style({ width: 200, resizable: false,
-			       background: &quot;white&quot;, color: &quot;black&quot; },
-			     arguments, 0);
-  print(&quot;Slipping feet into Sandals.&quot;);
-  this.window = new AppWindow();
-  js_to_beach_style(this.style, this.window.style);
-
-  with (this.window) {
-    for (var i = (has_style(arguments, 0) ? 1 : 0); i &lt; arguments.length; i++) {
-      var preferred = arguments[i].getPreferredSize();
-      arguments[i].setPreferredSize(new Dimension(this.style.width, preferred.height * ((preferred.width / this.style.width) + 0.75)));
-      add(arguments[i]);
-    }
-  }
-  this.window.go();
-  print(&quot;Walking in Sandals.&quot;);
-};
-
-/*** LAYOUT STUFF ***/
-Sandals.stack = function () {
-  var layout = new Stack();
-  for (var i = 0; i &lt; arguments.length; i++)
-    layout.add(arguments[i]);
-  return layout;
-};
-
-Sandals.flow = function () {
-  var layout = new Flow();
-  for (var i = 0; i &lt; arguments.length; i++)
-    layout.add(arguments[i]);
-  return layout;
-};
-
-/*** TEXT BLOCKS STUFF ***/
-function combine_text (text) {
-  var final_text = &quot;&quot;;
-  var styles = new Array();
-  var offset = 0;
-  if (text[0] instanceof StyledText) {
-    styles.push([offset, text[i].text.length, text[i].style]);
-    offset += text[0].text.length;
-    final_text = text[0].text;
-  } else {
-    offset += text[0].length;
-    final_text = text[0];
-  }
-  offset++; // First space is added
-  for (var i = 0; i &lt; text.length; i++) {
-    if (text[i] instanceof StyledText) {
-      styles.push([offset, text[i].text.length, text[i].style]);
-      offset += text[i].text.length;
-      final_text += &quot; &quot; + text[i].text;
-    } else {
-      offset += text[i].length;
-      final_text += &quot; &quot; + text[i];
-    }
-    offset++;
-  }
-  return [final_text, styles];
-}
-
-Sandals.para = function () {
-  var style = extract_style({ background: &quot;white&quot;, color: &quot;black&quot; },
-			    arguments, -1);
-  var final_text, styles, offset;
-  [final_text, styles] = combine_text(arguments);
-  var text = TextBlock.Para(final_text);
-  // Setup whatever styles were added
-  for each (var x in styles) {
-    var bs = new BeachStyle();
-    js_to_beach_style(inherit_style(style, x[2]), bs);
-    text.setRegionStyle(x[0], x[1], bs);
-  }
-  js_to_beach_style(style, text.style);
-  return text;
-};
-
-Sandals.title = function () {
-  return TextBlock.Title(arguments[0]);
-};
-
-Sandals.caption = function () {
-  var style = extract_style({ size: 14 }, arguments, -1);
-  return this.para();
-};
-
-Sandals.strong = function (text) {
-  return new StyledText(text, extract_style({ bold: true }, arguments, -1));
-};
-
-Sandals.em = function (text) {
-  return new StyledText(text, extract_style({ italic: true }, arguments, -1));
-};
-
-Sandals.code = function (text) {
-  return new StyledText(text, extract_style({ code: true }, arguments, -1));
-};
-
-Sandals.ins = function (text) {
-  return new StyledText(text, extract_style({ underline: true }, arguments, -1));
-};
+/* Sandals - a JavaScript/Rhino version of _why's Shoes library
+ *           for Ruby that uses Java's Swing library
+ * Copyright (C) 2008, Rudolf Olah
+ */
+
+importPackage(java.awt);
+importPackage(javax.swing);
+importPackage(javax.swing.text);
+importPackage(Packages.beachhouse);
+importPackage(Packages.beachhouse.util);
+
+/*** STYLE STUFF ***/
+function inherit_style (parent, child) {
+  var name = '';
+  var merged = new Object();
+  for (name in parent)
+    merged[name] = parent[name];
+  for (name in child)
+    merged[name] = child[name];
+  return merged;
+}
+
+function has_style (args, position) {
+  var x = position &gt;= 0 ? args[position] : args[args.length + position];
+  if (x instanceof Object)
+    return x;
+  return false;
+}
+
+function extract_style (default_style, args, position) {
+  var user_style = has_style(args, position);
+  if (user_style)
+    return inherit_style(default_style, user_style);
+  return default_style;
+}
+
+function js_to_beach_style (js, bs) {
+  if (&quot;color&quot; in js)
+    bs.setColor(js.color);
+  if (&quot;background&quot; in js)
+    bs.setBackground(js.background);
+  bs.setResizable(&quot;resizable&quot; in js &amp;&amp; js.resizable ? true : false);
+  bs.setBold(&quot;bold&quot; in js &amp;&amp; js.bold ? true : false);
+  bs.setItalic(&quot;italic&quot; in js &amp;&amp; js.italic ? true : false);
+  bs.setUnderline(&quot;underline&quot; in js &amp;&amp; js.underline ? true : false);
+  bs.setFontSize(&quot;size&quot; in js ? js.size : 12);
+}
+
+/*** STYLED TEXT ***/
+function StyledText (text) {
+  if (arguments.length == 0 || arguments.length &gt; 2)
+    throw Error(&quot;Too many arguments.&quot;);
+  this.style = (arguments.length == 2 ? arguments[1] : new Object() );
+  if (text instanceof StyledText) {
+    this.text = text.text;
+    this.style = inherit_style(this.style, text.style);
+  } else {
+    this.text = text;
+  }
+}
+
+/*** SANDAL STUFF ***/
+var Sandals = new Object();
+Sandals.RELEASE_NAME = &quot;Rootbeer&quot;;
+Sandals.RELEASE_ID = 1;
+/*
+Sandals.app = function () {
+  if (arguments.length == 0)
+    throw Error(&quot;Sandals requires style, or things to display&quot;);
+  this.style = extract_style({ width: 500, height: 600, resizable: true,
+			       background: &quot;grey&quot;, color: &quot;black&quot; },
+			     arguments, 0);
+
+  this.window = new AppWindow();
+  js_to_beach_style(this.style, this.window.style);
+  var blah = function () {
+  var app = {
+    get name() { return this.window.getTitle(); },
+    set name(x) { this.window.setTitle(x); },
+    location: java.lang.System.getProperty(&quot;user.dir&quot;)
+  };
+  arguments[0]();
+  this.window.go();
+  print(&quot;Walking on to the beach.&quot;);
+};
+*/
+try {
+  if (app.started)
+    print(&quot;Sandals application already running.&quot;);
+} catch (ReferenceError) {
+  /* There will only ever be one Sandals application running at a time. */
+  var app = new Object;
+}
+
+Sandals.go = function (body) {
+  this.app_window = new AppWindow();
+  app.__defineGetter__(&quot;name&quot;, function () { return Sandals.app_window.name; });
+  app.__defineSetter__(&quot;name&quot;, function (x) { Sandals.app_window.name = x; });
+  app.location = this.app_window.getCurrentDirectory();
+  print(&quot;Slipping feet into Sandals.&quot;);
+  body();
+  this.app_window.go();
+  print(&quot;Walking on to the beach.&quot;);
+}
+
+/*** LAYOUT STUFF ***/
+Sandals.stack = function () {
+  var layout = new Stack();
+  for (var i = 0; i &lt; arguments.length; i++)
+    layout.add(arguments[i]);
+  return layout;
+};
+
+Sandals.flow = function () {
+  var layout = new Flow();
+  for (var i = 0; i &lt; arguments.length; i++)
+    layout.add(arguments[i]);
+  return layout;
+};
+
+/*** TEXT BLOCKS STUFF ***/
+Sandals.para = function () {
+  print(&quot;Arguments to para: &quot; + arguments[0]);
+  var style = extract_style({ background: &quot;white&quot;, color: &quot;black&quot; },
+			    arguments, -1);
+  var text = TextBlock.Para(&quot;&quot;);
+  for each (var x in arguments) {
+    text.appendText(x);
+  }
+  js_to_beach_style(style, text.style);
+  this.app_window.add(text);
+};
+
+Sandals.title = function () {
+  return TextBlock.Title(arguments[0]);
+};
+
+Sandals.caption = function () {
+  var style = extract_style({ size: 14 }, arguments, -1);
+  return this.para();
+};
+
+Sandals.strong = function (text) {
+  return new StyledText(text, extract_style({ bold: true }, arguments, -1));
+};
+
+Sandals.em = function (text) {
+  return new StyledText(text, extract_style({ italic: true }, arguments, -1));
+};
+
+Sandals.code = function (text) {
+  return new StyledText(text, extract_style({ code: true }, arguments, -1));
+};
+
+Sandals.ins = function (text) {
+  return new StyledText(text, extract_style({ underline: true }, arguments, -1));
+};</diff>
      <filename>sandals.js</filename>
    </modified>
    <modified>
      <diff>@@ -1,9 +1,12 @@
-load(&quot;sandals.js&quot;);
-with (Sandals) {
-  app(para(&quot;Testing test test.&quot;,
-	   strong(&quot;Breadsticks.&quot;),
-	   em(&quot;Breadsticks.&quot;),
-	   code(&quot;Breadsticks.&quot;),
-	   strong(ins(&quot;Very good.&quot;))
-	   ));
-}
\ No newline at end of file
+load(&quot;sandals.js&quot;);
+with (Sandals) {
+go(function () {
+  app.name = &quot;Sandals | Paragraph Test&quot;;
+  para(&quot;Testing test test.&quot;,
+       &quot;Breadsticks.&quot;,
+       &quot;Breadsticks.&quot;,
+       &quot;Breadsticks.&quot;,
+       &quot;Very good.&quot;);
+  print(&quot;Location of this Sandals application: &quot; + app.location);
+});
+}</diff>
      <filename>tests/para.js</filename>
    </modified>
    <modified>
      <diff>@@ -1,10 +1,10 @@
-load(&quot;sandals.js&quot;);
-with (Sandals) {
-  app(para(&quot;Testing test test.&quot;,
-	   strong(&quot;Breadsticks.&quot;),
-	   em(&quot;Breadsticks.&quot;),
-	   code(&quot;Breadsticks.&quot;),
-	   strong(ins(&quot;Very good.&quot;)),
-	   &quot;More writing, yay yay!&quot;,
-	  &quot;Stretching out on to another line, oh boy!&quot;));
+load(&quot;sandals.js&quot;);
+with (Sandals) {
+  app(para(&quot;Testing test test.&quot;,
+	   strong(&quot;Breadsticks.&quot;),
+	   em(&quot;Breadsticks.&quot;),
+	   code(&quot;Breadsticks.&quot;),
+	   strong(ins(&quot;Very good.&quot;)),
+	   &quot;More writing, yay yay!&quot;,
+	  &quot;Stretching out on to another line, oh boy!&quot;));
 }
\ No newline at end of file</diff>
      <filename>tests/para2.js</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>9bb85e753924dd29ac6e94ab17b274dce3c903ab</id>
    </parent>
  </parents>
  <author>
    <name>Rudolf Olah</name>
    <email>omouse@gmail.com</email>
  </author>
  <url>http://github.com/omouse/sandals/commit/cdda666c6e8a790929a8b8160390ae5654d8c36d</url>
  <id>cdda666c6e8a790929a8b8160390ae5654d8c36d</id>
  <committed-date>2008-07-25T16:24:33-07:00</committed-date>
  <authored-date>2008-07-25T16:24:33-07:00</authored-date>
  <message>Refining sandals.js and the BeachHouse</message>
  <tree>a4a84fc36763a261989f0b35162dfc364b6a206c</tree>
  <committer>
    <name>Rudolf Olah</name>
    <email>omouse@gmail.com</email>
  </committer>
</commit>
