Class TLcdGXYCompositeCurvePainter
- All Implemented Interfaces:
ILcdCloneable,ILcdDeepCloneable,ILcdPropertyChangeSource,ILcdGXYEditor,ILcdGXYEditorProvider,ILcdGXYPainter,ILcdGXYPainterProvider,ILcdGXYPathPainter,Serializable,Cloneable
ILcdCompositeCurve objects and enables visual editing of
ILcdCompositeCurve objects in an ILcdGXYView.
Painting an ILcdCompositeCurve
Body
This painter provides support for painting an ILcdCompositeCurve object. For each curve of the
composite curve, a painter is retrieved via the set
painter provider.
The retrieved painter is then used to discretize the corresponding ILcdCurve object.
Handles
This painter does not define a handle for ILcdCompositeCurve objects. However, the handles for
each individual ILcdCurve object are defined by the corresponding painter for that curve.
Snap targets
This painter will process all ILcdCurve objects in the ILcdCompositeCurve object
and tries to retrieve a snap target for each curve using the corresponding painter. The first snap target
that is found, is used as snap target for this TLcdGXYCompositeCurvePainter.
Styling options
The visualization of the ILcdCompositeCurve object is governed by the painter provider set to
this painter. The painter provider is responsible for providing
a painter to be used for painting each of the individual
ILcdCurve objects contained in the ILcdCompositeCurve object.
Note that this implementation assumes that a painter can be provided for each curve of the composite curve.
Locating an ILcdCompositeCurve in a view
Anchor point of an ILcdCompositeCurve
When the ILcdCompositeCurve object only contains one ILcdCurve object, the anchor
point of that object is used as anchor point for the composite curve. If more ILcdCurve objects
are available, the center point of the bounds, calculated by boundsSFCT, is used.
When is an ILcdCompositeCurve touched
The ILcdCompositeCurve object is touched when one of the ILcdCurve objects in the
composite curve is touched.
Visually editing and creating an ILcdCompositeCurve
Modifying an ILcdCompositeCurve
This implementation translates either the touched handle or the entire composite curve for
ILcdGXYEditor.TRANSLATED, and translates the touched sub curve if the user drags with
ILcdGXYEditor.RESHAPED. Note that this behavior relies on the sub curve painter's
isTouched method to distinguish between touching
the curve body and the handles.
Other edit operations are passed onto the first touched sub curve that is successfully edited.
For every shape that has to be edited, an
editor is retrieved via the set setCurveGXYEditorProvider(com.luciad.view.gxy.ILcdGXYEditorProvider). The retrieved editor
is then used to edit the corresponding ILcdCurve object.
Similarly to the painter provider, the editor provider is responsible
for providing an editor to be used for editing the individual
ILcdCurve objects contained in the ILcdCompositeCurve object.
Note that this implementation assumes that an editor can be provided for each shape of the composite curve.
Creating an ILcdCompositeCurve
When initializing an ILcdCompositeCurve object via interaction through the view, only the last curve
object is edited. The number of user interactions required to complete the initialization is defined by the
editor corresponding to the last ILcdCurve object.
Accepted snap targets
This painter accepts a snap target if at least one of the curve editors returned by the curve editor provider accepts the snap target.
- Since:
- 9.0
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intConstant value indicating that the anchor point should be chosen at the end point of the curve.static final intConstant value indicating that the anchor point should be chosen at the anchor point of the first possible curve.static final intConstant value indicating that the anchor point should be chosen as the focus point of the curve.static final intConstant value indicating that the anchor point should be chosen in the middle of the bounds, calculated byboundsSFCT.static final intConstant value indicating that the anchor point should be chosen at the middle of the curve.static final intConstant value indicating that the anchor point should be chosen as the anchor point of the only curve in the composite curve.static final intConstant value indicating that the anchor point should be chosen at the start point of the curve.Fields 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
ConstructorsConstructorDescriptionConstructs a defaultTLcdGXYCompositeCurvePainterand sets the display name to "CompositeCurve".TLcdGXYCompositeCurvePainter(ILcdGXYPainterProvider<ILcdGXYPathPainter> aCurveGXYPainterProvider, ILcdGXYEditorProvider aCurveGXYEditorProvider) Constructs a defaultTLcdGXYCompositeCurvePainterwith the specified painter and editor, and sets the display name to "CompositeCurve".TLcdGXYCompositeCurvePainter(ILcdGXYPainterProvider<ILcdGXYPathPainter> aCurveGXYPainterProvider, ILcdGXYEditorProvider aCurveGXYEditorProvider, ILcdCurveConnectorProvider aCurveConnectorProvider) Constructs a defaultTLcdGXYCompositeCurvePainterwith the specified painter, editor and connector provider, and sets the display name to "CompositeCurve". -
Method Summary
Modifier and TypeMethodDescriptionbooleanacceptSnapTarget(Graphics aGraphics, ILcdGXYContext aGXYContext) Determines whether a snap target should be accepted or not.voidanchorPointSFCT(Graphics aGraphics, int aRenderMode, ILcdGXYContext aGXYContext, Point aPointSFCT) Moves the specifiedaPointSFCTto the anchor point of theILcdCompositeCurveobject.booleanappendAWTPath(ILcdGXYContext aGXYContext, int aRenderMode, ILcdAWTPath aAWTPathSFCT) Appends a discretized representation in view coordinates to the given path.booleanappendGeneralPath(ILcdGXYContext aGXYContext, int aRenderMode, ILcdGeneralPath aGeneralPathSFCT) Appends a discretized representation in world coordinates to the given path.voidboundsSFCT(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.clone()MakesObject.clone()public.Returns a deep clone of this Object.booleanedit(Graphics aGraphics, int aRenderMode, ILcdGXYContext aGXYContext) This implementation translates either the touched handle or the entire composite curve forILcdGXYEditor.TRANSLATED, and translates the touched sub curve if the user drags withILcdGXYEditor.RESHAPED.intReturns the location of the anchor point (by default: ONE_CURVE_ANCHOR_POINT).intReturns the number of user interactions required to complete the initialization of theILcdCompositeCurveobject set to this editor.getCursor(Graphics aGraphics, int aRenderMode, ILcdGXYContext aGXYContext) Returns aCursorthat clarifies the render mode and context this painter is operating in.Returns the curve provider used to provider a curve connector for each shape inside the composite curve.Returns the editor provider used to provide an editor for each shape inside the composite curve.Returns the painter provider used to provide a painter for each shape inside the composite curve.getGXYEditor(Object aObject) Returns this instance as editor for editing the specifiedObject.Returns the line style used for painting the outline of the object.Returns the Object for which the representation is currently being handled by this painter.booleanisTouched(Graphics aGraphics, int aRenderMode, ILcdGXYContext aGXYContext) Returns whether one of theILcdCurveobjects inside theILcdCompositeCurveobject is touched.voidpaint(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.voidsetAnchorPointLocation(int aAnchorPointLocation) Sets the preferred anchor point location.voidsetCurveConnectorProvider(ILcdCurveConnectorProvider aCurveConnectorProvider) Sets a connector provider to ensure connectivity during editing operations.voidsetCurveGXYEditorProvider(ILcdGXYEditorProvider aCurveGXYEditorProvider) Sets the editor provider used to provide an editor for each shape inside the composite curve.voidsetCurveGXYPainterProvider(ILcdGXYPainterProvider<ILcdGXYPathPainter> aCurveGXYPainterProvider) Sets the painter provider used to provide a painter for each shape inside the composite curve.voidsetLineStyle(ILcdGXYPainterStyle aLineStyle) Sets the line style to use when painting the outline of the object.voidSets the Object for which the representation shall be handled by this painter.protected voidsetupGraphicsForLine(ILcdCompositeCurve aCurve, Graphics aGraphics, int aRenderMode, ILcdGXYContext aGXYContext) Called just before painting the composite curve on the specifiedGraphicsobject.snapTarget(Graphics aGraphics, ILcdGXYContext aGXYContext) Returns the first snap target that was found by the painters of the shapes inside theILcdCompositeCurveobject.booleansupportSnap(Graphics aGraphics, ILcdGXYContext aGXYContext) Supports snapping when at least one of the painters of the shapes inside theILcdCompositeCurveobject supports snapping.Methods inherited from class com.luciad.view.gxy.ALcdGXYPainter
addPropertyChangeListener, firePropertyChangeEvent, firePropertyChangeEvent, getDisplayName, getGXYPainter, isTraceOn, removePropertyChangeListener, setClassTraceOn, setDisplayName, setTraceOnMethods 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
-
Field Details
-
MIDDLE_OF_BOUNDS
public static final int MIDDLE_OF_BOUNDSConstant value indicating that the anchor point should be chosen in the middle of the bounds, calculated byboundsSFCT.- See Also:
-
FOCUS_POINT
public static final int FOCUS_POINTConstant value indicating that the anchor point should be chosen as the focus point of the curve. This focus point is first retrieved in model coordinates, and then transformed to view coordinates. If this point cannot be retrieved, theMIDDLE_OF_BOUNDSmethod is used.- See Also:
-
ONE_CURVE_ANCHOR_POINT
public static final int ONE_CURVE_ANCHOR_POINTConstant value indicating that the anchor point should be chosen as the anchor point of the only curve in the composite curve. If more than one curve exists in the composite curve, theMIDDLE_OF_BOUNDSmethod is used.- See Also:
-
FIRST_POSSIBLE_CURVE_ANCHOR_POINT
public static final int FIRST_POSSIBLE_CURVE_ANCHOR_POINTConstant value indicating that the anchor point should be chosen at the anchor point of the first possible curve. If this point is invalid, then the second curve is used, and so on... If no valid anchor point can be found, theMIDDLE_OF_BOUNDSmethod is used.- See Also:
-
START_OF_CURVE
public static final int START_OF_CURVEConstant value indicating that the anchor point should be chosen at the start point of the curve. This start point is first retrieved in model coordinates, and then transformed to view coordinates. If this point cannot be retrieved, theMIDDLE_OF_BOUNDSmethod is used.- See Also:
-
MIDDLE_OF_CURVE
public static final int MIDDLE_OF_CURVEConstant value indicating that the anchor point should be chosen at the middle of the curve. The middle is first retrieved in model coordinates, and then transformed to view coordinates. If this point cannot be retrieved, theMIDDLE_OF_BOUNDSmethod is used.- See Also:
-
END_OF_CURVE
public static final int END_OF_CURVEConstant value indicating that the anchor point should be chosen at the end point of the curve. This end point is first retrieved in model coordinates, and then transformed to view coordinates. If this point cannot be retrieved, theMIDDLE_OF_BOUNDSmethod is used.- See Also:
-
-
Constructor Details
-
TLcdGXYCompositeCurvePainter
public TLcdGXYCompositeCurvePainter()Constructs a defaultTLcdGXYCompositeCurvePainterand sets the display name to "CompositeCurve". The painter provider and the editor provider are not initialized and are required to be set using the methodssetCurveGXYPainterProvider(com.luciad.view.gxy.ILcdGXYPainterProvider)andsetCurveGXYEditorProvider(com.luciad.view.gxy.ILcdGXYEditorProvider)respectively.To ensure connectivity of the composite curve during editing operations, an instance of
TLcdDefaultCurveConnectorProvideris used asILcdCurveConnectorProvider. Custom implementations can be set throughsetCurveConnectorProvider(com.luciad.shape.constraints.ILcdCurveConnectorProvider).- See Also:
-
TLcdGXYCompositeCurvePainter
public TLcdGXYCompositeCurvePainter(ILcdGXYPainterProvider<ILcdGXYPathPainter> aCurveGXYPainterProvider, ILcdGXYEditorProvider aCurveGXYEditorProvider) Constructs a defaultTLcdGXYCompositeCurvePainterwith the specified painter and editor, and sets the display name to "CompositeCurve".To ensure connectivity of the composite curve during editing operations, an instance of
TLcdDefaultCurveConnectorProvideris used asILcdCurveConnectorProvider. Custom implementations can be set throughsetCurveConnectorProvider(com.luciad.shape.constraints.ILcdCurveConnectorProvider).- Parameters:
aCurveGXYPainterProvider- the painter provider for theILcdCurveobjects inside theILcdCompositeCurveobject.aCurveGXYEditorProvider- the editor provider for theILcdCurveobjects inside theILcdCompositeCurveobject.
-
TLcdGXYCompositeCurvePainter
public TLcdGXYCompositeCurvePainter(ILcdGXYPainterProvider<ILcdGXYPathPainter> aCurveGXYPainterProvider, ILcdGXYEditorProvider aCurveGXYEditorProvider, ILcdCurveConnectorProvider aCurveConnectorProvider) Constructs a defaultTLcdGXYCompositeCurvePainterwith the specified painter, editor and connector provider, and sets the display name to "CompositeCurve".- Parameters:
aCurveGXYPainterProvider- the painter provider for theILcdCurveobjects inside theILcdCompositeCurveobject.aCurveGXYEditorProvider- the editor provider for theILcdCurveobjects inside theILcdCompositeCurveobject.aCurveConnectorProvider- the connector provider to ensure connectivity of the composite curve during editing operations.
-
-
Method Details
-
getAnchorPointLocation
public int getAnchorPointLocation()Returns the location of the anchor point (by default: ONE_CURVE_ANCHOR_POINT). -
setAnchorPointLocation
public void setAnchorPointLocation(int aAnchorPointLocation) Sets the preferred anchor point location.- Parameters:
aAnchorPointLocation- one ofMIDDLE_OF_BOUNDS,FOCUS_POINT,ONE_CURVE_ANCHOR_POINT,FIRST_POSSIBLE_CURVE_ANCHOR_POINT,START_OF_CURVE,MIDDLE_OF_CURVE,END_OF_CURVE.
-
paint
Displays the representation of the object in the given mode on the Graphics passed, taking into account the context passed.This implementation will retrieve a painter for all
ILcdCurveobjects inside theILcdCompositeCurveobject using the set painter provider and will use that painter to paint the corresponding shape.- Specified by:
paintin interfaceILcdGXYPainter- Parameters:
aGraphics- The graphics to paint the object on.aRenderMode- The mode to render the object in.aGXYContext- The context to render the object in.
-
getGXYEditor
Returns this instance as editor for editing the specifiedObject. If thisObjectis not the same as theObjectset to this painter, thesetObject(Object)method is called to update the object set to the painter.- Specified by:
getGXYEditorin interfaceILcdGXYEditorProvider- Parameters:
aObject- the object to be edited.- Returns:
- this instance as editor for editing the specified
Object.
-
setObject
Description copied from interface:ILcdGXYPainterSets the Object for which the representation shall be handled by this painter.Setting the object on the painter may have an effect on the internal state of the painter, for example, the color to use.
When the object is set to a painter, the context parameter in subsequent calls to methods in this class must contain a layer that contains this object and for which the painter for this object is this painter.
- Specified by:
setObjectin interfaceILcdGXYEditor- Specified by:
setObjectin interfaceILcdGXYPainter- Parameters:
aObject- the object for which the representation shall be handled by this painter.- See Also:
-
setLineStyle
Sets the line style to use when painting the outline of the object. Note that this property can be set tonull.- Parameters:
aLineStyle- the line style to use when painting the outline of the object.- See Also:
-
getLineStyle
Returns the line style used for painting the outline of the object. Note that this method can returnnull.- Returns:
- the line style used for painting the outline of the object.
- See Also:
-
setupGraphicsForLine
protected void setupGraphicsForLine(ILcdCompositeCurve aCurve, Graphics aGraphics, int aRenderMode, ILcdGXYContext aGXYContext) Called just before painting the composite curve on the specified
Graphicsobject. It can be redefined in order to set specificGraphicsproperties likeColor, etc...This implementation calls
ILcdGXYPainterStyle.setupGraphics(java.awt.Graphics, java.lang.Object, int, com.luciad.view.gxy.ILcdGXYContext)on the lineStyle property if a line style has been set to this instance.- Parameters:
aCurve- The curve to paint.aGraphics- The graphics to paint the object on.aRenderMode- The mode to render the object in.aGXYContext- The context to render the object in.
-
getObject
Description copied from interface:ILcdGXYPainterReturns the Object for which the representation is currently being handled by this painter.- Specified by:
getObjectin interfaceILcdGXYEditor- Specified by:
getObjectin interfaceILcdGXYPainter- Returns:
- the Object for which the representation is currently being handled by this painter.
- See Also:
-
setCurveGXYPainterProvider
public void setCurveGXYPainterProvider(ILcdGXYPainterProvider<ILcdGXYPathPainter> aCurveGXYPainterProvider) Sets the painter provider used to provide a painter for each shape inside the composite curve.- Parameters:
aCurveGXYPainterProvider- the painter provider for theILcdCurveobjects inside theILcdCompositeCurveobject.- See Also:
-
getCurveGXYPainterProvider
Returns the painter provider used to provide a painter for each shape inside the composite curve.- Returns:
- the painter provider used to provide a painter for each shape inside the composite curve.
- See Also:
-
setCurveGXYEditorProvider
Sets the editor provider used to provide an editor for each shape inside the composite curve.- Parameters:
aCurveGXYEditorProvider- the editor provider for theILcdCurveobjects inside theILcdCompositeCurveobject.- See Also:
-
getCurveGXYEditorProvider
Returns the editor provider used to provide an editor for each shape inside the composite curve.- Returns:
- the editor provider used to provide an editor for each shape inside the composite curve.
- See Also:
-
setCurveConnectorProvider
Sets a connector provider to ensure connectivity during editing operations.- Parameters:
aCurveConnectorProvider- a connector provider that returns a connector for the curve types encountered in every composite curve.- See Also:
-
getCurveConnectorProvider
Returns the curve provider used to provider a curve connector for each shape inside the composite curve.- Returns:
- the curve provider used to provider a curve connector for each shape inside the composite curve.
- See Also:
-
anchorPointSFCT
public void anchorPointSFCT(Graphics aGraphics, int aRenderMode, ILcdGXYContext aGXYContext, Point aPointSFCT) throws TLcdNoBoundsException Moves the specified
aPointSFCTto the anchor point of theILcdCompositeCurveobject. If the composite curve only contains one object, the anchor point of that object is used. When more shapes are available in the composite curve, the center point of the bounds, calculated byboundsSFCT, is used- Specified by:
anchorPointSFCTin interfaceILcdGXYPainter- Overrides:
anchorPointSFCTin classALcdGXYPainter- Parameters:
aGraphics- The graphics to paint the object on.aRenderMode- The mode to render the object in.aGXYContext- The context to render the object in.aPointSFCT- The point that needs to be updated.- Throws:
TLcdNoBoundsException- if theILcdCompositeCurveobject doesn't have a valid anchor point, e.g. if it is always invisible in the current projection.- See Also:
-
supportSnap
Supports snapping when at least one of the painters of the shapes inside the
ILcdCompositeCurveobject supports snapping.- Specified by:
supportSnapin interfaceILcdGXYPainter- Overrides:
supportSnapin classALcdGXYPainter- Parameters:
aGraphics- the graphics on which is worked.aGXYContext- the context of the snapping.- Returns:
trueif one of the painters for the shapes inside theILcdCompositeCurveobject supports snapping,falseotherwise.
-
snapTarget
Returns the first snap target that was found by the painters of the shapes inside the
ILcdCompositeCurveobject. If no point was touched,nullwill be returned.- Specified by:
snapTargetin interfaceILcdGXYPainter- Overrides:
snapTargetin classALcdGXYPainter- Parameters:
aGraphics- the graphics on which is worked.aGXYContext- the context of the snapping.- Returns:
- the first snap target that was found by the painters of the shapes inside the
ILcdCompositeCurveobject,nullotherwise. - See Also:
-
boundsSFCT
public void boundsSFCT(Graphics aGraphics, int aRenderMode, ILcdGXYContext aGXYContext, ILcd2DEditableBounds aBoundsSFCT) throws TLcdNoBoundsException 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
ILcdBoundedobjects.- Specified by:
boundsSFCTin interfaceILcdGXYPainter- Parameters:
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.- Throws:
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.- See Also:
-
getCursor
Returns aCursorthat clarifies the render mode and context this painter is operating in. When no specificCursoris required,nullis returned.- Specified by:
getCursorin interfaceILcdGXYPainter- Overrides:
getCursorin classALcdGXYPainter- Parameters:
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.- Returns:
- a cursor to indicate the type of operating mode and context. Returns
nullif no particular cursor is required.
-
edit
This implementation translates either the touched handle or the entire composite curve for
ILcdGXYEditor.TRANSLATED, and translates the touched sub curve if the user drags withILcdGXYEditor.RESHAPED. Note that this behavior relies on the sub curve painter'sisTouchedmethod to distinguish between touching the curvebodyand thehandles. Other edit operations are passed onto the first touched sub curve that is successfully edited. For every shape that has to be edited, an editor is retrieved via the seteditor provider. The retrieved editor is then used to edit the correspondingILcdCurveobject.In the creation render modes, only the last
ILcdCurveobject is edited.- Specified by:
editin interfaceILcdGXYEditor- Parameters:
aGraphics- The graphics to edit the object on.aRenderMode- The mode to render the object in.aGXYContext- The context to render the object in.- Returns:
- true if the object has changed when this method returns, false otherwise.
- See Also:
-
getCreationClickCount
public int getCreationClickCount()Returns the number of user interactions required to complete the initialization of theILcdCompositeCurveobject set to this editor. This method will return the number of user interactions required by the editor corresponding to the lastILcdCurveobject.- Specified by:
getCreationClickCountin interfaceILcdGXYEditor- Returns:
- the number of user interactions required by the editor corresponding to the last
ILcdCurveobject.
-
acceptSnapTarget
Determines whether a snap target should be accepted or not. A snap target is accepted if at least one of the curve editors returned by the curve editor provider accepts the snap target.
- Specified by:
acceptSnapTargetin 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:
trueif at least one of the curve editors returned by the curve editor provider accepts the snap target,falseotherwise.- See Also:
-
isTouched
Returns whether one of theILcdCurveobjects inside theILcdCompositeCurveobject is touched.- Specified by:
isTouchedin interfaceILcdGXYPainter- Parameters:
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.- Returns:
- whether one of the
ILcdCurveobjects inside theILcdCompositeCurveobject is touched. - See Also:
-
appendAWTPath
Description copied from interface:ILcdGXYPathPainterAppends a discretized representation in view coordinates to the given path.- Specified by:
appendAWTPathin interfaceILcdGXYPathPainter- Parameters:
aGXYContext- the graphics contextaRenderMode- the rendering modeaAWTPathSFCT- the path to append to- Returns:
- true if a discretization of the shape could be successfully appended to the path
-
appendGeneralPath
public boolean appendGeneralPath(ILcdGXYContext aGXYContext, int aRenderMode, ILcdGeneralPath aGeneralPathSFCT) Description copied from interface:ILcdGXYPathPainterAppends a discretized representation in world coordinates to the given path.- Specified by:
appendGeneralPathin interfaceILcdGXYPathPainter- Parameters:
aGXYContext- the graphics contextaRenderMode- the rendering modeaGeneralPathSFCT- the path to append to- Returns:
- true if a discretization of the shape could be successfully appended to the path
-
clone
Description copied from interface:ILcdDeepCloneableReturns a deep clone of this Object. An object dictionary is used to keep track of all objects of the original Object graph, for which a clone has already been created. The dictionary should be ajava.util.Map, using reference-equality instead of object-equality when comparing keys (such as thejava.util.IdentityHashMap). It contains as keys the objects in the original object graph that have already been cloned, and as values their corresponding clone. The Object returned by this method should fulfill the following conditions, as specified in the generalObject.clone()contract:this.clone(aObjectDictionary) != thisthis.clone(aObjectDictionary).getClass() == this.getClass()this.clone(aObjectDictionary).equals(this)
- If a clone of this Object already exists in the object dictionary before this
clonemethod is called, this method shall return that clone:aObjectDictionary.get(this) == null || aObjectDictionary.get(this) == this.clone(aObjectDictionary) - The object dictionary shall contain the resulting clone, after this
clone method has completed:this.clone(aObjectDictionary) == aObjectDictionary.get(this)
- Specified by:
clonein interfaceILcdDeepCloneable- Parameters:
aObjectDictionary- the Object dictionary that keeps track of the objects for which a clone has already been made, and their corresponding clone Object.- Returns:
- a deep clone of this Object that fulfills the conditions described above.
-
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 classALcdGXYPainter- Returns:
- a clone of this painter provider.
- See Also:
-