Class TLcdGXYILSPainter

java.lang.Object
com.luciad.view.gxy.ALcdGXYPainter
com.luciad.ais.view.gxy.painter.TLcdGXYILSPainter
All Implemented Interfaces:
ILcdCloneable, ILcdPropertyChangeSource, ILcdGXYPainter, ILcdGXYPainterProvider, Serializable, Cloneable

public class TLcdGXYILSPainter extends ALcdGXYPainter
This painter is used for painting ILcdILS objects. An ILcdILS consists of
  • a glide path,
  • a localizer,
  • a DME,
  • one or more markers.
This painter uses different painters for each component of a given ILS object. These painters can either be specified at construction time, or later on by using the setters.

Each component painter must handle objects of a specific type:

  • glide paths of type ILcdGlidePath
  • localizers of type ILcdLocalizer
  • DMEs of type ILcdDME
  • markers of type ILcdMarker.An ILcdILS can have several markers, each of which will be painted with the marker painter.
Note that all these object types implement ILcdPoint, so that a single point painter could be used to paint them all.
See Also:
  • Constructor Details

    • TLcdGXYILSPainter

      public TLcdGXYILSPainter()
      Constructs a new TLcdGXYILSPainter object. The painters used to paint the ILS components are set to:
      • a TLcdAISPointPainter for glide paths,
      • a TLcdAISPointPainter for localizers,
      • a TLcdAISPointPainter for DMEs,
      • a TLcdAISPointPainter for markers.
      All these painters are a different instance but use -the same- instance of the TLcdICAODefaultSymbolProvider class as their symbolProvider.
    • TLcdGXYILSPainter

      public TLcdGXYILSPainter(ILcdGXYPainter aGlidePathPainter, ILcdGXYPainter aLocalizerPainter, ILcdGXYPainter aMarkerPainter, ILcdGXYPainter aDMEPainter)
      Constructs a new TLcdGXYILSPainter object.
      Parameters:
      aGlidePathPainter - the painter to be used to draw glide paths
      aLocalizerPainter - the painter to be used to draw localizers
      aMarkerPainter - the painter to be used to draw markers
      aDMEPainter - the painter to be used to draw DMEs
  • Method Details

    • clone

      public Object clone()
      Description copied from interface: ILcdCloneable

      Makes Object.clone() public.

      When for example extending from java.lang.Object, it can be implemented like this:
      
       public Object clone() {
         try {
           return super.clone();
         } catch ( CloneNotSupportedException e ) {
           // Cannot happen: extends from Object and implements Cloneable (see also Object.clone)
           throw new RuntimeException( e );
         }
       }
       
      Specified by:
      clone in interface ILcdCloneable
      Specified by:
      clone in interface ILcdGXYPainterProvider
      Overrides:
      clone in class ALcdGXYPainter
      Returns:
      a clone of this painter provider.
      See Also:
    • setObject

      public void setObject(Object aObject)
      Checks whether the given object is an instanceof the ILcdILS interface. If true, each not null component of the given ILS will be set on the corresponding painter.
      Parameters:
      aObject - an instance of an implementation of the ILcdILS interface that is to be painted by this painter
      See Also:
    • getObject

      public Object getObject()
      Returns the ILS object whose components are to be painted by this painter.
      Returns:
      the ILS object
      See Also:
    • paint

      public void paint(Graphics aGraphics, int aMode, ILcdGXYContext aContext)
      Calls, for each not null component of the ILS object to be painted, the paint method of the corresponding painter.
      Parameters:
      aGraphics - the Graphics on which to paint
      aMode - the painting mode to use
      aContext - the ILcdGXYContext the drawing depends on
    • boundsSFCT

      public void boundsSFCT(Graphics aGraphics, int aMode, ILcdGXYContext aContext, ILcd2DEditableBounds a2DEditableBounds) throws TLcdNoBoundsException
      Sets aBoundsSFCT to the union of the bounds of the representations of the components of the ILS object to be painted.
      Parameters:
      aGraphics - the Graphics on which to paint
      aMode - the painting mode to use
      aContext - the ILcdGXYContext the drawing depends on
      a2DEditableBounds - the ILcd2DEditableBounds to be modified
      Throws:
      TLcdNoBoundsException - if the one of the components doesn't have any valid bounds, e.g. if it is always invisible in the current projection
      See Also:
    • isTouched

      public boolean isTouched(Graphics aGraphics, int aMode, ILcdGXYContext aContext)
      Returns true if one of the representations of the components of the ILS object to be painted, is touched in the mode aMode at view location (aGXYContext.getX(), aGXYContext.getY()).
      Parameters:
      aGraphics - the Graphics on which to paint
      aMode - the mode to consider
      aContext - the ILcdGXYContext to consider
      Returns:
      true if one of the representations is touched
      See Also:
    • setGlidePathPainter

      public void setGlidePathPainter(ILcdGXYPainter aPainter)
      Specifies a painter that is able to paint glide paths.
      See Also:
    • setLocalizerPainter

      public void setLocalizerPainter(ILcdGXYPainter aPainter)
      Specifies a painter that is able to paint localizers.
      See Also:
    • setMarkerPainter

      public void setMarkerPainter(ILcdGXYPainter aPainter)
      Specifies a painter that is able to paint ILcdMarker objects.
      See Also:
    • setDMEPainter

      public void setDMEPainter(ILcdGXYPainter aPainter)
      Specifies a painter that is able to paint DMEs.
      See Also:
    • getGlidePathPainter

      public ILcdGXYPainter getGlidePathPainter()
      Returns the painter that is used to paint glide paths.
      See Also:
    • getLocalizerPainter

      public ILcdGXYPainter getLocalizerPainter()
      Returns the painter that is used to paint localizers.
      See Also:
    • getMarkerPainter

      public ILcdGXYPainter getMarkerPainter()
      Returns the painter that is used to paint markers.
      See Also:
    • getDMEPainter

      public ILcdGXYPainter getDMEPainter()
      Returns the painter that is used to paint DMEs.
      See Also: