Package com.luciad.view.gxy
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 Summary
FieldsModifier and TypeFieldDescriptionstatic ILcdGXYPainterStyleDeprecated.do not use this fieldstatic ILcdGXYPainterStyleDeprecated.do not use this fieldstatic ILcdGXYPainterStyleDeprecated.do not use this fieldstatic ILcdGXYPainterStyleDeprecated.do not use this fieldprotected TLcdXYBoundsFields inherited from interface com.luciad.view.gxy.ILcdGXYPainter
BODY, CREATING, DEFAULT, HANDLES, RESHAPING, SELECTED, SNAPS, TRANSLATING -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddPropertyChangeListener(PropertyChangeListener aPropertyChangeListener) Adds aPropertyChangeListenerto thisILcdGXYPainter.voidanchorPointSFCT(Graphics aGraphics, int aMode, ILcdGXYContext aGXYContext, Point aPointSFCT) ImplementsILcdGXYPainter.anchorPointSFCT.clone()MakesObject.clone()public.protected voidFires aPropertyChangeEventto all PropertyChangeListeners that have been registered to thisILcdGXYPainter.protected voidfirePropertyChangeEvent(String aPropertyName, Object aOldValue, Object aNewValue) Fires aPropertyChangeEventto all PropertyChangeListeners that have been registered to thisILcdGXYPainter.getCursor(Graphics aGraphics, int aMode, ILcdGXYContext aGXYContext) Override this method to return a cursor.Returns the display name of thisILcdGXYPainter.getGXYPainter(Object aObject) Finds anILcdGXYPainterthat can be used to paint or locate the object passed.booleanDeprecated.This method has been deprecated.voidremovePropertyChangeListener(PropertyChangeListener aPropertyChangeListener) Removes aPropertyChangeListenerfrom thisILcdGXYPainter.static voidsetClassTraceOn(boolean aClassTraceOn) Deprecated.This method has been deprecated.voidsetDisplayName(String aDisplayName) Sets a displayName for thisILcdGXYPainter.voidsetTraceOn(boolean aTraceOn) Deprecated.This method has been deprecated.snapTarget(Graphics aGraphics, ILcdGXYContext aGXYContext) Override this method to support snapping.booleansupportSnap(Graphics aGraphics, ILcdGXYContext aGXYContext) Override this method to support snapping.Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.luciad.view.gxy.ILcdGXYPainter
boundsSFCT, getObject, isTouched, paint, setObject
-
Field Details
-
defaultLineStyle
Deprecated.do not use this field -
defaultFillStyle
Deprecated.do not use this field -
defaultCreationLineStyle
Deprecated.do not use this field -
defaultCreationFillStyle
Deprecated.do not use this field -
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 istruethen 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 eithertrueorfalseas argument automatically turns off tracing for all other class instances for whichsetTraceOnhas not been called. If the argument isfalsethen 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.Returnstrueif tracing is enabled for this class.- Returns:
- true if tracing is enabled for this class, false otherwise.
-
getDisplayName
Returns the display name of thisILcdGXYPainter.- Specified by:
getDisplayNamein interfaceILcdGXYPainter- Returns:
- the name that has been set using
setDisplayName(), orthis.toString()if no name has been set.
-
setDisplayName
Sets a displayName for thisILcdGXYPainter. -
addPropertyChangeListener
Adds aPropertyChangeListenerto thisILcdGXYPainter.- Specified by:
addPropertyChangeListenerin interfaceILcdPropertyChangeSource- Parameters:
aPropertyChangeListener- The listener to be notified- See Also:
-
removePropertyChangeListener
Removes aPropertyChangeListenerfrom thisILcdGXYPainter.- Specified by:
removePropertyChangeListenerin interfaceILcdPropertyChangeSource- Parameters:
aPropertyChangeListener- the listener that should no longer be notified of changes of this object's properties- See Also:
-
firePropertyChangeEvent
Fires aPropertyChangeEventto all PropertyChangeListeners that have been registered to thisILcdGXYPainter.This is merely a convenience wrapper around the more general firePropertyChange method that takes
PropertyChangeEventvalue.- 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
Fires aPropertyChangeEventto all PropertyChangeListeners that have been registered to thisILcdGXYPainter.- Parameters:
aEvent- The PropertyChangeEvent object.
-
anchorPointSFCT
public void anchorPointSFCT(Graphics aGraphics, int aMode, ILcdGXYContext aGXYContext, Point aPointSFCT) throws TLcdNoBoundsException ImplementsILcdGXYPainter.anchorPointSFCT.aPointSFCTwill be set to the center of the bounds calculated by boundsSFCT.- Specified by:
anchorPointSFCTin interfaceILcdGXYPainter- Parameters:
aGraphics- the Graphics on which the representation of the object is paintedaMode- 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
Override this method to support snapping. This implementation does not support snapping.- Specified by:
supportSnapin interfaceILcdGXYPainter- Parameters:
aGraphics- the Graphics on which the representation of the object is paintedaGXYContext- the context in which this object is represented and in which the editing of an object occurs.- Returns:
false.
-
snapTarget
Override this method to support snapping. This implementation does not support snapping.- Specified by:
snapTargetin interfaceILcdGXYPainter- Parameters:
aGraphics- the Graphics on which the representation of the object is paintedaGXYContext- the context in which this object is represented and in which the editing of an object occurs.- Returns:
null.- See Also:
-
getCursor
Override this method to return a cursor. This implementation returns null.- Specified by:
getCursorin interfaceILcdGXYPainter- Parameters:
aGraphics- the Graphics on which the representation of the object is paintedaMode- the rendering mode to return the cursor for.aGXYContext- the context in which the rendering occurs.- Returns:
null.
-
getGXYPainter
Description copied from interface:ILcdGXYPainterProviderFinds anILcdGXYPainterthat 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:
getGXYPainterin interfaceILcdGXYPainterProvider- 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
Description copied from interface:ILcdCloneableMakes
When for example extending fromObject.clone()public.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:
clonein interfaceILcdCloneable- Specified by:
clonein interfaceILcdGXYPainterProvider- Overrides:
clonein classObject- Returns:
- a clone of this painter provider.
- See Also:
-