Login | Register
My pages Projects Community openCollabNet

Discussions > commits > svn commit: r1185 - trunk/src/org/tigris/gef/base/SelectionManager.java

gef
Discussion topic

Back to topic list

svn commit: r1185 - trunk/src/org/tigris/gef/base/SelectionManager.java

Author dthompson
Full name Dave Thompson
Date 2008-12-09 12:07:59 PST
Message Author: dthompson
Date: 2008-12-09 12:07:58-0800
New Revision: 1185

Modified:
   trunk/src/org/tigris​/gef/base/SelectionM​anager.java

Log:
Swapped over to generics inside one method, to simplify the code.

Modified: trunk/src/org/tigris​/gef/base/SelectionM​anager.java
Url: http://gef.tigris.or​g/source/browse/gef/​trunk/src/org/tigris​/gef/base/SelectionM​anager.java?view=dif​f&pathrev=1185​&r1=1184&r2=11​85
====================​====================​====================​==================
--- trunk/src/org/tigris​/gef/base/SelectionM​anager.java (original)
+++ trunk/src/org/tigris​/gef/base/SelectionM​anager.java 2008-12-09 12:07:58-0800
@@ -772,11 +772,9 @@
         }
 
         if (layer != null) {
- List editors = layer.getEditors();
- int editorCount = editors.size();
+ List<Editor> editors = layer.getEditors();
             Rectangle dirtyRegionScaled = new Rectangle();
- for (int editorIndex = 0; editorIndex < editorCount; ++editorIndex) {
- Editor editor = (Editor) editors.get(editorIndex);
+ for (Editor editor : editors) {
                 double editorScale = editor.getScale();
                 dirtyRegionScaled.x = (int) Math.floor(dirtyRegion.x
                         * editorScale);

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

Messages

Show all messages in topic

svn commit: r1185 - trunk/src/org/tigris/gef/base/SelectionManager.java dthompson Dave Thompson 2008-12-09 12:07:59 PST
Messages per page: