cayenne-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mgen...@apache.org
Subject [09/50] cayenne-modeler git commit: Updated DataNodeAdapter to valid Property Adapter semantics.
Date Thu, 05 Jan 2017 22:09:17 GMT
Updated DataNodeAdapter to valid Property Adapter semantics.


Project: http://git-wip-us.apache.org/repos/asf/cayenne-modeler/repo
Commit: http://git-wip-us.apache.org/repos/asf/cayenne-modeler/commit/d4dc76cc
Tree: http://git-wip-us.apache.org/repos/asf/cayenne-modeler/tree/d4dc76cc
Diff: http://git-wip-us.apache.org/repos/asf/cayenne-modeler/diff/d4dc76cc

Branch: refs/heads/master
Commit: d4dc76cce84943f985b99fc4f0508d1d3ce02457
Parents: 4b05602
Author: mrg <blacknext@gmail.com>
Authored: Mon Sep 26 08:47:10 2016 -0400
Committer: mrg <blacknext@gmail.com>
Committed: Mon Sep 26 08:47:10 2016 -0400

----------------------------------------------------------------------
 .../org/apache/cayenne/modeler/adapters/DataNodeAdapter.java  | 7 +++----
 .../modeler/layout/DataNodeConfigurationTabLayout.java        | 4 ++--
 .../org/apache/cayenne/modeler/project/DataNodeTreeItem.java  | 2 +-
 3 files changed, 6 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cayenne-modeler/blob/d4dc76cc/src/main/java/org/apache/cayenne/modeler/adapters/DataNodeAdapter.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/cayenne/modeler/adapters/DataNodeAdapter.java b/src/main/java/org/apache/cayenne/modeler/adapters/DataNodeAdapter.java
index 4a1bc64..29722ca 100644
--- a/src/main/java/org/apache/cayenne/modeler/adapters/DataNodeAdapter.java
+++ b/src/main/java/org/apache/cayenne/modeler/adapters/DataNodeAdapter.java
@@ -51,8 +51,7 @@ public class DataNodeAdapter extends CayennePropertyAdapter
         }
     }
 
-    public StringProperty getNameProperty()
-    {
-        return nameProperty;
-    }
+    public StringProperty nameProperty() { return nameProperty; }
+    public String getName() { return nameProperty.get(); }
+    public void setName(final String value) { nameProperty.set(value); }
 }

http://git-wip-us.apache.org/repos/asf/cayenne-modeler/blob/d4dc76cc/src/main/java/org/apache/cayenne/modeler/layout/DataNodeConfigurationTabLayout.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/cayenne/modeler/layout/DataNodeConfigurationTabLayout.java
b/src/main/java/org/apache/cayenne/modeler/layout/DataNodeConfigurationTabLayout.java
index 05b490e..0c91b53 100644
--- a/src/main/java/org/apache/cayenne/modeler/layout/DataNodeConfigurationTabLayout.java
+++ b/src/main/java/org/apache/cayenne/modeler/layout/DataNodeConfigurationTabLayout.java
@@ -177,12 +177,12 @@ public class DataNodeConfigurationTabLayout
     @Override
     public void beginEditing()
     {
-        nameTextField.textProperty().bindBidirectional(dataNodeAdapter.getNameProperty());
+        nameTextField.textProperty().bindBidirectional(dataNodeAdapter.nameProperty());
     }
 
     @Override
     public void endEditing()
     {
-        nameTextField.textProperty().unbindBidirectional(dataNodeAdapter.getNameProperty());
+        nameTextField.textProperty().unbindBidirectional(dataNodeAdapter.nameProperty());
     }
 }

http://git-wip-us.apache.org/repos/asf/cayenne-modeler/blob/d4dc76cc/src/main/java/org/apache/cayenne/modeler/project/DataNodeTreeItem.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/cayenne/modeler/project/DataNodeTreeItem.java b/src/main/java/org/apache/cayenne/modeler/project/DataNodeTreeItem.java
index 1a2e269..0d48e45 100644
--- a/src/main/java/org/apache/cayenne/modeler/project/DataNodeTreeItem.java
+++ b/src/main/java/org/apache/cayenne/modeler/project/DataNodeTreeItem.java
@@ -33,7 +33,7 @@ public class DataNodeTreeItem extends TreeItem<String> implements
CayenneTreeIte
     {
         this.dataNodeAdapter = dataNodeAdapter;
 
-        valueProperty().bindBidirectional(dataNodeAdapter.getNameProperty());
+        valueProperty().bindBidirectional(dataNodeAdapter.nameProperty());
         setGraphic(GlyphsDude.createIcon(FontAwesomeIcon.SERVER, TREE_ICON_SIZE));
         parent.getChildren().add(this);
         setExpanded(true);


Mime
View raw message