changeset 89:2dd082b14d62

Add @DefaultProperty annotations (RT-14879).
author Greg Brown <greg.x.brown@oracle.com>
date Wed, 30 Nov 2011 11:33:44 -0500
parents 72189bd682fe
children 87f489a5e00a
files javafx-ui-controls/src/javafx/scene/control/Labeled.java javafx-ui-controls/src/javafx/scene/control/ListView.java javafx-ui-controls/src/javafx/scene/control/Menu.java javafx-ui-controls/src/javafx/scene/control/MenuBar.java javafx-ui-controls/src/javafx/scene/control/ScrollPane.java javafx-ui-controls/src/javafx/scene/control/TabPane.java javafx-ui-controls/src/javafx/scene/control/TableView.java javafx-ui-controls/src/javafx/scene/control/TextInputControl.java javafx-ui-controls/src/javafx/scene/control/TitledPane.java javafx-ui-controls/src/javafx/scene/control/TreeView.java
diffstat 10 files changed, 20 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/javafx-ui-controls/src/javafx/scene/control/Labeled.java	Wed Nov 30 00:54:19 2011 -0800
+++ b/javafx-ui-controls/src/javafx/scene/control/Labeled.java	Wed Nov 30 11:33:44 2011 -0500
@@ -51,6 +51,7 @@
 
 import com.sun.javafx.css.Styleable;
 import com.sun.javafx.css.StyleableProperty;
+import javafx.beans.DefaultProperty;
 import javafx.beans.property.ReadOnlyObjectProperty;
 import javafx.beans.property.ReadOnlyObjectWrapper;
 
@@ -78,6 +79,7 @@
  * @see Label
  * @see ToggleButton
  */
+@DefaultProperty("text")
 public abstract class Labeled extends Control {
 
     /***************************************************************************
--- a/javafx-ui-controls/src/javafx/scene/control/ListView.java	Wed Nov 30 00:54:19 2011 -0800
+++ b/javafx-ui-controls/src/javafx/scene/control/ListView.java	Wed Nov 30 11:33:44 2011 -0500
@@ -52,6 +52,7 @@
 import com.sun.javafx.scene.control.WeakListChangeListener;
 import com.sun.javafx.scene.control.skin.ListViewSkin;
 import com.sun.javafx.scene.control.skin.VirtualContainerBase;
+import javafx.beans.DefaultProperty;
 import javafx.beans.property.ReadOnlyIntegerProperty;
 import javafx.beans.property.ReadOnlyIntegerWrapper;
 import javafx.beans.property.BooleanProperty;
@@ -131,6 +132,7 @@
  *          and {@link #focusModelProperty() focus model}.
  */
 // TODO add code examples
+@DefaultProperty("items")
 public class ListView<T> extends Control {
     
     /***************************************************************************
--- a/javafx-ui-controls/src/javafx/scene/control/Menu.java	Wed Nov 30 00:54:19 2011 -0800
+++ b/javafx-ui-controls/src/javafx/scene/control/Menu.java	Wed Nov 30 11:33:44 2011 -0500
@@ -39,6 +39,7 @@
 import com.sun.javafx.collections.TrackableObservableList;
 import com.sun.javafx.event.EventHandlerManager;
 import com.sun.javafx.scene.control.Logging;
+import javafx.beans.DefaultProperty;
 import javafx.beans.property.ReadOnlyBooleanProperty;
 import javafx.beans.property.ReadOnlyBooleanWrapper;
 
@@ -80,6 +81,7 @@
  * @see MenuBar
  * @see MenuItem
  */
+@DefaultProperty("items")
 public class Menu extends MenuItem {
 
     /**
--- a/javafx-ui-controls/src/javafx/scene/control/MenuBar.java	Wed Nov 30 00:54:19 2011 -0800
+++ b/javafx-ui-controls/src/javafx/scene/control/MenuBar.java	Wed Nov 30 11:33:44 2011 -0500
@@ -25,6 +25,7 @@
 
 package javafx.scene.control;
 
+import javafx.beans.DefaultProperty;
 import javafx.collections.FXCollections;
 import javafx.collections.ObservableList;
 
@@ -54,6 +55,7 @@
  * @see Menu
  * @see MenuItem
  */
+@DefaultProperty("menus")
 public class MenuBar extends Control {
 
     /***************************************************************************
--- a/javafx-ui-controls/src/javafx/scene/control/ScrollPane.java	Wed Nov 30 00:54:19 2011 -0800
+++ b/javafx-ui-controls/src/javafx/scene/control/ScrollPane.java	Wed Nov 30 11:33:44 2011 -0500
@@ -44,6 +44,7 @@
 import com.sun.javafx.css.Styleable;
 import com.sun.javafx.css.StyleManager;
 import com.sun.javafx.css.StyleableProperty;
+import javafx.beans.DefaultProperty;
 
 /**
  * A Control that provides a scrolled, clipped viewport of its contents. It
@@ -81,6 +82,7 @@
  *
  * Implementation of ScrollPane According to JavaFX UI Control API Specification
  */
+@DefaultProperty("content")
 public class ScrollPane extends Control {
 
     /***************************************************************************
--- a/javafx-ui-controls/src/javafx/scene/control/TabPane.java	Wed Nov 30 00:54:19 2011 -0800
+++ b/javafx-ui-controls/src/javafx/scene/control/TabPane.java	Wed Nov 30 11:33:44 2011 -0500
@@ -43,6 +43,7 @@
 import com.sun.javafx.css.Styleable;
 import com.sun.javafx.css.StyleManager;
 import com.sun.javafx.css.StyleableProperty;
+import javafx.beans.DefaultProperty;
 
 /**
  * <p>A control that allows switching between a group of {@link Tab Tabs}.  Only one tab
@@ -75,6 +76,7 @@
  *
  * @see Tab
  */
+@DefaultProperty("tabs")
 public class TabPane extends Control {
     private static final double DEFAULT_TAB_MIN_WIDTH = 0;
 
--- a/javafx-ui-controls/src/javafx/scene/control/TableView.java	Wed Nov 30 00:54:19 2011 -0800
+++ b/javafx-ui-controls/src/javafx/scene/control/TableView.java	Wed Nov 30 11:33:44 2011 -0500
@@ -61,6 +61,7 @@
 import com.sun.javafx.scene.control.skin.TableViewSkin;
 import com.sun.javafx.scene.control.skin.VirtualContainerBase;
 import java.util.HashMap;
+import javafx.beans.DefaultProperty;
 import javafx.beans.WeakInvalidationListener;
 import javafx.beans.property.ReadOnlyObjectProperty;
 import javafx.beans.property.ReadOnlyObjectWrapper;
@@ -200,6 +201,7 @@
  * @see TablePosition
  * @param <S> The type of the objects contained within the TableView items list.
  */
+@DefaultProperty("items")
 public class TableView<S> extends Control {
     
     /***************************************************************************
--- a/javafx-ui-controls/src/javafx/scene/control/TextInputControl.java	Wed Nov 30 00:54:19 2011 -0800
+++ b/javafx-ui-controls/src/javafx/scene/control/TextInputControl.java	Wed Nov 30 11:33:44 2011 -0500
@@ -47,10 +47,12 @@
 
 import com.sun.javafx.Utils;
 import com.sun.javafx.binding.ExpressionHelper;
+import javafx.beans.DefaultProperty;
 
 /**
  * Abstract base class for text input controls.
  */
+@DefaultProperty("text")
 public abstract class TextInputControl extends Control {
     /**
      * Interface representing a text input's content. Since it is an ObservableStringValue,
--- a/javafx-ui-controls/src/javafx/scene/control/TitledPane.java	Wed Nov 30 00:54:19 2011 -0800
+++ b/javafx-ui-controls/src/javafx/scene/control/TitledPane.java	Wed Nov 30 11:33:44 2011 -0500
@@ -39,6 +39,7 @@
 import com.sun.javafx.css.Styleable;
 import com.sun.javafx.css.StyleManager;
 import com.sun.javafx.css.StyleableProperty;
+import javafx.beans.DefaultProperty;
 
 /**
  * <p>A TitledPane is a panel with a title that can be opened and closed.</p>
@@ -57,7 +58,7 @@
  * </code></pre>
  *
  */
-
+@DefaultProperty("content")
 public class TitledPane extends Labeled {
 
     /***************************************************************************
--- a/javafx-ui-controls/src/javafx/scene/control/TreeView.java	Wed Nov 30 00:54:19 2011 -0800
+++ b/javafx-ui-controls/src/javafx/scene/control/TreeView.java	Wed Nov 30 11:33:44 2011 -0500
@@ -47,6 +47,7 @@
 import com.sun.javafx.scene.control.WeakEventHandler;
 import com.sun.javafx.scene.control.skin.VirtualContainerBase;
 import java.lang.ref.WeakReference;
+import javafx.beans.DefaultProperty;
 import javafx.beans.property.SimpleBooleanProperty;
 import javafx.beans.property.ReadOnlyObjectProperty;
 import javafx.beans.property.ReadOnlyObjectWrapper;
@@ -94,6 +95,7 @@
  * @param <T> The type of the item contained within the {@link TreeItem} value
  *      property for all tree items in this TreeView.
  */
+@DefaultProperty("root")
 public class TreeView<T> extends Control {
     
     /***************************************************************************