public class TLcdMagneticNorthGXYPainter extends TLcdGXYPointListPainter
ILcdMagneticNorthModel
.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
OUTLINED
defaultCreationFillStyle, defaultCreationLineStyle, defaultFillStyle, defaultLineStyle, fWorkBounds
CREATING, END_CREATION, RESHAPED, START_CREATION, TRANSLATED
BODY, DEFAULT, HANDLES, RESHAPING, SELECTED, SNAPS, TRANSLATING
Constructor and Description |
---|
TLcdMagneticNorthGXYPainter()
Creates and initializes a new
TLcdMagneticNorthGXYPainter . |
Modifier and Type | Method and Description |
---|---|
Object |
clone()
Makes
Object.clone() public. |
double |
getEmphasizedDegrees()
Returns the value in degrees of emphasized lines.
|
int |
getEmphasizeDegrees()
Deprecated.
Use
getEmphasizedDegrees()
Returns the value in degrees of emphasized lines. |
ILcdGXYPainterStyle |
getEmphasizedNegativeStyle()
Returns the
ILcdGXYPainterStyle for the emphasized lines having a negative value. |
ILcdGXYPainterStyle |
getEmphasizedPositiveStyle()
Returns the
ILcdGXYPainterStyle for the emphasized lines having a positive value. |
ILcdGXYPainterStyle |
getNegativeStyle()
Returns the
ILcdGXYPainterStyle for lines that are not emphasized and have a negative value. |
ILcdGXYPainterStyle |
getPositiveStyle()
Returns the
ILcdGXYPainterStyle for lines that are not emphasized and have a positive value. |
ILcdGXYPainterStyle |
getZeroStyle()
Returns the
ILcdGXYPainterStyle 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 an
ILcdPointList from the given object. |
void |
setEmphasizedDegrees(double aEmphasizedDegrees)
Sets which values of lines should be emphasized.
|
void |
setEmphasizeDegrees(int aEmphasizeDegrees)
Deprecated.
Use
setEmphasizedDegrees(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. |
void |
setEmphasizedNegativeStyle(ILcdGXYPainterStyle aEmphasizedNegativeStyle)
Sets the
ILcdGXYPainterStyle for the emphasized lines having a negative value. |
void |
setEmphasizedPositiveStyle(ILcdGXYPainterStyle aEmphasizedPositiveStyle)
Sets the
ILcdGXYPainterStyle for the emphasized lines having a positive value. |
void |
setNegativeStyle(ILcdGXYPainterStyle aNegativeStyle)
Sets the
ILcdGXYPainterStyle for lines that are not emphasized and have a negative value. |
void |
setObject(Object aObject)
Sets the object to paint or edit.
|
void |
setPositiveStyle(ILcdGXYPainterStyle aPositiveStyle)
Sets the
ILcdGXYPainterStyle for lines that are not emphasized and have a positive value. |
void |
setZeroStyle(ILcdGXYPainterStyle aZeroStyle)
Sets the
ILcdGXYPainterStyle for the lines having zero value. |
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
getEditMode, getFillStyle, getLineStyle, getSelectionMode, setEditMode, setFillStyle, setLineStyle, setSelectionMode
addPropertyChangeListener, firePropertyChangeEvent, firePropertyChangeEvent, getDisplayName, getGXYPainter, removePropertyChangeListener, setClassTraceOn, setDisplayName
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getDisplayName
getDisplayName
addPropertyChangeListener, removePropertyChangeListener
public TLcdMagneticNorthGXYPainter()
TLcdMagneticNorthGXYPainter
.public void setObject(Object aObject)
TLcdGXYPointListPainter
ILcdPointList
for painting and (optionally) an ILcd2DEditablePointList
for editing.
You can change how the ILcdPointList
is derived from the object by overriding
TLcdGXYPointListPainter.retrievePointList(java.lang.Object)
.setObject
in interface ILcdGXYEditor
setObject
in interface ILcdGXYPainter
setObject
in class TLcdGXYPointListPainter
aObject
- The object to paint and edit.TLcdGXYPointListPainter.getObject()
protected ILcdPointList retrievePointList(Object aObject)
TLcdGXYPointListPainter
ILcdPointList
from the given object.
The default implementation simply casts the object to an ILcdPointList
.
Re-define this method to obtain the ILcdPointList
by other means.retrievePointList
in class TLcdGXYPointListPainter
TLcdGXYPointListPainter.setObject(java.lang.Object)
public void paint(Graphics aGraphics, int aMode, ILcdGXYContext aGXYContext)
TLcdGXYPointListPainter
This implementation will use the specified render mode to determine how the object needs to be
rendered. In ILcdGXYPainter.TRANSLATING
mode, the ILcdPointList
object is rendered as if
all points were moved along the same distance in view coordinates as passed in the context. In
ILcdGXYPainter.RESHAPING
mode, the object is painted with one point moved as defined in the context.
In ILcdGXYPainter.CREATING
mode, the object is painted as if the current mouse position is the last
point of the ILcdPointList
. 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
or TLcdGXYPointListPainter.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.
paint
in interface ILcdGXYPainter
paint
in class TLcdGXYPointListPainter
aGraphics
- The graphics to paint the object on.aMode
- The mode to render the object in.aGXYContext
- The context to render the object in.public ILcdGXYPainterStyle getEmphasizedNegativeStyle()
ILcdGXYPainterStyle
for the emphasized lines having a negative value.ILcdGXYPainterStyle
for the emphasized lines having a negative value.setEmphasizedNegativeStyle(com.luciad.view.gxy.ILcdGXYPainterStyle)
public void setEmphasizedNegativeStyle(ILcdGXYPainterStyle aEmphasizedNegativeStyle)
ILcdGXYPainterStyle
for the emphasized lines having a negative value.aEmphasizedNegativeStyle
- The new painter stylegetEmphasizedNegativeStyle()
public ILcdGXYPainterStyle getEmphasizedPositiveStyle()
ILcdGXYPainterStyle
for the emphasized lines having a positive value.ILcdGXYPainterStyle
for the emphasized lines having a positive value.setEmphasizedPositiveStyle(com.luciad.view.gxy.ILcdGXYPainterStyle)
public void setEmphasizedPositiveStyle(ILcdGXYPainterStyle aEmphasizedPositiveStyle)
ILcdGXYPainterStyle
for the emphasized lines having a positive value.aEmphasizedPositiveStyle
- The new painter stylegetEmphasizedPositiveStyle()
public ILcdGXYPainterStyle getZeroStyle()
ILcdGXYPainterStyle
for the lines having zero value.ILcdGXYPainterStyle
for the lines having zero value.setZeroStyle(com.luciad.view.gxy.ILcdGXYPainterStyle)
public void setZeroStyle(ILcdGXYPainterStyle aZeroStyle)
ILcdGXYPainterStyle
for the lines having zero value.aZeroStyle
- The new painter stylegetZeroStyle()
public ILcdGXYPainterStyle getNegativeStyle()
ILcdGXYPainterStyle
for lines that are not emphasized and have a negative value.ILcdGXYPainterStyle
for lines that are not emphasized and have a negative value.setNegativeStyle(com.luciad.view.gxy.ILcdGXYPainterStyle)
public void setNegativeStyle(ILcdGXYPainterStyle aNegativeStyle)
ILcdGXYPainterStyle
for lines that are not emphasized and have a negative value.aNegativeStyle
- The new painter stylegetNegativeStyle()
public ILcdGXYPainterStyle getPositiveStyle()
ILcdGXYPainterStyle
for lines that are not emphasized and have a positive value.ILcdGXYPainterStyle
for lines that are not emphasized and have a positive value.setPositiveStyle(com.luciad.view.gxy.ILcdGXYPainterStyle)
public void setPositiveStyle(ILcdGXYPainterStyle aPositiveStyle)
ILcdGXYPainterStyle
for lines that are not emphasized and have a positive value.aPositiveStyle
- The new painter stylegetPositiveStyle()
public int getEmphasizeDegrees()
getEmphasizedDegrees()
Returns the value in degrees of emphasized lines.setEmphasizeDegrees(int)
public void setEmphasizeDegrees(int aEmphasizeDegrees)
setEmphasizedDegrees(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.aEmphasizeDegrees
- The value as degrees.getEmphasizeDegrees()
public double getEmphasizedDegrees()
setEmphasizedDegrees(double)
public void setEmphasizedDegrees(double aEmphasizedDegrees)
aEmphasizedDegrees
- The value as degrees.getEmphasizedDegrees()
public Object clone()
ILcdCloneable
Makes Object.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 );
}
}
clone
in interface ILcdCloneable
clone
in interface ILcdGXYEditorProvider
clone
in interface ILcdGXYPainterProvider
clone
in class TLcdGXYPointListPainter
Object.clone()