public class TLcdGXYIconPainter extends ALcdGXYPainter implements ILcdGXYPainter, ILcdGXYEditor, ILcdGXYEditorProvider
ILcdShape
objects as points and enables visual editing of
ILcd2DEditableShape
objects as points in an ILcdGXYView
.
This painter paints ILcdShape
objects by painting an ILcdIcon
at the location of
the shapes focus point. Two icons are used, one to be used as default icon and one to be used when selected.
When the object is being edited, the selection icon is used. If the ILcdShape
implements ILcdOriented
, the top of the icon can be
automatically rotated
according to the orientation. If an icon implements
ILcdAnchoredIcon, the painter maps its anchor point on the object's focus point. If not, the center
of the icon is mapped to the object's focus point. In addition, the icon can be
automatically scaled
.
The painter has the ability to add a halo effect around the painted icons. For a more detailed explanation
of halos, please refer to TLcdGXYHaloLabelPainter
. The methods that control the appearance of the
halos are equivalent to those in TLcdGXYHaloLabelPainter
.
It is possible to use an ILcdObjectIconProvider
for the default icon and the selection icon with
setIconProvider(ILcdObjectIconProvider)
and setSelectionIconProvider(ILcdObjectIconProvider)
.
If an icon provider is set, the icon getIcon()
is used only as a fallback icon when the
icon provider cannot provide an icon for the current object. The method getIcon()
always
returns the fallback icon, and this is not always the icon that will be painted.
For the selection icon, similar functionality and methods are used.
The method getIcon(int)
returns the icon that will be actually painted for the given rendering mode,
so this method may also return the icon given by the icon provider for the current object.
The icon displayed acts as a handle. Since this is already painted in ILcdGXYPainter.BODY
mode, no additional
handles are painted.
The focus point of the ILcdShape
object can be returned on the condition that it is touched,
see isTouched
. If the focus
point is defined as snap target, it will be highlighted with the snapIcon
.
The visualization of the ILcdShape
object is governed by the icon
and selection icon
set to this painter.
The anchor point is located at the focus point of the ILcdShape
object.
An ILcdShape
object is touched when the mouse position is over the painted icon.
This editor will move the ILcd2DEditableShape
in both RESHAPED
and
TRANSLATED
mode. The shape is moved to the location of the mouse pointer.
When initializing an ILcd2DEditableShape
object via interaction through the view, the
ILcdShape
object will be moved when calling edit
with START_CREATION
mode. The shape is moved to the location of the
mouse pointer. In CREATING
or END_CREATION
mode, the object
will not be updated.
All points are accepted as snap target as long as:
ILcdShape
object with the model to model
transformation
,ILcdShape
object set to
this painter.
This painter implementation may cache images of the icons used. Image caching can be turned on/off with the
setUseImageCache
method.
The painter has the ability to add a halo effect around the painted icons. For a more detailed explanation
of halos, please refer to TLcdGXYHaloLabelPainter
. The methods that control the appearance of the
halos are equivalent to those in TLcdGXYHaloLabelPainter
.
Modifier and Type | Class and Description |
---|---|
static class |
TLcdGXYIconPainter.ScalingMode
Possible icon scaling modes.
|
defaultCreationFillStyle, defaultCreationLineStyle, defaultFillStyle, defaultLineStyle, fWorkBounds
BODY, CREATING, DEFAULT, HANDLES, RESHAPING, SELECTED, SNAPS, TRANSLATING
CREATING, END_CREATION, RESHAPED, START_CREATION, TRANSLATED
Constructor and Description |
---|
TLcdGXYIconPainter()
Constructs a default
TLcdGXYIconPainter and sets the display name
to "Point". |
TLcdGXYIconPainter(String aDisplayName)
Constructs a default
TLcdGXYIconPainter with the given display name. |
Modifier and Type | Method and Description |
---|---|
boolean |
acceptSnapTarget(Graphics aGraphics,
ILcdGXYContext aGXYContext)
Determines whether a snap target should be accepted or not.
|
void |
anchorPointSFCT(Graphics aGraphics,
int aMode,
ILcdGXYContext aGXYContext,
Point aPointSFCT)
Implements
ILcdGXYPainter.anchorPointSFCT . |
void |
boundsSFCT(Graphics aGraphics,
int aRenderMode,
ILcdGXYContext aGXYContext,
ILcd2DEditableBounds aBoundsSFCT)
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.
|
void |
clearImageCache()
Clears the entire image cache.
|
void |
clearImageCache(Object aObject)
Clears the icon image cache for the given object.
|
Object |
clone()
Creates and returns a copy of this object.
|
boolean |
edit(Graphics aGraphics,
int aRenderMode,
ILcdGXYContext aGXYContext)
This implementation edits the
ILcdShape object set to the painter. |
protected void |
firePropertyChangeEvent(PropertyChangeEvent aPropertyChangeEvent)
Fires a
PropertyChangeEvent to all PropertyChangeListeners that have been
registered to this ILcdGXYPainter . |
int |
getCreationClickCount()
Returns
1 as the number of required user interactions. |
Cursor |
getCursor(Graphics aGraphics,
int aRenderMode,
ILcdGXYContext aGXYContext)
Returns a translation
Cursor when appropriate, or null otherwise. |
ILcdGXYEditor |
getGXYEditor(Object aObject)
Returns this instance as editor for editing the specified
Object . |
TLcdHaloAlgorithm |
getHaloAlgorithm()
Returns the algorithm that is used for rendering halo's.
|
Color |
getHaloColor()
Returns the color of the halo effect.
|
int |
getHaloThickness()
Returns the thickness of the halo effect.
|
ILcdIcon |
getIcon()
Returns the
ILcdIcon used for painting in default mode. |
protected ILcdIcon |
getIcon(int aRenderMode)
Returns the icon that needs to be painted for the specified rendering mode.
|
ILcdObjectIconProvider |
getIconProvider()
Returns the
ILcdIconProvider used for painting in default mode. |
Object |
getObject()
Returns the object that can currently be painted or edited by this painter/editor.
|
boolean |
getPaintCache()
Returns whether caching is used when painting this painter's object.
|
double |
getScale()
Returns the current size factor.
|
TLcdGXYIconPainter.ScalingMode |
getScalingMode()
Returns the current icon scaling mode.
|
ILcdIcon |
getSelectionIcon()
Returns the
ILcdIcon used for painting in selected mode. |
ILcdObjectIconProvider |
getSelectionIconProvider()
Returns the
ILcdIconProvider used for painting in selected mode. |
ILcdIcon |
getSnapIcon()
Returns the icon that is used to paint snap target points of the object set to this painter.
|
boolean |
isHaloEnabled()
Returns whether the painter will add a halo effect around the icons.
|
boolean |
isTouched(Graphics aGraphics,
int aRenderMode,
ILcdGXYContext aGXYContext)
Returns whether the mouse position in the given context is touching the painted icon.
|
boolean |
isUseImageCache()
Returns
true when icon halo image caching is enabled, false otherwise. |
boolean |
isUseOrientation()
Returns if the icon will be rotated when the painted object implements
ILcdOriented . |
void |
paint(Graphics aGraphics,
int aRenderMode,
ILcdGXYContext aGXYContext)
Displays the representation of the object in the given mode on the Graphics passed, taking into
account the context passed.
|
protected void |
paintSnap(Graphics aGraphics,
int aRenderMode,
ILcdGXYContext aGXYContext)
Called when this painter needs to paint its object in the rendering mode
ILcdGXYPainter.SNAPS . |
void |
setHaloAlgorithm(TLcdHaloAlgorithm aHaloAlgorithm)
Sets the algorithm to be used for rendering halo's.
|
void |
setHaloColor(Color aHaloColor)
Sets the color of the halo effect.
|
void |
setHaloEnabled(boolean aHaloEnabled)
Determines whether the painter will add a halo effect around the icons.
|
void |
setHaloThickness(int aHaloThickness)
Sets the thickness defined in pixels of the halo effect.
|
void |
setIcon(ILcdIcon aIcon)
Sets the
ILcdIcon used for painting in default mode. |
void |
setIconProvider(ILcdObjectIconProvider aIconProvider)
Sets the
ILcdIconProvider used for painting in default mode. |
void |
setModelModelTransformationClass(Class aModel2ModelTransformationClass)
Sets the transformation class that should be used when snapping to points that are defined
in a different reference than the reference of this painter's object.
|
void |
setObject(Object aObject)
Sets the object to paint and edit.
|
void |
setPaintCache(boolean aPaintCache)
Turns caching of the object location on or off.
|
void |
setScale(double aScale)
Sets the new size factor for the icons.
|
void |
setScalingMode(TLcdGXYIconPainter.ScalingMode aScalingMode)
Sets the icon scaling mode, which determines how the
setScale(double)
property is interpreted. |
void |
setSelectionIcon(ILcdIcon aSelectionIcon)
Sets the
ILcdIcon used for painting in selected mode. |
void |
setSelectionIconProvider(ILcdObjectIconProvider aSelectionIconProvider)
Sets the
ILcdIconProvider used for painting in selected mode. |
void |
setSnapIcon(ILcdIcon aSnapIcon)
Sets the icon that marks snap targets of the object currently set to this painter.
|
void |
setUseImageCache(boolean aUseImageCache)
Enables or disables the caching of icons with halo as images.
|
void |
setUseOrientation(boolean aUseOrientation)
Sets whether to paint a rotated icon when the painted object implements
ILcdOriented . |
Object |
snapTarget(Graphics aGraphics,
ILcdGXYContext aGXYContext)
Returns the focus point of the
ILcdShape object if the point is touched. |
boolean |
supportSnap(Graphics aGraphics,
ILcdGXYContext aGXYContext)
Supports snapping when the
ILcdShape object set to this painter is visible in the view. |
addPropertyChangeListener, firePropertyChangeEvent, getDisplayName, getGXYPainter, isTraceOn, removePropertyChangeListener, setClassTraceOn, setDisplayName, setTraceOn
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getDisplayName
getDisplayName
addPropertyChangeListener, removePropertyChangeListener
public TLcdGXYIconPainter()
TLcdGXYIconPainter
and sets the display name
to "Point".public TLcdGXYIconPainter(String aDisplayName)
TLcdGXYIconPainter
with the given display name.aDisplayName
- The display name for this painter, used for textual representation
of this painter.protected void firePropertyChangeEvent(PropertyChangeEvent aPropertyChangeEvent)
PropertyChangeEvent
to all PropertyChangeListeners that have been
registered to this ILcdGXYPainter
.
This implementation will also clear the image cache when a property change event is fired.
firePropertyChangeEvent
in class ALcdGXYPainter
aPropertyChangeEvent
- The PropertyChangeEvent object.public void anchorPointSFCT(Graphics aGraphics, int aMode, ILcdGXYContext aGXYContext, Point aPointSFCT) throws TLcdNoBoundsException
ALcdGXYPainter
ILcdGXYPainter.anchorPointSFCT
.
aPointSFCT
will be set to the center of the
bounds calculated by boundsSFCT.anchorPointSFCT
in interface ILcdGXYPainter
anchorPointSFCT
in class ALcdGXYPainter
aGraphics
- the Graphics on which the representation of the object is paintedaMode
- the mode the object is painted in (see class documentation)aGXYContext
- the context for which the representation of the object is painted. It contains amongst others
the transformations from model to world and world to view.aPointSFCT
- the point that has to be moved to the location of the anchor point of the representation of
the object. This point must not be taken into account when the method has thrown a TLcdNoBoundsException.TLcdNoBoundsException
- if no anchor point can be determined for the representation of the object.
This can be when the object does not have a representation in the given context, for example when it is located in
a part of the world which is not visible in the projection as set in the views world reference.paint
public void setObject(Object aObject)
Sets the object to paint and edit. The object should be an instance of or refer to
an instance of ILcdShape
for painting and ILcd2DEditableShape
for editing.
This painter/editor can be used to paint the object without using the edit functionality. This
method shall therefore only check if the object implements ILcdShape
and shall throw
a ClassCastException
if it does not.
When this painter is used as editor with an object that does not implement the interface ILcd2DEditableShape
, the edit
method shall throw the necessary exception.
setObject
in interface ILcdGXYEditor
setObject
in interface ILcdGXYPainter
aObject
- The object to paint and edit.ClassCastException
- when the object does not implement ILcdShape
.getObject()
public final Object getObject()
getObject
in interface ILcdGXYEditor
getObject
in interface ILcdGXYPainter
setObject(Object)
public void setPaintCache(boolean aPaintCache)
ILcdCache
. By default, caching is turned on.aPaintCache
- A flag indicating whether to use caching when painting an object.getPaintCache()
public boolean getPaintCache()
true
if caching is used to paint this painter's object, false
otherwise.setPaintCache(boolean)
public void setIcon(ILcdIcon aIcon)
ILcdIcon
used for painting in default mode. For painting, this is a
fallback icon, it is only painted if there is no icon provider set or the icon provider can't
provide an icon for the current object.
When the given icon implements ILcdAnchoredIcon, the painter maps its anchor point on the
object's focus point. If not, the center of the icon is mapped to the object's focus point.aIcon
- the icon to paint in default mode.getIcon()
public ILcdIcon getIcon()
ILcdIcon
used for painting in default mode. For painting, this is a
fallback icon, it is only painted if there is no icon provider set or the icon provider can't
provide an icon for the current object.ILcdIcon
used for painting in default mode.setIcon(com.luciad.gui.ILcdIcon)
public void setSelectionIcon(ILcdIcon aSelectionIcon)
ILcdIcon
used for painting in selected mode. For painting, this is a
fallback icon, it is only painted if there is no selection icon provider set or the selection
icon provider can't provide an icon for the current object.
When the given icon implements ILcdAnchoredIcon, the painter maps its anchor point on the
object's focus point. If not, the center of the icon is mapped to the object's focus point.aSelectionIcon
- the ILcdIcon
used for painting in selected mode.getSelectionIcon()
public ILcdIcon getSelectionIcon()
ILcdIcon
used for painting in selected mode. For painting, this is a
fallback icon, it is only painted if there is no selection icon provider set or the selection
icon provider can't provide an icon for the current object.ILcdIcon
used for painting in selected mode.setSelectionIcon(com.luciad.gui.ILcdIcon)
public void setSnapIcon(ILcdIcon aSnapIcon)
paint
method is called with the render mode ILcdGXYPainter.SNAPS
.
When the given icon implements ILcdAnchoredIcon, the painter maps its anchor point on the
object's focus point. If not, the center of the icon is mapped to the object's focus point.aSnapIcon
- The icon that should be used to paint snap target points.getSnapIcon()
public ILcdIcon getSnapIcon()
setSnapIcon(ILcdIcon)
public void setIconProvider(ILcdObjectIconProvider aIconProvider)
Sets the ILcdIconProvider
used for painting in default mode.
If an icon provider is set that can provide an icon for the object, it overrides the icon
that is set with setIcon(ILcdIcon)
for painting.
aIconProvider
- the icon provider to paint in default mode.getIconProvider()
public ILcdObjectIconProvider getIconProvider()
ILcdIconProvider
used for painting in default mode.ILcdIconProvider
used for painting in default mode.setIconProvider(com.luciad.gui.ILcdObjectIconProvider)
public void setSelectionIconProvider(ILcdObjectIconProvider aSelectionIconProvider)
ILcdIconProvider
used for painting in selected mode.
If a selection icon provider is set that can provide an icon for the object, it overrides
the icon that is set with setSelectionIcon(ILcdIcon)
for painting.
aSelectionIconProvider
- the ILcdIconProvider
used for painting in selected mode.getSelectionIconProvider()
public ILcdObjectIconProvider getSelectionIconProvider()
ILcdIconProvider
used for painting in selected mode.ILcdIconProvider
used for painting in selected mode.setSelectionIconProvider(com.luciad.gui.ILcdObjectIconProvider)
public boolean isHaloEnabled()
setHaloEnabled(boolean)
public void setHaloEnabled(boolean aHaloEnabled)
false
.aHaloEnabled
- a flag indicating whether to add a halo effect around the icons.isHaloEnabled()
public int getHaloThickness()
setHaloThickness(int)
public void setHaloThickness(int aHaloThickness)
1
.aHaloThickness
- the thickness defined in pixels of the halo effect.getHaloThickness()
,
TLcdGXYHaloLabelPainter.setHaloThickness(int)
public Color getHaloColor()
setHaloColor(java.awt.Color)
public void setHaloColor(Color aHaloColor)
Color.white
.aHaloColor
- the color of the halo effect.getHaloColor()
,
TLcdGXYHaloLabelPainter.setHaloColor(java.awt.Color)
public void setHaloAlgorithm(TLcdHaloAlgorithm aHaloAlgorithm)
TLcdHaloAlgorithm
for more information on the available algorithms.aHaloAlgorithm
- the algorithm to be used for rendering halo's.TLcdHaloAlgorithm
,
getHaloAlgorithm()
public TLcdHaloAlgorithm getHaloAlgorithm()
TLcdHaloAlgorithm
,
setHaloAlgorithm(com.luciad.util.TLcdHaloAlgorithm)
public boolean isUseImageCache()
true
when icon halo image caching is enabled, false
otherwise.true
when icon halo image caching is enabled, false
otherwise.public void setUseImageCache(boolean aUseImageCache)
aUseImageCache
- a flag indicating whether image caching should be enabled.isUseImageCache()
,
TLcdGXYHaloLabelPainter.setUseImageCache(boolean)
,
setHaloEnabled(boolean)
public void clearImageCache()
Clears the entire image cache.
To remove a single item from the cache, use clearImageCache(Object)
.
setUseImageCache(boolean)
public void clearImageCache(Object aObject)
clearImageCache()
.aObject
- the object for which the cache to be cleared.setUseImageCache(boolean)
public void paint(Graphics aGraphics, int aRenderMode, ILcdGXYContext aGXYContext)
This implementation will use the method getIcon(int)
with the specified render mode to
determine how the object needs to be rendered. In ILcdGXYPainter.RESHAPING
and ILcdGXYPainter.TRANSLATING
mode,
the ILcdShape
object is rendered as if the point was moved along the same distance
in view coordinates as passed in the context.
If the halo effect is enabled, a halo effect will be added around the icon. Note that the halo effect
will only be added when the rendering mode does not contain the mode SELECTED
.
paint
in interface ILcdGXYPainter
aGraphics
- The graphics to paint the object on.aRenderMode
- The mode to render the object in.aGXYContext
- The context to render the object in.protected void paintSnap(Graphics aGraphics, int aRenderMode, ILcdGXYContext aGXYContext)
ILcdGXYPainter.SNAPS
.aGraphics
- The graphics to paint the object on.aRenderMode
- The mode to render the object in, ILcdGXYPainter.SNAPS
included.aGXYContext
- The context to render the object in.public double getScale()
setScale(double)
public void setScale(double aScale)
getScalingMode()
.aScale
- the new size factorsetScalingMode(com.luciad.view.gxy.painter.TLcdGXYIconPainter.ScalingMode)
,
getScale()
public TLcdGXYIconPainter.ScalingMode getScalingMode()
setScalingMode(com.luciad.view.gxy.painter.TLcdGXYIconPainter.ScalingMode)
public void setScalingMode(TLcdGXYIconPainter.ScalingMode aScalingMode)
setScale(double)
property is interpreted.aScalingMode
- the new icon scaling modegetScalingMode()
public boolean isUseOrientation()
ILcdOriented
.ILcdOriented
,
false if the icon is painted without applying rotation.public void setUseOrientation(boolean aUseOrientation)
ILcdOriented
.aUseOrientation
- if true, and if the painted object implements ILcdOriented
, the icon
is rotated so that the top of the original icon follows the orientation with respect to the northprotected ILcdIcon getIcon(int aRenderMode)
Returns the icon that needs to be painted for the specified rendering mode. This implementation
will return the selection icon if the rendering mode contains
SELECTED
. If the mode contains BODY
or DEFAULT
,
the default icon is returned. The method returns null
in all other cases.
The default icon is the icon returned by getIconProvider()
if the icon provider is not null
and the icon it returns for the current object is not null, otherwise it is the fallback
icon, gotten with getIcon()
The selection icon is the icon returned by getSelectionIconProvider()
if the icon provider is not null
and the icon it returns for the current object is not null, otherwise it is the fallback selection
icon, gotten with getSelectionIcon()
aRenderMode
- The mode to render the object in.null
.setIconProvider(com.luciad.gui.ILcdObjectIconProvider)
,
setSelectionIconProvider(com.luciad.gui.ILcdObjectIconProvider)
,
setIcon(com.luciad.gui.ILcdIcon)
,
setSelectionIcon(com.luciad.gui.ILcdIcon)
public boolean isTouched(Graphics aGraphics, int aRenderMode, ILcdGXYContext aGXYContext)
Returns whether the mouse position in the given context is touching the painted icon.
This implementation will use the method getIcon(int)
with the specified render
mode to determine which icon needs to be touched.
isTouched
in interface ILcdGXYPainter
aGraphics
- The graphics to paint the object on.aRenderMode
- The mode to render the object in.aGXYContext
- The context in which the object is rendered.ILcdShape
object is touched.boundsSFCT
public Cursor getCursor(Graphics aGraphics, int aRenderMode, ILcdGXYContext aGXYContext)
Cursor
when appropriate, or null
otherwise.getCursor
in interface ILcdGXYPainter
getCursor
in class ALcdGXYPainter
aGraphics
- The graphics on which the object is painted.aRenderMode
- The mode to render the object in.aGXYContext
- The context in which the object is rendered.null
if
no particular cursor is required.public void boundsSFCT(Graphics aGraphics, int aRenderMode, ILcdGXYContext aGXYContext, ILcd2DEditableBounds aBoundsSFCT) throws TLcdNoBoundsException
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.
boundsSFCT
in interface ILcdGXYPainter
aGraphics
- The graphics to paint the object on.aRenderMode
- The mode to render the object in.aGXYContext
- The context to render the object in.aBoundsSFCT
- The bounds to update.TLcdNoBoundsException
- if no bounds can be determined for the representation of the object.
This can happen when the object does not have a representation in the given context, for example when it is located
in a part of the world which is not visible in the current view.isTouched
public boolean supportSnap(Graphics aGraphics, ILcdGXYContext aGXYContext)
Supports snapping when the ILcdShape
object set to this painter is visible in the view.
supportSnap
in interface ILcdGXYPainter
supportSnap
in class ALcdGXYPainter
aGraphics
- the graphics on which is worked.aGXYContext
- the context of the snapping.true
if the ILcdShape
object is visible in the view,
false
otherwise.public Object snapTarget(Graphics aGraphics, ILcdGXYContext aGXYContext)
Returns the focus point of the ILcdShape
object if the point is touched.
If not, null
will be returned.
snapTarget
in interface ILcdGXYPainter
snapTarget
in class ALcdGXYPainter
aGraphics
- the graphics on which is worked.aGXYContext
- the context of the snapping.ILcdShape
object if the point is touched,
null
otherwise.supportSnap
public boolean edit(Graphics aGraphics, int aRenderMode, ILcdGXYContext aGXYContext)
This implementation edits the ILcdShape
object set to the painter. The object needs to
implement the interface ILcd2DEditableShape
otherwise a ClassCastException
will be thrown.
In ILcdGXYEditor.START_CREATION
, ILcdGXYEditor.TRANSLATED
and ILcdGXYEditor.RESHAPED
render mode, the focus
point of the ILcdShape
object is moved to the location beneath the mouse pointer.
If, in all render modes, a snap target is found for the moved point, the snap target location is used for the moved point.
edit
in interface ILcdGXYEditor
aGraphics
- The graphics to edit the object on.aRenderMode
- The mode to render the object in.aGXYContext
- The context to render the object in.ClassCastException
- if the painter's object does not implement ILcd2DEditableShape
.ILcdGXYContext
,
acceptSnapTarget
public int getCreationClickCount()
1
as the number of required user interactions.getCreationClickCount
in interface ILcdGXYEditor
1
.public void setModelModelTransformationClass(Class aModel2ModelTransformationClass)
Sets the transformation class that should be used when snapping to points that are defined
in a different reference than the reference of this painter's object. 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.
This property allows the painter to snap to points defined in a different model reference.
Instances of this specified class should implement ILcdModelModelTransformation
,
otherwise the snapping functionality to different model references will not work.
aModel2ModelTransformationClass
- the transformation used as described above.public boolean acceptSnapTarget(Graphics aGraphics, ILcdGXYContext aGXYContext)
Determines whether a snap target should be accepted or not. A snap target is accepted if the following conditions are met:
ILcd2DEditableShape
.ILcdPoint
whose coordinates are expressed in the
same coordinate system as the current objects coordinate system or the model to model
transformation can transform the point to a point in the objects coordinate system.acceptSnapTarget
in interface ILcdGXYEditor
aGraphics
- the graphics on which the snap target should be checked.aGXYContext
- the context in which the snap target should be checked.true
if the above conditions are met, false
otherwise.setModelModelTransformationClass(Class)
public ILcdGXYEditor getGXYEditor(Object aObject)
Object
. If this
Object
is not the same as the Object
set to this painter, the
setObject(Object)
method is called to update the object set to the painter.getGXYEditor
in interface ILcdGXYEditorProvider
aObject
- the object to be edited.Object
.public Object clone()
getIcon()
and getSelectionIcon()
) and the snap icon but shallow copies are made of the icon providers.clone
in interface ILcdCloneable
clone
in interface ILcdGXYEditorProvider
clone
in interface ILcdGXYPainterProvider
clone
in class ALcdGXYPainter
Object.clone()