Login | Register
My pages Projects Community openCollabNet

Discussions > cvs > CVS update: gef/src/org/tigris/gef/presentation EdgeAnnotationStrategy.java

gef
Discussion topic

Back to topic list

CVS update: gef/src/org/tigris/gef/presentation EdgeAnnotationStrategy.java

Reply

Author 1sturm
Full name Thorsten Sturm
Date 2001-04-26 01:37:34 PDT
Message User: 1sturm
  Date: 01/04/26 01:37:34

  Modified: src/org/tigris/gef/presentation EdgeAnnotationStrategy.java
  Log:
  minor fixes
  
  Revision Changes Path
  1.2 +13 -14 gef/src/org/tigris/g​ef/presentation/Edge​AnnotationStrategy.j​ava
  
  Index: EdgeAnnotationStrategy.java
  ====================​====================​====================​=======
  RCS file: /cvs/gef/src/org/tig​ris/gef/presentation​/EdgeAnnotationStrat​egy.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- EdgeAnnotationStrategy.java 2001/04/23 10:43:49 1.1
  +++ EdgeAnnotationStrategy.java 2001/04/26 08:37:34 1.2
  @@ -43,15 +43,15 @@
                   ende = edge.getLastPoint();
               } catch (ArrayIndexOutOfBoundsException e){
                   try{
  - start= edge.getSourcePortFi​g().center();
  + start= edge.getSourcePortFi​g().center();
                       ende = edge.getDestPortFig().center();
                   }
                   catch(NullPointerException ne){
                           start = new Point(10,10);
                           ende = new Point(100,10);
                   }
  - }
  -
  + }
  +
               if ((start.x == ende.x) && (start.y == ende.y)) return annotation.getLocation();
               
               // calculate
  @@ -100,11 +100,10 @@
               AnnotationProperties prop = (AnnotationPropertie​s)annotations.get(an​notation);
               prop.setRatio(ratio,​prop.hasFixedRatio()​);
               prop.setOffset(d ,prop.hasFixedOffset());
  -
  - // so ungefaehr
  +
               //((PathConvPercentP​lusConst)edge.getPat​hConvOfFig(annotatio​n)).setPercentOffset​((int)ratio, d);
  - System.out.println("ratio = " +ratio + " d= " +d);
  -
  + //System.out.println("ratio = " +ratio + " d= " +d);
  +
               //
           }
           drawConnectingLine(annotation);
  @@ -116,8 +115,8 @@
           Fig owner = annotation.getAnnota​tionOwner();
           AnnotationProperties prop = (AnnotationPropertie​s)annotations.get(an​notation);
           FigLine line = prop.getConnectingLine();
  -
  -
  +
  +
           if ( ((FigEdge)owner).get​SourcePortFig().cent​er() == null || ((FigEdge)owner).get​DestPortFig().center​() == null ) return;
                   //line from annotation to center of owning edge
           //line.setShape(anno​tation.center(), owner.center());
  @@ -139,17 +138,17 @@
           line.damage();
           annotation.damage();
   
  - // remove line automatically
  - AnnotationLineRemove​r.instance().removeL​ineIn( getAnnotationPropert​ies(annotation).getL​ineVisibilityDuratio​n(),annotation );
  + // remove line automatically
  + AnnotationLineRemove​r.instance().removeL​ineIn( getAnnotationPropert​ies(annotation).getL​ineVisibilityDuratio​n(),annotation );
           }
   
       // move annotations
  - // this method is called, when an annotationOwner is moved without its
  + // this method is called, when an annotationOwner is moved without its
       // annotations
       public void translateAnnotations(Fig owner){
           java.util.Enumeration enum = annotations.keys();
           // owner has moved; set annotations to their new positions
  - while (enum.hasMoreElements()){
  + while (enum.hasMoreElements()){
               Fig annotation = (Fig)enum.nextElement();
               annotation.setLocati​on(restoreAnnotation​Position(annotation)​);
               //drawConnectingLine​(annotation);
  @@ -157,7 +156,7 @@
               // call endtrans of annotation
               annotation.endTrans();
               annotation.damage();
  -
  +
           }
           owner.damage();
       }

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

Messages

Show all messages in topic

CVS update: gef/src/org/tigris/gef/presentation EdgeAnnotationStrategy.java 1sturm Thorsten Sturm 2001-04-26 01:37:34 PDT
Messages per page: