svn commit: r16372 - trunk/src/argouml-app/src/org/argouml/uml/diagram: static_structure/ui ui
Michiel van der Wulp <[email protected]>
| Newsgroups | gmane.comp.lang.uml.argouml.cvs |
|---|---|
| Message-ID | <[email protected]> |
Author: mvw
Date: 2008-12-18 11:59:41-0800
New Revision: 16372
Modified:
trunk/src/argouml-app/src/org/argouml/uml/diagram/static_structure/ui/FigClassifierBoxWithAttributes.java
trunk/src/argouml-app/src/org/argouml/uml/diagram/ui/FigNodeModelElement.java
Log:
Aligned Fig size: before, different parts of a class had width 60, but name and stereo were 90. You could see this give a special effect when drawing classes in certain cases.
In ArgoUML V0.22 the old value of 60 was changed to 90, IIRC not intentionally.
Hence, I wanted to restore the value to 60 now, but to align to grid better, it would better be a multiple of 16 (or 8). So, the final choice is 64.
Modified: trunk/src/argouml-app/src/org/argouml/uml/diagram/static_structure/ui/FigClassifierBoxWithAttributes.java
Url: http://argouml.tigris.org/source/browse/argouml/trunk/src/argouml-app/src/org/argouml/uml/diagram/static_structure/ui/FigClassifierBoxWithAttributes.java?view=diff&pathrev=16372&r1=16371&r2=16372
==============================================================================
--- trunk/src/argouml-app/src/org/argouml/uml/diagram/static_structure/ui/FigClassifierBoxWithAttributes.java (original)
+++ trunk/src/argouml-app/src/org/argouml/uml/diagram/static_structure/ui/FigClassifierBoxWithAttributes.java 2008-12-18 11:59:41-0800
@@ -255,7 +255,7 @@
aSize = addChildDimensions(aSize, getAttributesFig());
aSize = addChildDimensions(aSize, getOperationsFig());
- aSize.width = Math.max(60, aSize.width);
+ aSize.width = Math.max(WIDTH, aSize.width);
return aSize;
}
Modified: trunk/src/argouml-app/src/org/argouml/uml/diagram/ui/FigNodeModelElement.java
Url: http://argouml.tigris.org/source/browse/argouml/trunk/src/argouml-app/src/org/argouml/uml/diagram/ui/FigNodeModelElement.java?view=diff&pathrev=16372&r1=16371&r2=16372
==============================================================================
--- trunk/src/argouml-app/src/org/argouml/uml/diagram/ui/FigNodeModelElement.java (original)
+++ trunk/src/argouml-app/src/org/argouml/uml/diagram/ui/FigNodeModelElement.java 2008-12-18 11:59:41-0800
@@ -144,9 +144,11 @@
// as needed to express other common factors - tfm 20081201
/**
- * Default width for a node fig
+ * Default width for a node fig.
+ * Used to be 60 (up to V0.20), later (from V0.22) it was 90.
+ * Now 64 to align to grid better.
*/
- protected static final int WIDTH = 60;
+ protected static final int WIDTH = 64;
private DiElement diElement;
@@ -307,8 +309,8 @@
// is inside it:
bigPort = new FigRect(X0, Y0, 0, 0, Color.cyan, Color.cyan);
- nameFig = new FigNameWithAbstractAndBold(X0, Y0, 90, 21, true);
- stereotypeFig = new FigStereotypesGroup(X0, Y0, 90, 15);
+ nameFig = new FigNameWithAbstractAndBold(X0, Y0, WIDTH, 21, true);
+ stereotypeFig = new FigStereotypesGroup(X0, Y0, WIDTH, 15);
constructFigs();
}
@@ -370,9 +372,9 @@
// is inside it:
bigPort = new FigRect(X0, Y0, 0, 0, Color.cyan, Color.cyan);
nameFig = new FigNameWithAbstractAndBold(element,
- new Rectangle(X0, Y0, 90, 21), getSettings(), true);
+ new Rectangle(X0, Y0, WIDTH, 21), getSettings(), true);
stereotypeFig = new FigStereotypesGroup(element,
- new Rectangle(X0, Y0, 90, 15), settings);
+ new Rectangle(X0, Y0, WIDTH, 15), settings);
constructFigs();
if (element == null) {
throw new IllegalArgumentException("An owner must be supplied");
------------------------------------------------------
http://argouml.tigris.org/ds/viewMessage.do?dsForumId=5905&dsMessageId=986931
To unsubscribe from this discussion, e-mail: [[email protected]].