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
Modifier and TypeFieldDescriptionstatic ILcdGXYPainterStyle
Deprecated.do not use this fieldstatic ILcdGXYPainterStyle
Deprecated.do not use this fieldstatic ILcdGXYPainterStyle
Deprecated.do not use this fieldstatic ILcdGXYPainterStyle
Deprecated.do not use this fieldprotected TLcdXYBounds
Fields inherited from interface com.luciad.view.gxy.ILcdGXYPainter
BODY, CREATING, DEFAULT, HANDLES, RESHAPING, SELECTED, SNAPS, TRANSLATING
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addPropertyChangeListener
(PropertyChangeListener aPropertyChangeListener) Adds aPropertyChangeListener
to thisILcdGXYPainter
.void
anchorPointSFCT
(Graphics aGraphics, int aMode, ILcdGXYContext aGXYContext, Point aPointSFCT) ImplementsILcdGXYPainter.anchorPointSFCT
.clone()
MakesObject.clone()
public.protected void
Fires aPropertyChangeEvent
to all PropertyChangeListeners that have been registered to thisILcdGXYPainter
.protected void
firePropertyChangeEvent
(String aPropertyName, Object aOldValue, Object aNewValue) Fires aPropertyChangeEvent
to 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 anILcdGXYPainter
that can be used to paint or locate the object passed.boolean
Deprecated.This method has been deprecated.void
removePropertyChangeListener
(PropertyChangeListener aPropertyChangeListener) Removes aPropertyChangeListener
from thisILcdGXYPainter
.static void
setClassTraceOn
(boolean aClassTraceOn) Deprecated.This method has been deprecated.void
setDisplayName
(String aDisplayName) Sets a displayName for thisILcdGXYPainter
.void
setTraceOn
(boolean aTraceOn) Deprecated.This method has been deprecated.snapTarget
(Graphics aGraphics, ILcdGXYContext aGXYContext) Override this method to support snapping.boolean
supportSnap
(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, wait
Methods 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 istrue
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 eithertrue
orfalse
as argument automatically turns off tracing for all other class instances for whichsetTraceOn
has not been called. If the argument isfalse
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.Returnstrue
if 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:
getDisplayName
in 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 aPropertyChangeListener
to thisILcdGXYPainter
.- Specified by:
addPropertyChangeListener
in interfaceILcdPropertyChangeSource
- Parameters:
aPropertyChangeListener
- The listener to be notified- See Also:
-
removePropertyChangeListener
Removes aPropertyChangeListener
from thisILcdGXYPainter
.- Specified by:
removePropertyChangeListener
in interfaceILcdPropertyChangeSource
- Parameters:
aPropertyChangeListener
- the listener that should no longer be notified of changes of this object's properties- See Also:
-
firePropertyChangeEvent
Fires aPropertyChangeEvent
to all PropertyChangeListeners that have been registered to thisILcdGXYPainter
.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
Fires aPropertyChangeEvent
to 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
.aPointSFCT
will be set to the center of the bounds calculated by boundsSFCT.- Specified by:
anchorPointSFCT
in 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:
supportSnap
in 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:
snapTarget
in 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:
getCursor
in 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:ILcdGXYPainterProvider
Finds anILcdGXYPainter
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 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:ILcdCloneable
Makes
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:
clone
in interfaceILcdCloneable
- Specified by:
clone
in interfaceILcdGXYPainterProvider
- Overrides:
clone
in classObject
- Returns:
- a clone of this painter provider.
- See Also:
-