Class TLcdMagneticNorthGXYPainter
- All Implemented Interfaces:
ILcdCloneable
,ILcdPropertyChangeSource
,ILcdGXYEditor
,ILcdGXYEditorProvider
,ILcdGXYPainter
,ILcdGXYPainterProvider
,ILcdGXYPathPainter
,Serializable
,Cloneable
ILcdMagneticNorthModel
.- See Also:
-
Field Summary
Fields inherited from class com.luciad.view.gxy.painter.TLcdGXYPointListPainter
AREA, COORDINATES_AVERAGE, END_OF_CURVE, FILLED, FIRST_POSSIBLE_POINT, FOCUS_POINT, INSIDE_POLYGON, MEDIAN_POINT, MIDDLE_OF_BOUNDS, MIDDLE_OF_CURVE, OUTLINE_AREA, OUTLINED_FILLED, POINT, POLYGON, POLYLINE, START_OF_CURVE
Fields inherited from class com.luciad.view.gxy.painter.ALcdGXYAreaPainter
OUTLINED
Fields inherited from class com.luciad.view.gxy.ALcdGXYPainter
defaultCreationFillStyle, defaultCreationLineStyle, defaultFillStyle, defaultLineStyle, fWorkBounds
Fields inherited from interface com.luciad.view.gxy.ILcdGXYEditor
CREATING, END_CREATION, RESHAPED, START_CREATION, TRANSLATED
Fields inherited from interface com.luciad.view.gxy.ILcdGXYPainter
BODY, CREATING, DEFAULT, HANDLES, RESHAPING, SELECTED, SNAPS, TRANSLATING
-
Constructor Summary
ConstructorDescriptionCreates and initializes a newTLcdMagneticNorthGXYPainter
. -
Method Summary
Modifier and TypeMethodDescriptionclone()
MakesObject.clone()
public.double
Returns the value in degrees of emphasized lines.int
Deprecated.Returns theILcdGXYPainterStyle
for the emphasized lines having a negative value.Returns theILcdGXYPainterStyle
for the emphasized lines having a positive value.Returns theILcdGXYPainterStyle
for lines that are not emphasized and have a negative value.Returns theILcdGXYPainterStyle
for lines that are not emphasized and have a positive value.Returns theILcdGXYPainterStyle
for the lines having zero value.void
paint
(Graphics aGraphics, int aMode, ILcdGXYContext aGXYContext) Displays the representation of the object in the given mode on the Graphics passed, taking into account the context passed.protected ILcdPointList
retrievePointList
(Object aObject) Extracts anILcdPointList
from the given object.void
setEmphasizedDegrees
(double aEmphasizedDegrees) Sets which values of lines should be emphasized.void
setEmphasizeDegrees
(int aEmphasizeDegrees) Deprecated.UsesetEmphasizedDegrees(double)
Sets which values of lines should be emphasized.void
setEmphasizedNegativeStyle
(ILcdGXYPainterStyle aEmphasizedNegativeStyle) Sets theILcdGXYPainterStyle
for the emphasized lines having a negative value.void
setEmphasizedPositiveStyle
(ILcdGXYPainterStyle aEmphasizedPositiveStyle) Sets theILcdGXYPainterStyle
for the emphasized lines having a positive value.void
setNegativeStyle
(ILcdGXYPainterStyle aNegativeStyle) Sets theILcdGXYPainterStyle
for lines that are not emphasized and have a negative value.void
Sets the object to paint or edit.void
setPositiveStyle
(ILcdGXYPainterStyle aPositiveStyle) Sets theILcdGXYPainterStyle
for lines that are not emphasized and have a positive value.void
setZeroStyle
(ILcdGXYPainterStyle aZeroStyle) Sets theILcdGXYPainterStyle
for the lines having zero value.Methods inherited from class com.luciad.view.gxy.painter.TLcdGXYPointListPainter
acceptSnapTarget, anchorPointSFCT, append2DPoint, appendAWTPath, appendGeneralPath, boundsSFCT, edit, getAnchorPointLocation, getCreationClickCount, getCursor, getFillSelection, getGXYEditor, getMinimumEditDelta, getMode, getModeName, getObject, getPaintCache, getSnapIcon, getTouchedPoint, getTouchedSegment, getTouchedSegment, getWindingRule, insert2DPoint, insidePolygon, isMoveOnlyOnEdit, isTouched, isTraceOn, linkToSnapTarget, move2DPoint, removePointAt, retrieveMinimalPointcount, setAnchorPointLocation, setFillSelection, setMinimumEditDelta, setMode, setModelModelTransformationClass, setMoveOnlyOnEdit, setPaintCache, setSnapIcon, setTraceOn, setupGraphicsForFill, setupGraphicsForLine, setupGraphicsForPoint, setWindingRule, snapTarget, supportSnap, translate2D, translate2DPoint
Methods inherited from class com.luciad.view.gxy.painter.ALcdGXYAreaPainter
getEditMode, getFillStyle, getLineStyle, getSelectionMode, setEditMode, setFillStyle, setLineStyle, setSelectionMode
Methods inherited from class com.luciad.view.gxy.ALcdGXYPainter
addPropertyChangeListener, firePropertyChangeEvent, firePropertyChangeEvent, getDisplayName, getGXYPainter, removePropertyChangeListener, setClassTraceOn, setDisplayName
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.ILcdGXYEditor
getDisplayName
Methods inherited from interface com.luciad.view.gxy.ILcdGXYPainter
getDisplayName
Methods inherited from interface com.luciad.util.ILcdPropertyChangeSource
addPropertyChangeListener, removePropertyChangeListener
-
Constructor Details
-
TLcdMagneticNorthGXYPainter
public TLcdMagneticNorthGXYPainter()Creates and initializes a newTLcdMagneticNorthGXYPainter
.
-
-
Method Details
-
setObject
Description copied from class:TLcdGXYPointListPainter
Sets the object to paint or edit. This painter needs anILcdPointList
for painting and (optionally) anILcd2DEditablePointList
for editing. You can change how theILcdPointList
is derived from the object by overridingTLcdGXYPointListPainter.retrievePointList(java.lang.Object)
.- Specified by:
setObject
in interfaceILcdGXYEditor
- Specified by:
setObject
in interfaceILcdGXYPainter
- Overrides:
setObject
in classTLcdGXYPointListPainter
- Parameters:
aObject
- The object to paint and edit.- See Also:
-
retrievePointList
Description copied from class:TLcdGXYPointListPainter
Extracts anILcdPointList
from the given object. The default implementation simply casts the object to anILcdPointList
. Re-define this method to obtain theILcdPointList
by other means.- Overrides:
retrievePointList
in classTLcdGXYPointListPainter
- Returns:
- the point list associated with the given object
- See Also:
-
paint
Description copied from class:TLcdGXYPointListPainter
Displays the representation of the object in the given mode on the Graphics passed, taking into account the context passed.This implementation will use the specified render mode to determine how the object needs to be rendered. In
ILcdGXYPainter.TRANSLATING
mode, theILcdPointList
object is rendered as if all points were moved along the same distance in view coordinates as passed in the context. InILcdGXYPainter.RESHAPING
mode, the object is painted with one point moved as defined in the context. InILcdGXYPainter.CREATING
mode, the object is painted as if the current mouse position is the last point of theILcdPointList
. In the above render modes, the object is painted using the edit paint mode (ALcdGXYAreaPainter.getEditMode()
).In the render mode
ILcdGXYPainter.SELECTED
, the object is painted using the selection paint mode (ALcdGXYAreaPainter.getSelectionMode()
). In all other render modes, the paint mode (TLcdGXYPointListPainter.getMode()
) is used.Note: when the paint mode is set to
TLcdGXYPointListPainter.POINT
orTLcdGXYPointListPainter.POLYLINE
, the objects will be painted as, respectively points and polylines. The selectionMode and editMode property are not taken into account when finding the mode in which the object should be painted.- Specified by:
paint
in interfaceILcdGXYPainter
- Overrides:
paint
in classTLcdGXYPointListPainter
- Parameters:
aGraphics
- The graphics to paint the object on.aMode
- The mode to render the object in.aGXYContext
- The context to render the object in.
-
getEmphasizedNegativeStyle
Returns theILcdGXYPainterStyle
for the emphasized lines having a negative value.- Returns:
- the
ILcdGXYPainterStyle
for the emphasized lines having a negative value. - See Also:
-
setEmphasizedNegativeStyle
Sets theILcdGXYPainterStyle
for the emphasized lines having a negative value.- Parameters:
aEmphasizedNegativeStyle
- The new painter style- See Also:
-
getEmphasizedPositiveStyle
Returns theILcdGXYPainterStyle
for the emphasized lines having a positive value.- Returns:
- the
ILcdGXYPainterStyle
for the emphasized lines having a positive value. - See Also:
-
setEmphasizedPositiveStyle
Sets theILcdGXYPainterStyle
for the emphasized lines having a positive value.- Parameters:
aEmphasizedPositiveStyle
- The new painter style- See Also:
-
getZeroStyle
Returns theILcdGXYPainterStyle
for the lines having zero value.- Returns:
- the
ILcdGXYPainterStyle
for the lines having zero value. - See Also:
-
setZeroStyle
Sets theILcdGXYPainterStyle
for the lines having zero value.- Parameters:
aZeroStyle
- The new painter style- See Also:
-
getNegativeStyle
Returns theILcdGXYPainterStyle
for lines that are not emphasized and have a negative value.- Returns:
- the
ILcdGXYPainterStyle
for lines that are not emphasized and have a negative value. - See Also:
-
setNegativeStyle
Sets theILcdGXYPainterStyle
for lines that are not emphasized and have a negative value.- Parameters:
aNegativeStyle
- The new painter style- See Also:
-
getPositiveStyle
Returns theILcdGXYPainterStyle
for lines that are not emphasized and have a positive value.- Returns:
- the
ILcdGXYPainterStyle
for lines that are not emphasized and have a positive value. - See Also:
-
setPositiveStyle
Sets theILcdGXYPainterStyle
for lines that are not emphasized and have a positive value.- Parameters:
aPositiveStyle
- The new painter style- See Also:
-
getEmphasizeDegrees
public int getEmphasizeDegrees()Deprecated.UsegetEmphasizedDegrees()
Returns the value in degrees of emphasized lines.- Returns:
- the value in degrees of emphasized lines
- See Also:
-
setEmphasizeDegrees
public void setEmphasizeDegrees(int aEmphasizeDegrees) Deprecated.UsesetEmphasizedDegrees(double)
Sets which values of lines should be emphasized. If the value of a line is a multiple of the given value, the line will be painted using an emphasized style.- Parameters:
aEmphasizeDegrees
- The value as degrees.- See Also:
-
getEmphasizedDegrees
public double getEmphasizedDegrees()Returns the value in degrees of emphasized lines.- Returns:
- the value in degrees of emphasized lines
- See Also:
-
setEmphasizedDegrees
public void setEmphasizedDegrees(double aEmphasizedDegrees) Sets which values of lines should be emphasized. If the value of a line is a multiple of the given value, the line will be painted using an emphasized style.- Parameters:
aEmphasizedDegrees
- The value as degrees.- See Also:
-
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 interfaceILcdGXYEditorProvider
- Specified by:
clone
in interfaceILcdGXYPainterProvider
- Overrides:
clone
in classTLcdGXYPointListPainter
- Returns:
- a clone of this painter provider.
- See Also:
-
getEmphasizedDegrees()
Returns the value in degrees of emphasized lines.