Package gov.nasa.worldwind.render

Examples of gov.nasa.worldwind.render.AnnotationAttributes


      this._lyrCustomXxx = new GfrRenderableLayerPickingCustomXxx();

      this.wwd.getModel().getLayers().add(this._lyrCustomXxx);    // add render _lyrCustomXxx to the globe model

      // Init control points rendering attributes
      this.controlPointsAttributes = new AnnotationAttributes();
      // Define an 8x8 square centered on the screen point
      this.controlPointsAttributes.setFrameShape(AVKey.SHAPE_RECTANGLE);
      this.controlPointsAttributes.setLeader(AVKey.SHAPE_NONE);
      this.controlPointsAttributes.setAdjustWidthToText(AVKey.SIZE_FIXED);
      this.controlPointsAttributes.setSize(new Dimension(8, 8));
View Full Code Here


         this.applicationLayer.addRenderable(this.layer);    // add render layer to the application provided layer
      else
         this.wwd.getModel().getLayers().add(this.layer);    // add render layer to the globe model

      // Init control points rendering attributes
      this.controlPointsAttributes = new AnnotationAttributes();
      // Define an 8x8 square centered on the screen point
      this.controlPointsAttributes.setFrameShape(AVKey.SHAPE_RECTANGLE);
      this.controlPointsAttributes.setLeader(AVKey.SHAPE_NONE);
      this.controlPointsAttributes.setAdjustWidthToText(AVKey.SIZE_FIXED);
      this.controlPointsAttributes.setSize(new Dimension(8, 8));
      this.controlPointsAttributes.setDrawOffset(new Point(0, -4));
      this.controlPointsAttributes.setInsets(new Insets(0, 0, 0, 0));
      this.controlPointsAttributes.setBorderWidth(0);
      this.controlPointsAttributes.setCornerRadius(0);
      this.controlPointsAttributes.setBackgroundColor(Color.BLUE);    // Normal color
      this.controlPointsAttributes.setTextColor(Color.GREEN);         // Highlighted color
      this.controlPointsAttributes.setHighlightScale(1.2);
      this.controlPointsAttributes.setDistanceMaxScale(1);            // No distance scaling
      this.controlPointsAttributes.setDistanceMinScale(1);
      this.controlPointsAttributes.setDistanceMinOpacity(1);

      // Init control point with leader rendering attributes.
      /*this.controlPointWithLeaderAttributes = new AnnotationAttributes();
      this.controlPointWithLeaderAttributes.setDefaults(this.controlPointsAttributes);
      this.controlPointWithLeaderAttributes.setFrameShape(AVKey.SHAPE_ELLIPSE);
      this.controlPointWithLeaderAttributes.setSize(new Dimension(10, 10));
      this.controlPointWithLeaderAttributes.setDrawOffset(new Point(0, -5));
      this.controlPointWithLeaderAttributes.setBackgroundColor(Color.LIGHT_GRAY);

      this.leaderAttributes = new BasicShapeAttributes();
      this.leaderAttributes.setOutlineMaterial(Material.WHITE);
      this.leaderAttributes.setOutlineOpacity(0.7);
      this.leaderAttributes.setOutlineWidth(3);*/

      // Annotation attributes
      this.annotationAttributes = new AnnotationAttributes();
      this.annotationAttributes.setFrameShape(AVKey.SHAPE_NONE);
      this.annotationAttributes.setInsets(new Insets(0, 0, 0, 0));
      this.annotationAttributes.setDrawOffset(new Point(0, 10));
      this.annotationAttributes.setTextAlign(AVKey.CENTER);
      this.annotationAttributes.setEffect(AVKey.TEXT_EFFECT_OUTLINE);
View Full Code Here

        super();
       
        super.setPickEnabled(false);
       
        // Annotation attributes
      this.annotationAttributes = new AnnotationAttributes();
      this.annotationAttributes.setFrameShape(AVKey.SHAPE_NONE);
      this.annotationAttributes.setInsets(new Insets(0, 0, 0, 0));
      this.annotationAttributes.setDrawOffset(new Point(0, 10));
      this.annotationAttributes.setTextAlign(AVKey.CENTER);
      this.annotationAttributes.setEffect(AVKey.TEXT_EFFECT_OUTLINE);
View Full Code Here

         
          if (evt.getWhat() != EnuEvtDspRndWwdEarthShp.ANNOTATION)
             return;
         
          String strValue = (String) evt.getValue();
          AnnotationAttributes attrs = super.getAttributes();
          attrs.setFrameShape(strValue);
          this.firePropertyChange(GfrShouldRedrawRnd.STR, null, null);
          return;
       }
      
    }
View Full Code Here

   }
  
   private void _setAttributesThis_(String strKindShape)
   {
      AnnotationAttributes attrs = new AnnotationAttributes();
        attrs.setAdjustWidthToText(AVKey.SIZE_FIT_TEXT);
        attrs.setFrameShape(strKindShape);

        attrs.setDrawOffset(new Point(0, 20)); // coz of tbrl with SurfaceCircle, tempo code

        attrs.setLeaderGapWidth(5);
       

        attrs.setTextColor(Color.BLACK);
        attrs.setBackgroundColor(new Color(1f, 1f, 1f, 0.8f));
        attrs.setCornerRadius(5);
        attrs.setBorderColor(new Color(0xababab));

        attrs.setFont(GfrUtilFont.s_get());
        attrs.setTextAlign(AVKey.CENTER);
        attrs.setInsets(new Insets(5, 5, 5, 5));
        attrs.setCornerRadius(0);
       
        super.setAttributes(attrs);
   }
View Full Code Here

    * fixing up drawing of "shape==none"
    */
   @Override
   protected void drawText(DrawContext dc, int width, int height, double opacity, Position pickPosition)
   {
       AnnotationAttributes attrs = super.getAttributes();
       String str = attrs.getFrameShape();
      
       if (str.compareTo(AVKey.SHAPE_NONE) == 0)
          return;
      
       super.drawText(dc, width, height, opacity, pickPosition);
View Full Code Here

         
          if (evt.getWhat() != EnuEvtDspRndWwdEarthShp.ANNOTATION)
             return;
         
          String strValue = (String) evt.getValue();
          AnnotationAttributes attrs = super.getAttributes();
          attrs.setFrameShape(strValue);
          this.firePropertyChange(GfrShouldRedrawRnd.STR, null, null);
          return;
       }
    }
View Full Code Here

TOP

Related Classes of gov.nasa.worldwind.render.AnnotationAttributes

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.