Login | Register
My pages Projects Community openCollabNet

Discussions > commits > svn commit: r1327 - trunk/src/org/tigris/gef/presentation/FigGroup.java

gef
Discussion topic

Back to topic list

svn commit: r1327 - trunk/src/org/tigris/gef/presentation/FigGroup.java

Author bobtarling
Full name Bob Tarling
Date 2011-05-21 07:50:32 PDT
Message Author: bobtarling
Date: 2011-05-21 07:50:32-0700
New Revision: 1327

Modified:
   trunk/src/org/tigris​/gef/presentation/Fi​gGroup.java

Log:
setFigs and getFig now use Generics

Modified: trunk/src/org/tigris​/gef/presentation/Fi​gGroup.java
Url: http://gef.tigris.or​g/source/browse/gef/​trunk/src/org/tigris​/gef/presentation/Fi​gGroup.java?view=dif​f&pathrev=1327​&r1=1326&r2=13​27
====================​====================​====================​==================
--- trunk/src/org/tigris​/gef/presentation/Fi​gGroup.java (original)
+++ trunk/src/org/tigris​/gef/presentation/Fi​gGroup.java 2011-05-21 07:50:32-0700
@@ -62,7 +62,7 @@
     /**
      * The Fig's contained in this FigGroup
      */
- private List<DiagramElement> figs;
+ private List<Fig> figs;
 
     private int extraFrameSpace = 0;
 
@@ -96,7 +96,7 @@
     /** Construct a new FigGroup that holds no Figs. */
     public FigGroup() {
         super();
- figs = Collections.synchron​izedList(new ArrayList<Diagram​Element>());
+ figs = Collections.synchron​izedList(new ArrayList<Fig>());
     }
 
     /**
@@ -274,16 +274,15 @@
     /**
      * Get the child figs that make up this group.
      * USED BY PGML.tee
- * @deprecated in 0.13.1 use getDiagramElements
      *
      * @return the figs of this group
      */
- public List getFigs() {
+ public List<Fig> getFigs() {
         return Collections.unmodifi​ableList(figs);
     }
-
+
     public List<DiagramElement> getDiagramElements() {
- return Collections.unmodifi​ableList(figs);
+ return Collections.unmodifi​ableList(new ArrayList<Diagram​Element>(figs));
     }
     
     
@@ -477,9 +476,9 @@
     }
 
     /** Set the Figs in this group. Fires PropertyChange with "bounds". */
- public void setFigs(List figs) {
+ public void setFigs(List<Fig> figs) {
         Rectangle oldBounds = getBounds();
- this.figs = new ArrayList(figs);
+ this.figs = new ArrayList<Fig>(figs);
         calcBounds();
         firePropChange("bounds", oldBounds, getBounds());
     }

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

Messages

Show all messages in topic

svn commit: r1327 - trunk/src/org/tigris/gef/presentation/FigGroup.java bobtarling Bob Tarling 2011-05-21 07:50:32 PDT
Messages per page: