cayenne-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ntimof...@apache.org
Subject [4/5] cayenne git commit: Global Modeler update and bug fixing. Major changes: - CAY-2300 New icons and design improvements - alert istead of silent fail for edit relationship without target - closes #206 CAY-2287 - closes #209 inheritance icon allow
Date Wed, 10 May 2017 14:17:41 GMT
http://git-wip-us.apache.org/repos/asf/cayenne/blob/09b0fdb0/modeler/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/action/CreateNodeAction.java
----------------------------------------------------------------------
diff --git a/modeler/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/action/CreateNodeAction.java b/modeler/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/action/CreateNodeAction.java
index 56a0437..25c3bb2 100644
--- a/modeler/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/action/CreateNodeAction.java
+++ b/modeler/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/action/CreateNodeAction.java
@@ -53,7 +53,7 @@ public class CreateNodeAction extends CayenneAction {
 
     @Override
     public String getIconName() {
-        return "icon-node.gif";
+        return "icon-node.png";
     }
 
     @Override

http://git-wip-us.apache.org/repos/asf/cayenne/blob/09b0fdb0/modeler/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/action/CreateObjEntityAction.java
----------------------------------------------------------------------
diff --git a/modeler/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/action/CreateObjEntityAction.java b/modeler/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/action/CreateObjEntityAction.java
index 397bf3a..9080833 100644
--- a/modeler/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/action/CreateObjEntityAction.java
+++ b/modeler/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/action/CreateObjEntityAction.java
@@ -71,7 +71,7 @@ public class CreateObjEntityAction extends CayenneAction {
 
     @Override
     public String getIconName() {
-        return "icon-new_objentity.gif";
+        return "icon-new_objentity.png";
     }
 
     @Override

http://git-wip-us.apache.org/repos/asf/cayenne/blob/09b0fdb0/modeler/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/action/CreateProcedureAction.java
----------------------------------------------------------------------
diff --git a/modeler/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/action/CreateProcedureAction.java b/modeler/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/action/CreateProcedureAction.java
index 3dbdaa4..df8e612 100644
--- a/modeler/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/action/CreateProcedureAction.java
+++ b/modeler/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/action/CreateProcedureAction.java
@@ -87,6 +87,6 @@ public class CreateProcedureAction extends CayenneAction {
     }
 
     public String getIconName() {
-        return "icon-stored-procedure.gif";
+        return "icon-stored-procedure.png";
     }
 }

http://git-wip-us.apache.org/repos/asf/cayenne/blob/09b0fdb0/modeler/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/action/CreateProcedureParameterAction.java
----------------------------------------------------------------------
diff --git a/modeler/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/action/CreateProcedureParameterAction.java b/modeler/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/action/CreateProcedureParameterAction.java
index 67c19c5..01287d3 100644
--- a/modeler/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/action/CreateProcedureParameterAction.java
+++ b/modeler/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/action/CreateProcedureParameterAction.java
@@ -59,7 +59,7 @@ public class CreateProcedureParameterAction extends CayenneAction {
 
     @Override
     public String getIconName() {
-        return "icon-plus.gif";
+        return "icon-plus.png";
     }
 
     /**

http://git-wip-us.apache.org/repos/asf/cayenne/blob/09b0fdb0/modeler/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/action/CreateQueryAction.java
----------------------------------------------------------------------
diff --git a/modeler/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/action/CreateQueryAction.java b/modeler/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/action/CreateQueryAction.java
index 4595214..076d994 100644
--- a/modeler/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/action/CreateQueryAction.java
+++ b/modeler/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/action/CreateQueryAction.java
@@ -51,7 +51,7 @@ public class CreateQueryAction extends CayenneAction {
     }
 
     public String getIconName() {
-        return "icon-query.gif";
+        return "icon-new_query.png";
     }
 
     public void performAction(ActionEvent e) {

http://git-wip-us.apache.org/repos/asf/cayenne/blob/09b0fdb0/modeler/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/action/CreateRelationshipAction.java
----------------------------------------------------------------------
diff --git a/modeler/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/action/CreateRelationshipAction.java b/modeler/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/action/CreateRelationshipAction.java
index ec3a42d..07cfbc3 100644
--- a/modeler/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/action/CreateRelationshipAction.java
+++ b/modeler/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/action/CreateRelationshipAction.java
@@ -81,7 +81,7 @@ public class CreateRelationshipAction extends CayenneAction {
 
     @Override
     public String getIconName() {
-        return "icon-relationship.gif";
+        return "icon-relationship.png";
     }
 
     /**

http://git-wip-us.apache.org/repos/asf/cayenne/blob/09b0fdb0/modeler/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/action/CutAction.java
----------------------------------------------------------------------
diff --git a/modeler/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/action/CutAction.java b/modeler/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/action/CutAction.java
index 0a19569..fa37a34 100644
--- a/modeler/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/action/CutAction.java
+++ b/modeler/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/action/CutAction.java
@@ -53,7 +53,7 @@ public class CutAction extends CayenneAction {
 
     @Override
     public String getIconName() {
-        return "icon-cut.gif";
+        return "icon-cut.png";
     }
 
     @Override

http://git-wip-us.apache.org/repos/asf/cayenne/blob/09b0fdb0/modeler/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/action/DbEntityCounterpartAction.java
----------------------------------------------------------------------
diff --git a/modeler/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/action/DbEntityCounterpartAction.java b/modeler/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/action/DbEntityCounterpartAction.java
index da83cd3..f127133 100644
--- a/modeler/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/action/DbEntityCounterpartAction.java
+++ b/modeler/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/action/DbEntityCounterpartAction.java
@@ -49,7 +49,7 @@ public class DbEntityCounterpartAction extends CayenneAction {
     }
 
     public String getIconName() {
-        return "icon-move_up.gif";
+        return "icon-move_up.png";
     }
 
     /**

http://git-wip-us.apache.org/repos/asf/cayenne/blob/09b0fdb0/modeler/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/action/DbEntitySyncAction.java
----------------------------------------------------------------------
diff --git a/modeler/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/action/DbEntitySyncAction.java b/modeler/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/action/DbEntitySyncAction.java
index 3b1ef7f..8544180 100644
--- a/modeler/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/action/DbEntitySyncAction.java
+++ b/modeler/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/action/DbEntitySyncAction.java
@@ -52,7 +52,7 @@ public class DbEntitySyncAction extends CayenneAction {
 	}
 
 	public String getIconName() {
-		return "icon-sync.gif";
+		return "icon-sync.png";
 	}
 
 	/**

http://git-wip-us.apache.org/repos/asf/cayenne/blob/09b0fdb0/modeler/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/action/DefaultActionManager.java
----------------------------------------------------------------------
diff --git a/modeler/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/action/DefaultActionManager.java b/modeler/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/action/DefaultActionManager.java
index 488b9e8..5e170ef 100644
--- a/modeler/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/action/DefaultActionManager.java
+++ b/modeler/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/action/DefaultActionManager.java
@@ -86,13 +86,12 @@ public class DefaultActionManager implements ActionManager {
         // start callback-related actions
         registerAction(new CreateCallbackMethodAction(application)).setAlwaysOn(true);
         registerAction(new RemoveCallbackMethodAction(application));
-        registerAction(new RemoveEntityListenerAction(application));
-        registerAction(new RemoveEntityListenerForDataMapAction(application));
         // end callback-related actions
         registerAction(new DbEntitySyncAction(application));
         registerAction(new ObjEntitySyncAction(application));
         registerAction(new DbEntityCounterpartAction(application));
         registerAction(new ObjEntityCounterpartAction(application));
+        registerAction(new ObjEntityToSuperEntityAction(application));
         registerAction(new ReverseEngineeringAction(application));
         registerAction(new InferRelationshipsAction(application));
         registerAction(new ImportEOModelAction(application));
@@ -133,7 +132,7 @@ public class DefaultActionManager implements ActionManager {
 
         registerAction(new CreateEmbeddableAction(application));
         registerAction(new ShowGraphEntityAction(application));
-        
+
         registerAction(new CollapseTreeAction(application));
         registerAction(new FilterAction(application));
 
@@ -192,6 +191,7 @@ public class DefaultActionManager implements ActionManager {
                 CreateAttributeAction.class.getName(),
                 CreateRelationshipAction.class.getName(),
                 ObjEntityCounterpartAction.class.getName(),
+                ObjEntityToSuperEntityAction.class.getName(),
                 ShowGraphEntityAction.class.getName()));
 
         DB_ENTITY_ACTIONS = new HashSet<String>(DATA_MAP_ACTIONS);

http://git-wip-us.apache.org/repos/asf/cayenne/blob/09b0fdb0/modeler/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/action/FilterAction.java
----------------------------------------------------------------------
diff --git a/modeler/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/action/FilterAction.java b/modeler/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/action/FilterAction.java
index 0c680f1..91d88eb 100644
--- a/modeler/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/action/FilterAction.java
+++ b/modeler/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/action/FilterAction.java
@@ -46,9 +46,14 @@ public class FilterAction extends CayenneAction{
 	@Override
 	public void performAction(ActionEvent e) {
 		JButton source = (JButton)e.getSource();
-        if(filterDialog == null)
-        	filterDialog  = new FilterDialog(getApplication().getFrameController().getEditorView().getFilterController());
+        if(filterDialog == null) {
+            filterDialog = new FilterDialog(getApplication().getFrameController().getEditorView().getFilterController());
+        }
 		filterDialog.pack();
 		filterDialog.show(source, 0, source.getHeight());
-	}	
+	}
+
+    public void resetDialog() {
+        filterDialog = null;
+    }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/cayenne/blob/09b0fdb0/modeler/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/action/GenerateCodeAction.java
----------------------------------------------------------------------
diff --git a/modeler/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/action/GenerateCodeAction.java b/modeler/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/action/GenerateCodeAction.java
index aebe022..57ccca1 100644
--- a/modeler/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/action/GenerateCodeAction.java
+++ b/modeler/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/action/GenerateCodeAction.java
@@ -41,7 +41,7 @@ public class GenerateCodeAction extends CayenneAction {
     }
 
     public String getIconName() {
-        return "icon-gen_java.gif";
+        return "icon-gen_java.png";
     }
 
     public void performAction(ActionEvent e) {

http://git-wip-us.apache.org/repos/asf/cayenne/blob/09b0fdb0/modeler/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/action/ImportEOModelAction.java
----------------------------------------------------------------------
diff --git a/modeler/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/action/ImportEOModelAction.java b/modeler/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/action/ImportEOModelAction.java
index 849b777..369a8ed 100644
--- a/modeler/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/action/ImportEOModelAction.java
+++ b/modeler/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/action/ImportEOModelAction.java
@@ -77,10 +77,6 @@ public class ImportEOModelAction extends CayenneAction {
         super(getActionName(), application);
     }
 
-    public String getIconName() {
-        return "icon-eomodel.gif";
-    }
-
     public void performAction(ActionEvent event) {
         importEOModel();
     }

http://git-wip-us.apache.org/repos/asf/cayenne/blob/09b0fdb0/modeler/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/action/LinkDataMapsAction.java
----------------------------------------------------------------------
diff --git a/modeler/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/action/LinkDataMapsAction.java b/modeler/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/action/LinkDataMapsAction.java
index fef2f8e..a7a62c7 100644
--- a/modeler/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/action/LinkDataMapsAction.java
+++ b/modeler/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/action/LinkDataMapsAction.java
@@ -48,7 +48,7 @@ public class LinkDataMapsAction extends CayenneAction {
 
     @Override
     public String getIconName() {
-        return "icon-sync.gif";
+        return "icon-sync.png";
     }
 
     @Override

http://git-wip-us.apache.org/repos/asf/cayenne/blob/09b0fdb0/modeler/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/action/MigrateAction.java
----------------------------------------------------------------------
diff --git a/modeler/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/action/MigrateAction.java b/modeler/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/action/MigrateAction.java
index e6b7a8d..3ec5279 100644
--- a/modeler/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/action/MigrateAction.java
+++ b/modeler/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/action/MigrateAction.java
@@ -34,6 +34,8 @@ import java.util.Collection;
  */
 public class MigrateAction extends DBWizardAction<DbActionOptionsDialog> {
 
+    private boolean dialogShown;
+
     public MigrateAction(Application application) {
         super(getActionName(), application);
     }
@@ -54,7 +56,12 @@ public class MigrateAction extends DBWizardAction<DbActionOptionsDialog> {
             throw new IllegalStateException("No current DataMap selected.");
         }
 
+        dialogShown = false;
         DbActionOptionsDialog optionsDialog = loaderOptionDialog(connectWizard);
+        if(dialogShown && optionsDialog == null) {
+            return;
+        }
+
         String selectedCatalog = optionsDialog == null ? null : optionsDialog.getSelectedCatalog();
         String selectedSchema = optionsDialog == null ? null : optionsDialog.getSelectedSchema();
 
@@ -72,6 +79,7 @@ public class MigrateAction extends DBWizardAction<DbActionOptionsDialog> {
     @Override
     protected DbActionOptionsDialog createDialog(Collection<String> catalogs, Collection<String> schemas,
                                                  String currentCatalog, String currentSchema) {
+        dialogShown = true;
         return new DbActionOptionsDialog(Application.getFrame(), "Migrate DB Schema: Select Catalog and Schema",
                 catalogs, schemas, currentCatalog, currentSchema);
     }

http://git-wip-us.apache.org/repos/asf/cayenne/blob/09b0fdb0/modeler/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/action/NavigateBackwardAction.java
----------------------------------------------------------------------
diff --git a/modeler/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/action/NavigateBackwardAction.java b/modeler/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/action/NavigateBackwardAction.java
index 6f45065..cba35cb 100644
--- a/modeler/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/action/NavigateBackwardAction.java
+++ b/modeler/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/action/NavigateBackwardAction.java
@@ -36,14 +36,13 @@ public class NavigateBackwardAction extends CayenneAction {
 
     /**
      * Constructor for Move Backward Action
-     * @param name
      */
     public NavigateBackwardAction(Application application) {
         super(getActionName(), application);
     }
 
     public String getIconName() {
-        return "icon-backward_nav.gif";
+        return "icon-backward.png";
     }
 
     /**

http://git-wip-us.apache.org/repos/asf/cayenne/blob/09b0fdb0/modeler/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/action/NavigateForwardAction.java
----------------------------------------------------------------------
diff --git a/modeler/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/action/NavigateForwardAction.java b/modeler/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/action/NavigateForwardAction.java
index 06a0bd6..c10c73c 100644
--- a/modeler/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/action/NavigateForwardAction.java
+++ b/modeler/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/action/NavigateForwardAction.java
@@ -36,14 +36,13 @@ public class NavigateForwardAction extends CayenneAction {
 
     /**
      * Constructor for Move Forward Action
-     * @param name
      */
     public NavigateForwardAction(Application application) {
         super(getActionName(), application);
     }
 
     public String getIconName() {
-        return "icon-forward_nav.gif";
+        return "icon-forward.png";
     }
 
     /**

http://git-wip-us.apache.org/repos/asf/cayenne/blob/09b0fdb0/modeler/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/action/NewProjectAction.java
----------------------------------------------------------------------
diff --git a/modeler/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/action/NewProjectAction.java b/modeler/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/action/NewProjectAction.java
index b5bbbc5..014b3e8 100644
--- a/modeler/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/action/NewProjectAction.java
+++ b/modeler/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/action/NewProjectAction.java
@@ -43,7 +43,7 @@ public class NewProjectAction extends ProjectAction {
     }
 
     public String getIconName() {
-        return "icon-new.gif";
+        return "icon-new.png";
     }
 
     public KeyStroke getAcceleratorKey() {

http://git-wip-us.apache.org/repos/asf/cayenne/blob/09b0fdb0/modeler/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/action/ObjEntityCounterpartAction.java
----------------------------------------------------------------------
diff --git a/modeler/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/action/ObjEntityCounterpartAction.java b/modeler/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/action/ObjEntityCounterpartAction.java
index 8bcf4ef..7126a0a 100644
--- a/modeler/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/action/ObjEntityCounterpartAction.java
+++ b/modeler/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/action/ObjEntityCounterpartAction.java
@@ -19,26 +19,10 @@
 
 package org.apache.cayenne.modeler.action;
 
-import java.awt.event.ActionEvent;
-import java.util.Iterator;
-
-import javax.swing.tree.DefaultMutableTreeNode;
-import javax.swing.tree.TreePath;
-
-import org.apache.cayenne.configuration.ConfigurationNode;
-import org.apache.cayenne.configuration.DataChannelDescriptor;
-import org.apache.cayenne.map.DbEntity;
 import org.apache.cayenne.map.Entity;
-import org.apache.cayenne.map.ObjEntity;
 import org.apache.cayenne.modeler.Application;
-import org.apache.cayenne.modeler.CayenneModelerFrame;
-import org.apache.cayenne.modeler.ProjectController;
-import org.apache.cayenne.modeler.ProjectTreeModel;
-import org.apache.cayenne.modeler.editor.EditorView;
-import org.apache.cayenne.modeler.event.EntityDisplayEvent;
-import org.apache.cayenne.modeler.util.CayenneAction;
 
-public class ObjEntityCounterpartAction extends CayenneAction {
+public class ObjEntityCounterpartAction extends BaseViewEntityAction {
 
     public static String getActionName() {
         return "View related DbEntity";
@@ -49,36 +33,11 @@ public class ObjEntityCounterpartAction extends CayenneAction {
     }
 
     public String getIconName() {
-        return "icon-move_down.gif";
-    }
-
-    /**
-     * @see org.apache.cayenne.modeler.util.CayenneAction#performAction(ActionEvent)
-     */
-    public void performAction(ActionEvent e) {
-        viewCounterpartEntity();
+        return "icon-move_down.png";
     }
 
-    protected void viewCounterpartEntity() {
-        ProjectController mediator = getProjectController();
-
-        ObjEntity objEntity = mediator.getCurrentObjEntity();
-
-        if (objEntity == null) {
-            return;
-        }
-        
-        DbEntity entity = objEntity.getDbEntity();
-        
-        TreePath path = DbEntityCounterpartAction.buildTreePath(entity);
-        DbEntityCounterpartAction.editor().getProjectTreeView().getSelectionModel().setSelectionPath(path);
-        
-        EntityDisplayEvent event = new EntityDisplayEvent(
-                DbEntityCounterpartAction.editor().getProjectTreeView(),
-                entity,
-                entity.getDataMap(),
-                (DataChannelDescriptor) getProjectController().getProject().getRootNode());
-        getProjectController().fireDbEntityDisplayEvent(event);
+    @Override
+    protected Entity getEntity() {
+        return objEntity.getDbEntity();
     }
-    
 }

http://git-wip-us.apache.org/repos/asf/cayenne/blob/09b0fdb0/modeler/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/action/ObjEntitySyncAction.java
----------------------------------------------------------------------
diff --git a/modeler/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/action/ObjEntitySyncAction.java b/modeler/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/action/ObjEntitySyncAction.java
index 6693458..bc2cd56 100644
--- a/modeler/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/action/ObjEntitySyncAction.java
+++ b/modeler/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/action/ObjEntitySyncAction.java
@@ -51,7 +51,7 @@ public class ObjEntitySyncAction extends CayenneAction {
     }
 
     public String getIconName() {
-        return "icon-sync.gif";
+        return "icon-sync.png";
     }
 
     public KeyStroke getAcceleratorKey() {

http://git-wip-us.apache.org/repos/asf/cayenne/blob/09b0fdb0/modeler/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/action/ObjEntityToSuperEntityAction.java
----------------------------------------------------------------------
diff --git a/modeler/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/action/ObjEntityToSuperEntityAction.java b/modeler/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/action/ObjEntityToSuperEntityAction.java
new file mode 100644
index 0000000..eb0b839
--- /dev/null
+++ b/modeler/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/action/ObjEntityToSuperEntityAction.java
@@ -0,0 +1,42 @@
+/*****************************************************************
+ *   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.cayenne.modeler.action;
+
+import org.apache.cayenne.map.Entity;
+import org.apache.cayenne.modeler.Application;
+
+/**
+ * @since 4.0
+ */
+public class ObjEntityToSuperEntityAction extends BaseViewEntityAction {
+
+    public static String getActionName() {
+        return "View related SuperEntity";
+    }
+
+    public ObjEntityToSuperEntityAction(Application application) {
+        super(getActionName(), application);
+    }
+
+    @Override
+    protected Entity getEntity() {
+        return super.objEntity.getSuperEntity();
+    }
+}

http://git-wip-us.apache.org/repos/asf/cayenne/blob/09b0fdb0/modeler/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/action/OpenProjectAction.java
----------------------------------------------------------------------
diff --git a/modeler/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/action/OpenProjectAction.java b/modeler/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/action/OpenProjectAction.java
index 9d71da0..e7fcb56 100644
--- a/modeler/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/action/OpenProjectAction.java
+++ b/modeler/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/action/OpenProjectAction.java
@@ -60,7 +60,7 @@ public class OpenProjectAction extends ProjectAction {
 
     @Override
     public String getIconName() {
-        return "icon-open.gif";
+        return "icon-open.png";
     }
 
     @Override

http://git-wip-us.apache.org/repos/asf/cayenne/blob/09b0fdb0/modeler/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/action/PasteAction.java
----------------------------------------------------------------------
diff --git a/modeler/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/action/PasteAction.java b/modeler/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/action/PasteAction.java
index cf835ef..94162ee 100644
--- a/modeler/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/action/PasteAction.java
+++ b/modeler/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/action/PasteAction.java
@@ -85,7 +85,7 @@ public class PasteAction extends CayenneAction implements FlavorListener {
 
     @Override
     public String getIconName() {
-        return "icon-paste.gif";
+        return "icon-paste.png";
     }
 
     @Override

http://git-wip-us.apache.org/repos/asf/cayenne/blob/09b0fdb0/modeler/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/action/ProjectOpener.java
----------------------------------------------------------------------
diff --git a/modeler/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/action/ProjectOpener.java b/modeler/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/action/ProjectOpener.java
index f958e72..1028d11 100644
--- a/modeler/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/action/ProjectOpener.java
+++ b/modeler/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/action/ProjectOpener.java
@@ -47,21 +47,16 @@ class ProjectOpener extends JFileChooser {
      * Selects a directory to store the project.
      */
     File newProjectDir(Frame f, Project p) {
-        if (p instanceof Project) {
+        if (p != null) {
             StringBuilder nameProject = new StringBuilder("cayenne");
             if(((DataChannelDescriptor)p.getRootNode()).getName()!=null){
                 nameProject.append("-").append(((DataChannelDescriptor)p.getRootNode()).getName());
             }
             nameProject.append(".xml");
             // configure for application project
-            return newProjectDir(f, nameProject.toString(), FileFilters
-                    .getApplicationFilter());
-        }
-        else {
-            String message = (p == null)
-                    ? "Null project."
-                    : "Unrecognized project class: " + p.getClass().getName();
-            throw new CayenneRuntimeException(message);
+            return newProjectDir(f, nameProject.toString(), FileFilters.getApplicationFilter());
+        } else {
+            throw new CayenneRuntimeException("Null project.");
         }
     }
 
@@ -105,16 +100,11 @@ class ProjectOpener extends JFileChooser {
 
                 if (dialog.shouldOverwrite()) {
                     break;
-                }
-                else if (dialog.shouldSelectAnother()) {
-                    continue;
-                }
-                else {
+                } else if (!dialog.shouldSelectAnother()) {
                     // canceled
                     return null;
                 }
-            }
-            else {
+            } else {
                 break;
             }
         }

http://git-wip-us.apache.org/repos/asf/cayenne/blob/09b0fdb0/modeler/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/action/RedoAction.java
----------------------------------------------------------------------
diff --git a/modeler/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/action/RedoAction.java b/modeler/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/action/RedoAction.java
index 01e504e..470257a 100644
--- a/modeler/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/action/RedoAction.java
+++ b/modeler/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/action/RedoAction.java
@@ -57,7 +57,7 @@ public class RedoAction extends CayenneAction {
     
     @Override
     public String getIconName() {
-        return "icon-redo.gif";
+        return "icon-redo.png";
     }
 
     @Override

http://git-wip-us.apache.org/repos/asf/cayenne/blob/09b0fdb0/modeler/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/action/RemoveAction.java
----------------------------------------------------------------------
diff --git a/modeler/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/action/RemoveAction.java b/modeler/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/action/RemoveAction.java
index 467fc50..7c36701 100644
--- a/modeler/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/action/RemoveAction.java
+++ b/modeler/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/action/RemoveAction.java
@@ -95,7 +95,7 @@ public class RemoveAction extends CayenneAction {
 
     @Override
     public String getIconName() {
-        return "icon-trash.gif";
+        return "icon-trash.png";
     }
 
     @Override

http://git-wip-us.apache.org/repos/asf/cayenne/blob/09b0fdb0/modeler/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/action/RemoveCallbackMethodAction.java
----------------------------------------------------------------------
diff --git a/modeler/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/action/RemoveCallbackMethodAction.java b/modeler/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/action/RemoveCallbackMethodAction.java
index 029baa4..2b0222b 100644
--- a/modeler/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/action/RemoveCallbackMethodAction.java
+++ b/modeler/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/action/RemoveCallbackMethodAction.java
@@ -63,7 +63,7 @@ public class RemoveCallbackMethodAction extends RemoveAction {
      */
     @Override
     public String getIconName() {
-        return "icon-trash.gif";
+        return "icon-trash.png";
     }
     
     /**

http://git-wip-us.apache.org/repos/asf/cayenne/blob/09b0fdb0/modeler/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/action/RemoveEntityListenerAction.java
----------------------------------------------------------------------
diff --git a/modeler/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/action/RemoveEntityListenerAction.java b/modeler/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/action/RemoveEntityListenerAction.java
deleted file mode 100644
index f3b6466..0000000
--- a/modeler/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/action/RemoveEntityListenerAction.java
+++ /dev/null
@@ -1,101 +0,0 @@
-/*****************************************************************
- *   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.cayenne.modeler.action;
-
-import java.awt.event.ActionEvent;
-
-import org.apache.cayenne.map.ObjEntity;
-import org.apache.cayenne.map.event.MapEvent;
-import org.apache.cayenne.modeler.Application;
-import org.apache.cayenne.modeler.dialog.ConfirmRemoveDialog;
-import org.apache.cayenne.modeler.event.EntityListenerEvent;
-
-
-/**
- * Action class for removing entity listeners from an ObjEntity
- *
- * @version 1.0 Oct 30, 2007
- */
-public class RemoveEntityListenerAction extends RemoveAction {
-    
-    
-    /**
-     * unique action name
-     */
-    private static final String ACTION_NAME = "Remove entity listener";
-
-    /**
-     * Constructor.
-     *
-     * @param application Application instance
-     */
-    public RemoveEntityListenerAction(Application application) {
-        super(getActionName(), application);
-    }
-
-    /**
-     * @return unique action name
-     */
-    public static String getActionName() {
-        return ACTION_NAME;
-    }
-
-    /**
-     * @return icon file name for button
-     */
-    public String getIconName() {
-        return "icon-remove-listener.gif";
-    }
-
-    /**
-     * base entity listener removing logic
-     * @param e event
-     */
-    public void performAction(ActionEvent e, boolean allowAsking) {
-        ConfirmRemoveDialog dialog = getConfirmDeleteDialog(allowAsking);
-
-        if ((getProjectController().getCurrentObjEntity() != null) &&
-            (getProjectController().getCurrentListenerClass() != null)) {
-
-            if (dialog.shouldDelete("entity listener", getProjectController()
-                    .getCurrentListenerClass())) {
-                
-                ObjEntity objEnt = getProjectController().getCurrentObjEntity();
-                String listenerClass = getProjectController().getCurrentListenerClass();
-                
-                removeEntityListener(objEnt, listenerClass);
-            }
-        }
-    }
-
-    public void removeEntityListener(ObjEntity objEnt, String listenerClass) {
-      
-        objEnt.removeEntityListener(listenerClass);
-
-        getProjectController().fireEntityListenerEvent(
-                new EntityListenerEvent(
-                        RemoveEntityListenerAction.this,
-                        listenerClass,
-                        listenerClass,
-                        MapEvent.REMOVE
-                )
-        );
-    }
-}
-

http://git-wip-us.apache.org/repos/asf/cayenne/blob/09b0fdb0/modeler/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/action/RemoveEntityListenerForDataMapAction.java
----------------------------------------------------------------------
diff --git a/modeler/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/action/RemoveEntityListenerForDataMapAction.java b/modeler/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/action/RemoveEntityListenerForDataMapAction.java
deleted file mode 100644
index ca6bc2c..0000000
--- a/modeler/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/action/RemoveEntityListenerForDataMapAction.java
+++ /dev/null
@@ -1,98 +0,0 @@
-/*****************************************************************
- *   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.cayenne.modeler.action;
-
-import java.awt.event.ActionEvent;
-
-import org.apache.cayenne.map.DataMap;
-import org.apache.cayenne.map.event.MapEvent;
-import org.apache.cayenne.modeler.Application;
-import org.apache.cayenne.modeler.dialog.ConfirmRemoveDialog;
-import org.apache.cayenne.modeler.event.EntityListenerEvent;
-
-
-/**
- * Action class for removing entity listeners from a DamaMap
- *
- * @version 1.0 Oct 30, 2007
- */
-public class RemoveEntityListenerForDataMapAction extends RemoveAction {
-    
-    
-    /**
-     * unique action name
-     */
-    private static final String ACTION_NAME = "Remove entity listener for data map";
-
-    /**
-     * Constructor.
-     *
-     * @param application Application instance
-     */
-    public RemoveEntityListenerForDataMapAction(Application application) {
-        super(getActionName(), application);
-    }
-
-    /**
-     * @return unique action name
-     */
-    public static String getActionName() {
-        return ACTION_NAME;
-    }
-
-    /**
-     * @return icon file name for button
-     */
-    public String getIconName() {
-        return "icon-remove-listener.gif";
-    }
-    
-    /**
-     * base entity listener removing logic
-     * @param e event
-     */
-    public void performAction(ActionEvent e, boolean allowAsking) {
-        ConfirmRemoveDialog dialog = getConfirmDeleteDialog(allowAsking);
-
-        if (getProjectController().getCurrentListenerClass() != null) {
-            if (dialog.shouldDelete("entity listener", getProjectController()
-                    .getCurrentListenerClass())) {
-                
-                String listenerClass = getProjectController().getCurrentListenerClass();
-                removeEntityListener(getProjectController().getCurrentDataMap(), listenerClass);
-            }
-        }
-    }
-
-    public void removeEntityListener(DataMap map, String listenerClass) {
-        if (listenerClass != null) {
-            map.removeDefaultEntityListener(listenerClass);
-
-            getProjectController().fireEntityListenerEvent(
-                    new EntityListenerEvent(
-                            RemoveEntityListenerForDataMapAction.this,
-                            listenerClass,
-                            listenerClass,
-                            MapEvent.REMOVE
-                    )
-            );
-        }
-    }
-}
-

http://git-wip-us.apache.org/repos/asf/cayenne/blob/09b0fdb0/modeler/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/action/SaveAction.java
----------------------------------------------------------------------
diff --git a/modeler/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/action/SaveAction.java b/modeler/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/action/SaveAction.java
index 0d2ae3e..18cfdd3 100644
--- a/modeler/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/action/SaveAction.java
+++ b/modeler/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/action/SaveAction.java
@@ -50,7 +50,7 @@ public class SaveAction extends SaveAsAction {
 
     @Override
     public String getIconName() {
-        return "icon-save.gif";
+        return "icon-save.png";
     }
 
     @Override

http://git-wip-us.apache.org/repos/asf/cayenne/blob/09b0fdb0/modeler/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/action/UndoAction.java
----------------------------------------------------------------------
diff --git a/modeler/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/action/UndoAction.java b/modeler/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/action/UndoAction.java
index 71e7b92..ef311ed 100644
--- a/modeler/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/action/UndoAction.java
+++ b/modeler/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/action/UndoAction.java
@@ -49,7 +49,7 @@ public class UndoAction extends CayenneAction {
     
     @Override
     public String getIconName() {
-        return "icon-undo.gif";
+        return "icon-undo.png";
     }
 
     @Override

http://git-wip-us.apache.org/repos/asf/cayenne/blob/09b0fdb0/modeler/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/dialog/ConfirmRemoveDialog.java
----------------------------------------------------------------------
diff --git a/modeler/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/dialog/ConfirmRemoveDialog.java b/modeler/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/dialog/ConfirmRemoveDialog.java
index 1cd775b..f76024b 100644
--- a/modeler/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/dialog/ConfirmRemoveDialog.java
+++ b/modeler/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/dialog/ConfirmRemoveDialog.java
@@ -21,7 +21,6 @@ package org.apache.cayenne.modeler.dialog;
 import java.util.prefs.Preferences;
 
 import javax.swing.JCheckBox;
-import javax.swing.JDialog;
 import javax.swing.JOptionPane;
 
 import org.apache.cayenne.modeler.Application;
@@ -33,6 +32,8 @@ import org.apache.cayenne.modeler.dialog.pref.GeneralPreferences;
  */
 public class ConfirmRemoveDialog {
 
+    private static final String DELETE = "Delete";
+
     private boolean shouldDelete = true;
 
     /**
@@ -53,18 +54,14 @@ public class ConfirmRemoveDialog {
                 neverPromptAgainBox
         };
 
-        JOptionPane pane = new JOptionPane(
-                message,
-                JOptionPane.QUESTION_MESSAGE,
-                JOptionPane.YES_NO_OPTION);
-
-        JDialog dialog = pane.createDialog(Application.getFrame(), "Confirm Remove");
-        dialog.setVisible(true);
+        JOptionPane pane = new JOptionPane(message, JOptionPane.QUESTION_MESSAGE);
+        pane.setOptions(new Object[]{ DELETE, "Cancel" });
+        pane.setInitialValue(DELETE);
+        pane.createDialog(Application.getFrame(), "Confirm Delete").setVisible(true);
 
-        Object selectedValue = pane.getValue();
-        shouldDelete = selectedValue==null?false:selectedValue.equals(JOptionPane.YES_OPTION);
+        shouldDelete = DELETE.equals(pane.getValue());
 
-        // If the user clicks "no" or window close button, we'll just ignore whatever's in the checkbox because
+        // If the user clicks "cancel" or window close button, we'll just ignore whatever's in the checkbox because
         // it's non-sensical.
         if (shouldDelete) {
             Preferences pref = Application.getInstance().getPreferencesNode(
@@ -77,7 +74,7 @@ public class ConfirmRemoveDialog {
     }
 
     public boolean shouldDelete(String type, String name) {
-        return shouldDelete(String.format("%s named '%s", type, name));
+        return shouldDelete(String.format("%s named '%s'", type, name));
     }
 
     public boolean shouldDelete(String name) {

http://git-wip-us.apache.org/repos/asf/cayenne/blob/09b0fdb0/modeler/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/dialog/LogConsole.java
----------------------------------------------------------------------
diff --git a/modeler/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/dialog/LogConsole.java b/modeler/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/dialog/LogConsole.java
index a7d586b..57bee1c 100644
--- a/modeler/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/dialog/LogConsole.java
+++ b/modeler/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/dialog/LogConsole.java
@@ -23,15 +23,12 @@ import org.apache.cayenne.modeler.pref.ComponentGeometry;
 import org.apache.cayenne.modeler.util.CayenneController;
 import org.apache.cayenne.util.Util;
 
-import javax.swing.JToolBar;
 import javax.swing.text.*;
 import java.awt.*;
 import java.awt.datatransfer.Clipboard;
 import java.awt.datatransfer.StringSelection;
 import java.awt.event.ActionEvent;
 import java.awt.event.ActionListener;
-import java.awt.event.MouseAdapter;
-import java.awt.event.MouseEvent;
 import java.io.PrintWriter;
 import java.io.StringWriter;
 import java.text.DateFormat;
@@ -98,7 +95,7 @@ public class LogConsole extends CayenneController {
         StyleConstants.setForeground(WARN_STYLE, Color.RED.darker());
         
         INFO_STYLE = new SimpleAttributeSet();
-        StyleConstants.setForeground(INFO_STYLE, Color.BLUE);
+        StyleConstants.setForeground(INFO_STYLE, new Color(32, 65, 150));
         
         DEBUG_STYLE = null;
     }
@@ -141,12 +138,6 @@ public class LogConsole extends CayenneController {
     }
     
     protected void initBindings() {
-    	view.getMenuButton().addMouseListener(new MouseAdapter() {
-            public void mousePressed(MouseEvent e) {
-            	view.getMenu().show(view, view.getMenuButton().getX(),view.getMenuButton().getY()+view.getMenuButton().getHeight());
-            }
-        });
-    	
         view.getClearItem().addActionListener(new ActionListener() {
             public void actionPerformed(ActionEvent e) {
                 clear();
@@ -161,10 +152,7 @@ public class LogConsole extends CayenneController {
         
         view.getDockItem().addActionListener(new ActionListener() {
             public void actionPerformed(ActionEvent e) {
-                /**
-                 * Log console should be visible
-                 */
-                
+                // Log console should be visible
                 disappear();
                 setConsoleProperty(DOCKED_PROPERTY, !getConsoleProperty(DOCKED_PROPERTY));
                 appear();
@@ -186,22 +174,19 @@ public class LogConsole extends CayenneController {
      */
     private void appear() {
         if (!getConsoleProperty(DOCKED_PROPERTY)) {
-            view.getDockItem().setText("Dock");
+            view.setDocked(false);
             
             if (logWindow == null) {
                 logWindow = new LogConsoleWindow(this);
-            
                 ComponentGeometry geometry = new ComponentGeometry(getClass(), null);
                 geometry.bind(logWindow, 600, 300, 0);
             }
             
             logWindow.setContentPane(view);
-            
             logWindow.validate();
             logWindow.setVisible(true);
-        }
-        else {
-            view.getDockItem().setText("Undock");
+        } else {
+            view.setDocked(true);
             Application.getFrame().setDockComponent(view);
         }
     }
@@ -213,8 +198,7 @@ public class LogConsole extends CayenneController {
         if (!getConsoleProperty(DOCKED_PROPERTY)) {
             logWindow.dispose();
             logWindow = null;
-        }
-        else {
+        } else {
             Application.getFrame().setDockComponent(null);
         }
     }
@@ -225,16 +209,12 @@ public class LogConsole extends CayenneController {
     public void copy() {
         String selectedText = view.getLogView().getSelectedText();
         
-        /**
-         * If nothing is selected, we copy the whole text
-         */
+        // If nothing is selected, we copy the whole text
         if (Util.isEmptyString(selectedText)) {
             Document doc = view.getLogView().getDocument();
-            
             try {
                 selectedText = doc.getText(0, doc.getLength());
-            }
-            catch (BadLocationException e) {
+            } catch (BadLocationException e) {
                 return;
             }
         }
@@ -254,8 +234,7 @@ public class LogConsole extends CayenneController {
         
         if (needShow) {
             appear();
-        }
-        else {
+        } else {
             disappear();
         }
     }
@@ -288,15 +267,14 @@ public class LogConsole extends CayenneController {
      * @param style Message font, color etc.
      */
     public void appendMessage(String level, String message, AttributeSet style) {
-        appendMessage(message, null, style);
+        appendMessage(level, message, null, style);
     }
     
     /**
      * Appends a message and (or) an exception
      * @param style Message font, color etc.
      */
-    public void appendMessage(String level, String message, Throwable ex, 
-        AttributeSet style) {
+    public void appendMessage(String level, String message, Throwable ex, AttributeSet style) {
         
         if (loggingStopped) {
             return;
@@ -310,20 +288,16 @@ public class LogConsole extends CayenneController {
         }
         
         StringBuilder newText = new StringBuilder(FORMAT.format(new Date()))
-            .append(System.getProperty("line.separator"))
-            .append(level.toUpperCase() + ": ");
+                //.append(System.getProperty("line.separator"))
+                .append(" ").append(level.toUpperCase()).append(": ");
         
         if (message != null) {
-            /**
-             * Append the message
-             */
+            // Append the message
             newText.append(message).append(System.getProperty("line.separator"));
         }
         
         if (ex != null) {
-            /**
-             * Append the stack trace
-             */
+            // Append the stack trace
             StringWriter out = new StringWriter();
             PrintWriter printer = new PrintWriter(out);
             
@@ -337,11 +311,9 @@ public class LogConsole extends CayenneController {
             doc.insertString(doc.getLength(), newText.toString(), style);
 
             if (autoScroll) {
-                view.getLogView().setCaretPosition(
-                        doc.getLength() - 1);
+                view.getLogView().setCaretPosition(doc.getLength() - 1);
             }
-        }
-        catch (BadLocationException ignored) {
+        } catch (BadLocationException ignored) {
             //should not happen
         }
         

http://git-wip-us.apache.org/repos/asf/cayenne/blob/09b0fdb0/modeler/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/dialog/LogConsoleView.java
----------------------------------------------------------------------
diff --git a/modeler/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/dialog/LogConsoleView.java b/modeler/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/dialog/LogConsoleView.java
index 20b1612..f46c936 100644
--- a/modeler/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/dialog/LogConsoleView.java
+++ b/modeler/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/dialog/LogConsoleView.java
@@ -21,7 +21,9 @@ package org.apache.cayenne.modeler.dialog;
 import javax.swing.*;
 import javax.swing.text.JTextComponent;
 
+import org.apache.cayenne.modeler.util.CayenneAction;
 import org.apache.cayenne.modeler.util.ModelerUtil;
+import org.apache.cayenne.swing.components.TopBorder;
 
 import java.awt.*;
 
@@ -30,41 +32,31 @@ import java.awt.*;
  * application. 
  */
 public class LogConsoleView extends JPanel {
-    
+
+    static private final Icon DOCK_ICON = ModelerUtil.buildIcon("icon-down.png");
+    static private final Icon UNDOCK_ICON = ModelerUtil.buildIcon("icon-up.png");
+
     /**
      * Area to be filled with log messages
      */
-    JTextComponent logView;
+    private JTextComponent logView;
     
     /**
      * Item which performs clearing the console output 
      */
-    JMenuItem clearItem;
+    private JButton clearItem;
     
     /**
      * Item which performs copying the console output 
      */
-    JMenuItem copyItem;
+    private JButton copyItem;
     
     /**
      * Item which performs docking the window, i.e. sticking it to parent 
      */
-    JMenuItem dockItem;
-    
-    /**
-     * Scrollpane containing the text area
-     */
-    JScrollPane scroller;
-    
-    /**
-     * PopupMenu to choose item 
-     */
-    JPopupMenu menu;
-    
-    /**
-     * Button which performs showing PopupMenu
-     */
-    JButton menuButton;
+    private JButton dockItem;
+
+    private JToolBar buttonsBar;
     
     /**
      * Constructs a new log console view component
@@ -72,40 +64,42 @@ public class LogConsoleView extends JPanel {
     public LogConsoleView() {
         //log console window must be non-modal
         super();
-        
         init();
     }
     
     /**
-     * Initializes all lays out subcomponents
+     * Initializes and lays out subcomponents
      */
     protected void init() {
-        setLayout(new BorderLayout(5, 5));
-        
-        logView = new JEditorPane("text/html", "");
-        logView.setEditable(false);
-        
-        scroller = new JScrollPane(logView);
-        add(scroller, BorderLayout.CENTER);
-        
-        JToolBar buttonsBar = new JToolBar();
+        setLayout(new BorderLayout());
+
+        buttonsBar = new JToolBar();
+        buttonsBar.setBorder(BorderFactory.createEmptyBorder());
         buttonsBar.setFloatable(false);
-        
-        menu = new JPopupMenu();
-        copyItem = new JMenuItem("Copy");
-        menu.add(copyItem);
-        clearItem = new JMenuItem("Clear");
-        menu.add(clearItem);
-        dockItem = new JMenuItem("Dock");
-        menu.add(dockItem);
-        
-        menu.setInvoker(this);
 
-        Icon icon = ModelerUtil.buildIcon("popupmenu.gif");
-        menuButton = new JButton(icon);
-        
-        buttonsBar.add(menuButton);
+        copyItem = new CayenneAction.CayenneToolbarButton(null, 0);
+        copyItem.setIcon(ModelerUtil.buildIcon("icon-copy.png"));
+        copyItem.setText("Copy");
+        buttonsBar.add(copyItem);
+
+        clearItem = new CayenneAction.CayenneToolbarButton(null, 0);
+        clearItem.setIcon(ModelerUtil.buildIcon("icon-trash.png"));
+        clearItem.setText("Clear");
+        buttonsBar.add(clearItem);
+
+        dockItem = new CayenneAction.CayenneToolbarButton(null, 0);
+        setDocked(false);
+        buttonsBar.add(dockItem);
+
         add(buttonsBar, BorderLayout.NORTH);
+
+        logView = new JEditorPane("text/html", "");
+        logView.setFont(new JLabel().getFont().deriveFont(12f));
+        logView.setEditable(false);
+
+        JScrollPane scrollPane = new JScrollPane(logView);
+        scrollPane.setBorder(TopBorder.create());
+        add(scrollPane, BorderLayout.CENTER);
         
         //no need to center log window
         setLocation(100, 100);
@@ -114,31 +108,31 @@ public class LogConsoleView extends JPanel {
     /**
      * @return area to be filled with log messages
      */
-    protected JTextComponent getLogView() {
+    JTextComponent getLogView() {
         return logView;
     }
     
-    protected JMenuItem getCopyItem() {
+    JButton getCopyItem() {
         return copyItem;
     }
     
-    protected JMenuItem getClearItem() {
+    JButton getClearItem() {
         return clearItem;
     }
     
-    protected JMenuItem getDockItem() {
+    JButton getDockItem() {
         return dockItem;
     }
-    
-    protected JScrollPane getScroller() {
-        return scroller;
-    }
-    
-    protected AbstractButton getMenuButton() {
-        return menuButton;
-    }
-    
-    protected JPopupMenu getMenu() {
-        return menu;
+
+    void setDocked(boolean isDocked) {
+        if(isDocked) {
+            dockItem.setIcon(UNDOCK_ICON);
+            dockItem.setText("Undock");
+            buttonsBar.setBorder(TopBorder.create());
+        } else {
+            dockItem.setIcon(DOCK_ICON);
+            dockItem.setText("Dock");
+            buttonsBar.setBorder(BorderFactory.createEmptyBorder());
+        }
     }
 }

http://git-wip-us.apache.org/repos/asf/cayenne/blob/09b0fdb0/modeler/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/dialog/ResolveDbRelationshipDialog.java
----------------------------------------------------------------------
diff --git a/modeler/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/dialog/ResolveDbRelationshipDialog.java b/modeler/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/dialog/ResolveDbRelationshipDialog.java
index 4e252dd..1927ed4 100644
--- a/modeler/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/dialog/ResolveDbRelationshipDialog.java
+++ b/modeler/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/dialog/ResolveDbRelationshipDialog.java
@@ -82,7 +82,10 @@ public class ResolveDbRelationshipDialog extends CayenneDialog {
 
         initView();
         initController();
-        initWithModel(relationship);
+        if(!initWithModel(relationship)){
+            cancelPressed = true;
+            return;
+        }
 
         this.undo = new RelationshipUndoableEdit(relationship);
 
@@ -91,6 +94,14 @@ public class ResolveDbRelationshipDialog extends CayenneDialog {
 
     }
 
+    @Override
+    public void setVisible(boolean b) {
+        if(b && cancelPressed) {
+            return;
+        }
+        super.setVisible(b);
+    }
+
     /**
      * Creates graphical components.
      */
@@ -148,20 +159,25 @@ public class ResolveDbRelationshipDialog extends CayenneDialog {
         }), BorderLayout.SOUTH);
     }
 
-    private void initWithModel(DbRelationship aRelationship) {
+    private boolean initWithModel(DbRelationship aRelationship) {
         // sanity check
         if (aRelationship.getSourceEntity() == null) {
             throw new CayenneRuntimeException("Null source entity: %s", aRelationship);
         }
 
-        if (aRelationship.getTargetEntity() == null) {
-            throw new CayenneRuntimeException("Null target entity: %s", aRelationship);
-        }
-
         if (aRelationship.getSourceEntity().getDataMap() == null) {
             throw new CayenneRuntimeException("Null DataMap: %s", aRelationship.getSourceEntity());
         }
 
+        if (aRelationship.getTargetEntity() == null) {
+            JOptionPane.showMessageDialog(
+                    this,
+                    "Please select target DbEntity first",
+                    "Select target",
+                    JOptionPane.INFORMATION_MESSAGE);
+            return false;
+        }
+
         // Once assigned, can reference relationship directly. Would it be
         // OK to assign relationship at the very top of this method?
         relationship = aRelationship;
@@ -198,6 +214,7 @@ public class ResolveDbRelationshipDialog extends CayenneDialog {
 
         name.setText(relationship.getName());
         tablePreferences.bind(table, null, null, null, DbJoinTableModel.SOURCE, true);
+        return true;
     }
 
     private void initController() {

http://git-wip-us.apache.org/repos/asf/cayenne/blob/09b0fdb0/modeler/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/dialog/UnsavedChangesDialog.java
----------------------------------------------------------------------
diff --git a/modeler/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/dialog/UnsavedChangesDialog.java b/modeler/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/dialog/UnsavedChangesDialog.java
index 1140486..d5f630a 100644
--- a/modeler/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/dialog/UnsavedChangesDialog.java
+++ b/modeler/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/dialog/UnsavedChangesDialog.java
@@ -20,77 +20,36 @@
 package org.apache.cayenne.modeler.dialog;
 
 import java.awt.Component;
-import java.awt.event.ActionEvent;
-import java.awt.event.ActionListener;
-
-import javax.swing.JButton;
-import javax.swing.JComponent;
-import javax.swing.JDialog;
 import javax.swing.JOptionPane;
 
-/**
- */
 public class UnsavedChangesDialog {
 
     private static final String SAVE_AND_CLOSE = "Save Changes";
     private static final String CLOSE_WITHOUT_SAVE = "Discard Changes";
     private static final String CANCEL = "Cancel";
 
-    private JButton saveButton = new JButton(SAVE_AND_CLOSE);
-    private JButton withoutSaveButton = new JButton(CLOSE_WITHOUT_SAVE);
-    private JButton cancelButton = new JButton(CANCEL);
-    
     protected Component parent;
     protected String result = CANCEL;
 
     public UnsavedChangesDialog(Component parent) {
         this.parent = parent;
-        initButtons();
     }
     
     public void show() {
         JOptionPane pane = new JOptionPane(
                 "You have unsaved changes. Do you want to save them?",
                 JOptionPane.QUESTION_MESSAGE);
-        pane.setOptions(new Object[] {saveButton, withoutSaveButton, cancelButton});
-        
-        JDialog dialog = pane.createDialog(parent, "Unsaved Changes");
-        dialog.setVisible(true);
+        pane.setOptions(new Object[] {SAVE_AND_CLOSE, CLOSE_WITHOUT_SAVE, CANCEL});
+        pane.setInitialValue(SAVE_AND_CLOSE);
+
+        pane.createDialog(parent, "Unsaved Changes").setVisible(true);
         Object selectedValue = pane.getValue();
-        // need to do an if..else chain, since
-        // sometimes values are unexpected
+        result = CANCEL;
         if (SAVE_AND_CLOSE.equals(selectedValue)) {
             result = SAVE_AND_CLOSE;
         } else if (CLOSE_WITHOUT_SAVE.equals(selectedValue)) {
             result = CLOSE_WITHOUT_SAVE;
-        } else {
-            result = CANCEL;
-        }
-    }
-    
-    private void initButtons(){
-        ActionListener listener =  new ActionListener(){
-            
-            @Override
-            public void actionPerformed(ActionEvent e) {
-                JOptionPane pane = getOptionPane((JComponent)e.getSource());
-                pane.setValue(e.getActionCommand());
-            }
-        };
-        
-        saveButton.addActionListener(listener);
-        withoutSaveButton.addActionListener(listener);
-        cancelButton.addActionListener(listener);
-    }
-    
-    private JOptionPane getOptionPane(JComponent parent) {
-        JOptionPane pane = null;
-        if (!(parent instanceof JOptionPane)) {
-            pane = getOptionPane((JComponent)parent.getParent());
-        } else {
-            pane = (JOptionPane) parent;
         }
-        return pane;
     }
 
     public boolean shouldSave() {

http://git-wip-us.apache.org/repos/asf/cayenne/blob/09b0fdb0/modeler/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/dialog/datadomain/FilterController.java
----------------------------------------------------------------------
diff --git a/modeler/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/dialog/datadomain/FilterController.java b/modeler/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/dialog/datadomain/FilterController.java
index f0dc8b9..69f2db1 100644
--- a/modeler/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/dialog/datadomain/FilterController.java
+++ b/modeler/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/dialog/datadomain/FilterController.java
@@ -59,11 +59,11 @@ public class FilterController {
 		this.tree = treePanel;
 		this.treeModel = tree.getProjectModel();
 		
-		filterMap.put("dbEntity",true);
-		filterMap.put("objEntity",true);
-		filterMap.put("embeddable",true);
-		filterMap.put("procedure",true);
-		filterMap.put("query",true);
+		filterMap.put("dbEntity",	true);
+		filterMap.put("objEntity",	true);
+		filterMap.put("embeddable",	true);
+		filterMap.put("procedure",	true);
+		filterMap.put("query",		true);
 	}
 	
 	
@@ -82,10 +82,10 @@ public class FilterController {
 				expandAll(tree, path, action);
 			}
 		}
-		if(action == "expand") {
+
+		if("expand".equals(action)) {
 			tree.expandPath(parent);
-		}
-		else if(action == "collapse") {
+		} else if("collapse".equals(action)) {
 			treeModel.reload(treeModel.getRootNode());
 		}
 	}

http://git-wip-us.apache.org/repos/asf/cayenne/blob/09b0fdb0/modeler/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/dialog/datadomain/FilterDialog.java
----------------------------------------------------------------------
diff --git a/modeler/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/dialog/datadomain/FilterDialog.java b/modeler/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/dialog/datadomain/FilterDialog.java
index 6ffaa1f..a34c72b 100644
--- a/modeler/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/dialog/datadomain/FilterDialog.java
+++ b/modeler/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/dialog/datadomain/FilterDialog.java
@@ -25,12 +25,9 @@ import javax.swing.JCheckBox;
 import javax.swing.JPopupMenu;
 import java.awt.event.ActionEvent;
 import java.awt.event.ActionListener;
-import java.util.Set;
 
 public class FilterDialog extends JPopupMenu {
-	
-	private String SHOW_ALL = "Show all";
-	
+
 	private JCheckBox dbEntity;
 	private JCheckBox objEntity;
 	private JCheckBox embeddable;
@@ -39,7 +36,9 @@ public class FilterDialog extends JPopupMenu {
 	private JCheckBox all;
 	private ProjectController eventController;
 	private FilterController filterController;
-	
+
+	/* NOTE: Setters and getters are used by view bindings, don't delete them */
+
 	public Boolean getDbEntityFilter() {
 		return filterController.getFilterMap().get("dbEntity");
 	}
@@ -78,19 +77,16 @@ public class FilterDialog extends JPopupMenu {
 	}
 
 	public Boolean getAllFilter() {
-		Set<String> keys=filterController.getFilterMap().keySet();
-		
-		for(String key : keys) {
-			if(filterController.getFilterMap().get(key) != true) {
+		for(Boolean selected : filterController.getFilterMap().values()) {
+			if(!selected) {
 				return false;
 			}
 		}
-		
+
 		return true;
 	}
-	
+
 	public void setAllFilter(Boolean value) {
-		
 	}
 	
 	public FilterDialog(FilterController filterController){
@@ -103,7 +99,7 @@ public class FilterDialog extends JPopupMenu {
 	
 	public void initView(){
 
-		all = new JCheckBox(SHOW_ALL);
+		all = new JCheckBox("Show all");
 		dbEntity = new JCheckBox("DbEntity");
 		objEntity = new JCheckBox("ObjEntity");
 		embeddable = new JCheckBox("Embeddable");
@@ -139,7 +135,6 @@ public class FilterDialog extends JPopupMenu {
 
         all.setEnabled(false);
 		all.addActionListener(new ActionListener() {
-
             @Override
             public void actionPerformed(ActionEvent e) {
 				dbEntity.setSelected(true);
@@ -156,27 +151,14 @@ public class FilterDialog extends JPopupMenu {
 	}
 
 	void checkAllStates() {
-		if(!isAll()) {
+		if(!getAllFilter()) {
 			all.setSelected(false);
 			all.setEnabled(true);
-		}
-		else {
+		} else {
 			all.setSelected(true);
 			all.setEnabled(false);
 		}
 	}
-	
-	private boolean isAll() {
-		Set<String> keys=filterController.getFilterMap().keySet();
-		
-		for(String key : keys) {
-			if(filterController.getFilterMap().get(key) == false) {
-				return false;
-			}
-		}
-
-		return true;
-	}
 
 	private class CheckListener implements ActionListener {
 
@@ -194,5 +176,4 @@ public class FilterDialog extends JPopupMenu {
             checkAllStates();
 		}
 	}
-	
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/cayenne/blob/09b0fdb0/modeler/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/dialog/objentity/ObjAttributeInfoDialogView.java
----------------------------------------------------------------------
diff --git a/modeler/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/dialog/objentity/ObjAttributeInfoDialogView.java b/modeler/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/dialog/objentity/ObjAttributeInfoDialogView.java
index 1acc7e7..4170bfd 100644
--- a/modeler/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/dialog/objentity/ObjAttributeInfoDialogView.java
+++ b/modeler/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/dialog/objentity/ObjAttributeInfoDialogView.java
@@ -198,8 +198,8 @@ public class ObjAttributeInfoDialogView extends JDialog {
             public void actionPerformed(ActionEvent e) {
                 boolean isType = false;
                 String[] typeNames = ModelerUtil.getRegisteredTypeNames();
-                for (int i = 0; i < typeNames.length; i++) {
-                    if (typeComboBox.getSelectedItem() == null || typeNames[i].equals(typeComboBox.getSelectedItem().toString())) {
+                for (String typeName : typeNames) {
+                    if (typeComboBox.getSelectedItem() == null || typeName.equals(typeComboBox.getSelectedItem().toString())) {
                         isType = true;
                     }
                 }
@@ -209,7 +209,6 @@ public class ObjAttributeInfoDialogView extends JDialog {
                 } else {
                     ((CardLayout) typeManagerPane.getLayout()).show(typeManagerPane, EMBEDDABLE_PANEL);
                     getCurrentPathLabel().setText("");
-
                 }
             }
 

http://git-wip-us.apache.org/repos/asf/cayenne/blob/09b0fdb0/modeler/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/dialog/pref/ClasspathPreferencesView.java
----------------------------------------------------------------------
diff --git a/modeler/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/dialog/pref/ClasspathPreferencesView.java b/modeler/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/dialog/pref/ClasspathPreferencesView.java
index 9460bd9..c3e0373 100644
--- a/modeler/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/dialog/pref/ClasspathPreferencesView.java
+++ b/modeler/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/dialog/pref/ClasspathPreferencesView.java
@@ -21,6 +21,7 @@ package org.apache.cayenne.modeler.dialog.pref;
 
 import java.awt.BorderLayout;
 
+import javax.swing.BorderFactory;
 import javax.swing.JButton;
 import javax.swing.JPanel;
 import javax.swing.JScrollPane;
@@ -60,7 +61,9 @@ public class ClasspathPreferencesView extends JPanel {
         builder.append(removeEntryButton);
 
         setLayout(new BorderLayout());
-        add(new JScrollPane(table), BorderLayout.CENTER);
+        JScrollPane scrollPane = new JScrollPane(table);
+        scrollPane.setBorder(BorderFactory.createEmptyBorder());
+        add(scrollPane, BorderLayout.CENTER);
         add(builder.getPanel(), BorderLayout.EAST);
     }
 

http://git-wip-us.apache.org/repos/asf/cayenne/blob/09b0fdb0/modeler/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/dialog/pref/PreferenceDialogView.java
----------------------------------------------------------------------
diff --git a/modeler/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/dialog/pref/PreferenceDialogView.java b/modeler/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/dialog/pref/PreferenceDialogView.java
index 216be9a..8e28641 100644
--- a/modeler/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/dialog/pref/PreferenceDialogView.java
+++ b/modeler/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/dialog/pref/PreferenceDialogView.java
@@ -19,15 +19,22 @@
 
 package org.apache.cayenne.modeler.dialog.pref;
 
+import org.apache.cayenne.swing.components.TopBorder;
+
 import java.awt.BorderLayout;
 import java.awt.CardLayout;
+import java.awt.Component;
 import java.awt.Container;
 import java.awt.Dialog;
+import java.awt.Dimension;
 import java.awt.FlowLayout;
+import java.awt.Font;
 import java.awt.Frame;
-
+import javax.swing.BorderFactory;
+import javax.swing.DefaultListCellRenderer;
 import javax.swing.JButton;
 import javax.swing.JDialog;
+import javax.swing.JLabel;
 import javax.swing.JList;
 import javax.swing.JPanel;
 import javax.swing.JScrollPane;
@@ -38,7 +45,7 @@ import javax.swing.JSplitPane;
 public class PreferenceDialogView extends JDialog {
 
     protected JSplitPane split;
-    protected JList list;
+    protected JList<Object> list;
     protected CardLayout detailLayout;
     protected Container detailPanel;
     protected JButton cancelButton;
@@ -55,31 +62,43 @@ public class PreferenceDialogView extends JDialog {
     }
 
     private void init() {
-        this.split = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT);
-        this.list = new JList();
-        this.detailLayout = new CardLayout();
-        this.detailPanel = new JPanel(detailLayout);
-        this.saveButton = new JButton("Save");
-        this.cancelButton = new JButton("Cancel");
+        split = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT);
+        split.setBorder(TopBorder.create());
+        list = new JList<>();
+        list.setCellRenderer(new DefaultListCellRenderer() {
+            @Override
+            public Component getListCellRendererComponent(JList list, Object value, int index, boolean isSelected, boolean cellHasFocus) {
+                super.getListCellRendererComponent(list, value, index, isSelected, cellHasFocus);
+                setBorder(BorderFactory.createEmptyBorder(5, 8, 5, 0));
+                return this;
+            }
+        });
+        list.setFont(new JLabel().getFont().deriveFont(Font.BOLD, 12));
+        detailLayout = new CardLayout();
+        detailPanel = new JPanel(detailLayout);
+        saveButton = new JButton("Save");
+        cancelButton = new JButton("Cancel");
 
         // assemble
 
         Container leftContainer = new JPanel(new BorderLayout());
-        leftContainer.add(new JScrollPane(list));
+        JScrollPane scrollPane = new JScrollPane(list);
+        scrollPane.setBorder(BorderFactory.createEmptyBorder());
+        leftContainer.add(scrollPane);
+        leftContainer.setPreferredSize(new Dimension(180, 400));
+
+        split.setLeftComponent(leftContainer);
+        split.setRightComponent(detailPanel);
+        split.setDividerSize(3);
 
         JPanel buttons = new JPanel(new FlowLayout(FlowLayout.RIGHT));
         buttons.add(cancelButton);
         buttons.add(saveButton);
-
-        Container rightContainer = new JPanel(new BorderLayout());
-        rightContainer.add(detailPanel, BorderLayout.CENTER);
-        rightContainer.add(buttons, BorderLayout.SOUTH);
-
-        split.setLeftComponent(leftContainer);
-        split.setRightComponent(rightContainer);
+        buttons.setBorder(TopBorder.create());
 
         getContentPane().setLayout(new BorderLayout());
         getContentPane().add(split, BorderLayout.CENTER);
+        getContentPane().add(buttons, BorderLayout.SOUTH);
         setTitle("Edit Preferences");
     }
 

http://git-wip-us.apache.org/repos/asf/cayenne/blob/09b0fdb0/modeler/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/dialog/pref/TemplateCreator.java
----------------------------------------------------------------------
diff --git a/modeler/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/dialog/pref/TemplateCreator.java b/modeler/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/dialog/pref/TemplateCreator.java
index 2539ef0..c9f874f 100644
--- a/modeler/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/dialog/pref/TemplateCreator.java
+++ b/modeler/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/dialog/pref/TemplateCreator.java
@@ -114,21 +114,19 @@ public class TemplateCreator extends CayenneController {
             JOptionPane.showMessageDialog(
                     view,
                     "Enter Template Name",
-                    null,
+                    "Error",
                     JOptionPane.WARNING_MESSAGE);
-        }
-        else if (existingNames.contains(templateName)) {
+        } else if (existingNames.contains(templateName)) {
             JOptionPane.showMessageDialog(
                     view,
                     "'" + templateName + "' is already taken, enter a different name",
-                    null,
+                    "Error",
                     JOptionPane.WARNING_MESSAGE);
-        }
-        else if (view.getTemplateChooser().getFile() == null) {
+        } else if (view.getTemplateChooser().getFile() == null) {
             JOptionPane.showMessageDialog(
                     view,
                     "Must select an existing template file",
-                    null,
+                    "Error",
                     JOptionPane.WARNING_MESSAGE);
         }
         else {

http://git-wip-us.apache.org/repos/asf/cayenne/blob/09b0fdb0/modeler/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/dialog/pref/TemplatePreferences.java
----------------------------------------------------------------------
diff --git a/modeler/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/dialog/pref/TemplatePreferences.java b/modeler/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/dialog/pref/TemplatePreferences.java
index 4bf7032..e76aa5c 100644
--- a/modeler/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/dialog/pref/TemplatePreferences.java
+++ b/modeler/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/dialog/pref/TemplatePreferences.java
@@ -55,16 +55,16 @@ public class TemplatePreferences extends CayenneController {
         if (editor instanceof CayennePreferenceEditor) {
             this.editor = (CayennePreferenceEditor) editor;
         }
-        this.templateEntries = new ArrayList<FSPath>();
+        this.templateEntries = new ArrayList<>();
 
         try {
             String[] keys = getTemplatePreferences().childrenNames();
-            for (int i = 0; i < keys.length; i++) {
+            for (String key : keys) {
                 templateEntries.add((FSPath) application
                         .getCayenneProjectPreferences()
                         .getProjectDetailObject(
                                 FSPath.class,
-                                getTemplatePreferences().node(keys[i])));
+                                getTemplatePreferences().node(key)));
             }
         }
         catch (BackingStoreException e) {

http://git-wip-us.apache.org/repos/asf/cayenne/blob/09b0fdb0/modeler/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/dialog/pref/TemplatePreferencesView.java
----------------------------------------------------------------------
diff --git a/modeler/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/dialog/pref/TemplatePreferencesView.java b/modeler/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/dialog/pref/TemplatePreferencesView.java
index fb7a98a..e29801e 100644
--- a/modeler/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/dialog/pref/TemplatePreferencesView.java
+++ b/modeler/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/dialog/pref/TemplatePreferencesView.java
@@ -21,6 +21,7 @@ package org.apache.cayenne.modeler.dialog.pref;
 
 import java.awt.BorderLayout;
 
+import javax.swing.BorderFactory;
 import javax.swing.JButton;
 import javax.swing.JPanel;
 import javax.swing.JScrollPane;
@@ -55,7 +56,9 @@ public class TemplatePreferencesView extends JPanel {
         builder.append(removeButton);
 
         setLayout(new BorderLayout());
-        add(new JScrollPane(table), BorderLayout.CENTER);
+        JScrollPane ScrollPane = new JScrollPane(table);
+        ScrollPane.setBorder(BorderFactory.createEmptyBorder());
+        add(ScrollPane, BorderLayout.CENTER);
         add(builder.getPanel(), BorderLayout.EAST);
     }
 

http://git-wip-us.apache.org/repos/asf/cayenne/blob/09b0fdb0/modeler/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/dialog/welcome/WelcomeScreen.java
----------------------------------------------------------------------
diff --git a/modeler/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/dialog/welcome/WelcomeScreen.java b/modeler/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/dialog/welcome/WelcomeScreen.java
index e1b641d..af1fc28 100644
--- a/modeler/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/dialog/welcome/WelcomeScreen.java
+++ b/modeler/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/dialog/welcome/WelcomeScreen.java
@@ -30,6 +30,7 @@ import java.io.File;
 import java.util.List;
 
 import javax.swing.Action;
+import javax.swing.BorderFactory;
 import javax.swing.Icon;
 import javax.swing.ImageIcon;
 import javax.swing.JButton;
@@ -89,6 +90,7 @@ public class WelcomeScreen extends JScrollPane implements RecentFileListListener
                 g2.dispose();
             }
         };
+        setBorder(BorderFactory.createEmptyBorder());
         initButtonsPane();
         initFileListPane();
         setViewportView(mainPanel);


Mime
View raw message