Login | Register
My pages Projects Community openCollabNet

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

gef
Discussion topic

Back to topic list

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

Author tfmorris
Full name Tom Morris
Date 2009-05-31 09:42:15 PDT
Message Author: tfmorris
Date: 2009-05-31 09:42:14-0700
New Revision: 1233

Modified:
   trunk/src/org/tigris​/gef/presentation/Fi​gCircle.java
   trunk/src/org/tigris​/gef/presentation/Fi​gPoly.java
   trunk/src/org/tigris​/gef/presentation/Fi​gText.java

Log:
Clean up indentation for my patch that Bob applied

Modified: trunk/src/org/tigris​/gef/presentation/Fi​gCircle.java
Url: http://gef.tigris.or​g/source/browse/gef/​trunk/src/org/tigris​/gef/presentation/Fi​gCircle.java?view=di​ff&pathrev=1233​&r1=1232&r2=1​233
====================​====================​====================​==================
--- trunk/src/org/tigris​/gef/presentation/Fi​gCircle.java (original)
+++ trunk/src/org/tigris​/gef/presentation/Fi​gCircle.java 2009-05-31 09:42:14-0700
@@ -1,5 +1,5 @@
 // $Id$
-// Copyright (c) 1996-2009 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
@@ -34,6 +34,7 @@
 
 /**
  * Primitive Fig for displaying circles and ovals.
+ *
  * @author ics125 spring 1996
  */
 public class FigCircle extends Fig {
@@ -87,7 +88,7 @@
     // ////////////////////​////////////////////​////////////////////​//
     // display methods
 
- /** Draw this FigCircle. */
+ /* Draw this FigCircle. */
     public void paint(Graphics g) {
 
         final int lineWidth = getLineWidth();
@@ -111,26 +112,26 @@
         }
     }
 
- private void paint(Graphics2D g2) {
- final int lineWidth = getLineWidth();
- Stroke oldStroke = g2.getStroke();
- Paint oldPaint = g2.getPaint();
- g2.setStroke(getDefa​ultStroke(lineWidth)​);
- if (_filled && _fillColor != null) {
- g2.setPaint(getDefau​ltPaint(_fillColor, _lineColor, _x, _y,
- _w, _h));
- g2.fill(new Ellipse2D.Float(_x + lineWidth, _y + lineWidth,
- _w - (2 * lineWidth), _h - (2 * lineWidth)));
- }
-
- if (lineWidth > 0 && _lineColor != null) {
- g2.setPaint(_lineColor);
- g2.draw(new Ellipse2D.Float(_x, _y, _w, _h));
- }
-
- g2.setStroke(oldStroke);
- g2.setPaint(oldPaint);
- }
+ private void paint(Graphics2D g2) {
+ final int lineWidth = getLineWidth();
+ Stroke oldStroke = g2.getStroke();
+ Paint oldPaint = g2.getPaint();
+ g2.setStroke(getDefa​ultStroke(lineWidth)​);
+ if (_filled && _fillColor != null) {
+ g2.setPaint(getDefau​ltPaint(_fillColor, _lineColor, _x, _y,
+ _w, _h));
+ g2.fill(new Ellipse2D.Float(_x + lineWidth, _y + lineWidth,
+ _w - (2 * lineWidth), _h - (2 * lineWidth)));
+ }
+
+ if (lineWidth > 0 && _lineColor != null) {
+ g2.setPaint(_lineColor);
+ g2.draw(new Ellipse2D.Float(_x, _y, _w, _h));
+ }
+
+ g2.setStroke(oldStroke);
+ g2.setPaint(oldPaint);
+ }
 
     public void appendSvg(StringBuffer sb) {
         sb.append("<ellipse id='").append(getId(​)).append("'");

Modified: trunk/src/org/tigris​/gef/presentation/Fi​gPoly.java
Url: http://gef.tigris.or​g/source/browse/gef/​trunk/src/org/tigris​/gef/presentation/Fi​gPoly.java?view=diff​&pathrev=1233​&r1=1232&r2=123​3
====================​====================​====================​==================
--- trunk/src/org/tigris​/gef/presentation/Fi​gPoly.java (original)
+++ trunk/src/org/tigris​/gef/presentation/Fi​gPoly.java 2009-05-31 09:42:14-0700
@@ -1,5 +1,5 @@
-// %1030542919702:org.t​igris.gef.presentati​on%
-// 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,10 +21,7 @@
 // PROVIDED HEREUNDER IS ON AN "AS IS" BASIS, AND THE UNIVERSITY OF
 // CALIFORNIA HAS NO OBLIGATIONS TO PROVIDE MAINTENANCE, SUPPORT,
 // UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
-// File: FigPoly.java
-// Classes: FigPoly
-// Original Author: jrobbins at ics dot uci dot edu
-// $Id$
+
 package org.tigris.gef.presentation;
 
 import org.tigris.gef.base.Geometry;
@@ -49,6 +46,8 @@
  * a number of handles that cannot be moved by user dragging. A FigPoly is not
  * closed unless the last point equals the first point. Thus, FigPolys can be
  * used to represent polylines such as FigEdgeRectilinear.
+ *
+ * @author jrobbins at ics dot uci dot edu
  */
 public class FigPoly extends Fig {
 
@@ -447,8 +446,8 @@
     /**
      * USED BY PGML.tee
      */
- public List getPointsList() {
- ArrayList res = new ArrayList(_npoints);
+ public List<Point> getPointsList() {
+ List<Point> res = new ArrayList<Point​>(_npoints);
 
         for (int i = 0; i < _npoints; i++) {
             res.add(new Point(_xpoints[i], _ypoints[i]));
@@ -550,13 +549,13 @@
                 Rectangle bb = poly.getBounds();
                 Paint oldPaint = g2.getPaint();
                 g2.setPaint(getDefau​ltPaint(_fillColor, _lineColor, bb.x, bb.y,
- bb.width, bb.height));
+ bb.width, bb.height));
                 g2.fill(poly);
                 g2.setPaint(oldPaint);
- } else {
+ } else {
                 g.setColor(_fillColor);
                 g.fillPolygon(_xpoints, _ypoints, _npoints);
- }
+ }
         }
 
         if (getLineWidth() > 0 && _lineColor != null) {
@@ -610,9 +609,9 @@
 
         GeneralPath gp = new GeneralPath();
         gp.reset();
- gp.moveTo((float) xPoints[0], (float) yPoints[0]);
+ gp.moveTo(xPoints[0], yPoints[0]);
         for (int i = 1; i < pointCount; i++) {
- gp.lineTo((float) xPoints[i], (float) yPoints[i]);
+ gp.lineTo(xPoints[i], yPoints[i]);
         }
 
         Stroke originalStroke = g2.getStroke();
@@ -622,9 +621,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='");

Modified: trunk/src/org/tigris​/gef/presentation/Fi​gText.java
Url: http://gef.tigris.or​g/source/browse/gef/​trunk/src/org/tigris​/gef/presentation/Fi​gText.java?view=diff​&pathrev=1233​&r1=1232&r2=123​3
====================​====================​====================​==================
--- trunk/src/org/tigris​/gef/presentation/Fi​gText.java (original)
+++ trunk/src/org/tigris​/gef/presentation/Fi​gText.java 2009-05-31 09:42:14-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: FigText.java
-// Classes: FigText
-// Original Author: ics125 spring 1996
-// $Id$
-
 package org.tigris.gef.presentation;
 
 import java.awt.Color;
@@ -54,6 +50,8 @@
 
 /**
  * This class handles painting and editing text Fig's in a LayerDiagram.
+ *
+ * @author ics125 spring 1996
  */
 
 public class FigText extends Fig implements KeyListener, MouseListener {
@@ -732,14 +730,14 @@
         int lineWidth = getLineWidth();
 
         if (isFilled()) {
- if (g instanceof Graphics2D) {
- Graphics2D g2 = (Graphics2D) g;
-
- } else {
- g.setColor(getFillColor());
- g.fillRect(_x, _y, _w, _h);
- }
- }
+ if (g instanceof Graphics2D) {
+ Graphics2D g2 = (Graphics2D) g;
+ // TODO: Noop - does something belong here?
+ } else {
+ g.setColor(getFillColor());
+ g.fillRect(_x, _y, _w, _h);
+ }
+ }
         if (lineWidth > 0) {
             g.setColor(getLineColor());
             // test linewidth

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

Messages

Show all messages in topic

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