svn commit: r16708 - trunk/src/argouml-app/src/org/argouml/uml/diagram: static_structure/ui ui

Tom Morris <[email protected]>
Newsgroups gmane.comp.lang.uml.argouml.cvs
Message-ID <[email protected]>
Author: tfmorris
Date: 2009-01-26 10:47:25-0800
New Revision: 16708

Modified:
   trunk/src/argouml-app/src/org/argouml/uml/diagram/static_structure/ui/FigEnumerationLiteral.java
   trunk/src/argouml-app/src/org/argouml/uml/diagram/ui/CompartmentFigText.java
   trunk/src/argouml-app/src/org/argouml/uml/diagram/ui/FigAttributesCompartment.java
   trunk/src/argouml-app/src/org/argouml/uml/diagram/ui/FigEnumLiteralsCompartment.java

Log:
RESOLVED - task 5652: enumeration fig broken (missing a line) 
http://argouml.tigris.org/issues/show_bug.cgi?id=5652

Modified: trunk/src/argouml-app/src/org/argouml/uml/diagram/static_structure/ui/FigEnumerationLiteral.java
Url: http://argouml.tigris.org/source/browse/argouml/trunk/src/argouml-app/src/org/argouml/uml/diagram/static_structure/ui/FigEnumerationLiteral.java?view=diff&pathrev=16708&r1=16707&r2=16708
==============================================================================
--- trunk/src/argouml-app/src/org/argouml/uml/diagram/static_structure/ui/FigEnumerationLiteral.java	(original)
+++ trunk/src/argouml-app/src/org/argouml/uml/diagram/static_structure/ui/FigEnumerationLiteral.java	2009-01-26 10:47:25-0800
@@ -74,6 +74,7 @@
      * @param settings render settings
      * @param np The notationProvider. See NotationProviderFactory2.
      */
+    @SuppressWarnings("deprecation")
     @Deprecated
     public FigEnumerationLiteral(Object owner, Rectangle bounds,
             DiagramSettings settings, NotationProvider np) {

Modified: trunk/src/argouml-app/src/org/argouml/uml/diagram/ui/CompartmentFigText.java
Url: http://argouml.tigris.org/source/browse/argouml/trunk/src/argouml-app/src/org/argouml/uml/diagram/ui/CompartmentFigText.java?view=diff&pathrev=16708&r1=16707&r2=16708
==============================================================================
--- trunk/src/argouml-app/src/org/argouml/uml/diagram/ui/CompartmentFigText.java	(original)
+++ trunk/src/argouml-app/src/org/argouml/uml/diagram/ui/CompartmentFigText.java	2009-01-26 10:47:25-0800
@@ -163,6 +163,9 @@
         setJustification(FigText.JUSTIFY_LEFT);
         setRightMargin(MARGIN);
         setLeftMargin(MARGIN);
+        // TODO: We'd like these to not be filled, but GEF won't let us
+        // select them if we do that.
+//        setFilled(false);
     }
     
     /**
@@ -286,7 +289,7 @@
     }
 
     /**
-     * @return  Current fill status&mdash;always <code>true</code>.
+     * @return  Current fill status&mdash;always <code>false</code>.
      */
     @Override
     public boolean isFilled() {

Modified: trunk/src/argouml-app/src/org/argouml/uml/diagram/ui/FigAttributesCompartment.java
Url: http://argouml.tigris.org/source/browse/argouml/trunk/src/argouml-app/src/org/argouml/uml/diagram/ui/FigAttributesCompartment.java?view=diff&pathrev=16708&r1=16707&r2=16708
==============================================================================
--- trunk/src/argouml-app/src/org/argouml/uml/diagram/ui/FigAttributesCompartment.java	(original)
+++ trunk/src/argouml-app/src/org/argouml/uml/diagram/ui/FigAttributesCompartment.java	2009-01-26 10:47:25-0800
@@ -103,14 +103,14 @@
     @SuppressWarnings("deprecation")
     @Deprecated
     @Override
-    protected FigSingleLineTextWithNotation createFigText(Object owner, Rectangle bounds,
-            DiagramSettings settings, NotationProvider np) {
+    protected FigSingleLineTextWithNotation createFigText(Object owner,
+            Rectangle bounds, DiagramSettings settings, NotationProvider np) {
         return new FigAttribute(owner, bounds, settings, np);
     }
-    
+
     @Override
-    protected FigSingleLineTextWithNotation createFigText(Object owner, Rectangle bounds,
-            DiagramSettings settings) {
+    protected FigSingleLineTextWithNotation createFigText(Object owner,
+            Rectangle bounds, DiagramSettings settings) {
         return new FigAttribute(owner, bounds, settings);
     }
 }

Modified: trunk/src/argouml-app/src/org/argouml/uml/diagram/ui/FigEnumLiteralsCompartment.java
Url: http://argouml.tigris.org/source/browse/argouml/trunk/src/argouml-app/src/org/argouml/uml/diagram/ui/FigEnumLiteralsCompartment.java?view=diff&pathrev=16708&r1=16707&r2=16708
==============================================================================
--- trunk/src/argouml-app/src/org/argouml/uml/diagram/ui/FigEnumLiteralsCompartment.java	(original)
+++ trunk/src/argouml-app/src/org/argouml/uml/diagram/ui/FigEnumLiteralsCompartment.java	2009-01-26 10:47:25-0800
@@ -72,6 +72,16 @@
     public FigEnumLiteralsCompartment(Object owner, Rectangle bounds, 
             DiagramSettings settings) {
         super(owner, bounds, settings);
+        
+        // TODO: We don't really want this to be filled, but if it's not then
+        // the user can't double click in the compartment to add a new literal
+        // Apparently GEF thinks unfilled figs are only selectable by border
+//        setFilled(false);
+
+        // We need the width of the outline fig (bigPort) for the compartment
+        // to match the width of the outer fig so that the outer fig doesn't
+        // get overwritten by our fill
+        setLineWidth(LINE_WIDTH);
     }
     
     /*
@@ -102,16 +112,17 @@
         TargetManager.getInstance().setTarget(literal);
     }
 
+    @SuppressWarnings("deprecation")
     @Deprecated
     @Override
-    protected FigSingleLineTextWithNotation createFigText(Object owner, Rectangle bounds,
-            DiagramSettings settings, NotationProvider np) {
+    protected FigSingleLineTextWithNotation createFigText(Object owner,
+            Rectangle bounds, DiagramSettings settings, NotationProvider np) {
         return new FigEnumerationLiteral(owner, bounds, settings, np);
     }
 
     @Override
-    protected FigSingleLineTextWithNotation createFigText(Object owner, Rectangle bounds,
-            DiagramSettings settings) {
+    protected FigSingleLineTextWithNotation createFigText(Object owner,
+            Rectangle bounds, DiagramSettings settings) {
         return new FigEnumerationLiteral(owner, bounds, settings);
     }  
 }

------------------------------------------------------
http://argouml.tigris.org/ds/viewMessage.do?dsForumId=5905&dsMessageId=1055553

To unsubscribe from this discussion, e-mail: [[email protected]].
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.