Class TLcdGXYPainterProvider

java.lang.Object
com.luciad.view.gxy.TLcdGXYPainterProvider
All Implemented Interfaces:
ILcdCloneable, ILcdDeepCloneable, ILcdGXYPainterProvider, Serializable, Cloneable

public class TLcdGXYPainterProvider extends Object implements ILcdGXYPainterProvider, ILcdDeepCloneable
A painter provider that allows registering painters for specific types of shapes.
By default, the provider is empty.

For a default painter (provider) that handles all supported shapes, see TLcdGXYShapePainter.

See Also:
  • Constructor Details

    • TLcdGXYPainterProvider

      public TLcdGXYPainterProvider()
  • 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.
    • addPropertyChangeListener

      public void addPropertyChangeListener(PropertyChangeListener aPropertyChangeListener)
    • removePropertyChangeListener

      public void removePropertyChangeListener(PropertyChangeListener aPropertyChangeListener)
    • getGXYPainters

      public ILcdGXYPainter[] getGXYPainters()
      Returns:
      all the Registered ILcdGXYEditors.
    • registerGXYPainterForClass

      public void registerGXYPainterForClass(Class aDataClass, ILcdGXYPainter aGXYPainter)
      Registers an ILcdGXYPainter to associate to a given Class of Object.
    • registerGXYPainterForClassName

      public void registerGXYPainterForClassName(String aDataClassName, ILcdGXYPainter aGXYPainter)
      Registers an ILcdGXYPainter to associate to a given Class name of Object.
    • deregisterAllGXYPainters

      public void deregisterAllGXYPainters()
      Removes all registered ILcdGXYPainters.
    • getGXYPainter

      public ILcdGXYPainter getGXYPainter(Object aObject)
      Returns the first found ILcdGXYPainter which has been registered with a Class that satisfy Class.isInstance(aObject). If no painter satisfies this condition, null is returned.
      Specified by:
      getGXYPainter in interface ILcdGXYPainterProvider
      Parameters:
      aObject - the object to find a painter for
      Returns:
      the first found ILcdGXYPainter which has been registered with a Class that satisfy Class.isInstance(aObject).
    • clone

      public Object clone()
      Returns a deep clone: the painters which are registered are cloned.
      Specified by:
      clone in interface ILcdCloneable
      Specified by:
      clone in interface ILcdGXYPainterProvider
      Overrides:
      clone in class Object
      Returns:
      a deep clone (the registered ILcdGXYPainters are cloned).
      See Also:
    • deepClone

      public TLcdGXYPainterProvider deepClone()
      Deprecated.
      use the clone method
      Returns:
      a deep clone (the registered ILcdGXYPainters are cloned).
    • clone

      public Object clone(Map aObjectDictionary)
      Description copied from interface: ILcdDeepCloneable
      Returns a deep clone of this Object.

      An object dictionary is used to keep track of all objects of the original Object graph, for which a clone has already been created. The dictionary should be a java.util.Map, using reference-equality instead of object-equality when comparing keys (such as the java.util.IdentityHashMap). It contains as keys the objects in the original object graph that have already been cloned, and as values their corresponding clone.

      The Object returned by this method should fulfill the following conditions, as specified in the general Object.clone() contract:

      • this.clone(aObjectDictionary) != this
      • this.clone(aObjectDictionary).getClass() == this.getClass()
      • this.clone(aObjectDictionary).equals(this)

      In addition, the following conditions should also hold:

      • If a clone of this Object already exists in the object dictionary before this clone method is called, this method shall return that clone:
        aObjectDictionary.get(this) == null || aObjectDictionary.get(this) == this.clone(aObjectDictionary)
      • The object dictionary shall contain the resulting clone, after this clone method has completed:
        this.clone(aObjectDictionary) == aObjectDictionary.get(this)
      Specified by:
      clone in interface ILcdDeepCloneable
      Parameters:
      aObjectDictionary - the Object dictionary that keeps track of the objects for which a clone has already been made, and their corresponding clone Object.
      Returns:
      a deep clone of this Object that fulfills the conditions described above.