cayenne-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ol...@apache.org
Subject svn commit: r890242 - in /cayenne/main/branches/STABLE-3.0/framework/cayenne-modeler/src/main/java/org/apache/cayenne/modeler: Application.java dialog/objentity/ObjAttributeInfoDialogView.java
Date Mon, 14 Dec 2009 09:30:28 GMT
Author: oltka
Date: Mon Dec 14 09:30:28 2009
New Revision: 890242

URL: http://svn.apache.org/viewvc?rev=890242&view=rev
Log:
CAY-1332

*some changes in ObjAttribute Inspector

Modified:
    cayenne/main/branches/STABLE-3.0/framework/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/Application.java
    cayenne/main/branches/STABLE-3.0/framework/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/dialog/objentity/ObjAttributeInfoDialogView.java

Modified: cayenne/main/branches/STABLE-3.0/framework/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/Application.java
URL: http://svn.apache.org/viewvc/cayenne/main/branches/STABLE-3.0/framework/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/Application.java?rev=890242&r1=890241&r2=890242&view=diff
==============================================================================
--- cayenne/main/branches/STABLE-3.0/framework/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/Application.java
(original)
+++ cayenne/main/branches/STABLE-3.0/framework/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/Application.java
Mon Dec 14 09:30:28 2009
@@ -29,7 +29,6 @@
 import javax.swing.JOptionPane;
 import javax.swing.JRootPane;
 import javax.swing.SwingUtilities;
-import javax.swing.undo.UndoManager;
 
 import org.apache.cayenne.modeler.dialog.LogConsole;
 import org.apache.cayenne.modeler.undo.CayenneUndoManager;

Modified: cayenne/main/branches/STABLE-3.0/framework/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/dialog/objentity/ObjAttributeInfoDialogView.java
URL: http://svn.apache.org/viewvc/cayenne/main/branches/STABLE-3.0/framework/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/dialog/objentity/ObjAttributeInfoDialogView.java?rev=890242&r1=890241&r2=890242&view=diff
==============================================================================
--- cayenne/main/branches/STABLE-3.0/framework/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/dialog/objentity/ObjAttributeInfoDialogView.java
(original)
+++ cayenne/main/branches/STABLE-3.0/framework/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/dialog/objentity/ObjAttributeInfoDialogView.java
Mon Dec 14 09:30:28 2009
@@ -26,6 +26,8 @@
 import java.awt.event.ActionListener;
 import java.awt.event.ComponentEvent;
 import java.awt.event.ComponentListener;
+import java.util.ArrayList;
+import java.util.Iterator;
 
 import javax.swing.JButton;
 import javax.swing.JComboBox;
@@ -35,6 +37,7 @@
 import javax.swing.JScrollPane;
 import javax.swing.JTextField;
 
+import org.apache.cayenne.map.Embeddable;
 import org.apache.cayenne.modeler.ProjectController;
 import org.apache.cayenne.modeler.util.CayenneTable;
 import org.apache.cayenne.modeler.util.CayenneWidgetFactory;
@@ -76,7 +79,7 @@
     static final String EMBEDDABLE_PANEL = "EMBEDDABLE_PANEL"; 
     static final String FLATTENED_PANEL = "FLATTENED_PANEL"; 
 
-    public ObjAttributeInfoDialogView(ProjectController mediator) {
+    public ObjAttributeInfoDialogView(final ProjectController mediator) {
 
         this.mediator = mediator;
 
@@ -209,7 +212,13 @@
                     }
                 }
 
-                if (isType) {
+                Iterator<Embeddable> embs = mediator.getEmbeddableNamesInCurRentDataDomain().iterator();
+                ArrayList<String> embNames = new ArrayList<String>();
+                while (embs.hasNext()) {
+                embNames.add(embs.next().getClassName());
+               }
+                
+                if (isType || !embNames.contains(type.getSelectedItem()) ) {
                     ((CardLayout) typeManagerPane.getLayout()).show(typeManagerPane, FLATTENED_PANEL);
                 }
                 else {



Mime
View raw message