You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pivot.apache.org by gb...@apache.org on 2011/01/10 00:19:29 UTC

svn commit: r1057053 [11/12] - in /pivot/branches/3.x: ./ core/ core/src/ core/src/org/ core/src/org/apache/ core/src/org/apache/pivot/ core/src/org/apache/pivot/beans/ core/src/org/apache/pivot/bxml/ core/src/org/apache/pivot/csv/ core/src/org/apache/...

Added: pivot/branches/3.x/scene/src/org/apache/pivot/scene/shape/Path.java
URL: http://svn.apache.org/viewvc/pivot/branches/3.x/scene/src/org/apache/pivot/scene/shape/Path.java?rev=1057053&view=auto
==============================================================================
--- pivot/branches/3.x/scene/src/org/apache/pivot/scene/shape/Path.java (added)
+++ pivot/branches/3.x/scene/src/org/apache/pivot/scene/shape/Path.java Sun Jan  9 23:19:19 2011
@@ -0,0 +1,47 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to you under the Apache License,
+ * Version 2.0 (the "License"); you may not use this file except in
+ * compliance with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.pivot.scene.shape;
+
+import org.apache.pivot.scene.Extents;
+import org.apache.pivot.scene.Graphics;
+
+/**
+ * Shape representing a path.
+ */
+public class Path extends Shape {
+    @Override
+    public boolean contains(int x, int y) {
+        // TODO
+        return true;
+    }
+
+    @Override
+    public Extents getExtents() {
+        // TODO
+        return null;
+    }
+
+    @Override
+    protected void drawShape(Graphics graphics) {
+        // TODO
+    }
+
+    @Override
+    protected void fillShape(Graphics graphics) {
+        // TODO
+    }
+}

Added: pivot/branches/3.x/scene/src/org/apache/pivot/scene/shape/Rectangle.java
URL: http://svn.apache.org/viewvc/pivot/branches/3.x/scene/src/org/apache/pivot/scene/shape/Rectangle.java?rev=1057053&view=auto
==============================================================================
--- pivot/branches/3.x/scene/src/org/apache/pivot/scene/shape/Rectangle.java (added)
+++ pivot/branches/3.x/scene/src/org/apache/pivot/scene/shape/Rectangle.java Sun Jan  9 23:19:19 2011
@@ -0,0 +1,74 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to you under the Apache License,
+ * Version 2.0 (the "License"); you may not use this file except in
+ * compliance with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.pivot.scene.shape;
+
+import org.apache.pivot.scene.Extents;
+import org.apache.pivot.scene.Graphics;
+
+/**
+ * Shape representing a rectangle.
+ */
+public class Rectangle extends Shape {
+    private int cornerRadius;
+
+    public Rectangle() {
+        this(0, 0, 0, 0);
+    }
+
+    public Rectangle(int x, int y, int width, int height) {
+        this(x, y, width, height, 0);
+    }
+
+    public Rectangle(int x, int y, int width, int height, int cornerRadius) {
+        setLocation(x, y);
+        setSize(width, height);
+        setCornerRadius(cornerRadius);
+    }
+
+    public int getCornerRadius() {
+        return cornerRadius;
+    }
+
+    public void setCornerRadius(int cornerRadius) {
+        int previousCornerRadius = this.cornerRadius;
+        if (previousCornerRadius != cornerRadius) {
+            this.cornerRadius = cornerRadius;
+            repaint();
+        }
+    }
+
+    @Override
+    public boolean contains(int x, int y) {
+        // TODO
+        return true;
+    }
+
+    @Override
+    public Extents getExtents() {
+        return new Extents(0, getWidth(), 0, getHeight());
+    }
+
+    @Override
+    protected void drawShape(Graphics graphics) {
+        graphics.drawRectangle(getX(), getY(), getWidth(), getHeight(), cornerRadius);
+    }
+
+    @Override
+    protected void fillShape(Graphics graphics) {
+        graphics.fillRectangle(getX(), getY(), getWidth(), getHeight(), cornerRadius);
+    }
+}

Added: pivot/branches/3.x/scene/src/org/apache/pivot/scene/shape/Shape.java
URL: http://svn.apache.org/viewvc/pivot/branches/3.x/scene/src/org/apache/pivot/scene/shape/Shape.java?rev=1057053&view=auto
==============================================================================
--- pivot/branches/3.x/scene/src/org/apache/pivot/scene/shape/Shape.java (added)
+++ pivot/branches/3.x/scene/src/org/apache/pivot/scene/shape/Shape.java Sun Jan  9 23:19:19 2011
@@ -0,0 +1,146 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to you under the Apache License,
+ * Version 2.0 (the "License"); you may not use this file except in
+ * compliance with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.pivot.scene.shape;
+
+import org.apache.pivot.scene.Color;
+import org.apache.pivot.scene.Graphics;
+import org.apache.pivot.scene.Node;
+import org.apache.pivot.scene.Paint;
+import org.apache.pivot.scene.SolidColorPaint;
+import org.apache.pivot.scene.Stroke;
+
+/**
+ * Abstract base class for shapes.
+ */
+public abstract class Shape extends Node {
+    private Paint fill = null;
+    private Paint outline = new SolidColorPaint(Color.BLACK);
+    private Stroke stroke = new Stroke();
+    private boolean antiAliased = true;
+
+    public Paint getFill() {
+        return fill;
+    }
+
+    public void setFill(Paint fill) {
+        Paint previousFill = this.fill;
+        if (previousFill != fill) {
+            this.fill = fill;
+            repaint();
+        }
+    }
+
+    public final void setFill(String fill) {
+        if (fill == null) {
+            throw new IllegalArgumentException("fill is null.");
+        }
+
+        setFill(fill.length() == 0 ? null : Paint.decode(fill));
+    }
+
+    public Paint getOutline() {
+        return outline;
+    }
+
+    public void setOutline(Paint outline) {
+        Paint previousOutline = this.outline;
+        if (previousOutline != outline) {
+            this.outline = outline;
+            repaint();
+        }
+    }
+
+    public final void setOutline(String outline) {
+        if (outline == null) {
+            throw new IllegalArgumentException("outline is null.");
+        }
+
+        setOutline(outline.length() == 0 ? null : Paint.decode(outline));
+    }
+
+    public Stroke getStroke() {
+        return stroke;
+    }
+
+    public void setStroke(Stroke stroke) {
+        Stroke previousStroke = this.stroke;
+        if (previousStroke != stroke) {
+            this.stroke = stroke;
+            invalidate();
+        }
+    }
+
+    public void setStroke(String stroke) {
+        if (stroke == null) {
+            throw new IllegalArgumentException("stroke is null.");
+        }
+
+        setStroke(stroke.length() == 0 ? null : Stroke.decode(stroke));
+    }
+
+    public boolean isAntiAliased() {
+        return antiAliased;
+    }
+
+    public void setAntiAliased(boolean antiAliased) {
+        if (this.antiAliased != antiAliased) {
+            this.antiAliased = antiAliased;
+            invalidate();
+        }
+    }
+
+    @Override
+    public boolean isFocusable() {
+        return false;
+    }
+
+    @Override
+    public int getPreferredWidth(int height) {
+        return 0;
+    }
+
+    @Override
+    public int getPreferredHeight(int width) {
+        return 0;
+    }
+
+    @Override
+    public int getBaseline(int width, int height) {
+        return -1;
+    }
+
+    @Override
+    public void layout() {
+        // No-op
+    }
+
+    @Override
+    public void paint(Graphics graphics) {
+        if (fill != null) {
+            graphics.setPaint(fill);
+            fillShape(graphics);
+        }
+
+        if (outline != null) {
+            graphics.setStroke(stroke);
+            drawShape(graphics);
+        }
+    }
+
+    protected abstract void drawShape(Graphics graphics);
+    protected abstract void fillShape(Graphics graphics);
+}

Added: pivot/branches/3.x/scene/src/org/apache/pivot/scene/text/TextBox.java
URL: http://svn.apache.org/viewvc/pivot/branches/3.x/scene/src/org/apache/pivot/scene/text/TextBox.java?rev=1057053&view=auto
==============================================================================
--- pivot/branches/3.x/scene/src/org/apache/pivot/scene/text/TextBox.java (added)
+++ pivot/branches/3.x/scene/src/org/apache/pivot/scene/text/TextBox.java Sun Jan  9 23:19:19 2011
@@ -0,0 +1,107 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to you under the Apache License,
+ * Version 2.0 (the "License"); you may not use this file except in
+ * compliance with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.pivot.scene.text;
+
+import org.apache.pivot.bxml.DefaultProperty;
+import org.apache.pivot.scene.Extents;
+import org.apache.pivot.scene.Font;
+import org.apache.pivot.scene.Graphics;
+import org.apache.pivot.scene.Node;
+
+/**
+ * Node representing a block of optionally-wrapped text.
+ */
+@DefaultProperty("text")
+public class TextBox extends Node {
+    private CharSequence text = ""; // TODO Default to null?
+
+    /*
+    private Font font = DEFAULT_FONT;
+    private Paint fill = new SolidColorPaint(Color.BLACK);
+    private HorizontalAlignment horizontalAlignment = HorizontalAlignment.LEFT;
+    private VerticalAlignment verticalAlignment = VerticalAlignment.TOP;
+    private boolean wrap = false;
+    */
+
+    public static final Font DEFAULT_FONT = null; // TODO Get default system font
+
+    public CharSequence getText() {
+        return text;
+    }
+
+    public void setText(CharSequence text) {
+        // TODO Allow null?
+
+        // TODO Fire event
+    }
+
+    @Override
+    public Extents getExtents() {
+        // TODO
+        return null;
+    }
+
+    @Override
+    public boolean contains(int x, int y) {
+        // TODO
+        return false;
+    }
+
+    @Override
+    public boolean isFocusable() {
+        return false;
+    }
+
+    @Override
+    public int getPreferredWidth(int height) {
+        // TODO Calculate and cache preferred width
+        return 0;
+    }
+
+    @Override
+    public int getPreferredHeight(int width) {
+        // TODO Calculate and cache preferred height
+        return 0;
+    }
+
+    @Override
+    public int getBaseline(int width, int height) {
+        // TODO
+        return 0;
+    }
+
+    @Override
+    public void validate() {
+        if (!isValid()) {
+            // TODO Relayout text
+
+            // TODO Set extents
+        }
+
+        super.validate();
+    }
+
+    @Override
+    public void layout() {
+        // TODO
+    }
+
+    @Override
+    public void paint(Graphics graphics) {
+        // TODO
+    }
+}

Added: pivot/branches/3.x/ui/.classpath
URL: http://svn.apache.org/viewvc/pivot/branches/3.x/ui/.classpath?rev=1057053&view=auto
==============================================================================
--- pivot/branches/3.x/ui/.classpath (added)
+++ pivot/branches/3.x/ui/.classpath Sun Jan  9 23:19:19 2011
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+	<classpathentry kind="src" path="src"/>
+	<classpathentry kind="src" path="test"/>
+	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
+	<classpathentry combineaccessrules="false" kind="src" path="/core"/>
+	<classpathentry combineaccessrules="false" kind="src" path="/scene"/>
+	<classpathentry kind="output" path="bin"/>
+</classpath>

Added: pivot/branches/3.x/ui/.project
URL: http://svn.apache.org/viewvc/pivot/branches/3.x/ui/.project?rev=1057053&view=auto
==============================================================================
--- pivot/branches/3.x/ui/.project (added)
+++ pivot/branches/3.x/ui/.project Sun Jan  9 23:19:19 2011
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+	<name>ui</name>
+	<comment></comment>
+	<projects>
+	</projects>
+	<buildSpec>
+		<buildCommand>
+			<name>org.eclipse.jdt.core.javabuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+	</buildSpec>
+	<natures>
+		<nature>org.eclipse.jdt.core.javanature</nature>
+	</natures>
+</projectDescription>

Added: pivot/branches/3.x/ui/src/org/apache/pivot/ui/Application.java
URL: http://svn.apache.org/viewvc/pivot/branches/3.x/ui/src/org/apache/pivot/ui/Application.java?rev=1057053&view=auto
==============================================================================
--- pivot/branches/3.x/ui/src/org/apache/pivot/ui/Application.java (added)
+++ pivot/branches/3.x/ui/src/org/apache/pivot/ui/Application.java Sun Jan  9 23:19:19 2011
@@ -0,0 +1,74 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to you under the Apache License,
+ * Version 2.0 (the "License"); you may not use this file except in
+ * compliance with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.pivot.ui;
+
+import java.util.List;
+import java.util.Map;
+
+import org.apache.pivot.scene.Stage;
+import org.apache.pivot.scene.media.Image;
+
+/**
+ * Represents the entry point into an application.
+ * <p>
+ * These methods are called by the application context. In general, they should
+ * not be invoked directly by the application.
+ */
+public interface Application {
+    /**
+     * Returns the application's title.
+     */
+    public String getTitle();
+
+    /**
+     * Returns the application's icon list.
+     */
+    public List<Image> getIcons();
+
+    /**
+     * Called when the application is starting up.
+     *
+     * @param stage
+     * The stage on which this application was started.
+     *
+     * @param properties
+     * Initialization properties passed to the application.
+     */
+    public void startup(Stage stage, Map<String, String> properties) throws Exception;
+
+    /**
+     * Called when the application is being shut down.
+     *
+     * @param optional
+     * If <tt>true</tt>, the shutdown may be cancelled by returning a value of
+     * <tt>true</tt>.
+     *
+     * @return
+     * <tt>true</tt> to cancel shutdown, <tt>false</tt> to continue.
+     */
+    public boolean shutdown(boolean optional) throws Exception;
+
+    /**
+     * Called to notify the application that it is being suspended.
+     */
+    public void suspend() throws Exception;
+
+    /**
+     * Called when a suspended application has been resumed.
+     */
+    public void resume() throws Exception;
+}

Added: pivot/branches/3.x/ui/src/org/apache/pivot/ui/Automation.java
URL: http://svn.apache.org/viewvc/pivot/branches/3.x/ui/src/org/apache/pivot/ui/Automation.java?rev=1057053&view=auto
==============================================================================
--- pivot/branches/3.x/ui/src/org/apache/pivot/ui/Automation.java (added)
+++ pivot/branches/3.x/ui/src/org/apache/pivot/ui/Automation.java Sun Jan  9 23:19:19 2011
@@ -0,0 +1,43 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to you under the Apache License,
+ * Version 2.0 (the "License"); you may not use this file except in
+ * compliance with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.pivot.ui;
+
+import java.util.HashMap;
+
+/**
+ * Supports UI automation by providing a means to obtain a reference to
+ * a component via an automation ID.
+ */
+public final class Automation {
+    private Automation() {
+    }
+
+    private static HashMap<String, Component> components = new HashMap<String, Component>();
+
+    public static Component get(String automationID) {
+        return components.get(automationID);
+    }
+
+    protected static void add(String automationID, Component component) {
+        components.put(automationID, component);
+    }
+
+    protected static void remove(String automationID) {
+        components.remove(automationID);
+    }
+}
+

Added: pivot/branches/3.x/ui/src/org/apache/pivot/ui/BindType.java
URL: http://svn.apache.org/viewvc/pivot/branches/3.x/ui/src/org/apache/pivot/ui/BindType.java?rev=1057053&view=auto
==============================================================================
--- pivot/branches/3.x/ui/src/org/apache/pivot/ui/BindType.java (added)
+++ pivot/branches/3.x/ui/src/org/apache/pivot/ui/BindType.java Sun Jan  9 23:19:19 2011
@@ -0,0 +1,40 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to you under the Apache License,
+ * Version 2.0 (the "License"); you may not use this file except in
+ * compliance with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.pivot.ui;
+
+/**
+ * Defines a bind type.
+ */
+public enum BindType {
+    /**
+     * The binding will only be processed for {@link Component#load(Object)}
+     * operations.
+     */
+    LOAD,
+
+    /**
+     * The binding will only be processed for {@link Component#store(Object)}
+     * operations.
+     */
+    STORE,
+
+    /**
+     * The binding will be process for both {@link Component#load(Object)}
+     * and {@link Component#store(Object)} operations.
+     */
+    BOTH
+}

Added: pivot/branches/3.x/ui/src/org/apache/pivot/ui/BoxPane.java
URL: http://svn.apache.org/viewvc/pivot/branches/3.x/ui/src/org/apache/pivot/ui/BoxPane.java?rev=1057053&view=auto
==============================================================================
--- pivot/branches/3.x/ui/src/org/apache/pivot/ui/BoxPane.java (added)
+++ pivot/branches/3.x/ui/src/org/apache/pivot/ui/BoxPane.java Sun Jan  9 23:19:19 2011
@@ -0,0 +1,29 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to you under the Apache License,
+ * Version 2.0 (the "License"); you may not use this file except in
+ * compliance with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.pivot.ui;
+
+import org.apache.pivot.bxml.DefaultProperty;
+import org.apache.pivot.util.ObservableList;
+
+// TODO Not abstract; just for prototyping
+@DefaultProperty("components")
+public abstract class BoxPane extends Component {
+    public ObservableList<Component> getComponents() {
+        // TODO Wrap in list that will set parent
+        return null;
+    }
+}

Added: pivot/branches/3.x/ui/src/org/apache/pivot/ui/Component.java
URL: http://svn.apache.org/viewvc/pivot/branches/3.x/ui/src/org/apache/pivot/ui/Component.java?rev=1057053&view=auto
==============================================================================
--- pivot/branches/3.x/ui/src/org/apache/pivot/ui/Component.java (added)
+++ pivot/branches/3.x/ui/src/org/apache/pivot/ui/Component.java Sun Jan  9 23:19:19 2011
@@ -0,0 +1,435 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to you under the Apache License,
+ * Version 2.0 (the "License"); you may not use this file except in
+ * compliance with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.pivot.ui;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.net.URL;
+import java.util.HashMap;
+import java.util.LinkedList;
+import java.util.Map;
+
+import org.apache.pivot.beans.BeanAdapter;
+import org.apache.pivot.beans.PropertyNotFoundException;
+import org.apache.pivot.io.SerializationException;
+import org.apache.pivot.json.JSONSerializer;
+import org.apache.pivot.scene.Group;
+import org.apache.pivot.scene.Node;
+import org.apache.pivot.util.ObservableMap;
+import org.apache.pivot.util.ObservableMapAdapter;
+
+/**
+ * Abstract base class for components.
+*/
+public abstract class Component extends Group {
+    // The currently installed skin and associated style adapter
+    private Skin skin = null;
+    private BeanAdapter styles = null;
+
+    // Tooltip content and delay
+    private Node tooltipContent = null;
+    private int tooltipDelay = 1000;
+
+    // User data
+    private ObservableMap<String, Object> userData = ObservableMapAdapter.observableHashMap();
+
+    // The component's automation ID
+    private String automationID;
+
+    // TODO Event listener lists
+
+    // Typed and named styles
+    private static HashMap<Class<? extends Component>, Map<String, ?>> typedStyles =
+        new HashMap<Class<? extends Component>, Map<String,?>>();
+    private static HashMap<String, Map<String, ?>> namedStyles = new HashMap<String, Map<String,?>>();
+
+    /**
+     * Returns the currently installed skin.
+     *
+     * @return
+     * The currently installed skin.
+     */
+    protected Skin getSkin() {
+        return skin;
+    }
+
+    /**
+     * Sets the skin, replacing any previous skin.
+     *
+     * @param skin
+     * The new skin.
+     */
+    protected void setSkin(Skin skin) {
+        if (skin == null) {
+            throw new IllegalArgumentException("skin is null.");
+        }
+
+        if (this.skin != null) {
+            throw new IllegalStateException("Skin is already installed.");
+        }
+
+        this.skin = skin;
+
+        // TODO Use a custom inner class that ignores missing property exceptions
+        styles = new BeanAdapter(skin);
+
+        skin.install(this);
+
+        // Apply any defined type styles
+        LinkedList<Class<?>> styleTypes = new LinkedList<Class<?>>();
+
+        Class<?> type = getClass();
+        while (type != Object.class) {
+            styleTypes.add(0, type);
+            type = type.getSuperclass();
+        }
+
+        for (Class<?> styleType : styleTypes) {
+            Map<String, ?> styles = typedStyles.get(styleType);
+
+            if (styles != null) {
+                setStyles(styles);
+            }
+        }
+
+        invalidate();
+        repaint();
+    }
+
+    /**
+     * Installs the skin for the given component class, as defined by the current
+     * theme.
+     *
+     * @param componentClass
+     */
+    @SuppressWarnings("unchecked")
+    protected void installSkin(Class<? extends Component> componentClass) {
+        // Walk up component hierarchy from this type; if we find a match
+        // and the super class equals the given component class, install
+        // the skin. Otherwise, ignore - it will be installed later by a
+        // subclass of the component class.
+        Class<?> type = getClass();
+
+        Theme theme = Theme.getTheme();
+        Class<? extends Skin> skinClass =
+            theme.getSkinClass((Class<? extends Component>)type);
+
+        while (skinClass == null
+            && type != componentClass
+            && type != Component.class) {
+            type = type.getSuperclass();
+
+            if (type != Component.class) {
+                skinClass = theme.getSkinClass((Class<? extends Component>)type);
+            }
+        }
+
+        if (type == Component.class) {
+            throw new IllegalArgumentException(componentClass.getName()
+                + " is not an ancestor of " + getClass().getName());
+        }
+
+        if (skinClass == null) {
+            throw new IllegalArgumentException("No skin mapping for "
+                + componentClass.getName() + " found.");
+        }
+
+        if (type == componentClass) {
+            try {
+                setSkin(skinClass.newInstance());
+            } catch(InstantiationException exception) {
+                throw new IllegalArgumentException(exception);
+            } catch(IllegalAccessException exception) {
+                throw new IllegalArgumentException(exception);
+            }
+        }
+    }
+
+    /**
+     * Returns the component's style map. Style names correspond to the Java
+     * bean properties of the skin.
+     * <p>
+     * An attempt to set a non-existent style will produce a warning. This
+     * allows an application to be dynamically themed without risk of failure
+     * due to a {@link PropertyNotFoundException}.
+     */
+    public ObservableMap<String, Object> getStyles() {
+        return styles;
+    }
+
+    /**
+     * Applies a set of styles.
+     *
+     * @param styles
+     * A map containing the styles to apply.
+     */
+    public void setStyles(Map<String, ?> styles) {
+        if (styles == null) {
+            throw new IllegalArgumentException("styles is null.");
+        }
+
+        for (Map.Entry<String, ?> entry : styles.entrySet()) {
+            getStyles().put(entry.getKey(), entry.getValue());
+        }
+    }
+
+    /**
+     * Applies a set of named styles.
+     *
+     * @param styleName
+     */
+    public void setStyleName(String styleName) {
+        if (styleName == null) {
+            throw new IllegalArgumentException();
+        }
+
+        Map<String, ?> styles = namedStyles.get(styleName);
+
+        if (styles == null) {
+            System.err.println("Named style \"" + styleName + "\" does not exist.");
+        } else {
+            setStyles(styles);
+        }
+    }
+
+    /**
+     * Applies a set of named styles.
+     *
+     * @param styleNames
+     */
+    public void setStyleNames(String styleNames) {
+        if (styleNames == null) {
+            throw new IllegalArgumentException();
+        }
+
+        String[] styleNameArray = styleNames.split(",");
+
+        for (int i = 0; i < styleNameArray.length; i++) {
+            String styleName = styleNameArray[i];
+            setStyleName(styleName.trim());
+        }
+    }
+
+    /**
+     * Returns the component's automation ID.
+     *
+     * @return
+     * The component's automation ID, or <tt>null</tt> if the component does not
+     * have an automation ID.
+     */
+    public String getAutomationID() {
+        return automationID;
+    }
+
+    /**
+     * Sets the component's automation ID. This value can be used to obtain a
+     * reference to the component via {@link Automation#get(String)} when the
+     * component is attached to a component hierarchy.
+     *
+     * @param automationID
+     * The automation ID to use for the component, or <tt>null</tt> to clear the
+     * automation ID.
+     */
+    public void setAutomationID(String automationID) {
+        String previousAutomationID = this.automationID;
+        this.automationID = automationID;
+
+        if (getStage() != null) {
+            if (previousAutomationID != null) {
+                Automation.remove(previousAutomationID);
+            }
+
+            if (automationID != null) {
+                Automation.add(automationID, this);
+            }
+        }
+    }
+
+    public Window getWindow() {
+        return (Window)getAncestor(Window.class);
+    }
+
+    /**
+     * Returns the component's tooltip content.
+     *
+     * @return
+     * The component's tooltip content, or <tt>null</tt> if no tooltip is
+     * specified.
+     */
+    public Node getTooltipContent() {
+        return tooltipContent;
+    }
+
+    /**
+     * Sets the component's tooltip content.
+     *
+     * @param tooltipContents
+     * The component's tooltip content, or <tt>null</tt> for no tooltip.
+     */
+    public void setTooltipContent(Node tooltipContent) {
+        Node previousTooltipContent = this.tooltipContent;
+
+        if (previousTooltipContent != tooltipContent) {
+            this.tooltipContent = tooltipContent;
+
+            // TODO Fire event
+        }
+    }
+
+    /**
+     * Returns the component's tooltip delay.
+     *
+     * @return
+     * The tooltip delay, in milliseconds.
+     */
+    public int getTooltipDelay() {
+        return tooltipDelay;
+    }
+
+    /**
+     * Sets the component's tooltip delay.
+     *
+     * @param tooltipDelay
+     * The tooltip delay, in milliseconds.
+     */
+    public void setTooltipDelay(int tooltipDelay) {
+        int previousTooltipDelay = this.tooltipDelay;
+
+        if (previousTooltipDelay != tooltipDelay) {
+            this.tooltipDelay = tooltipDelay;
+
+            // TODO Fire event
+        }
+    }
+
+    public ObservableMap<String, Object> getUserData() {
+        return userData;
+    }
+
+    /**
+     * Copies bound values from the bind context to the component. This
+     * functionality must be provided by the subclass; the base implementation
+     * is a no-op.
+     *
+     * @param context
+     */
+    public void load(Object context) {
+        // TODO IMPORTANT If we don't have a Container class, we'll need to implement
+        // load() and store() in a lot more places
+    }
+
+    /**
+     * Copies bound values from the component to the bind context. This
+     * functionality must be provided by the subclass; the base implementation
+     * is a no-op.
+     *
+     * @param context
+     */
+    public void store(Object context) {
+    }
+
+    /**
+     * Clears any bound values in the component.
+     */
+    public void clear() {
+    }
+
+    @Override
+    public String toString() {
+        String s = super.toString();
+
+        if (automationID != null) {
+            s += "#" + automationID;
+        }
+
+        return s;
+    }
+
+    /**
+     * Returns the typed style dictionary.
+     */
+    public static Map<Class<? extends Component>, Map<String, ?>> getTypedStyles() {
+        return typedStyles;
+    }
+
+    /**
+     * Returns the named style dictionary.
+     */
+    public static Map<String, Map<String, ?>> getNamedStyles() {
+        return namedStyles;
+    }
+
+    /**
+     * Adds the styles from a named stylesheet to the named or typed style collections.
+     *
+     * @param resourceName
+     */
+    @SuppressWarnings("unchecked")
+    public static void appendStylesheet(String resourceName) {
+        // TODO Use .properties files with JSON map values rather than .json files
+
+        ClassLoader classLoader = Component.class.getClassLoader();
+
+        URL stylesheetLocation = classLoader.getResource(resourceName.substring(1));
+        if (stylesheetLocation == null) {
+            throw new RuntimeException("Unable to locate style sheet resource \"" + resourceName + "\".");
+        }
+
+        try {
+            InputStream inputStream = stylesheetLocation.openStream();
+
+            try {
+                JSONSerializer serializer = new JSONSerializer();
+                Map<String, Map<String, ?>> stylesheet =
+                    (Map<String, Map<String, ?>>)serializer.readObject(inputStream);
+
+                for (Map.Entry<String, Map<String, ?>> entry : stylesheet.entrySet()) {
+                    String name = entry.getKey();
+                    Map<String, ?> styles = entry.getValue();
+
+                    int i = name.lastIndexOf('.') + 1;
+                    if (Character.isUpperCase(name.charAt(i))) {
+                        // Assume the current package if none specified
+                        if (!name.contains(".")) {
+                            name = Component.class.getPackage().getName() + "." + name;
+                        }
+
+                        Class<?> type = null;
+                        try {
+                            type = Class.forName(name);
+                        } catch (ClassNotFoundException exception) {
+                            // No-op
+                        }
+
+                        if (type != null
+                            && Component.class.isAssignableFrom(type)) {
+                            Component.getTypedStyles().put((Class<? extends Component>)type, styles);
+                        }
+                    } else {
+                        Component.getNamedStyles().put(name, styles);
+                    }
+                }
+            } finally {
+                inputStream.close();
+            }
+        } catch (IOException exception) {
+            throw new RuntimeException(exception);
+        } catch (SerializationException exception) {
+            throw new RuntimeException(exception);
+        }
+    }
+}

Added: pivot/branches/3.x/ui/src/org/apache/pivot/ui/Form.java
URL: http://svn.apache.org/viewvc/pivot/branches/3.x/ui/src/org/apache/pivot/ui/Form.java?rev=1057053&view=auto
==============================================================================
--- pivot/branches/3.x/ui/src/org/apache/pivot/ui/Form.java (added)
+++ pivot/branches/3.x/ui/src/org/apache/pivot/ui/Form.java Sun Jan  9 23:19:19 2011
@@ -0,0 +1,58 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to you under the Apache License,
+ * Version 2.0 (the "License"); you may not use this file except in
+ * compliance with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.pivot.ui;
+
+import org.apache.pivot.util.ObservableList;
+
+// TODO Not abstract; just for prototyping
+public abstract class Form extends Component {
+    public static class Section {
+        public String getHeading() {
+            // TODO
+            return null;
+        }
+
+        // TODO
+        public ObservableList<Field> getFields() {
+            // TODO
+            return null;
+        }
+    }
+
+    public static class Field {
+        // TODO
+
+        public Component getContent() {
+            // TODO
+            return null;
+        }
+
+        public Flag getFlag() {
+            // TODO
+            return null;
+        }
+    }
+
+    public static class Flag {
+        // TODO
+    }
+
+    public ObservableList<Section> getSections() {
+        // TODO
+        return null;
+    }
+}

Added: pivot/branches/3.x/ui/src/org/apache/pivot/ui/ListView.java
URL: http://svn.apache.org/viewvc/pivot/branches/3.x/ui/src/org/apache/pivot/ui/ListView.java?rev=1057053&view=auto
==============================================================================
--- pivot/branches/3.x/ui/src/org/apache/pivot/ui/ListView.java (added)
+++ pivot/branches/3.x/ui/src/org/apache/pivot/ui/ListView.java Sun Jan  9 23:19:19 2011
@@ -0,0 +1,55 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to you under the Apache License,
+ * Version 2.0 (the "License"); you may not use this file except in
+ * compliance with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.pivot.ui;
+
+import org.apache.pivot.scene.Visual;
+import org.apache.pivot.scene.Bounds;
+
+//TODO Not abstract; just for prototyping
+public abstract class ListView extends Component {
+    private ItemRenderer itemRenderer;
+
+    public interface ItemRenderer extends Visual {
+        // TODO
+    }
+
+    public ItemRenderer getItemRenderer() {
+        return itemRenderer;
+    }
+
+    public void setItemRenderer(ItemRenderer itemRenderer) {
+        this.itemRenderer = itemRenderer;
+
+        // TODO
+    }
+
+    // NOTE This is not called getItemAt()
+    public int getItemIndex(int y) {
+        // TODO
+        return -1;
+    }
+
+    public Bounds getItemBounds(int index) {
+        // TODO
+        return null;
+    }
+
+    public int getItemIndent() {
+        // TODO
+        return -1;
+    }
+}

Added: pivot/branches/3.x/ui/src/org/apache/pivot/ui/Skin.java
URL: http://svn.apache.org/viewvc/pivot/branches/3.x/ui/src/org/apache/pivot/ui/Skin.java?rev=1057053&view=auto
==============================================================================
--- pivot/branches/3.x/ui/src/org/apache/pivot/ui/Skin.java (added)
+++ pivot/branches/3.x/ui/src/org/apache/pivot/ui/Skin.java Sun Jan  9 23:19:19 2011
@@ -0,0 +1,30 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to you under the Apache License,
+ * Version 2.0 (the "License"); you may not use this file except in
+ * compliance with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.pivot.ui;
+
+/**
+ * Interface representing a skin. A skin manages the graphical representation
+ * and behavior of a component.
+ */
+public interface Skin {
+    /**
+     * Installs the skin on a component.
+     *
+     * @param component
+     */
+    public void install(Component component);
+}

Added: pivot/branches/3.x/ui/src/org/apache/pivot/ui/Span.java
URL: http://svn.apache.org/viewvc/pivot/branches/3.x/ui/src/org/apache/pivot/ui/Span.java?rev=1057053&view=auto
==============================================================================
--- pivot/branches/3.x/ui/src/org/apache/pivot/ui/Span.java (added)
+++ pivot/branches/3.x/ui/src/org/apache/pivot/ui/Span.java Sun Jan  9 23:19:19 2011
@@ -0,0 +1,29 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to you under the Apache License,
+ * Version 2.0 (the "License"); you may not use this file except in
+ * compliance with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.pivot.ui;
+
+public final class Span {
+    public final int start;
+    public final int length;
+
+    public Span(int start, int length) {
+        this.start = start;
+        this.length = length;
+    }
+
+    // TODO
+}

Added: pivot/branches/3.x/ui/src/org/apache/pivot/ui/StageLayout.java
URL: http://svn.apache.org/viewvc/pivot/branches/3.x/ui/src/org/apache/pivot/ui/StageLayout.java?rev=1057053&view=auto
==============================================================================
--- pivot/branches/3.x/ui/src/org/apache/pivot/ui/StageLayout.java (added)
+++ pivot/branches/3.x/ui/src/org/apache/pivot/ui/StageLayout.java Sun Jan  9 23:19:19 2011
@@ -0,0 +1,49 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to you under the Apache License,
+ * Version 2.0 (the "License"); you may not use this file except in
+ * compliance with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.pivot.ui;
+
+import org.apache.pivot.scene.Group;
+import org.apache.pivot.scene.Layout;
+import org.apache.pivot.scene.Node;
+
+/**
+ * A layout with no preferred size that assigns each child nodes its preferred
+ * size but does not change its position.
+ */
+public class StageLayout implements Layout {
+    @Override
+    public int getBaseline(Group group, int width, int height) {
+        return -1;
+    }
+
+    @Override
+    public int getPreferredHeight(Group group, int width) {
+        return 0;
+    }
+
+    @Override
+    public int getPreferredWidth(Group group, int height) {
+        return 0;
+    }
+
+    @Override
+    public void layout(Group group) {
+        for (Node node : group.getNodes()) {
+            node.setSize(node.getPreferredWidth(-1), node.getPreferredHeight(-1));
+        }
+    }
+}

Added: pivot/branches/3.x/ui/src/org/apache/pivot/ui/TabPane.java
URL: http://svn.apache.org/viewvc/pivot/branches/3.x/ui/src/org/apache/pivot/ui/TabPane.java?rev=1057053&view=auto
==============================================================================
--- pivot/branches/3.x/ui/src/org/apache/pivot/ui/TabPane.java (added)
+++ pivot/branches/3.x/ui/src/org/apache/pivot/ui/TabPane.java Sun Jan  9 23:19:19 2011
@@ -0,0 +1,175 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to you under the Apache License,
+ * Version 2.0 (the "License"); you may not use this file except in
+ * compliance with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.pivot.ui;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.List;
+
+import org.apache.pivot.bxml.DefaultProperty;
+import org.apache.pivot.scene.Group;
+import org.apache.pivot.scene.Node;
+import org.apache.pivot.util.ObservableList;
+import org.apache.pivot.util.ObservableListAdapter;
+
+/**
+ * Container that provides access to a set of components via selectable tabs,
+ * only one of which is visible at a time.
+ */
+@DefaultProperty("tabs")
+// TODO Not abstract; just for prototyping
+public abstract class TabPane extends Group {
+    // Tab list
+    private class TabList extends ObservableListAdapter<Tab> {
+        public TabList() {
+            super(new ArrayList<Tab>());
+        }
+
+        @Override
+        public void add(int index, Tab tab) {
+            getNodes().add(tab);
+            super.add(tab);
+        }
+
+        @Override
+        public boolean addAll(int index, Collection<? extends Tab> tabs) {
+            getNodes().addAll(tabs);
+            return super.addAll(index, tabs);
+        }
+
+        @Override
+        public Tab remove(int index) {
+            getNodes().remove(get(index));
+            return super.remove(index);
+        }
+
+        @Override
+        protected void removeRange(int fromIndex, int toIndex) {
+            for (int i = fromIndex; i < toIndex; i++) {
+                getNodes().remove(get(i));
+            }
+
+            super.removeRange(fromIndex, toIndex);
+        }
+
+        @Override
+        public Tab set(int index, Tab tab) {
+            throw new UnsupportedOperationException();
+        }
+
+        @Override
+        public List<Tab> setAll(int index, Collection<? extends Tab> tabs) {
+            throw new UnsupportedOperationException();
+        }
+    }
+
+    private TabList tabs = new TabList();
+    private Component anchor = null;
+    private Component corner = null;
+
+    private ObservableList<Node> nodes = new ObservableListAdapter<Node>(getNodes()) {
+        @Override
+        public Node remove(int index) {
+            validateRemove(get(index));
+            return super.remove(index);
+        }
+
+        @Override
+        protected void removeRange(int fromIndex, int toIndex) {
+            for (int i = fromIndex; i < toIndex; i++) {
+                validateRemove(nodes.get(i));
+            }
+
+            super.removeRange(fromIndex, toIndex);
+        }
+
+        private void validateRemove(Node node) {
+            if (node == anchor
+                || node == corner
+                || tabs.indexOf(node) >= 0) {
+                throw new IllegalArgumentException();
+            }
+        }
+    };
+
+    /**
+     * Class representing a tab in a tab pane.
+     */
+    @DefaultProperty("content")
+    // TODO Not abstract; just for prototyping
+    public abstract static class Tab extends Group {
+        private Object tabData = null;
+        private Component content = null;
+
+        private ObservableList<Node> nodes = new ObservableListAdapter<Node>(getNodes()) {
+            @Override
+            public Node remove(int index) {
+                validateRemove(get(index));
+                return super.remove(index);
+            }
+
+            @Override
+            protected void removeRange(int fromIndex, int toIndex) {
+                for (int i = fromIndex; i < toIndex; i++) {
+                    validateRemove(nodes.get(i));
+                }
+
+                super.removeRange(fromIndex, toIndex);
+            }
+
+            private void validateRemove(Node node) {
+                if (node == content) {
+                    throw new IllegalArgumentException();
+                }
+            }
+        };
+
+        @Override
+        public ObservableList<Node> getNodes() {
+            return nodes;
+        }
+
+        public Component getContent() {
+            return content;
+        }
+
+        public void setContent(Component content) {
+            this.content = content;
+
+            // TODO Fire event
+        }
+
+        public Object getTabData() {
+            return tabData;
+        }
+
+        public void setTabData(Object tabData) {
+            this.tabData = tabData;
+
+            // TODO Fire event
+        }
+    }
+
+    @Override
+    public ObservableList<Node> getNodes() {
+        return nodes;
+    }
+
+    public ObservableList<Tab> getTabs() {
+        return tabs;
+    }
+}

Added: pivot/branches/3.x/ui/src/org/apache/pivot/ui/TablePane.java
URL: http://svn.apache.org/viewvc/pivot/branches/3.x/ui/src/org/apache/pivot/ui/TablePane.java?rev=1057053&view=auto
==============================================================================
--- pivot/branches/3.x/ui/src/org/apache/pivot/ui/TablePane.java (added)
+++ pivot/branches/3.x/ui/src/org/apache/pivot/ui/TablePane.java Sun Jan  9 23:19:19 2011
@@ -0,0 +1,130 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to you under the Apache License,
+ * Version 2.0 (the "License"); you may not use this file except in
+ * compliance with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.pivot.ui;
+
+import org.apache.pivot.bxml.DefaultProperty;
+import org.apache.pivot.scene.Group;
+import org.apache.pivot.util.ObservableList;
+
+/**
+ * Container that arranges components in a two-dimensional grid, optionally
+ * spanning multiple rows and columns.
+ */
+// TODO Not abstract; just for prototyping
+public abstract class TablePane extends Component {
+    public static class Column {
+        private int preferredWidth = -1;
+        private boolean relative = false;
+
+        public int getPreferredWidth() {
+            return preferredWidth;
+        }
+
+        public void setPreferredWidth(int width) {
+            this.preferredWidth = width;
+
+            // TODO Fire event
+        }
+
+        public boolean isRelative() {
+            return relative;
+        }
+
+        public void setRelative(boolean relative) {
+            this.relative = relative;
+
+            // TODO Fire event
+        }
+
+        // TODO
+    }
+
+    // TODO Not abstract
+    @DefaultProperty("cells")
+    public abstract static class Row extends Group {
+        private boolean relative = false;
+
+        public boolean isRelative() {
+            return relative;
+        }
+
+        public void setRelative(boolean relative) {
+            this.relative = relative;
+
+            // TODO Fire event
+        }
+
+        public ObservableList<Cell> getCells() {
+            // TODO
+            return null;
+        }
+
+        // TODO
+    }
+
+    // TODO Not abstract
+    @DefaultProperty("content")
+    public static class Cell extends Group {
+        private Component content;
+        private int columnSpan = 1;
+        private int rowSpan = 1;
+
+        public Component getContent() {
+            return content;
+        }
+
+        public void setContent(Component content) {
+            this.content = content;
+
+            // TODO Fire event
+        }
+
+        public int getColumnSpan() {
+            return columnSpan;
+        }
+
+        public void setColumnSpan(int columnSpan) {
+            this.columnSpan = columnSpan;
+
+            // TODO Fire event
+        }
+
+        public int getRowSpan() {
+            return rowSpan;
+        }
+
+        public void setRowSpan(int rowSpan) {
+            this.rowSpan = rowSpan;
+
+            // TODO Fire event
+        }
+
+        // TODO?
+    }
+
+    public ObservableList<Column> getColumns() {
+        // TODO
+        return null;
+    }
+
+    public ObservableList<Column> getRows() {
+        // TODO
+        return null;
+    }
+
+    // TODO
+}

Added: pivot/branches/3.x/ui/src/org/apache/pivot/ui/TableView.java
URL: http://svn.apache.org/viewvc/pivot/branches/3.x/ui/src/org/apache/pivot/ui/TableView.java?rev=1057053&view=auto
==============================================================================
--- pivot/branches/3.x/ui/src/org/apache/pivot/ui/TableView.java (added)
+++ pivot/branches/3.x/ui/src/org/apache/pivot/ui/TableView.java Sun Jan  9 23:19:19 2011
@@ -0,0 +1,46 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to you under the Apache License,
+ * Version 2.0 (the "License"); you may not use this file except in
+ * compliance with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.pivot.ui;
+
+import org.apache.pivot.util.ObservableList;
+import org.apache.pivot.util.ObservableListAdapter;
+
+// TODO Not abstract; just for prototyping
+public abstract class TableView extends Component {
+    public static class Column {
+        // TODO Create properties, fire events directly from this class,
+        // not via TableView
+    }
+
+    // TODO Observers will need to listen for changes on the list as well as
+    // on individual items (columns)
+    private ObservableList<Column> columns = ObservableListAdapter.observableArrayList();
+
+    public ObservableList<Column> getColumns() {
+        return columns;
+    }
+
+    public void setColumns(ObservableList<Column> columns) {
+        if (columns == null) {
+            throw new IllegalArgumentException();
+        }
+
+        this.columns = columns;
+
+        // TODO Fire event
+    }
+}

Added: pivot/branches/3.x/ui/src/org/apache/pivot/ui/TextArea.java
URL: http://svn.apache.org/viewvc/pivot/branches/3.x/ui/src/org/apache/pivot/ui/TextArea.java?rev=1057053&view=auto
==============================================================================
--- pivot/branches/3.x/ui/src/org/apache/pivot/ui/TextArea.java (added)
+++ pivot/branches/3.x/ui/src/org/apache/pivot/ui/TextArea.java Sun Jan  9 23:19:19 2011
@@ -0,0 +1,85 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to you under the Apache License,
+ * Version 2.0 (the "License"); you may not use this file except in
+ * compliance with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.pivot.ui;
+
+import java.io.IOException;
+import java.io.Reader;
+import java.net.URL;
+
+import org.apache.pivot.scene.Bounds;
+
+public interface TextArea {
+    public enum ScrollDirection {
+        UP,
+        DOWN
+    }
+
+    public interface TextBindMapping {
+        public String toString(Object value);
+        public Object valueOf(String text);
+    }
+
+    public String getText();
+    public String getText(int start, int length);
+    public void setText(String text);
+    public void setText(URL textURL) throws IOException;
+    public void setText(Reader textReader) throws IOException;
+
+    public void insertText(CharSequence text, int index);
+    public void removeText(int start, int length);
+
+    public int getParagraphIndex(int index);
+    public CharSequence getParagraphText(int paragraphIndex);
+
+    public char getCharacter(int index);
+    public int getCharacterCount();
+
+    public void cut();
+    public void copy();
+    public void paste();
+
+    public void undo();
+    public void redo();
+
+    public int getSelectionStart();
+    public int getSelectionLength();
+    public Span getSelection();
+    public void setSelection(int selectionStart, int selectionLength);
+    public void setSelection(Span selection);
+    public void selectAll();
+    public void clearSelection();
+    public String getSelectedText();
+    public int getMaximumLength();
+    public void setMaximumLength(int maximumLength);
+
+    public boolean isEditable();
+    public void setEditable(boolean editable);
+
+    public String getTextKey();
+    public void setTextKey(String textKey);
+    public BindType getTextBindType();
+    public void setTextBindType(BindType textBindType);
+
+    public int getInsertionPoint(int x, int y);
+    public int getNextInsertionPoint(int x, int from, ScrollDirection direction);
+    public int getRowIndex(int index);
+    public int getRowOffset(int index);
+    public int getRowLength(int index);
+    public int getRowCount();
+
+    public Bounds getCharacterBounds(int index);
+}

Added: pivot/branches/3.x/ui/src/org/apache/pivot/ui/TextAreaContentListener.java
URL: http://svn.apache.org/viewvc/pivot/branches/3.x/ui/src/org/apache/pivot/ui/TextAreaContentListener.java?rev=1057053&view=auto
==============================================================================
--- pivot/branches/3.x/ui/src/org/apache/pivot/ui/TextAreaContentListener.java (added)
+++ pivot/branches/3.x/ui/src/org/apache/pivot/ui/TextAreaContentListener.java Sun Jan  9 23:19:19 2011
@@ -0,0 +1,23 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to you under the Apache License,
+ * Version 2.0 (the "License"); you may not use this file except in
+ * compliance with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.pivot.ui;
+
+public interface TextAreaContentListener {
+    public void textInserted(TextArea textArea, int index, int length);
+    public void textRemoved(TextArea textArea, int index, int length);
+    public void textChanged(TextArea textArea);
+}

Added: pivot/branches/3.x/ui/src/org/apache/pivot/ui/TextAreaParagraphListener.java
URL: http://svn.apache.org/viewvc/pivot/branches/3.x/ui/src/org/apache/pivot/ui/TextAreaParagraphListener.java?rev=1057053&view=auto
==============================================================================
--- pivot/branches/3.x/ui/src/org/apache/pivot/ui/TextAreaParagraphListener.java (added)
+++ pivot/branches/3.x/ui/src/org/apache/pivot/ui/TextAreaParagraphListener.java Sun Jan  9 23:19:19 2011
@@ -0,0 +1,23 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to you under the Apache License,
+ * Version 2.0 (the "License"); you may not use this file except in
+ * compliance with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.pivot.ui;
+
+public interface TextAreaParagraphListener {
+    public void paragraphsInserted(TextArea textArea, int index, int count);
+    public void paragraphsRemoved(TextArea textArea, int index, int count);
+    public void paragraphUpdated(TextArea textArea, int index);
+}

Added: pivot/branches/3.x/ui/src/org/apache/pivot/ui/Theme.java
URL: http://svn.apache.org/viewvc/pivot/branches/3.x/ui/src/org/apache/pivot/ui/Theme.java?rev=1057053&view=auto
==============================================================================
--- pivot/branches/3.x/ui/src/org/apache/pivot/ui/Theme.java (added)
+++ pivot/branches/3.x/ui/src/org/apache/pivot/ui/Theme.java Sun Jan  9 23:19:19 2011
@@ -0,0 +1,121 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to you under the Apache License,
+ * Version 2.0 (the "License"); you may not use this file except in
+ * compliance with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.pivot.ui;
+
+import java.util.HashMap;
+
+import org.apache.pivot.scene.Font;
+import org.apache.pivot.util.Service;
+
+/**
+ * Base class for Pivot themes. A theme defines a complete "look and feel"
+ * for a Pivot application.
+ * <p>
+ * Note that concrete Theme implementations should be declared as final. If
+ * multiple third-party libraries attempted to extend a theme, it would cause a
+ * conflict, as only one could be used in any given application.
+ * <p>
+ * IMPORTANT All skin mappings must be added to the map, even non-static inner
+ * classes. Otherwise, the component's base class will attempt to install its
+ * own skin, which will result in the addition of duplicate listeners.
+ */
+public abstract class Theme {
+    protected HashMap<Class<? extends Component>, Class<? extends Skin>> componentSkinMap =
+        new HashMap<Class<? extends Component>, Class<? extends Skin>>();
+
+    private static Theme theme = null;
+
+    /**
+     * The service provider name (see {@link Service#getProvider(String)}).
+     */
+    public static final String PROVIDER_NAME = "org.apache.pivot.wtk.Theme";
+
+    static {
+        theme = (Theme)Service.getProvider(PROVIDER_NAME);
+
+        if (theme == null) {
+            throw new ThemeNotFoundException();
+        }
+    }
+
+    public Theme() {
+        // TODO Create non-themed mappings
+    }
+
+    public final Class<? extends Skin> getSkinClass(Class<? extends Component> componentClass) {
+        return componentSkinMap.get(componentClass);
+    }
+
+    public abstract Font getFont();
+    public abstract void setFont(Font font);
+
+    /**
+     * Returns the skin class responsible for skinning the specified component
+     * class.
+     *
+     * @param componentClass
+     * The component class.
+     *
+     * @return
+     * The skin class, or <tt>null</tt> if no skin mapping exists for the
+     * component class.
+     */
+    public Class<? extends Skin> get(Class<? extends Component> componentClass) {
+        if (componentClass == null) {
+            throw new IllegalArgumentException("Component class is null.");
+        }
+
+        return componentSkinMap.get(componentClass);
+    }
+
+    /**
+     * Sets the skin class responsible for skinning the specified component
+     * class.
+     *
+     * @param componentClass
+     * The component class.
+     *
+     * @param skinClass
+     * The skin class.
+     */
+    public void set(Class<? extends Component> componentClass, Class<? extends Skin> skinClass) {
+        if (componentClass == null) {
+            throw new IllegalArgumentException("Component class is null.");
+        }
+
+        if (skinClass == null) {
+            throw new IllegalArgumentException("Skin class is null.");
+        }
+
+        componentSkinMap.put(componentClass, skinClass);
+    }
+
+    /**
+     * Gets the current theme, as determined by the {@linkplain #PROVIDER_NAME
+     * theme provider}.
+     *
+     * @throws IllegalStateException
+     * If a theme has not been installed.
+     */
+    public static Theme getTheme() {
+        if (theme == null) {
+            throw new IllegalStateException("No installed theme.");
+        }
+
+        return theme;
+    }
+}

Added: pivot/branches/3.x/ui/src/org/apache/pivot/ui/ThemeNotFoundException.java
URL: http://svn.apache.org/viewvc/pivot/branches/3.x/ui/src/org/apache/pivot/ui/ThemeNotFoundException.java?rev=1057053&view=auto
==============================================================================
--- pivot/branches/3.x/ui/src/org/apache/pivot/ui/ThemeNotFoundException.java (added)
+++ pivot/branches/3.x/ui/src/org/apache/pivot/ui/ThemeNotFoundException.java Sun Jan  9 23:19:19 2011
@@ -0,0 +1,28 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to you under the Apache License,
+ * Version 2.0 (the "License"); you may not use this file except in
+ * compliance with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.pivot.ui;
+
+/**
+ * Thrown when a suitable theme cannot be located.
+ */
+public class ThemeNotFoundException extends RuntimeException {
+    private static final long serialVersionUID = -6357989164720725377L;
+
+    public ThemeNotFoundException() {
+        super("A theme could not be located.");
+    }
+}

Added: pivot/branches/3.x/ui/src/org/apache/pivot/ui/TreeView.java
URL: http://svn.apache.org/viewvc/pivot/branches/3.x/ui/src/org/apache/pivot/ui/TreeView.java?rev=1057053&view=auto
==============================================================================
--- pivot/branches/3.x/ui/src/org/apache/pivot/ui/TreeView.java (added)
+++ pivot/branches/3.x/ui/src/org/apache/pivot/ui/TreeView.java Sun Jan  9 23:19:19 2011
@@ -0,0 +1,45 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to you under the Apache License,
+ * Version 2.0 (the "License"); you may not use this file except in
+ * compliance with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.pivot.ui;
+
+import org.apache.pivot.scene.Visual;
+import org.apache.pivot.util.ObservableList;
+
+/**
+ * Class that displays a hierarchical data structure, allowing a user to select
+ * one or more paths.
+ */
+// TODO Not abstract; just for prototyping
+public abstract class TreeView extends Component {
+    /**
+     * Interface defining a tree view node.
+     */
+    public interface Node {
+        public ObservableList<Node> getNodes();
+    }
+
+    public interface NodeRenderer extends Visual {
+        // TODO
+    }
+
+    public Node getRoot() {
+        // TODO
+        return null;
+    }
+
+    // TODO
+}

Added: pivot/branches/3.x/ui/src/org/apache/pivot/ui/Viewport.java
URL: http://svn.apache.org/viewvc/pivot/branches/3.x/ui/src/org/apache/pivot/ui/Viewport.java?rev=1057053&view=auto
==============================================================================
--- pivot/branches/3.x/ui/src/org/apache/pivot/ui/Viewport.java (added)
+++ pivot/branches/3.x/ui/src/org/apache/pivot/ui/Viewport.java Sun Jan  9 23:19:19 2011
@@ -0,0 +1,6 @@
+package org.apache.pivot.ui;
+
+public abstract class Viewport extends Component {
+    // TODO
+    public abstract void scrollToVisible(int x, int y, int width, int height);
+}

Added: pivot/branches/3.x/ui/src/org/apache/pivot/ui/Window.java
URL: http://svn.apache.org/viewvc/pivot/branches/3.x/ui/src/org/apache/pivot/ui/Window.java?rev=1057053&view=auto
==============================================================================
--- pivot/branches/3.x/ui/src/org/apache/pivot/ui/Window.java (added)
+++ pivot/branches/3.x/ui/src/org/apache/pivot/ui/Window.java Sun Jan  9 23:19:19 2011
@@ -0,0 +1,6 @@
+package org.apache.pivot.ui;
+
+// TODO Not abstract
+public abstract class Window extends Component {
+    // TODO
+}

Added: pivot/branches/3.x/ui/src/org/apache/pivot/ui/skin/ComponentSkin.java
URL: http://svn.apache.org/viewvc/pivot/branches/3.x/ui/src/org/apache/pivot/ui/skin/ComponentSkin.java?rev=1057053&view=auto
==============================================================================
--- pivot/branches/3.x/ui/src/org/apache/pivot/ui/skin/ComponentSkin.java (added)
+++ pivot/branches/3.x/ui/src/org/apache/pivot/ui/skin/ComponentSkin.java Sun Jan  9 23:19:19 2011
@@ -0,0 +1,27 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to you under the Apache License,
+ * Version 2.0 (the "License"); you may not use this file except in
+ * compliance with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.pivot.ui.skin;
+
+import org.apache.pivot.ui.Component;
+import org.apache.pivot.ui.Skin;
+
+public abstract class ComponentSkin implements Skin {
+    @Override
+    public void install(Component component) {
+        // TODO Register base component listeners
+    }
+}

Added: pivot/branches/3.x/ui/test/org/apache/pivot/ui/test/StageTest.java
URL: http://svn.apache.org/viewvc/pivot/branches/3.x/ui/test/org/apache/pivot/ui/test/StageTest.java?rev=1057053&view=auto
==============================================================================
--- pivot/branches/3.x/ui/test/org/apache/pivot/ui/test/StageTest.java (added)
+++ pivot/branches/3.x/ui/test/org/apache/pivot/ui/test/StageTest.java Sun Jan  9 23:19:19 2011
@@ -0,0 +1,53 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to you under the Apache License,
+ * Version 2.0 (the "License"); you may not use this file except in
+ * compliance with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.pivot.ui.test;
+
+import java.util.List;
+import java.util.Map;
+
+import org.apache.pivot.scene.Stage;
+import org.apache.pivot.scene.media.Image;
+import org.apache.pivot.scene.shape.Rectangle;
+import org.apache.pivot.ui.Application;
+
+public class StageTest implements Application {
+    public String getTitle() {
+        return null;
+    }
+
+    public List<Image> getIcons() {
+        return null;
+    }
+
+    public void startup(Stage stage, Map<String, String> properties) throws Exception {
+        // TODO Rectangles don't have a preferred size; add a group to the stage and
+        // put the rectangles in it
+        stage.getNodes().add(new Rectangle(10, 10, 320, 240));
+        stage.getNodes().add(new Rectangle(20, 20, 320, 240));
+        stage.getNodes().add(new Rectangle(30, 30, 320, 240));
+    }
+
+    public boolean shutdown(boolean optional) {
+        return false;
+    }
+
+    public void suspend() {
+    }
+
+    public void resume() {
+    }
+}

Added: pivot/branches/3.x/web-server/.classpath
URL: http://svn.apache.org/viewvc/pivot/branches/3.x/web-server/.classpath?rev=1057053&view=auto
==============================================================================
--- pivot/branches/3.x/web-server/.classpath (added)
+++ pivot/branches/3.x/web-server/.classpath Sun Jan  9 23:19:19 2011
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+	<classpathentry kind="src" path="src"/>
+	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
+	<classpathentry combineaccessrules="false" kind="src" path="/core"/>
+	<classpathentry combineaccessrules="false" kind="src" path="/web"/>
+	<classpathentry kind="lib" path="lib/servlet-api.jar"/>
+	<classpathentry kind="output" path="bin"/>
+</classpath>

Added: pivot/branches/3.x/web-server/.project
URL: http://svn.apache.org/viewvc/pivot/branches/3.x/web-server/.project?rev=1057053&view=auto
==============================================================================
--- pivot/branches/3.x/web-server/.project (added)
+++ pivot/branches/3.x/web-server/.project Sun Jan  9 23:19:19 2011
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+	<name>web-server</name>
+	<comment></comment>
+	<projects>
+	</projects>
+	<buildSpec>
+		<buildCommand>
+			<name>org.eclipse.jdt.core.javabuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+	</buildSpec>
+	<natures>
+		<nature>org.eclipse.jdt.core.javanature</nature>
+	</natures>
+</projectDescription>

Added: pivot/branches/3.x/web-server/lib/servlet-api.jar
URL: http://svn.apache.org/viewvc/pivot/branches/3.x/web-server/lib/servlet-api.jar?rev=1057053&view=auto
==============================================================================
Binary file - no diff available.

Propchange: pivot/branches/3.x/web-server/lib/servlet-api.jar
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream