cayenne-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mgen...@apache.org
Subject [01/50] cayenne-modeler git commit: Bound data node name, and a bit of parent component refactoring and cleanup.
Date Thu, 05 Jan 2017 22:09:09 GMT
Repository: cayenne-modeler
Updated Branches:
  refs/heads/master [created] bf789920c


Bound data node name, and a bit of parent component refactoring and cleanup.


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

Branch: refs/heads/master
Commit: 4ad07754713553a37c9f55ee1a3dfd29232d687e
Parents: d13b10f
Author: mrg <blacknext@gmail.com>
Authored: Sun Sep 18 10:47:18 2016 -0400
Committer: mrg <blacknext@gmail.com>
Committed: Sun Sep 18 10:47:18 2016 -0400

----------------------------------------------------------------------
 .../modeler/layout/AbstractViewLayout.java      | 18 +++++---
 .../modeler/layout/DataDomainLayout.java        | 29 ++----------
 .../cayenne/modeler/layout/DataMapLayout.java   |  4 +-
 .../layout/DataNodeConfigurationTabLayout.java  | 21 +++++----
 .../DataNodeDatabaseAdapterTabLayout.java       |  4 +-
 .../cayenne/modeler/layout/DataNodeLayout.java  | 16 +++++--
 .../DataNodePasswordEncoderTabLayout.java       |  4 +-
 .../layout/DatabaseEntityColumnsTabLayout.java  | 12 ++---
 .../modeler/layout/DatabaseEntityLayout.java    | 48 ++------------------
 .../layout/DatabaseEntityTableTabLayout.java    | 42 ++---------------
 .../modeler/layout/DetailEditorSupport.java     |  2 -
 .../layout/ObjectEntityAttributesTabLayout.java | 48 +++-----------------
 .../layout/ObjectEntityClassTabLayout.java      |  4 +-
 .../modeler/layout/ObjectEntityLayout.java      | 12 ++---
 .../layouts/DataNodeConfigurationTabLayout.fxml |  4 +-
 15 files changed, 78 insertions(+), 190 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cayenne-modeler/blob/4ad07754/src/main/java/org/apache/cayenne/modeler/layout/AbstractViewLayout.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/cayenne/modeler/layout/AbstractViewLayout.java b/src/main/java/org/apache/cayenne/modeler/layout/AbstractViewLayout.java
index 5a04f4f..3fee9bf 100644
--- a/src/main/java/org/apache/cayenne/modeler/layout/AbstractViewLayout.java
+++ b/src/main/java/org/apache/cayenne/modeler/layout/AbstractViewLayout.java
@@ -31,13 +31,14 @@ public abstract class AbstractViewLayout extends AnchorPane implements
MainWindo
 {
     private static final Log LOGGER = LogFactory.getLog(AbstractViewLayout.class);
 
-    private MainWindowLayout mainWindow;
+//    private MainWindowLayout  mainWindow;
+    private final MainWindowSupport parentComponent;
 
-    protected AbstractViewLayout(MainWindowLayout mainWindow, String layout) throws IOException
+    protected AbstractViewLayout(final MainWindowSupport parentComponent, final String layout)
throws IOException
     {
-        FXMLLoader fxmlLoader = new FXMLLoader(getClass().getResource(layout));
+        final FXMLLoader fxmlLoader = new FXMLLoader(getClass().getResource(layout));
 
-        this.mainWindow = mainWindow;
+        this.parentComponent = parentComponent;
 
         fxmlLoader.setRoot(this);
         fxmlLoader.setController(this);
@@ -56,7 +57,7 @@ public abstract class AbstractViewLayout extends AnchorPane implements MainWindo
         // Override in subclasses to load in any necessary sub-views.
     }
 
-    protected void loadTab(AnchorPane source, AnchorPane destination)
+    protected void loadTab(final AnchorPane source, final AnchorPane destination)
     {
         destination.getChildren().removeAll(destination.getChildren());
 
@@ -72,6 +73,11 @@ public abstract class AbstractViewLayout extends AnchorPane implements
MainWindo
     @Override
     public MainWindowLayout getMainWindow()
     {
-        return mainWindow;
+        return parentComponent.getMainWindow(); //mainWindow;
+    }
+
+    public MainWindowSupport getParentComponent()
+    {
+        return parentComponent;
     }
 }

http://git-wip-us.apache.org/repos/asf/cayenne-modeler/blob/4ad07754/src/main/java/org/apache/cayenne/modeler/layout/DataDomainLayout.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/cayenne/modeler/layout/DataDomainLayout.java b/src/main/java/org/apache/cayenne/modeler/layout/DataDomainLayout.java
index 2399474..e2ffdf0 100644
--- a/src/main/java/org/apache/cayenne/modeler/layout/DataDomainLayout.java
+++ b/src/main/java/org/apache/cayenne/modeler/layout/DataDomainLayout.java
@@ -59,34 +59,15 @@ public class DataDomainLayout
 
     private DataDomainAdapter dataDomainAdapter;
 
-    public DataDomainLayout(final MainWindowSupport parent) throws IOException
+    public DataDomainLayout(final MainWindowSupport parentComponent) throws IOException
     {
-        super(parent.getMainWindow(), "/layouts/DataDomainLayout.fxml");
-//        FXMLLoader fxmlLoader = new FXMLLoader(getClass().getResource("/layouts/DataDomainLayout.fxml"));
-//
-//        this.mainWindow = mainWindow;
-//
-//        fxmlLoader.setRoot(this);
-//        fxmlLoader.setController(this);
-//        fxmlLoader.load();
+        super(parentComponent, "/layouts/DataDomainLayout.fxml");
     }
 
-//    @Override
-//    public void initialize()
-//    {
-//        System.out.println("foobar");
-//    }
-
-//    @Override
-//    public MainWindowLayout getMainWindow()
-//    {
-//        return mainWindow;
-//    }
-
     private final ChangeListener<FieldPathValue> changeObserver = (observable, oldValue,
newValue) ->
-        LOGGER.debug("Observable: " + observable + ", oldValue: " + oldValue + ", newValue:
" + newValue);
-
-
+        {
+            LOGGER.debug("Observable: " + observable + ", oldValue: " + oldValue + ", newValue:
" + newValue);
+        };
 
     @Override
     public void setPropertyAdapter(final DataDomainAdapter dataDomainAdapter)

http://git-wip-us.apache.org/repos/asf/cayenne-modeler/blob/4ad07754/src/main/java/org/apache/cayenne/modeler/layout/DataMapLayout.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/cayenne/modeler/layout/DataMapLayout.java b/src/main/java/org/apache/cayenne/modeler/layout/DataMapLayout.java
index 00cc506..224472f 100644
--- a/src/main/java/org/apache/cayenne/modeler/layout/DataMapLayout.java
+++ b/src/main/java/org/apache/cayenne/modeler/layout/DataMapLayout.java
@@ -41,9 +41,9 @@ public class DataMapLayout
 
     private DataMapAdapter dataMapAdapter;
 
-    public DataMapLayout(final MainWindowSupport parent) throws IOException
+    public DataMapLayout(final MainWindowSupport parentComponent) throws IOException
     {
-        super(parent.getMainWindow(), "/layouts/DataMapLayout.fxml");
+        super(parentComponent, "/layouts/DataMapLayout.fxml");
     }
 
     @Override

http://git-wip-us.apache.org/repos/asf/cayenne-modeler/blob/4ad07754/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 5322224..3d6410c 100644
--- a/src/main/java/org/apache/cayenne/modeler/layout/DataNodeConfigurationTabLayout.java
+++ b/src/main/java/org/apache/cayenne/modeler/layout/DataNodeConfigurationTabLayout.java
@@ -33,16 +33,19 @@ import javafx.scene.control.Button;
 import javafx.scene.control.ComboBox;
 import javafx.scene.control.Spinner;
 import javafx.scene.control.SpinnerValueFactory;
+import javafx.scene.control.TextField;
 import javafx.scene.layout.GridPane;
 
 public class DataNodeConfigurationTabLayout
     extends AbstractViewLayout
     implements DetailEditorSupport<DataNodeAdapter>
-
 {
     private static final Log LOGGER = LogFactory.getLog(DataNodeConfigurationTabLayout.class);
 
     @FXML
+    private TextField nameTextField;
+
+    @FXML
     private ComboBox<String> dataSourceFactoryComboBox;
 
     @FXML
@@ -75,13 +78,11 @@ public class DataNodeConfigurationTabLayout
 //    private ObjectEntityClassTabLayout objectEntityClassTabViewController;
 
     private DataNodeAdapter dataNodeAdapter;
-    private final DataNodeLayout parent;
+//    private final DataNodeLayout parent;
 
-    public DataNodeConfigurationTabLayout(final DataNodeLayout parent) throws IOException
+    public DataNodeConfigurationTabLayout(final DataNodeLayout parentComponent) throws IOException
     {
-        super(parent.getMainWindow(), "/layouts/DataNodeConfigurationTabLayout.fxml");
-
-        this.parent = parent;
+        super(parentComponent, "/layouts/DataNodeConfigurationTabLayout.fxml");
     }
 
     private final String dataSourceJdbcConfigurationSetting = "org.apache.cayenne.configuration.server.XMLPoolingDataSourceFactory";
@@ -116,10 +117,12 @@ public class DataNodeConfigurationTabLayout
                 dbcpConfigurationGrid.setVisible(dbcp);
                 dbcpConfigurationGrid.setManaged(dbcp);
 
+                final DataNodeLayout dataNodeLayout = (DataNodeLayout) getParentComponent();
+
                 if (jdbc)
-                    parent.enablePasswordEncoderTab();
+                    dataNodeLayout.enablePasswordEncoderTab();
                 else
-                    parent.disablePasswordEncoderTab();
+                    dataNodeLayout.disablePasswordEncoderTab();
             });
 
         dataSourceFactoryComboBox.getSelectionModel().select(0);
@@ -155,10 +158,12 @@ public class DataNodeConfigurationTabLayout
     @Override
     public void beginEditing()
     {
+        nameTextField.textProperty().bindBidirectional(dataNodeAdapter.getNameProperty());
     }
 
     @Override
     public void endEditing()
     {
+        nameTextField.textProperty().unbindBidirectional(dataNodeAdapter.getNameProperty());
     }
 }

http://git-wip-us.apache.org/repos/asf/cayenne-modeler/blob/4ad07754/src/main/java/org/apache/cayenne/modeler/layout/DataNodeDatabaseAdapterTabLayout.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/cayenne/modeler/layout/DataNodeDatabaseAdapterTabLayout.java
b/src/main/java/org/apache/cayenne/modeler/layout/DataNodeDatabaseAdapterTabLayout.java
index f3d018a..76c5430 100644
--- a/src/main/java/org/apache/cayenne/modeler/layout/DataNodeDatabaseAdapterTabLayout.java
+++ b/src/main/java/org/apache/cayenne/modeler/layout/DataNodeDatabaseAdapterTabLayout.java
@@ -36,9 +36,9 @@ public class DataNodeDatabaseAdapterTabLayout
 
     private DataNodeAdapter dataNodeAdapter;
 
-    public DataNodeDatabaseAdapterTabLayout(final MainWindowSupport parent) throws IOException
+    public DataNodeDatabaseAdapterTabLayout(final MainWindowSupport parentComponent) throws
IOException
     {
-        super(parent.getMainWindow(), "/layouts/DataNodeDatabaseAdapterTabLayout.fxml");
+        super(parentComponent.getMainWindow(), "/layouts/DataNodeDatabaseAdapterTabLayout.fxml");
     }
 
     @Override

http://git-wip-us.apache.org/repos/asf/cayenne-modeler/blob/4ad07754/src/main/java/org/apache/cayenne/modeler/layout/DataNodeLayout.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/cayenne/modeler/layout/DataNodeLayout.java b/src/main/java/org/apache/cayenne/modeler/layout/DataNodeLayout.java
index e9d166a..b554a5c 100644
--- a/src/main/java/org/apache/cayenne/modeler/layout/DataNodeLayout.java
+++ b/src/main/java/org/apache/cayenne/modeler/layout/DataNodeLayout.java
@@ -53,9 +53,9 @@ public class DataNodeLayout
 
     private DataNodeAdapter dataNodeAdapter;
 
-    public DataNodeLayout(final MainWindowSupport parent) throws IOException
+    public DataNodeLayout(final MainWindowSupport parentComponent) throws IOException
     {
-        super(parent.getMainWindow(), "/layouts/DataNodeLayout.fxml");
+        super(parentComponent, "/layouts/DataNodeLayout.fxml");
     }
 
     @Override
@@ -82,6 +82,10 @@ public class DataNodeLayout
     public void setPropertyAdapter(final DataNodeAdapter dataNodeAdapter)
     {
         this.dataNodeAdapter = dataNodeAdapter;
+
+        dataNodeConfigurationTabLayout.setPropertyAdapter(dataNodeAdapter);
+        dataNodeDatabaseAdapterTabLayout.setPropertyAdapter(dataNodeAdapter);
+        dataNodePasswordEncoderTabLayout.setPropertyAdapter(dataNodeAdapter);
     }
 
     @Override
@@ -89,7 +93,9 @@ public class DataNodeLayout
     {
         LOGGER.debug("begin editing " + this);
 
-//        dataMapName.textProperty().bindBidirectional(dataMapAdapter.getNameProperty());
+        dataNodeConfigurationTabLayout.beginEditing();
+        dataNodeDatabaseAdapterTabLayout.beginEditing();
+        dataNodePasswordEncoderTabLayout.beginEditing();
     }
 
     @Override
@@ -97,7 +103,9 @@ public class DataNodeLayout
     {
         LOGGER.debug("end editing " + this);
 
-//        dataMapName.textProperty().unbindBidirectional(dataMapAdapter.getNameProperty());
+        dataNodeConfigurationTabLayout.endEditing();
+        dataNodeDatabaseAdapterTabLayout.endEditing();
+        dataNodePasswordEncoderTabLayout.endEditing();
     }
 
     public void tabChanged(final Event event)

http://git-wip-us.apache.org/repos/asf/cayenne-modeler/blob/4ad07754/src/main/java/org/apache/cayenne/modeler/layout/DataNodePasswordEncoderTabLayout.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/cayenne/modeler/layout/DataNodePasswordEncoderTabLayout.java
b/src/main/java/org/apache/cayenne/modeler/layout/DataNodePasswordEncoderTabLayout.java
index e10daa0..89877ec 100644
--- a/src/main/java/org/apache/cayenne/modeler/layout/DataNodePasswordEncoderTabLayout.java
+++ b/src/main/java/org/apache/cayenne/modeler/layout/DataNodePasswordEncoderTabLayout.java
@@ -62,9 +62,9 @@ public class DataNodePasswordEncoderTabLayout
     private final String passwordLocationUrlSetting        = "URL (file:, https:, etc.)";
 
 
-    public DataNodePasswordEncoderTabLayout(final MainWindowSupport parent) throws IOException
+    public DataNodePasswordEncoderTabLayout(final MainWindowSupport parentComponent) throws
IOException
     {
-        super(parent.getMainWindow(), "/layouts/DataNodePasswordEncoderTabLayout.fxml");
+        super(parentComponent, "/layouts/DataNodePasswordEncoderTabLayout.fxml");
     }
 
     @Override

http://git-wip-us.apache.org/repos/asf/cayenne-modeler/blob/4ad07754/src/main/java/org/apache/cayenne/modeler/layout/DatabaseEntityColumnsTabLayout.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/cayenne/modeler/layout/DatabaseEntityColumnsTabLayout.java
b/src/main/java/org/apache/cayenne/modeler/layout/DatabaseEntityColumnsTabLayout.java
index 442b324..b7b274e 100644
--- a/src/main/java/org/apache/cayenne/modeler/layout/DatabaseEntityColumnsTabLayout.java
+++ b/src/main/java/org/apache/cayenne/modeler/layout/DatabaseEntityColumnsTabLayout.java
@@ -65,9 +65,9 @@ public class DatabaseEntityColumnsTabLayout
 
     private DatabaseEntityAdapter databaseEntityAdapter;
 
-    public DatabaseEntityColumnsTabLayout(MainWindowSupport parent) throws IOException
+    public DatabaseEntityColumnsTabLayout(final MainWindowSupport parent) throws IOException
     {
-        super(parent.getMainWindow(), "/layouts/DatabaseEntityColumnsTabLayout.fxml");
+        super(parent, "/layouts/DatabaseEntityColumnsTabLayout.fxml");
 //        FXMLLoader fxmlLoader = new FXMLLoader(getClass().getResource("/layouts/DatabaseEntityColumnsTabLayout.fxml"));
 //
 //        this.parent = parent;
@@ -139,7 +139,7 @@ public class DatabaseEntityColumnsTabLayout
 //
 //            loadTab(objectEntityClassTabViewController, classTabAnchorPane);
         }
-        catch (Exception exception)
+        catch (final Exception exception)
         {
             // TODO Auto-generated catch block
 //            exception.printStackTrace();
@@ -161,7 +161,7 @@ public class DatabaseEntityColumnsTabLayout
 //    }
 
     @Deprecated // Unused?
-    public void display(DbEntity dbEntity)
+    public void display(final DbEntity dbEntity)
     {
         LOGGER.debug("trying to display: " + dbEntity);
 //        attributesTableView.setItems(FXCollections.observableArrayList(objEntity.getAttributes()));
@@ -170,14 +170,14 @@ public class DatabaseEntityColumnsTabLayout
     }
 
 //    public void tabChanged(ActionEvent event)
-    public void tabChanged(Event event)
+    public void tabChanged(final Event event)
     {
         LOGGER.debug("event: " + event);
         getMainWindow().getCayenneProject().getDataMaps();
     }
 
     @Override
-    public void setPropertyAdapter(DatabaseEntityAdapter databaseEntityAdapter)
+    public void setPropertyAdapter(final DatabaseEntityAdapter databaseEntityAdapter)
     {
         this.databaseEntityAdapter = databaseEntityAdapter;
     }

http://git-wip-us.apache.org/repos/asf/cayenne-modeler/blob/4ad07754/src/main/java/org/apache/cayenne/modeler/layout/DatabaseEntityLayout.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/cayenne/modeler/layout/DatabaseEntityLayout.java b/src/main/java/org/apache/cayenne/modeler/layout/DatabaseEntityLayout.java
index eec9948..20bc48e 100644
--- a/src/main/java/org/apache/cayenne/modeler/layout/DatabaseEntityLayout.java
+++ b/src/main/java/org/apache/cayenne/modeler/layout/DatabaseEntityLayout.java
@@ -21,7 +21,6 @@ package org.apache.cayenne.modeler.layout;
 
 import java.io.IOException;
 
-import org.apache.cayenne.map.DbEntity;
 import org.apache.cayenne.modeler.adapters.DatabaseEntityAdapter;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
@@ -48,25 +47,11 @@ public class DatabaseEntityLayout
 
     private DatabaseEntityAdapter databaseEntityAdapter;
 
-    public DatabaseEntityLayout(MainWindowSupport parent) throws IOException
+    public DatabaseEntityLayout(final MainWindowSupport parentComponent) throws IOException
     {
-        super(parent.getMainWindow(), "/layouts/DatabaseEntityLayout.fxml");
-//        FXMLLoader fxmlLoader = new FXMLLoader(getClass().getResource("/layouts/DatabaseEntityLayout.fxml"));
-//
-//        this.mainWindow = mainWindow;
-//
-//        fxmlLoader.setRoot(this);
-//        fxmlLoader.setController(this);
-//        fxmlLoader.load();
+        super(parentComponent, "/layouts/DatabaseEntityLayout.fxml");
     }
 
-//    @Override
-//    public void initialize()
-//    {
-//        super.initialize();
-//        System.out.println("done with init DatabaseEntityLayout");
-//    }
-
     @Override
     protected void loadSubViews()
     {
@@ -78,44 +63,21 @@ public class DatabaseEntityLayout
             loadTab(databaseEntityTableTabLayout, tableTabAnchorPane);
             loadTab(databaseEntityColumnsTabLayout, columnsTabAnchorPane);
         }
-        catch (Exception exception)
+        catch (final Exception exception)
         {
             // TODO Auto-generated catch block
             LOGGER.error("Could not load subviews", exception);
         }
     }
 
-//    private void loadTab(AnchorPane source, AnchorPane destination)
-//    {
-//        destination.getChildren().removeAll(destination.getChildren());
-//
-//        // Make the detail view fill the pane.
-//        AnchorPane.setTopAnchor(source, 0.0);
-//        AnchorPane.setLeftAnchor(source, 0.0);
-//        AnchorPane.setRightAnchor(source, 0.0);
-//        AnchorPane.setBottomAnchor(source, 0.0);
-//
-//        destination.getChildren().add(source);
-//    }
-
-    @Deprecated // Unused?
-    public void display(DbEntity dbEntity)
-    {
-        LOGGER.debug("trying to display: " + dbEntity);
-//        objectEntityClassTabLayout.display(dbEntity);
-//        objectEntityAttributesTabLayout.display(dbEntity);
-//        objEntity.getAttributes()
-    }
-
-//    public void tabChanged(ActionEvent event)
-    public void tabChanged(Event event)
+    public void tabChanged(final Event event)
     {
         LOGGER.debug("event: " + event);
         getMainWindow().getCayenneProject().getDataMaps();
     }
 
     @Override
-    public void setPropertyAdapter(DatabaseEntityAdapter databaseEntityAdapter)
+    public void setPropertyAdapter(final DatabaseEntityAdapter databaseEntityAdapter)
     {
         this.databaseEntityAdapter = databaseEntityAdapter;
 

http://git-wip-us.apache.org/repos/asf/cayenne-modeler/blob/4ad07754/src/main/java/org/apache/cayenne/modeler/layout/DatabaseEntityTableTabLayout.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/cayenne/modeler/layout/DatabaseEntityTableTabLayout.java
b/src/main/java/org/apache/cayenne/modeler/layout/DatabaseEntityTableTabLayout.java
index cc55d96..0c9ace1 100644
--- a/src/main/java/org/apache/cayenne/modeler/layout/DatabaseEntityTableTabLayout.java
+++ b/src/main/java/org/apache/cayenne/modeler/layout/DatabaseEntityTableTabLayout.java
@@ -21,7 +21,6 @@ package org.apache.cayenne.modeler.layout;
 
 import java.io.IOException;
 
-import org.apache.cayenne.map.DbEntity;
 import org.apache.cayenne.modeler.adapters.DatabaseEntityAdapter;
 
 public class DatabaseEntityTableTabLayout
@@ -38,37 +37,13 @@ public class DatabaseEntityTableTabLayout
 
     private DatabaseEntityAdapter databaseEntityAdapter;
 
-    public DatabaseEntityTableTabLayout(MainWindowSupport parent) throws IOException
+    public DatabaseEntityTableTabLayout(final MainWindowSupport parentComponent) throws IOException
     {
-        super(parent.getMainWindow(), "/layouts/DatabaseEntityTableTabLayout.fxml");
-//        FXMLLoader fxmlLoader = new FXMLLoader(getClass().getResource("/layouts/DatabaseEntityTableTabLayout.fxml"));
-//
-//        this.parent = parent;
-//
-//        fxmlLoader.setRoot(this);
-//        fxmlLoader.setController(this);
-//        fxmlLoader.load();
-    }
-
-
-//    @Override
-//    public void initialize()
-//    {
-////        dbEntitySyncButton.setGraphic(GlyphsDude.createIcon(FontAwesomeIcon.REFRESH,
"16px"));
-//    }
-
-//    private ObjEntity objectEntity;
-    @Deprecated // Unused?
-    public void display(DbEntity databaseEntity)
-    {
-//        this.objectEntity = objectEntity;
-//        System.out.println("trying to display: " + objectEntity);
-
-//        abstractClassCheckbox.selectedProperty().bind(objectEntity.isAbstract());
+        super(parentComponent, "/layouts/DatabaseEntityTableTabLayout.fxml");
     }
 
     @Override
-    public void setPropertyAdapter(DatabaseEntityAdapter databaseEntityAdapter)
+    public void setPropertyAdapter(final DatabaseEntityAdapter databaseEntityAdapter)
     {
         this.databaseEntityAdapter = databaseEntityAdapter;
     }
@@ -82,15 +57,4 @@ public class DatabaseEntityTableTabLayout
     public void endEditing()
     {
     }
-
-//    @Override
-//    protected void loadComponents()
-//    {
-//    }
-
-//    @Override
-//    public MainWindowLayout getMainWindow()
-//    {
-//        return parent.getMainWindow();
-//    }
 }

http://git-wip-us.apache.org/repos/asf/cayenne-modeler/blob/4ad07754/src/main/java/org/apache/cayenne/modeler/layout/DetailEditorSupport.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/cayenne/modeler/layout/DetailEditorSupport.java b/src/main/java/org/apache/cayenne/modeler/layout/DetailEditorSupport.java
index 691ba85..133f57b 100644
--- a/src/main/java/org/apache/cayenne/modeler/layout/DetailEditorSupport.java
+++ b/src/main/java/org/apache/cayenne/modeler/layout/DetailEditorSupport.java
@@ -26,6 +26,4 @@ public interface DetailEditorSupport<T extends CayennePropertyAdapter>
     void setPropertyAdapter(final T propertyAdapter);
     void beginEditing();
     void endEditing();
-
-//    void windowWillClose();
 }

http://git-wip-us.apache.org/repos/asf/cayenne-modeler/blob/4ad07754/src/main/java/org/apache/cayenne/modeler/layout/ObjectEntityAttributesTabLayout.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/cayenne/modeler/layout/ObjectEntityAttributesTabLayout.java
b/src/main/java/org/apache/cayenne/modeler/layout/ObjectEntityAttributesTabLayout.java
index a7b4382..c60a594 100644
--- a/src/main/java/org/apache/cayenne/modeler/layout/ObjectEntityAttributesTabLayout.java
+++ b/src/main/java/org/apache/cayenne/modeler/layout/ObjectEntityAttributesTabLayout.java
@@ -24,14 +24,12 @@ import java.io.IOException;
 import org.apache.cayenne.map.ObjAttribute;
 import org.apache.cayenne.map.ObjEntity;
 import org.apache.cayenne.modeler.adapters.ObjectEntityAdapter;
-import org.apache.cayenne.modeler.utility.ObjectEntityUtilities;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 
 import de.jensd.fx.glyphs.GlyphsDude;
 import de.jensd.fx.glyphs.fontawesome.FontAwesomeIcon;
 import javafx.collections.FXCollections;
-import javafx.collections.ObservableList;
 import javafx.event.Event;
 import javafx.fxml.FXML;
 import javafx.scene.control.TableColumn;
@@ -66,29 +64,16 @@ public class ObjectEntityAttributesTabLayout
 
     private ObjectEntityAdapter objectEntityAdapter;
 
-    public ObjectEntityAttributesTabLayout(MainWindowSupport parent) throws IOException
+    public ObjectEntityAttributesTabLayout(final MainWindowSupport parentComponent) throws
IOException
     {
-        super(parent.getMainWindow(), "/layouts/ObjectEntityAttributesTabLayout.fxml");
-//        FXMLLoader fxmlLoader = new FXMLLoader(getClass().getResource("/layouts/ObjectEntityAttributesTabLayout.fxml"));
-//
-//        this.parent = parent;
-//
-//        fxmlLoader.setRoot(this);
-//        fxmlLoader.setController(this);
-//        fxmlLoader.load();
+        super(parentComponent, "/layouts/ObjectEntityAttributesTabLayout.fxml");
     }
 
-    private static ObservableList javaTypes = FXCollections.observableArrayList(ObjectEntityUtilities.getRegisteredTypeNames());
+//    private static ObservableList javaTypes = FXCollections.observableArrayList(ObjectEntityUtilities.getRegisteredTypeNames());
 
     @Override
     public void initialize()
     {
-//        getScene().getWindow().getScene();
-//        getStage().getScene().getWindow().get
-//        System.out.println("mrg: " + getStage().getScene().getRoot());
-//        System.out.println("oeatv");
-//
-//        loadComponents();
         super.initialize();
 
         attributeUsedForLockingColumn.setText(null);
@@ -145,21 +130,7 @@ public class ObjectEntityAttributesTabLayout
 //        }
 //    }
 
-//    @Override
-//    private void loadTab(AnchorPane source, AnchorPane destination)
-//    {
-//        destination.getChildren().removeAll(destination.getChildren());
-//
-//        // Make the detail view fill the pane.
-//        AnchorPane.setTopAnchor(source, 0.0);
-//        AnchorPane.setLeftAnchor(source, 0.0);
-//        AnchorPane.setRightAnchor(source, 0.0);
-//        AnchorPane.setBottomAnchor(source, 0.0);
-//
-//        destination.getChildren().add(source);
-//    }
-
-    public void display(ObjEntity objEntity)
+    public void display(final ObjEntity objEntity)
     {
         LOGGER.debug("trying to display: " + objEntity);
         attributesTableView.setItems(FXCollections.observableArrayList(objEntity.getAttributes()));
@@ -167,21 +138,14 @@ public class ObjectEntityAttributesTabLayout
 //        objEntity.getAttributes()
     }
 
-//    public void tabChanged(ActionEvent event)
-    public void tabChanged(Event event)
+    public void tabChanged(final Event event)
     {
         LOGGER.debug("event: " + event);
         getMainWindow().getCayenneProject().getDataMaps();
     }
-//
-//    @Override
-//    public MainWindowLayout getMainWindow()
-//    {
-//        return parent.getMainWindow();
-//    }
 
     @Override
-    public void setPropertyAdapter(ObjectEntityAdapter objectEntityAdapter)
+    public void setPropertyAdapter(final ObjectEntityAdapter objectEntityAdapter)
     {
         this.objectEntityAdapter = objectEntityAdapter;
     }

http://git-wip-us.apache.org/repos/asf/cayenne-modeler/blob/4ad07754/src/main/java/org/apache/cayenne/modeler/layout/ObjectEntityClassTabLayout.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/cayenne/modeler/layout/ObjectEntityClassTabLayout.java
b/src/main/java/org/apache/cayenne/modeler/layout/ObjectEntityClassTabLayout.java
index c50b84c..3158636 100644
--- a/src/main/java/org/apache/cayenne/modeler/layout/ObjectEntityClassTabLayout.java
+++ b/src/main/java/org/apache/cayenne/modeler/layout/ObjectEntityClassTabLayout.java
@@ -47,9 +47,9 @@ public class ObjectEntityClassTabLayout
 
     private ObjectEntityAdapter objectEntityAdapter;
 
-    public ObjectEntityClassTabLayout(final MainWindowSupport parent) throws IOException
+    public ObjectEntityClassTabLayout(final MainWindowSupport parentComponent) throws IOException
     {
-        super(parent.getMainWindow(), "/layouts/ObjectEntityClassTabLayout.fxml");
+        super(parentComponent, "/layouts/ObjectEntityClassTabLayout.fxml");
     }
 
 

http://git-wip-us.apache.org/repos/asf/cayenne-modeler/blob/4ad07754/src/main/java/org/apache/cayenne/modeler/layout/ObjectEntityLayout.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/cayenne/modeler/layout/ObjectEntityLayout.java b/src/main/java/org/apache/cayenne/modeler/layout/ObjectEntityLayout.java
index a6364c1..f676a0d 100644
--- a/src/main/java/org/apache/cayenne/modeler/layout/ObjectEntityLayout.java
+++ b/src/main/java/org/apache/cayenne/modeler/layout/ObjectEntityLayout.java
@@ -46,9 +46,9 @@ public class ObjectEntityLayout
 
     private ObjectEntityAdapter objectEntityAdapter;
 
-    public ObjectEntityLayout(MainWindowSupport parent) throws IOException
+    public ObjectEntityLayout(final MainWindowSupport parentComponent) throws IOException
     {
-        super(parent.getMainWindow(), "/layouts/ObjectEntityLayout.fxml");
+        super(parentComponent, "/layouts/ObjectEntityLayout.fxml");
 //        FXMLLoader fxmlLoader = new FXMLLoader(getClass().getResource("/layouts/ObjectEntityLayout.fxml"));
 //
 //        this.mainWindow = mainWindow;
@@ -75,7 +75,7 @@ public class ObjectEntityLayout
             loadTab(objectEntityClassTabLayout, classTabAnchorPane);
             loadTab(objectEntityAttributesTabLayout, attributesTabAnchorPane);
         }
-        catch (Exception exception)
+        catch (final Exception exception)
         {
             // TODO Auto-generated catch block
             LOGGER.error("Could not load subviews", exception);
@@ -97,7 +97,7 @@ public class ObjectEntityLayout
 //    }
 
     @Deprecated // Unused?
-    public void display(ObjEntity objEntity)
+    public void display(final ObjEntity objEntity)
     {
         LOGGER.debug("trying to display: " + objEntity);
 //        objectEntityClassTabLayout.display(objEntity);
@@ -106,14 +106,14 @@ public class ObjectEntityLayout
     }
 
 //    public void tabChanged(ActionEvent event)
-    public void tabChanged(Event event)
+    public void tabChanged(final Event event)
     {
         LOGGER.debug("event: " + event);
         getMainWindow().getCayenneProject().getDataMaps();
     }
 
     @Override
-    public void setPropertyAdapter(ObjectEntityAdapter objectEntityAdapter)
+    public void setPropertyAdapter(final ObjectEntityAdapter objectEntityAdapter)
     {
         this.objectEntityAdapter = objectEntityAdapter;
 

http://git-wip-us.apache.org/repos/asf/cayenne-modeler/blob/4ad07754/src/main/resources/layouts/DataNodeConfigurationTabLayout.fxml
----------------------------------------------------------------------
diff --git a/src/main/resources/layouts/DataNodeConfigurationTabLayout.fxml b/src/main/resources/layouts/DataNodeConfigurationTabLayout.fxml
index 64a16a8..77717ad 100644
--- a/src/main/resources/layouts/DataNodeConfigurationTabLayout.fxml
+++ b/src/main/resources/layouts/DataNodeConfigurationTabLayout.fxml
@@ -29,7 +29,7 @@
                </rowConstraints>
                <children>
                   <Label alignment="CENTER_RIGHT" text="Name: " />
-                  <TextField fx:id="dataMapName" maxWidth="-Infinity" minWidth="-Infinity"
prefWidth="200.0" promptText="Data Node Name" GridPane.columnIndex="1" />
+                  <TextField fx:id="nameTextField" maxWidth="-Infinity" minWidth="-Infinity"
prefWidth="200.0" promptText="Data Node Name" GridPane.columnIndex="1" />
                   <Label text="Development DataSource: " GridPane.rowIndex="2" />
                   <Label text="Schema Update Strategy: " GridPane.rowIndex="1" />
                   <ComboBox prefWidth="500.0" promptText="Select Local DataSource (optional)"
GridPane.columnIndex="1" GridPane.rowIndex="2" />
@@ -102,7 +102,7 @@
                            </font>
                         </Label>
                         <Label text="JNDI Location: " GridPane.halignment="RIGHT" GridPane.rowIndex="1"
/>
-                        <TextField promptText="jdbc/your_name" GridPane.columnIndex="1"
GridPane.rowIndex="1" />
+                        <TextField promptText="jdbc/jndi_location_name" GridPane.columnIndex="1"
GridPane.rowIndex="1" />
                      </children>
                   </GridPane>
                   <GridPane fx:id="dbcpConfigurationGrid">


Mime
View raw message