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_CURVEFields inherited from class com.luciad.view.gxy.painter.ALcdGXYAreaPainter
OUTLINEDFields inherited from class com.luciad.view.gxy.ALcdGXYPainter
defaultCreationFillStyle, defaultCreationLineStyle, defaultFillStyle, defaultLineStyle, fWorkBoundsFields inherited from interface com.luciad.view.gxy.ILcdGXYEditor
CREATING, END_CREATION, RESHAPED, START_CREATION, TRANSLATEDFields inherited from interface com.luciad.view.gxy.ILcdGXYPainter
BODY, CREATING, DEFAULT, HANDLES, RESHAPING, SELECTED, SNAPS, TRANSLATING -
Constructor Summary
ConstructorsConstructorDescriptionCreates and initializes a newTLcdMagneticNorthGXYPainter. -
Method Summary
Modifier and TypeMethodDescriptionclone()MakesObject.clone()public.doubleReturns the value in degrees of emphasized lines.intDeprecated.Returns theILcdGXYPainterStylefor the emphasized lines having a negative value.Returns theILcdGXYPainterStylefor the emphasized lines having a positive value.Returns theILcdGXYPainterStylefor lines that are not emphasized and have a negative value.Returns theILcdGXYPainterStylefor lines that are not emphasized and have a positive value.Returns theILcdGXYPainterStylefor the lines having zero value.voidpaint(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 ILcdPointListretrievePointList(Object aObject) Extracts anILcdPointListfrom the given object.voidsetEmphasizedDegrees(double aEmphasizedDegrees) Sets which values of lines should be emphasized.voidsetEmphasizeDegrees(int aEmphasizeDegrees) Deprecated.UsesetEmphasizedDegrees(double)Sets which values of lines should be emphasized.voidsetEmphasizedNegativeStyle(ILcdGXYPainterStyle aEmphasizedNegativeStyle) Sets theILcdGXYPainterStylefor the emphasized lines having a negative value.voidsetEmphasizedPositiveStyle(ILcdGXYPainterStyle aEmphasizedPositiveStyle) Sets theILcdGXYPainterStylefor the emphasized lines having a positive value.voidsetNegativeStyle(ILcdGXYPainterStyle aNegativeStyle) Sets theILcdGXYPainterStylefor lines that are not emphasized and have a negative value.voidSets the object to paint or edit.voidsetPositiveStyle(ILcdGXYPainterStyle aPositiveStyle) Sets theILcdGXYPainterStylefor lines that are not emphasized and have a positive value.voidsetZeroStyle(ILcdGXYPainterStyle aZeroStyle) Sets theILcdGXYPainterStylefor 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, translate2DPointMethods inherited from class com.luciad.view.gxy.painter.ALcdGXYAreaPainter
getEditMode, getFillStyle, getLineStyle, getSelectionMode, setEditMode, setFillStyle, setLineStyle, setSelectionModeMethods inherited from class com.luciad.view.gxy.ALcdGXYPainter
addPropertyChangeListener, firePropertyChangeEvent, firePropertyChangeEvent, getDisplayName, getGXYPainter, removePropertyChangeListener, setClassTraceOn, setDisplayNameMethods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.luciad.view.gxy.ILcdGXYEditor
getDisplayNameMethods inherited from interface com.luciad.view.gxy.ILcdGXYPainter
getDisplayNameMethods 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:TLcdGXYPointListPainterSets the object to paint or edit. This painter needs anILcdPointListfor painting and (optionally) anILcd2DEditablePointListfor editing. You can change how theILcdPointListis derived from the object by overridingTLcdGXYPointListPainter.retrievePointList(java.lang.Object).- Specified by:
setObjectin interfaceILcdGXYEditor- Specified by:
setObjectin interfaceILcdGXYPainter- Overrides:
setObjectin classTLcdGXYPointListPainter- Parameters:
aObject- The object to paint and edit.- See Also:
-
retrievePointList
Description copied from class:TLcdGXYPointListPainterExtracts anILcdPointListfrom the given object. The default implementation simply casts the object to anILcdPointList. Re-define this method to obtain theILcdPointListby other means.- Overrides:
retrievePointListin classTLcdGXYPointListPainter- Returns:
- the point list associated with the given object
- See Also:
-
paint
Description copied from class:TLcdGXYPointListPainterDisplays 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.TRANSLATINGmode, theILcdPointListobject is rendered as if all points were moved along the same distance in view coordinates as passed in the context. InILcdGXYPainter.RESHAPINGmode, the object is painted with one point moved as defined in the context. InILcdGXYPainter.CREATINGmode, 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.POINTorTLcdGXYPointListPainter.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:
paintin interfaceILcdGXYPainter- Overrides:
paintin 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 theILcdGXYPainterStylefor the emphasized lines having a negative value.- Returns:
- the
ILcdGXYPainterStylefor the emphasized lines having a negative value. - See Also:
-
setEmphasizedNegativeStyle
Sets theILcdGXYPainterStylefor the emphasized lines having a negative value.- Parameters:
aEmphasizedNegativeStyle- The new painter style- See Also:
-
getEmphasizedPositiveStyle
Returns theILcdGXYPainterStylefor the emphasized lines having a positive value.- Returns:
- the
ILcdGXYPainterStylefor the emphasized lines having a positive value. - See Also:
-
setEmphasizedPositiveStyle
Sets theILcdGXYPainterStylefor the emphasized lines having a positive value.- Parameters:
aEmphasizedPositiveStyle- The new painter style- See Also:
-
getZeroStyle
Returns theILcdGXYPainterStylefor the lines having zero value.- Returns:
- the
ILcdGXYPainterStylefor the lines having zero value. - See Also:
-
setZeroStyle
Sets theILcdGXYPainterStylefor the lines having zero value.- Parameters:
aZeroStyle- The new painter style- See Also:
-
getNegativeStyle
Returns theILcdGXYPainterStylefor lines that are not emphasized and have a negative value.- Returns:
- the
ILcdGXYPainterStylefor lines that are not emphasized and have a negative value. - See Also:
-
setNegativeStyle
Sets theILcdGXYPainterStylefor lines that are not emphasized and have a negative value.- Parameters:
aNegativeStyle- The new painter style- See Also:
-
getPositiveStyle
Returns theILcdGXYPainterStylefor lines that are not emphasized and have a positive value.- Returns:
- the
ILcdGXYPainterStylefor lines that are not emphasized and have a positive value. - See Also:
-
setPositiveStyle
Sets theILcdGXYPainterStylefor 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: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 interfaceILcdGXYEditorProvider- Specified by:
clonein interfaceILcdGXYPainterProvider- Overrides:
clonein classTLcdGXYPointListPainter- Returns:
- a clone of this painter provider.
- See Also:
-
getEmphasizedDegrees()Returns the value in degrees of emphasized lines.