Class ALcdGXYPainter

java.lang.Object
com.luciad.view.gxy.ALcdGXYPainter
All Implemented Interfaces:
ILcdCloneable, ILcdPropertyChangeSource, ILcdGXYPainter, ILcdGXYPainterProvider, Serializable, Cloneable
Direct Known Subclasses:
ALcdEarthGXYPainter, ALcdGXYAreaPainter, ALcdRasterPainter, TLcdCompassGridPainter, TLcdDGNCellGXYPainter, TLcdDGNComplexShapeGXYPainter, TLcdDGNEllipse2DGXYPainter, TLcdGRIBRasterPainter, TLcdGXYArcPainter, TLcdGXYCircularArcPainter, TLcdGXYCompositeCurvePainter, TLcdGXYDynamicSegmentationEventPainter, TLcdGXYIconPainter, TLcdGXYILSPainter, TLcdGXYImageIconPainter, TLcdGXYImagePainter, TLcdGXYProcedureTrajectoryPainter, TLcdGXYRefuelingTrackPainter, TLcdGXYShapeListPainter, TLcdGXYTextPainter, TLcdGXYTiledWMSProxyPainter, TLcdICAOAirspacePainter, TLcdLonLatBorderGridPainter, TLcdLonLatGridPainter, TLcdMultivaluedRasterPainter, TLcdUTMZonePainter, TLcdWMSProxyGXYPainter

public abstract class ALcdGXYPainter extends Object implements ILcdGXYPainter, ILcdGXYPainterProvider
ALcdGXYPainter is an abstract class that can be used for implementing the ILcdGXYPainter interface.
See Also:
  • Field Details

    • defaultLineStyle

      public static ILcdGXYPainterStyle defaultLineStyle
      Deprecated.
      do not use this field
    • defaultFillStyle

      public static ILcdGXYPainterStyle defaultFillStyle
      Deprecated.
      do not use this field
    • defaultCreationLineStyle

      public static ILcdGXYPainterStyle defaultCreationLineStyle
      Deprecated.
      do not use this field
    • defaultCreationFillStyle

      public static ILcdGXYPainterStyle defaultCreationFillStyle
      Deprecated.
      do not use this field
    • fWorkBounds

      protected transient TLcdXYBounds fWorkBounds
  • Constructor Details

    • ALcdGXYPainter

      public ALcdGXYPainter()
  • Method Details

    • setClassTraceOn

      public static void setClassTraceOn(boolean aClassTraceOn)
      Deprecated.
      This method has been deprecated. It is recommended to use the standard Java logging framework directly.
      Enables tracing for all instances of this class. If the argument is true then all log messages are recorded, otherwise only the informative, warning and error messages are recorded.
      Parameters:
      aClassTraceOn - if true then all log messages are recorded, otherwise only the informative, warning and error messages are recorded.
    • setTraceOn

      public void setTraceOn(boolean aTraceOn)
      Deprecated.
      This method has been deprecated. It is recommended to use the standard Java logging framework directly.
      Enables tracing for this class instance. Calling this method with either true or false as argument automatically turns off tracing for all other class instances for which setTraceOn has not been called. If the argument is false then only the informative, warning and error log messages are recorded.
      Parameters:
      aTraceOn - if true then all log messages are recorded for this instance. If false, then only the informative, warning and error log messages are recorded.
    • isTraceOn

      public boolean isTraceOn()
      Deprecated.
      This method has been deprecated. It is recommended to use the standard Java logging framework directly.
      Returns true if tracing is enabled for this class.
      Returns:
      true if tracing is enabled for this class, false otherwise.
    • getDisplayName

      public String getDisplayName()
      Returns the display name of this ILcdGXYPainter.
      Specified by:
      getDisplayName in interface ILcdGXYPainter
      Returns:
      the name that has been set using setDisplayName(), or this.toString() if no name has been set.
    • setDisplayName

      public void setDisplayName(String aDisplayName)
      Sets a displayName for this ILcdGXYPainter.
    • addPropertyChangeListener

      public void addPropertyChangeListener(PropertyChangeListener aPropertyChangeListener)
      Adds a PropertyChangeListener to this ILcdGXYPainter.
      Specified by:
      addPropertyChangeListener in interface ILcdPropertyChangeSource
      Parameters:
      aPropertyChangeListener - The listener to be notified
      See Also:
    • removePropertyChangeListener

      public void removePropertyChangeListener(PropertyChangeListener aPropertyChangeListener)
      Removes a PropertyChangeListener from this ILcdGXYPainter.
      Specified by:
      removePropertyChangeListener in interface ILcdPropertyChangeSource
      Parameters:
      aPropertyChangeListener - the listener that should no longer be notified of changes of this object's properties
      See Also:
    • firePropertyChangeEvent

      protected void firePropertyChangeEvent(String aPropertyName, Object aOldValue, Object aNewValue)
      Fires a PropertyChangeEvent to all PropertyChangeListeners that have been registered to this ILcdGXYPainter.

      This is merely a convenience wrapper around the more general firePropertyChange method that takes PropertyChangeEvent value.

      Parameters:
      aPropertyName - The programmatic name of the property that was changed.
      aOldValue - The old value of the property.
      aNewValue - The new value of the property.
    • firePropertyChangeEvent

      protected void firePropertyChangeEvent(PropertyChangeEvent aEvent)
      Fires a PropertyChangeEvent to all PropertyChangeListeners that have been registered to this ILcdGXYPainter.
      Parameters:
      aEvent - The PropertyChangeEvent object.
    • anchorPointSFCT

      public void anchorPointSFCT(Graphics aGraphics, int aMode, ILcdGXYContext aGXYContext, Point aPointSFCT) throws TLcdNoBoundsException
      Implements ILcdGXYPainter.anchorPointSFCT. aPointSFCT will be set to the center of the bounds calculated by boundsSFCT.
      Specified by:
      anchorPointSFCT in interface ILcdGXYPainter
      Parameters:
      aGraphics - the Graphics on which the representation of the object is painted
      aMode - the mode the object is painted in (see class documentation)
      aGXYContext - the context for which the representation of the object is painted. It contains amongst others the transformations from model to world and world to view.
      aPointSFCT - the point that has to be moved to the location of the anchor point of the representation of the object. This point must not be taken into account when the method has thrown a TLcdNoBoundsException.
      Throws:
      TLcdNoBoundsException - if no anchor point can be determined for the representation of the object. This can be when the object does not have a representation in the given context, for example when it is located in a part of the world which is not visible in the projection as set in the views world reference.
      See Also:
    • supportSnap

      public boolean supportSnap(Graphics aGraphics, ILcdGXYContext aGXYContext)
      Override this method to support snapping. This implementation does not support snapping.
      Specified by:
      supportSnap in interface ILcdGXYPainter
      Parameters:
      aGraphics - the Graphics on which the representation of the object is painted
      aGXYContext - the context in which this object is represented and in which the editing of an object occurs.
      Returns:
      false.
    • snapTarget

      public Object snapTarget(Graphics aGraphics, ILcdGXYContext aGXYContext)
      Override this method to support snapping. This implementation does not support snapping.
      Specified by:
      snapTarget in interface ILcdGXYPainter
      Parameters:
      aGraphics - the Graphics on which the representation of the object is painted
      aGXYContext - the context in which this object is represented and in which the editing of an object occurs.
      Returns:
      null.
      See Also:
    • getCursor

      public Cursor getCursor(Graphics aGraphics, int aMode, ILcdGXYContext aGXYContext)
      Override this method to return a cursor. This implementation returns null.
      Specified by:
      getCursor in interface ILcdGXYPainter
      Parameters:
      aGraphics - the Graphics on which the representation of the object is painted
      aMode - the rendering mode to return the cursor for.
      aGXYContext - the context in which the rendering occurs.
      Returns:
      null.
    • getGXYPainter

      public ILcdGXYPainter getGXYPainter(Object aObject)
      Description copied from interface: ILcdGXYPainterProvider
      Finds an ILcdGXYPainter that can be used to paint or locate the object passed.

      The painter provider is responsible for setting the object to the painter before returning the painter. An implementation should therefore have the following structure:

      
       public ILcdGXYPainter getGXYPainter(Object aObject) {
         ILcdGXYPainter painter = ... // find the painter for the object
         if (painter != null) {
          painter.setObject(aObject);
         }
         return painter;
       }
       

      Specified by:
      getGXYPainter in interface ILcdGXYPainterProvider
      Parameters:
      aObject - the object to find a painter for
      Returns:
      a painter that can be used to paint or locate the object; or null if no painter could be found for the given object, or the object could not be set on the retrieved painter.
    • 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 Object
      Returns:
      a clone of this painter provider.
      See Also: