示例#1
0
        public void onChange(Message msg)
        {
            if (KMLAbstractObject.MSG_LINK_CHANGED.Equals(msg.getName()))
            {
                this.renderable = null;
            }

            super.onChange(msg);
        }
示例#2
0
        public void applyChange(KMLAbstractObject sourceValues)
        {
            if (!(sourceValues is KMLScreenOverlay))
            {
                String message = Logging.getMessage("nullValue.SourceIsNull");
                Logging.logger().warning(message);
                throw new ArgumentException(message);
            }

            this.renderable = null;

            super.applyChange(sourceValues);
        }
示例#3
0
        protected void doPreRender(KMLTraversalContext tc, DrawContext dc)
        {
            if (this.getRenderable() == null)
            {
                this.initializeRenderable(tc);
            }

            KMLRenderable r = this.getRenderable();

            if (r != null)
            {
                r.preRender(tc, dc);
            }
        }
示例#4
0
        protected void doRender(KMLTraversalContext tc, DrawContext dc)
        {
            // We've already initialized the screen image renderable during the preRender pass. Render the screen image
            // without any further preparation.

            KMLRenderable r = this.getRenderable();

            if (r != null)
            {
                r.render(tc, dc);
            }

            // Render the feature balloon (if any)
            this.renderBalloon(tc, dc);
        }
示例#5
0
        /**
         * Create the renderable that will represent the overlay.
         *
         * @param tc the current KML traversal context.
         */
        protected void initializeRenderable(KMLTraversalContext tc)
        {
            final String altitudeMode = this.getAltitudeMode();

            if ("absolute".Equals(altitudeMode))
            {
                this.renderable = new KMLGroundOverlayPolygonImpl(tc, this);
            }
            else // Default to clampToGround
            {
                // If the overlay has an icon, create a surface image renderable. Otherwise, create a surface polygon to
                // render the overlay as a colored polygon.
                if (this.getIcon() != null && this.getIcon().getHref() != null)
                {
                    this.renderable = new KMLSurfaceImageImpl(tc, this);
                }
                else
                {
                    this.renderable = new KMLSurfacePolygonImpl(tc, this);
                }
            }
        }
示例#6
0
 /**
  * Create the renderable that will represent the overlay.
  *
  * @param tc the current KML traversal context.
  */
 protected void initializeRenderable(KMLTraversalContext tc)
 {
     renderable = new KMLScreenImageImpl(tc, this);
 }