Class TLcdGXYLonLatHeightBufferPainter
- All Implemented Interfaces:
ILcdCloneable
,ILcdPropertyChangeSource
,ILcdGXYEditor
,ILcdGXYEditorProvider
,ILcdGXYPainter
,ILcdGXYPainterProvider
,Serializable
,Cloneable
TLcdLonLatHeightBuffer
objects in an ILcdGXYView
.- See Also:
-
Field Summary
Modifier and TypeFieldDescriptionstatic final int
Deprecated.useFILLED
insteadstatic final int
Deprecated.Draw the area defined by the buffer filled with the foreground color.static final int
Deprecated.Draw only the outline of the buffer.static final int
Deprecated.Draw the buffer as an outlined and filled area.static final int
Deprecated.Draw the buffer as an outlined and filled area where the outline is open at both ends.static final int
Deprecated.Draw the outline of the buffer which is open at both ends.static final int
Deprecated.useOUTLINED
insteadFields 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
ConstructorDescriptionDeprecated.Creates a new TLcdGXYBufferPainter. -
Method Summary
Modifier and TypeMethodDescriptionboolean
acceptSnapTarget
(Graphics aGraphics, ILcdGXYContext aGXYContext) Deprecated.Returns whether the object set to the editor can be edited so that (part of) the object snaps to the object passed as snap target in the context.void
boundsSFCT
(Graphics aGraphics, int aMode, ILcdGXYContext aGXYContext, ILcd2DEditableBounds aBoundsSFCT) Deprecated.Sets the supplied bounds (in view coordinates, pixels) so that it encompasses the representation of the object in the given mode taking into account the given context.protected void
calculateBoundsSFCT
(int aMode, ILcdGXYContext aGXYContext, ILcd2DEditableBounds aBoundsSFCT) Deprecated.Computes the bounds of the current object of the paint as the bounds that holds all contour points which are visible in the given context.clone()
Deprecated.MakesObject.clone()
public.boolean
edit
(Graphics aGraphics, int aMode, ILcdGXYContext aGXYContext) Deprecated.Defines how an object shall be edited by this editor, taking into account the mode and the context passed.double
Deprecated.Returns the buffer width set for creation of a new buffer.int
Deprecated.Returns the number of points needed for creation of a new buffer.getCursor
(Graphics aGraphics, int aMode, ILcdGXYContext aGXYContext) Deprecated.ImplementsILcdGXYPainter.getCursor
.boolean
Deprecated.boolean
Deprecated.getGXYEditor
(Object aObject) Deprecated.This implementation always returns this instance as an editor, with the object passed set as object.int
Deprecated.Returns the minimum pixel distance the input device (a mouse, for example) must move before editing the shape.final Object
Deprecated.Returns the object set to paint or edit.boolean
Deprecated.Returns whether caching will be used when painting the buffer.Deprecated.Returns the icon to paint snap target points of the object set to this painter.boolean
Deprecated.Returns whether the axis should be painted.boolean
Deprecated.Returns whether the axis points should be painted.boolean
Deprecated.Returns whether the painter draws the axis points of theTLcdLonLatHeightBuffer
when it is painted in selected mode.boolean
Deprecated.Returns whether the painter draws the axis of theTLcdLonLatHeightBuffer
when it is painted in selected mode.boolean
Deprecated.Returns whether to paint the point on the central axis that is the closest to the point on the corridor at which the width of the corridor is made to change.boolean
Deprecated.Returns whether the painter allows snapping to the invisible points of the shape.boolean
isTouched
(Graphics aGraphics, int aMode, ILcdGXYContext aGXYContext) Deprecated.Depending on the painter mode, returns whether the current object of the painter is touched by the mouse in the given context.boolean
Deprecated.This method has been deprecated.void
paint
(Graphics aGraphics, int aMode, ILcdGXYContext aGXYContext) Deprecated.Displays the representation of the object in the given mode on the Graphics passed, taking into account the supplied context.void
setCreationBufferWidth
(double aBufferWidth) Deprecated.Sets the width of the buffer to be set at creation time.void
setDrawAxis
(boolean aDrawAxis) Deprecated.drawAxis determines whether to paint the central axis when the object is not inILcdGXYPainter.SELECTED
mode.void
setDrawAxisPoints
(boolean aDrawAxisPoints) Deprecated.DrawAxisPoints determines whether to paint the central axis point when the object is not inILcdGXYPainter.SELECTED
mode.void
setDrawAxisPointsWhenSelected
(boolean aDrawAxisPointsWhenSelected) Deprecated.Sets whether the axis points of theTLcdLonLatHeightBuffer
should be drawn when selected.void
setDrawAxisWhenSelected
(boolean aDrawAxisWhenSelected) Deprecated.Sets whether the axis of theTLcdLonLatHeightBuffer
should be drawn when selected.void
setDrawIntersection
(boolean aDrawIntersection) Deprecated.drawIntersection determines whether to paint the point on the central axis that is the closest to the point on the corridor at which the width of the corridor is made to change.void
setMinimumEditDelta
(int aDelta) Deprecated.Sets the minimum pixel distance the input device (a mouse, for example) must move before editing the shape.void
setMode
(int aMode) Deprecated.Sets the mode to decide how to paint an object: the outline (ALcdGXYAreaPainter.OUTLINED
), as a filled area (ALcdGXYAreaPainter.FILLED
), or as a filled and outlined area (ALcdGXYAreaPainter.OUTLINED_FILLED
).void
setModelModelTransformationClass
(Class aModel2ModelTransformationClass) Deprecated.Sets the transformation class to use to transform points when snapping to points in models with non equal model references.void
Deprecated.Sets the object to paint or edit with this painter/editor.void
setPaintCache
(boolean aPaintCache) Deprecated.The property paintCache determines whether the painter will cache the points it has drawn.void
setSelectionMode
(int aSelectionMode) Deprecated.Sets the selection mode to decide how to paint a selected object: the outline (ALcdGXYAreaPainter.OUTLINED
), as a filled area (ALcdGXYAreaPainter.FILLED
), or as a filled and outlined area (ALcdGXYAreaPainter.OUTLINED_FILLED
).void
setSnapIcon
(ILcdIcon aSnapIcon) Deprecated.Sets the icon to paint snap target points of the object set to this painter.void
setSnapToInvisiblePoints
(boolean aSnapToInvisiblePoints) Deprecated.Sets whether the other shapes can snap to invisible points of this shape.void
setTraceOn
(boolean aTraceOn) Deprecated.This method has been deprecated.protected void
setupGraphicsForFill
(Graphics aGraphics, int aMode, ILcdGXYContext aGXYContext) Deprecated.This method is called by thisILcdGXYPainter
just before drawing Fills on aGraphics.protected void
setupGraphicsForLine
(Graphics aGraphics, int aMode, ILcdGXYContext aGXYContext) Deprecated.This method is called by thisILcdGXYPainter
just before drawing lines on aGraphics.void
setWidthFormat
(Format aWidthFormat) Deprecated.Controls how the width will be displayed when editing the buffer.snapTarget
(Graphics aGraphics, ILcdGXYContext aGXYContext) Deprecated.Returns one of the axis or contour points of theTLcdLonLatHeightBuffer
if it is touched.boolean
supportSnap
(Graphics aGraphics, ILcdGXYContext aGXYContext) Deprecated.This implementation supports snapping.Methods inherited from class com.luciad.view.gxy.painter.ALcdGXYAreaPainter
getEditMode, getFillStyle, getLineStyle, getMode, getSelectionMode, setEditMode, setFillStyle, setLineStyle
Methods inherited from class com.luciad.view.gxy.ALcdGXYPainter
addPropertyChangeListener, anchorPointSFCT, 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
anchorPointSFCT, getDisplayName
Methods inherited from interface com.luciad.util.ILcdPropertyChangeSource
addPropertyChangeListener, removePropertyChangeListener
-
Field Details
-
OUTLINED
public static final int OUTLINEDDeprecated.Draw only the outline of the buffer.- Since:
- 1.4
- See Also:
-
FILLED
public static final int FILLEDDeprecated.Draw the area defined by the buffer filled with the foreground color.- Since:
- LuciadLightspeed1.4
- See Also:
-
OUTLINED_FILLED
public static final int OUTLINED_FILLEDDeprecated.Draw the buffer as an outlined and filled area.- See Also:
-
OUTLINED_OPEN
public static final int OUTLINED_OPENDeprecated.Draw the outline of the buffer which is open at both ends.- See Also:
-
OUTLINED_FILLED_OPEN
public static final int OUTLINED_FILLED_OPENDeprecated.Draw the buffer as an outlined and filled area where the outline is open at both ends.- See Also:
-
POLYGON
public static final int POLYGONDeprecated.useOUTLINED
insteadDraw only the outline of the buffer.- See Also:
-
AREA
public static final int AREADeprecated.useFILLED
insteadDraw the area defined by the buffer filled with the foreground color.- See Also:
-
-
Constructor Details
-
TLcdGXYLonLatHeightBufferPainter
public TLcdGXYLonLatHeightBufferPainter()Deprecated.Creates a new TLcdGXYBufferPainter.
-
-
Method Details
-
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.- Overrides:
setTraceOn
in classALcdGXYPainter
- 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.- Overrides:
isTraceOn
in classALcdGXYPainter
- Returns:
- true if tracing is enabled for this class, false otherwise.
-
setObject
Deprecated.Sets the object to paint or edit with this painter/editor.- Specified by:
setObject
in interfaceILcdGXYEditor
- Specified by:
setObject
in interfaceILcdGXYPainter
- Parameters:
aObject
- the object to paint or edit with this painter/editor.- See Also:
-
getObject
Deprecated.Returns the object set to paint or edit.- Specified by:
getObject
in interfaceILcdGXYEditor
- Specified by:
getObject
in interfaceILcdGXYPainter
- Returns:
- the object set to paint or edit.
- See Also:
-
setPaintCache
public void setPaintCache(boolean aPaintCache) Deprecated.The property paintCache determines whether the painter will cache the points it has drawn. When the object has to be repainted, the points that haven't been edited, can then be drawn more quickly.- Parameters:
aPaintCache
- the new PaintCache value.- See Also:
-
getPaintCache
public boolean getPaintCache()Deprecated.Returns whether caching will be used when painting the buffer.- Returns:
- true if caching will be used when painting the buffer.
- See Also:
-
setCreationBufferWidth
public void setCreationBufferWidth(double aBufferWidth) Deprecated.Sets the width of the buffer to be set at creation time. In case a negative value or zero is specified, the buffer width will be proportional to the length of the first buffer segment.- Parameters:
aBufferWidth
- the new CreationBufferWidth value.- See Also:
-
getCreationBufferWidth
public double getCreationBufferWidth()Deprecated.Returns the buffer width set for creation of a new buffer.- Returns:
- the buffer width set for creation of a new buffer.
- See Also:
-
setMode
public void setMode(int aMode) Deprecated.Description copied from class:ALcdGXYAreaPainter
Sets the mode to decide how to paint an object: the outline (ALcdGXYAreaPainter.OUTLINED
), as a filled area (ALcdGXYAreaPainter.FILLED
), or as a filled and outlined area (ALcdGXYAreaPainter.OUTLINED_FILLED
).- Overrides:
setMode
in classALcdGXYAreaPainter
- Parameters:
aMode
- The mode deciding how to paint an object.- See Also:
-
setSelectionMode
public void setSelectionMode(int aSelectionMode) Deprecated.Description copied from class:ALcdGXYAreaPainter
Sets the selection mode to decide how to paint a selected object: the outline (ALcdGXYAreaPainter.OUTLINED
), as a filled area (ALcdGXYAreaPainter.FILLED
), or as a filled and outlined area (ALcdGXYAreaPainter.OUTLINED_FILLED
).- Overrides:
setSelectionMode
in classALcdGXYAreaPainter
- Parameters:
aSelectionMode
- The mode deciding how to paint a selected object.- See Also:
-
setDrawIntersection
public void setDrawIntersection(boolean aDrawIntersection) Deprecated.drawIntersection determines whether to paint the point on the central axis that is the closest to the point on the corridor at which the width of the corridor is made to change. Next to the axis point the width is then displayed. The default value is true.- Parameters:
aDrawIntersection
- true to paint the point on the central axis that is the closest to the point on the corridor at which the width of the corridor is made to change.- See Also:
-
isDrawIntersection
public boolean isDrawIntersection()Deprecated.Returns whether to paint the point on the central axis that is the closest to the point on the corridor at which the width of the corridor is made to change.- Returns:
- true to paint the point on the central axis that is the closest to the point on the corridor at which the width of the corridor is made to change.
- See Also:
-
getDrawIntersection
public boolean getDrawIntersection()Deprecated.- Returns:
- the return value of isDrawIntersection.
-
setDrawAxis
public void setDrawAxis(boolean aDrawAxis) Deprecated.drawAxis determines whether to paint the central axis when the object is not inILcdGXYPainter.SELECTED
mode.- Parameters:
aDrawAxis
- true to paint the axis when painting the buffer.- See Also:
-
isDrawAxis
public boolean isDrawAxis()Deprecated.Returns whether the axis should be painted.- Returns:
- true to paint the axis.
- See Also:
-
getDrawAxis
public boolean getDrawAxis()Deprecated.- Returns:
- the return value of isDrawAxis.
-
setDrawAxisWhenSelected
public void setDrawAxisWhenSelected(boolean aDrawAxisWhenSelected) Deprecated.Sets whether the axis of theTLcdLonLatHeightBuffer
should be drawn when selected.- Parameters:
aDrawAxisWhenSelected
- the new drawAxisWhenSelected property value.- See Also:
-
isDrawAxisWhenSelected
public boolean isDrawAxisWhenSelected()Deprecated.Returns whether the painter draws the axis of theTLcdLonLatHeightBuffer
when it is painted in selected mode.- Returns:
- whether the painter draws the axis of the
TLcdLonLatHeightBuffer
when it is painted in selected mode. - See Also:
-
setDrawAxisPoints
public void setDrawAxisPoints(boolean aDrawAxisPoints) Deprecated.DrawAxisPoints determines whether to paint the central axis point when the object is not inILcdGXYPainter.SELECTED
mode.- Parameters:
aDrawAxisPoints
- true to paint the axis points when painting the buffer.- See Also:
-
isDrawAxisPoints
public boolean isDrawAxisPoints()Deprecated.Returns whether the axis points should be painted.- Returns:
- true to paint the axis points.
- See Also:
-
setDrawAxisPointsWhenSelected
public void setDrawAxisPointsWhenSelected(boolean aDrawAxisPointsWhenSelected) Deprecated.Sets whether the axis points of theTLcdLonLatHeightBuffer
should be drawn when selected.- Parameters:
aDrawAxisPointsWhenSelected
- the new drawAxisPointsWhenSelected property value.- See Also:
-
isDrawAxisPointsWhenSelected
public boolean isDrawAxisPointsWhenSelected()Deprecated.Returns whether the painter draws the axis points of theTLcdLonLatHeightBuffer
when it is painted in selected mode.- Returns:
- whether the painter draws the axis points of the
TLcdLonLatHeightBuffer
when it is painted in selected mode. - See Also:
-
setSnapToInvisiblePoints
public void setSnapToInvisiblePoints(boolean aSnapToInvisiblePoints) Deprecated.Sets whether the other shapes can snap to invisible points of this shape. ForTLcdLonLatHeightBuffer
, all axis points are invisible points if there are not drawn.- Parameters:
aSnapToInvisiblePoints
- the new snapToInvisiblePoints property value.- See Also:
-
isSnapToInvisiblePoints
public boolean isSnapToInvisiblePoints()Deprecated.Returns whether the painter allows snapping to the invisible points of the shape.- Returns:
- whether the painter allows snapping to the invisible points of the shape.
- See Also:
-
setWidthFormat
Deprecated.Controls how the width will be displayed when editing the buffer.- Parameters:
aWidthFormat
- formats a Double, the distance between the center axis and the contour, as a String containing information on the width of the buffer.
-
setMinimumEditDelta
public void setMinimumEditDelta(int aDelta) Deprecated.Sets the minimum pixel distance the input device (a mouse, for example) must move before editing the shape. A larger value ensures that the object easily "snaps" back in place, a small value allows fine editing.- Parameters:
aDelta
- the minimum pixel distance the input device should move in either the X or Y direction
-
getMinimumEditDelta
public int getMinimumEditDelta()Deprecated.Returns the minimum pixel distance the input device (a mouse, for example) must move before editing the shape. A larger value ensures that the object easily "snaps" back in place, a small value allows fine editing. The default value is 3 pixels.- Returns:
- the minimum pixel distance the input device should move in either the X or Y direction
-
setSnapIcon
Deprecated.Sets the icon to paint snap target points of the object set to this painter.- Parameters:
aSnapIcon
- the icon to paint snap target points of the object set to this painter.- See Also:
-
getSnapIcon
Deprecated.Returns the icon to paint snap target points of the object set to this painter.- Returns:
- the icon to paint snap target points of the object set to this painter.
- See Also:
-
getCursor
Deprecated.ImplementsILcdGXYPainter.getCursor
. A non-null cursor is returned only if aMode is equal toILcdGXYPainter.RESHAPING
orILcdGXYPainter.TRANSLATING
. The kind of cursor that is returned depends on location of the mouse: Cursor.CROSSHAIR_CURSOR, if the mouse pointer is positioned on an axis point. Cursor.MOVE_CURSOR, if the mouse pointer is positioned on an axis segment line. Either Cursor.N_RESIZE_CURSOR, Cursor.W_RESIZE_CURSOR , Cursor.NE_RESIZE_CURSOR or Cursor.NW_RESIZE_CURSOR, if the mouse pointer is positioned on a contour segment line. Which one is actually returned depends on the orientation of the contour segment line.- Specified by:
getCursor
in interfaceILcdGXYPainter
- Overrides:
getCursor
in classALcdGXYPainter
- Parameters:
aGraphics
- the Graphics to get the cursor on.aMode
- the painting mode for which to get the cursor.aGXYContext
- the context in which to get the cursor.- Returns:
- if the mode is equal to
ILcdGXYPainter.RESHAPING
orILcdGXYPainter.TRANSLATING
and:- Cursor.CROSSHAIR_CURSOR, if the mouse pointer is positioned on an axis point.
- Cursor.MOVE_CURSOR, if the mouse pointer is positioned on an axis segment line.
- Cursor.N_RESIZE_CURSOR, Cursor.W_RESIZE_CURSOR , Cursor.NE_RESIZE_CURSOR or Cursor.NW_RESIZE_CURSOR, if the mouse pointer is positioned on a contour segment line depending on the orientation of the contour segment line.
-
getGXYEditor
Deprecated.This implementation always returns this instance as an editor, with the object passed set as object.- Specified by:
getGXYEditor
in interfaceILcdGXYEditorProvider
- Parameters:
aObject
- the object to retrieve an editor for.- Returns:
- this.
-
isTouched
Deprecated.Depending on the painter mode, returns whether the current object of the painter is touched by the mouse in the given context.- Specified by:
isTouched
in interfaceILcdGXYPainter
- Parameters:
aGraphics
- the graphics to check on whether the object in this painter is touched.aMode
- the painting mode to check in whether this painters object is touched.aGXYContext
- the context to check in whether this painters object is touched.- Returns:
- returns true, depending on the mode of the painter (not aMode,
setMode(int)
) if- OUTLINED: the mouse is on a line segment of the axis or the contour of the buffer,
- OUTLINED_OPEN: the mouse is on a line segment of the axis or the contour of the buffer is touched, except for the line segments at the ends of the buffer,
- FILLED, OUTLINED_FILLED, OUTLINED_FILLED_OPEN: the mouse is over the interior of the buffer,
-
false otherwise.
- See Also:
-
getCreationClickCount
public int getCreationClickCount()Deprecated.Returns the number of points needed for creation of a new buffer. This implementation returns -2, meaning unlimited number of point for creation.- Specified by:
getCreationClickCount
in interfaceILcdGXYEditor
- Returns:
- -2, meaning unlimited number of point for creation, with a minimum of two.
-
paint
Deprecated.Description copied from interface:ILcdGXYPainter
Displays the representation of the object in the given mode on the Graphics passed, taking into account the supplied context.The visual representation of an object depends on the context. Depending on the context (e.g. is the location covered by the view), an object may or may not have a representation. The context contains:
- transformations which allow to compute the location in view space of points and bounds given in model, space
- a pen which can connect points with a line or create arcs around a point,
- the view for which the object's representation must be painted. This can be useful when the painted object depends on the scale of the view, or the presence of other layers in the view.
- the current location(s) of the mouse or input device and the last location(s) the mouse or input device was pressed.
The mode passed in this method indicates what part of the object must be painted, whether it should be painted as selected or not, and whether user interaction (via mouse movements) must be taken into account.
When the mode passed contains either TRANSLATING, RESHAPING or CREATING, this method is also responsible for interpreting interaction on the representation of an object and modifying the representation of the object accordingly. The painter is not responsible for modifying the object itself, this is done by a corresponding
ILcdGXYEditor
. Implementations ofILcdGXYPainter
andILcdGXYEditor
interfaces must be consistent for an object: the painter must display the result of the user interaction on the object, while the editor is responsible for modifying the object as a result of the user interaction. A good practice to ensure a consistent implementation is to implement both theILcdGXYPainter
andILcdGXYEditor
interfaces in a single class.When the mode passed includes SNAPS, the part of the representation which corresponds to the object returned as snap target by the method
snapTarget
must be painted in order to provide the user with a visual indication of the snap target.The Graphics passed in this method can be different from the Graphics returned by a view due to techniques such as double buffering (as applied in Swing). Basic drawing operations must always be performed on the Graphics passed as an argument in this method.
- Specified by:
paint
in interfaceILcdGXYPainter
- Parameters:
aGraphics
- the Graphics on which the representation of the object is paintedaMode
- the mode the object is represented in (see class documentation).aGXYContext
- theILcdGXYContext
the drawing depends on.
-
edit
Deprecated.Description copied from interface:ILcdGXYEditor
Defines how an object shall be edited by this editor, taking into account the mode and the context passed.The mode passed indicates how the interaction should be interpreted. It can be one of the following:
TRANSLATED
RESHAPED
START_CREATION
CREATING
END_CREATION
The first two modes designate that the object should be modified, the last three modes are passed when initializing an object. From an implementation point of view there is no difference between TRANSLATED and RESHAPED. These constants only differ in semantics. For
ILcdShape
objects TRANSLATED can be seen as the mode that will be passed when the shape as a whole is moved. RESHAPED is used more often for moving part of a shape.The context contains information on the user interaction at hand. The methods
getX
andgetY
contain the location(s) of the user interaction. The methodsgetDeltaX
andgetDeltaY
contain the distance(s) over which the user interaction is taking place. For example,getX
andgetY
may contain the current mouse location whilegetDeltaX
andgetDeltaY
contain the distance over which the mouse has been dragged. The editing behavior can take into account multiple locations, to respond to, for example, multi-touch input.When a snap target is accepted, the implementation of this method should take that fact into account when editing or initializing an object.
- Specified by:
edit
in interfaceILcdGXYEditor
- Parameters:
aGraphics
- the graphics on which the buffer is being edited. This might be of importance e.g. when a scale or a clip is set on the graphics.aMode
- the editing mode, it will contain either ILcdGXYEditor.TRANSLATING or ILcdGXYEditor.RESHAPINGaGXYContext
- the context in which the buffer will be edited. This contains the graphics on which the buffer is painted, the current and previous mouse position, model to world, world to view transformations and possible snap targets.- Returns:
- true if the buffer was actually changed.
- See Also:
-
boundsSFCT
public void boundsSFCT(Graphics aGraphics, int aMode, ILcdGXYContext aGXYContext, ILcd2DEditableBounds aBoundsSFCT) throws TLcdNoBoundsException Deprecated.Description copied from interface:ILcdGXYPainter
Sets the supplied bounds (in view coordinates, pixels) so that it encompasses the representation of the object in the given mode taking into account the given context.If this method returns without exception the bounds argument must encompass the representation of the object. A point outside the bounds will not be contained within the painted object.
The bounds returned in this method can be seen as the equivalent in the view space of the bounds in the model space for
ILcdBounded
objects.- Specified by:
boundsSFCT
in interfaceILcdGXYPainter
- Parameters:
aGraphics
-aMode
-aGXYContext
-aBoundsSFCT
-- Throws:
TLcdNoBoundsException
- See Also:
-
supportSnap
Deprecated.This implementation supports snapping.- Specified by:
supportSnap
in interfaceILcdGXYPainter
- Overrides:
supportSnap
in classALcdGXYPainter
- Parameters:
aGraphics
- the Graphics on which the painter supports snap.aGXYContext
- the context in which the painter supports snap.- Returns:
- true
-
snapTarget
Deprecated.Returns one of the axis or contour points of theTLcdLonLatHeightBuffer
if it is touched. An axis points is only returned if the axis point is drawn (seeisDrawAxisPoints()
andisDrawAxis()
) or when snapping to invisible points is enabled (seeisSnapToInvisiblePoints()
).- Specified by:
snapTarget
in interfaceILcdGXYPainter
- Overrides:
snapTarget
in classALcdGXYPainter
- Parameters:
aGraphics
- the Graphics on which the snap target is given.aGXYContext
- the context in which the snap target is given.- Returns:
- the snappable
ILcdPoint
that is touched, otherwise null. - See Also:
-
setModelModelTransformationClass
Deprecated.Sets the transformation class to use to transform points when snapping to points in models with non equal model references. The transformation will be instantiated and setup to transform points from the model of the snap layer to points in the model which contains the current object of this painter. The default value is the TLcdGeoReference2GeoReference class.Setting this property allows to snap to points defined in a different model reference.
- Parameters:
aModel2ModelTransformationClass
- the transformation to use as described above. Instances of this class should implementILcdModelModelTransformation
-
acceptSnapTarget
Deprecated.Returns whether the object set to the editor can be edited so that (part of) the object snaps to the object passed as snap target in the context. If the snap target is accepted, a call to theedit
method with this context passed should edit the object so that (part of) the object snaps to the object passed as snap target in the context.The context contains information on the user interaction at hand: the current location of the user interaction, given by its
This editor can snap the current buffer to the given snap target if the following conditions are met:X
andY
coordinates, and thedistance in X direction
anddistance in Y direction
over which the user interaction is taking place. For example,getX
andgetY
may contain the current mouse location whilegetDeltaX
andgetDeltaY
contain the distance over which the mouse has been dragged. The context also contains the candidatesnap target
and thelayer the snap target is contained in
.- The snap target is an
ILcdPoint
whose coordinates are expressed in the same coordinate system as the current object or the model to model transformation can transform the point to a point in the objects coordinate system. - The axis doesn't contain any points or one of its axis points is touched. The axis points can be
touched if they are painted (see
isDrawAxisPoints()
orisDrawAxisPointsWhenSelected()
) or when the axis itself is drawn (seeisDrawAxis()
orisDrawAxisWhenSelected()
)
- Specified by:
acceptSnapTarget
in interfaceILcdGXYEditor
- Parameters:
aGraphics
- the Graphics on which the snap target should be checked.aGXYContext
- the context in which the snap target should be checked.- Returns:
- true if the above conditions are met, false otherwise.
- See Also:
- The snap target is an
-
setupGraphicsForLine
Deprecated.This method is called by thisILcdGXYPainter
just before drawing lines on aGraphics. It can be redefined in order to set specific Graphics properties like Color, etc ... It calls getLineStyle().setupGraphics if such method returns a non null value.- Parameters:
aGraphics
- the graphics to paint the object on.aMode
- the mode to paint the object in.aGXYContext
- the context to paint the object in.
-
setupGraphicsForFill
Deprecated.This method is called by thisILcdGXYPainter
just before drawing Fills on aGraphics. It can be redefined in order to set specific Graphics properties like Color, etc ... It calls getFillStyle().setupGraphics if such method returns a non null value.- Parameters:
aGraphics
- the graphics to paint the object on.aMode
- the mode to paint the object in.aGXYContext
- the context to paint the object in.
-
calculateBoundsSFCT
protected void calculateBoundsSFCT(int aMode, ILcdGXYContext aGXYContext, ILcd2DEditableBounds aBoundsSFCT) throws TLcdNoBoundsException Deprecated.Computes the bounds of the current object of the paint as the bounds that holds all contour points which are visible in the given context.- Parameters:
aMode
- the painting mode to calculate the bounds in.aGXYContext
- the context in which to calculate the boundsaBoundsSFCT
- the bounds to adapt to the bounds of the object of this painter.- Throws:
TLcdNoBoundsException
- if the axis of the buffer contains less than 2 points or if no points of the buffer are visible in the given context.
-
clone
Deprecated.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 classALcdGXYAreaPainter
- Returns:
- a clone of this painter provider.
- See Also:
-