Package com.luciad.ais.view.gxy.painter
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
This painter is used for painting
ILcdILS
objects. An
ILcdILS
consists of
- a glide path,
- a localizer,
- a DME,
- one or more markers.
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
.AnILcdILS
can have several markers, each of which will be painted with the marker painter.
ILcdPoint
, so that a single
point painter could be used to paint them all.- See Also:
-
Field Summary
Fields inherited from class com.luciad.view.gxy.ALcdGXYPainter
defaultCreationFillStyle, defaultCreationLineStyle, defaultFillStyle, defaultLineStyle, fWorkBounds
Fields inherited from interface com.luciad.view.gxy.ILcdGXYPainter
BODY, CREATING, DEFAULT, HANDLES, RESHAPING, SELECTED, SNAPS, TRANSLATING
-
Constructor Summary
ConstructorDescriptionConstructs a newTLcdGXYILSPainter
object.TLcdGXYILSPainter
(ILcdGXYPainter aGlidePathPainter, ILcdGXYPainter aLocalizerPainter, ILcdGXYPainter aMarkerPainter, ILcdGXYPainter aDMEPainter) Constructs a newTLcdGXYILSPainter
object. -
Method Summary
Modifier and TypeMethodDescriptionvoid
boundsSFCT
(Graphics aGraphics, int aMode, ILcdGXYContext aContext, ILcd2DEditableBounds a2DEditableBounds) SetsaBoundsSFCT
to the union of the bounds of the representations of the components of theILS
object to be painted.clone()
MakesObject.clone()
public.Returns the painter that is used to paint DMEs.Returns the painter that is used to paint glide paths.Returns the painter that is used to paint localizers.Returns the painter that is used to paint markers.Returns theILS
object whose components are to be painted by this painter.boolean
isTouched
(Graphics aGraphics, int aMode, ILcdGXYContext aContext) Returns true if one of the representations of the components of theILS
object to be painted, is touched in the modeaMode
at view location (aGXYContext.getX()
,aGXYContext.getY()
).void
paint
(Graphics aGraphics, int aMode, ILcdGXYContext aContext) Calls, for each not null component of theILS
object to be painted, thepaint
method of the corresponding painter.void
setDMEPainter
(ILcdGXYPainter aPainter) Specifies a painter that is able to paint DMEs.void
setGlidePathPainter
(ILcdGXYPainter aPainter) Specifies a painter that is able to paint glide paths.void
setLocalizerPainter
(ILcdGXYPainter aPainter) Specifies a painter that is able to paint localizers.void
setMarkerPainter
(ILcdGXYPainter aPainter) Specifies a painter that is able to paintILcdMarker
objects.void
Checks whether the given object is an instanceof theILcdILS
interface.Methods inherited from class com.luciad.view.gxy.ALcdGXYPainter
addPropertyChangeListener, anchorPointSFCT, firePropertyChangeEvent, firePropertyChangeEvent, getCursor, getDisplayName, getGXYPainter, isTraceOn, removePropertyChangeListener, setClassTraceOn, setDisplayName, setTraceOn, snapTarget, supportSnap
-
Constructor Details
-
TLcdGXYILSPainter
public TLcdGXYILSPainter()Constructs a newTLcdGXYILSPainter
object. The painters used to paint theILS
components are set to:- a
TLcdAISPointPainter
for glide paths, - a
TLcdAISPointPainter
for localizers, - a
TLcdAISPointPainter
for DMEs, - a
TLcdAISPointPainter
for markers.
TLcdICAODefaultSymbolProvider
class as their symbolProvider. - a
-
TLcdGXYILSPainter
public TLcdGXYILSPainter(ILcdGXYPainter aGlidePathPainter, ILcdGXYPainter aLocalizerPainter, ILcdGXYPainter aMarkerPainter, ILcdGXYPainter aDMEPainter) Constructs a newTLcdGXYILSPainter
object.- Parameters:
aGlidePathPainter
- the painter to be used to draw glide pathsaLocalizerPainter
- the painter to be used to draw localizersaMarkerPainter
- the painter to be used to draw markersaDMEPainter
- the painter to be used to draw DMEs
-
-
Method Details
-
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 classALcdGXYPainter
- Returns:
- a clone of this painter provider.
- See Also:
-
setObject
Checks whether the given object is an instanceof theILcdILS
interface. If true, each not null component of the givenILS
will be set on the corresponding painter.- Parameters:
aObject
- an instance of an implementation of theILcdILS
interface that is to be painted by this painter- See Also:
-
getObject
Returns theILS
object whose components are to be painted by this painter.- Returns:
- the
ILS
object - See Also:
-
paint
Calls, for each not null component of theILS
object to be painted, thepaint
method of the corresponding painter.- Parameters:
aGraphics
- theGraphics
on which to paintaMode
- the painting mode to useaContext
- theILcdGXYContext
the drawing depends on
-
boundsSFCT
public void boundsSFCT(Graphics aGraphics, int aMode, ILcdGXYContext aContext, ILcd2DEditableBounds a2DEditableBounds) throws TLcdNoBoundsException SetsaBoundsSFCT
to the union of the bounds of the representations of the components of theILS
object to be painted.- Parameters:
aGraphics
- theGraphics
on which to paintaMode
- the painting mode to useaContext
- theILcdGXYContext
the drawing depends ona2DEditableBounds
- theILcd2DEditableBounds
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
Returns true if one of the representations of the components of theILS
object to be painted, is touched in the modeaMode
at view location (aGXYContext.getX()
,aGXYContext.getY()
).- Parameters:
aGraphics
- theGraphics
on which to paintaMode
- the mode to consideraContext
- theILcdGXYContext
to consider- Returns:
- true if one of the representations is touched
- See Also:
-
setGlidePathPainter
Specifies a painter that is able to paint glide paths.- See Also:
-
setLocalizerPainter
Specifies a painter that is able to paint localizers.- See Also:
-
setMarkerPainter
Specifies a painter that is able to paintILcdMarker
objects.- See Also:
-
setDMEPainter
Specifies a painter that is able to paint DMEs.- See Also:
-
getGlidePathPainter
Returns the painter that is used to paint glide paths.- See Also:
-
getLocalizerPainter
Returns the painter that is used to paint localizers.- See Also:
-
getMarkerPainter
Returns the painter that is used to paint markers.- See Also:
-
getDMEPainter
Returns the painter that is used to paint DMEs.- See Also:
-