Login | Register
My pages Projects Community openCollabNet

Discussions > commits > svn commit: r1234 - trunk/src/org/tigris/gef/presentation

gef
Discussion topic

Back to topic list

svn commit: r1234 - trunk/src/org/tigris/gef/presentation

Author tfmorris
Full name Tom Morris
Date 2009-05-31 09:42:39 PDT
Message Author: tfmorris
Date: 2009-05-31 09:42:39-0700
New Revision: 1234

Modified:
   trunk/src/org/tigris​/gef/presentation/Fi​g.java
   trunk/src/org/tigris​/gef/presentation/Fi​gCube.java
   trunk/src/org/tigris​/gef/presentation/Fi​gDiamond.java

Log:
A few other minor cleanups

Modified: trunk/src/org/tigris​/gef/presentation/Fi​g.java
Url: http://gef.tigris.or​g/source/browse/gef/​trunk/src/org/tigris​/gef/presentation/Fi​g.java?view=diff​&pathrev=1234&r1​=1233&r2=1234
====================​====================​====================​==================
--- trunk/src/org/tigris​/gef/presentation/Fi​g.java (original)
+++ trunk/src/org/tigris​/gef/presentation/Fi​g.java 2009-05-31 09:42:39-0700
@@ -1,5 +1,5 @@
 // $Id$
-// Copyright (c) 1996-2008 The Regents of the University of California. All
+// Copyright (c) 1996,2009 The Regents of the University of California. All
 // Rights Reserved. Permission to use, copy, modify, and distribute this
 // software and its documentation without fee, and without a written
 // agreement is hereby granted, provided that the above copyright notice
@@ -26,7 +26,6 @@
 import java.awt.BasicStroke;
 import java.awt.Color;
 import java.awt.Dimension;
-import java.awt.GradientPaint;
 import java.awt.Graphics;
 import java.awt.Graphics2D;
 import java.awt.Paint;
@@ -35,7 +34,6 @@
 import java.awt.Stroke;
 import java.awt.event.MouseEvent;
 import java.awt.geom.Line2D;
-import java.awt.geom.Point2D;
 import java.awt.geom.Rectangle2D;
 import java.beans.PropertyChangeEvent;
 import java.beans.PropertyC​hangeListener;
@@ -75,7 +73,7 @@
         java.io.Serializable, PropertyChangeListener, PopupGenerator {
 
     /** The smallest size that the user can drag this Fig. */
- public final int MIN_SIZE = 4;
+ public static final int MIN_SIZE = 4;
 
     /** The size of the dashes drawn when the Fig is dashed. */
     private static final String[] DASHED_CHOICES = { "Solid", "Dashed",
@@ -222,7 +220,7 @@
     // geometric manipulations
 
     /** Margin between this Fig and automatically routed arcs. */
- public final int BORDER = 8;
+ public static final int BORDER = 8;
 
     /**
      * Most subclasses will not use this constructor, it is only useful for
@@ -678,6 +676,7 @@
         }
         if (lay != null) {
             lay.damageAll();
+// lay.damaged(this);
         }
     }
 
@@ -1057,7 +1056,7 @@
         return Geometry.ptClosestTo​(getBounds(), anotherPt);
     }
 
- /** Get the dashed attribute * */
+ /** Get the dashed attribute */
     public boolean getDashed() {
         return (_dashes != null);
     }

Modified: trunk/src/org/tigris​/gef/presentation/Fi​gCube.java
Url: http://gef.tigris.or​g/source/browse/gef/​trunk/src/org/tigris​/gef/presentation/Fi​gCube.java?view=diff​&pathrev=1234​&r1=1233&r2=123​4
====================​====================​====================​==================
--- trunk/src/org/tigris​/gef/presentation/Fi​gCube.java (original)
+++ trunk/src/org/tigris​/gef/presentation/Fi​gCube.java 2009-05-31 09:42:39-0700
@@ -1,4 +1,5 @@
-// Copyright (c) 1996-99 The Regents of the University of California. All
+// $Id$
+// Copyright (c) 1996,2009 The Regents of the University of California. All
 // Rights Reserved. Permission to use, copy, modify, and distribute this
 // software and its documentation without fee, and without a written
 // agreement is hereby granted, provided that the above copyright notice
@@ -21,11 +22,6 @@
 // CALIFORNIA HAS NO OBLIGATIONS TO PROVIDE MAINTENANCE, SUPPORT,
 // UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
 
-// File: FigCube.java
-// Classes: FigCube
-// Original Author: 5eichler@informatik.​uni-hamburg.de
-// $Id$
-
 package org.tigris.gef.presentation;
 
 import java.awt.Color;
@@ -34,6 +30,8 @@
 
 /**
  * This class is needed to paint cubes (the only 3dim Element in UML)
+ *
+ * @author 5eichler@informatik.​uni-hamburg.de
  */
 public class FigCube extends Fig implements Serializable {
 
@@ -94,8 +92,8 @@
 
     public void appendSvg(StringBuffer sb) {
         sb.append("<rect id='").append(getId(​)).append("' x='").append(getX())
- .append("' y='").append(getY()).append("' width='").append(
- getWidth()).append("' height='").append(getHeight())
+ .append("' y='").append(getY()).append("' width='")
+ .append(getWidth()).append("' height='").append(getHeight())
                 .append("'");
         appendSvgStyle(sb);
         sb.append(" />");

Modified: trunk/src/org/tigris​/gef/presentation/Fi​gDiamond.java
Url: http://gef.tigris.or​g/source/browse/gef/​trunk/src/org/tigris​/gef/presentation/Fi​gDiamond.java?view=d​iff&pathrev=1234​&r1=1233&r2=​1234
====================​====================​====================​==================
--- trunk/src/org/tigris​/gef/presentation/Fi​gDiamond.java (original)
+++ trunk/src/org/tigris​/gef/presentation/Fi​gDiamond.java 2009-05-31 09:42:39-0700
@@ -1,4 +1,5 @@
-// Copyright (c) 1996-99 The Regents of the University of California. All
+// $Id$
+// Copyright (c) 1996,2009 The Regents of the University of California. All
 // Rights Reserved. Permission to use, copy, modify, and distribute this
 // software and its documentation without fee, and without a written
 // agreement is hereby granted, provided that the above copyright notice
@@ -21,11 +22,6 @@
 // CALIFORNIA HAS NO OBLIGATIONS TO PROVIDE MAINTENANCE, SUPPORT,
 // UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
 
-// File: FigRect.java
-// Classes: FigRect
-// Original Author: ics125 spring 1996
-// $Id$
-
 package org.tigris.gef.presentation;
 
 import org.tigris.gef.prese​ntation.Fig;
@@ -36,8 +32,11 @@
 import java.util.ArrayList;
 import java.util.List;
 
-/** Primitive Fig to paint rectangles on a LayerDiagram. */
-
+/**
+ * Primitive Fig to paint rectangles on a LayerDiagram.
+ *
+ * @author ics125 spring 1996
+ */
 public class FigDiamond extends Fig {
 
     private static final long serialVersionUID = -5625367072029450739L;
@@ -76,8 +75,8 @@
      *
      * @see org.tigris.gef.prese​ntation.Fig#getGravi​tyPoints()
      */
- public List getGravityPoints() {
- ArrayList ret = new ArrayList(4);
+ public List<Point> getGravityPoints() {
+ ArrayList<Point> ret = new ArrayList<Point>(4);
         ret.add(new Point(_x + _w / 2, _y));
         ret.add(new Point(_x + _w, _y + _h / 2));
         ret.add(new Point(_x + _w / 2, _y + _h));
@@ -100,7 +99,7 @@
         ys[2] = _y + _h;
         xs[3] = _x;
         ys[3] = _y + _h / 2;
- Graphics g = (Graphics) graphicContext;
+ Graphics g = graphicContext;
         if (_filled && getFillColor() != null) {
             g.setColor(getFillColor());
             g.fillPolygon(xs, ys, 4);
@@ -112,9 +111,10 @@
     }
 
     public void appendSvg(StringBuffer sb) {
- sb.append("<path id='").append(getId(​)).append("' class='").append(
- getClass().getName()).append(
- "' style='fill:none; stroke-width:").appe​nd(getLineWidth())
+ sb.append("<path id='").append(getId(​)).append("' class='")
+ .append(getClass().getName())
+ .append("' style='fill:none; stroke-width:")
+ .append(getLineWidth())
                 .append("; stroke:rgb(").append​(getLineColor().getR​ed())
                 .append(",").append(​getLineColor().getGr​een()).append(',')
                 .append(getLineColor​().getBlue()).append​(" ;' d='");

« Previous message in topic | 1 of 1 | Next message in topic »

Messages

Show all messages in topic

svn commit: r1234 - trunk/src/org/tigris/gef/presentation tfmorris Tom Morris 2009-05-31 09:42:39 PDT
Messages per page: