Class TLcdSLDFeatureTypeStylePainter

java.lang.Object
com.luciad.ogc.sld.view.gxy.ALcdSLDFeatureTypeStylePainter
com.luciad.ogc.sld.view.gxy.TLcdSLDFeatureTypeStylePainter
All Implemented Interfaces:
ILcdCloneable, ILcdPropertyChangeSource, ILcdGXYEditor, ILcdGXYEditorProvider, ILcdGXYLabelPainter, ILcdGXYLabelPainter2, ILcdGXYLabelPainterProvider, ILcdGXYMultiLabelPainter, ILcdGXYPainter, ILcdGXYPainterProvider, Serializable, Cloneable

public class TLcdSLDFeatureTypeStylePainter extends ALcdSLDFeatureTypeStylePainter implements ILcdGXYLabelPainter2, ILcdGXYEditor, ILcdGXYEditorProvider
An ALcdSLDFeatureTypeStylePainter that
  • checks whether the scale of the view it is painting is valid for the object set to it,
  • delegates to its rule painters for objects that are accepted by the rule painters for all of its ILcdGXYPainter functionalities (paint, isTouched, boundsSFCT, ...),
  • delegates to its rule painters for objects that are accepted by the rule painters for all of its ILcdGXYLabelPainter functionalities (paintLabel, labelBoundsSFCT, ...).
See Also:
  • Constructor Details

    • TLcdSLDFeatureTypeStylePainter

      public TLcdSLDFeatureTypeStylePainter(String aFeatureTypeName, ALcdSLDRulePainter[] aRulePainters)
  • Method Details

    • isScaleValid

      public boolean isScaleValid(ILcdGXYView aView)
      Checks whether one of the rule painters accepts the scale in the view passed.
      Parameters:
      aView - the view the scale is derived from.
      Returns:
      true when one of the rule painters contained accepts the scale.
    • setObject

      public void setObject(Object aObject)
      Sets the object to all of the rule painters that accept this object.
      Specified by:
      setObject in interface ILcdGXYEditor
      Specified by:
      setObject in interface ILcdGXYLabelPainter
      Specified by:
      setObject in interface ILcdGXYLabelPainter2
      Specified by:
      setObject in interface ILcdGXYPainter
      Parameters:
      aObject - the object to be rendered.
      See Also:
    • accept

      protected boolean accept(Object aObject)
      Checks whether the feature type style in this painter should be applied to the given object. This implementation always returns true.
      Specified by:
      accept in class ALcdSLDFeatureTypeStylePainter
      Parameters:
      aObject - the object to check the feature type name for.
      Returns:
      true. This implementation accepts all objects.
    • getObject

      public Object getObject()
      Returns the object set to this painter.
      Specified by:
      getObject in interface ILcdGXYEditor
      Specified by:
      getObject in interface ILcdGXYLabelPainter
      Specified by:
      getObject in interface ILcdGXYPainter
      Returns:
      the object set to this painter.
      See Also:
    • setEditTouchedOnly

      public final void setEditTouchedOnly(boolean aEditTouchedOnly)
      Determines whether only the geometries that touched are edited or whether all geometries should be edited. By default, this property is set to false.
      Parameters:
      aEditTouchedOnly - a flag indicating whether only the touched geometries are edited or all geometries.
      See Also:
    • isEditTouchedOnly

      public final boolean isEditTouchedOnly()
      Returns whether only the touched geometries objects should be edited or all of them.
      Returns:
      whether only the touched geometries should be edited or all of them.
      See Also:
    • edit

      public boolean edit(Graphics aGraphics, int aMode, ILcdGXYContext aGXYContext)
      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 and getY contain the location(s) of the user interaction. The methods getDeltaX and getDeltaY contain the distance(s) over which the user interaction is taking place. For example, getX and getY may contain the current mouse location while getDeltaX and getDeltaY 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 interface ILcdGXYEditor
      Parameters:
      aGraphics - the Graphics on which the representation of the object is painted
      aMode - indicates how the user interaction should be interpreted. Is one of the following:
      • TRANSLATED,
      • RESHAPED,
      • START_CREATION,
      • CREATING,
      • END_CREATION.
      aGXYContext - contains information on the user interaction and the transformations to transform from view space to the object model space.
      Returns:
      true if the object has changed when this method returns, false otherwise.
      See Also:
    • getCreationClickCount

      public int getCreationClickCount()
      Description copied from interface: ILcdGXYEditor
      Returns the number user interactions required to complete the initialization of an object set to this editor. For example, for a circle this can be two: one to determine the center point of the circle and one to determine the radius of the circle. A negative number indicates that there is no upper limit to the number of user interactions. For example, for a polyline this could be -2: it requires a minimum of two clicks to establish a polyline, but there is no upper limit on the number of polyline points.
      Specified by:
      getCreationClickCount in interface ILcdGXYEditor
      Returns:
      the number of user interactions required to initialize the object set to this editor.
    • acceptSnapTarget

      public boolean acceptSnapTarget(Graphics aGraphics, ILcdGXYContext aGXYContext)
      Description copied from interface: ILcdGXYEditor
      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 the edit 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 X and Y coordinates, and the distance in X direction and distance in Y direction over which the user interaction is taking place. For example, getX and getY may contain the current mouse location while getDeltaX and getDeltaY contain the distance over which the mouse has been dragged. The context also contains the candidate snap target and the layer the snap target is contained in.

      Specified by:
      acceptSnapTarget in interface ILcdGXYEditor
      Parameters:
      aGraphics - the Graphics on which the representation of the object is painted
      aGXYContext - the context containing the information on the user interaction and the snap target.
      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.
      See Also:
    • paint

      public void paint(Graphics aGraphics, int aPainterMode, ILcdGXYContext aGXYContext)
      Delegates the painting to the rule painters that accept the object and for which the views scale is in range.
      Specified by:
      paint in interface ILcdGXYPainter
      Parameters:
      aGraphics - the Graphics on which the representation of the object is painted
      aPainterMode - the mode the object is represented in (see class documentation).
      aGXYContext - the ILcdGXYContext the drawing depends on.
    • boundsSFCT

      public void boundsSFCT(Graphics aGraphics, int aPaintMode, ILcdGXYContext aGXYContext, ILcd2DEditableBounds a2DEditableBounds) throws TLcdNoBoundsException
      Delegates computation of the bounds to all rule painters that accept the object and for the which the views scale is in range. The result is the union of all the bounds computed by the above rule painters.
      Specified by:
      boundsSFCT in interface ILcdGXYPainter
      Parameters:
      aGraphics - the Graphics on which the representation of the object is painted
      aPaintMode - the mode the object is represented in (see class documentation). For example, an object may be represented differently in SELECTED mode compared to DEFAULT mode. The returned bounds of the representation must take this different representation into account.
      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.
      a2DEditableBounds - the bounds that must be adapted to encompass the representation of the object in the given mode and context. These bounds must not be taken into account when the method has thrown an exception.
      Throws:
      TLcdNoBoundsException - when no rule painter accepted this object and was in range or when the rule painters will render nothing for the given object.
      See Also:
    • isTouched

      public boolean isTouched(Graphics aGraphics, int aPainterMode, ILcdGXYContext aGXYContext)
      Delegates to the rule painters which accept this object and for which the views scale is in range.
      Specified by:
      isTouched in interface ILcdGXYPainter
      Parameters:
      aGraphics - the Graphics on which the representation of the object is painted
      aPainterMode - the mode the object is represented in
      aGXYContext - contains the location of the interaction and the transformations to convert this location into model coordinates
      Returns:
      true if at least one of the rule painters above returns true, false otherwise.
      See Also:
    • anchorPointSFCT

      public void anchorPointSFCT(Graphics aGraphics, int aPainterMode, ILcdGXYContext aGXYContext, Point aPoint) throws TLcdNoBoundsException
      Delegates computation of the anchor point to the first of its rule painters that is valid in the given scale, accepts the object and does not throw a TLcdNoBoundsException.
      Specified by:
      anchorPointSFCT in interface ILcdGXYPainter
      Parameters:
      aGraphics - the Graphics on which the representation of the object is painted
      aPainterMode - 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.
      aPoint - 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.
      Throws:
      TLcdNoBoundsException - when no rule painters are valid in the given context, or when all rule painters which are in scale throw a TLcdNoBoundsException.
      See Also:
    • getDisplayName

      public String getDisplayName()
      Always returns "Feature Type Style Painter".
      Specified by:
      getDisplayName in interface ILcdGXYEditor
      Specified by:
      getDisplayName in interface ILcdGXYLabelPainter2
      Specified by:
      getDisplayName in interface ILcdGXYPainter
      Returns:
      "Feature Type Style Painter"
    • setLocationIndex

      public void setLocationIndex(int aLocationIndex)
      Sets a location index to all rules which accept the object, regardless of the scale of the view. The location index per rule is computed based on the order of the rule and the possible location count of the rule.
      Specified by:
      setLocationIndex in interface ILcdGXYLabelPainter
      Parameters:
      aLocationIndex -
      See Also:
    • getLocationIndex

      public int getLocationIndex()
      Retrieves a location index, based on the location indices of all the rules that could accept the object, regardless of the scale.
      Specified by:
      getLocationIndex in interface ILcdGXYLabelPainter
      Returns:
      the location index based on the location index of the rules which accept the object, regardless of the scale.
      See Also:
    • paintLabel

      public void paintLabel(Graphics aGraphics, int aLabelPainterMode, ILcdGXYContext aGXYContext)
      Delegates the label painting to the rule painters that accept the object and for which the views scale is in range.
      Specified by:
      paintLabel in interface ILcdGXYLabelPainter
      Specified by:
      paintLabel in interface ILcdGXYLabelPainter2
      Parameters:
      aGraphics - The graphics object to paint the label on
      aLabelPainterMode - A bitwise combination of
      aGXYContext - the drawing context for the label
      See Also:
    • getPossibleLocationCount

      public int getPossibleLocationCount(Graphics aGraphics)
      Returns the result of the multiplication of the possible location count for all applicable rules.
      Specified by:
      getPossibleLocationCount in interface ILcdGXYLabelPainter
      Parameters:
      aGraphics - the Graphics to render labels on.
      Returns:
      the result of the multiplication of the possible location count for all applicable rules.
      See Also:
    • labelBoundsSFCT

      public double labelBoundsSFCT(Graphics aGraphics, int aLabelPainterMode, ILcdGXYContext aGXYContext, Rectangle aRectangle) throws TLcdNoBoundsException
      Delegates computation of the label bounds to the rule painters which accept the object set and for which the view in the context is in scale range. The result is the union of all label bounds returned by the rule label painters taking into account the rotation. The rotation of the resulting bounds is 0. If there is only one applicable rule, the label bounds of that rule are returned, in which case the rotation might be different from 0.
      Specified by:
      labelBoundsSFCT in interface ILcdGXYLabelPainter
      Specified by:
      labelBoundsSFCT in interface ILcdGXYLabelPainter2
      Parameters:
      aGraphics - the graphics the label will be rendered on.
      aLabelPainterMode - the label painter mode, default or selected.
      aGXYContext - the context in which the label should be rendered.
      aRectangle - the rectangle to modify to store the result in.
      Returns:
      the rotation that should be applied to the rectangle.
      Throws:
      TLcdNoBoundsException - when no rules apply, or when all rules that apply throw a TLcdNoBoundsException.
      See Also:
    • getGXYLabelPainter

      public ILcdGXYLabelPainter getGXYLabelPainter(Object aObject)
      Always returns this as label painter.
      Specified by:
      getGXYLabelPainter in interface ILcdGXYLabelPainterProvider
      Parameters:
      aObject - the object to return a label painter for.
      Returns:
      always itself.
    • supportSnap

      public boolean supportSnap(Graphics aGraphics, ILcdGXYContext aGXYContext)
      Delegates to the rule painters which accept the object and for which the view is in scale range.
      Specified by:
      supportSnap in interface ILcdGXYPainter
      Parameters:
      aGraphics - the Graphics on which the representation of the object is painted
      aGXYContext - the context in which this object is represented and in which the editing of an object occurs.
      Returns:
      true if at least one of the rule painters which accepts the object and for which the view is in scale range supports snapping. false otherwise.
    • snapTarget

      public Object snapTarget(Graphics aGraphics, ILcdGXYContext aGXYContext)
      Delegates to the first rule painter which accepts the object, for which the view is in scale range and which returns a non null snap target.
      Specified by:
      snapTarget in interface ILcdGXYPainter
      Parameters:
      aGraphics - the Graphics on which the representation of the object is painted
      aGXYContext - the context in which this object is represented and in which the editing of an object occurs.
      Returns:
      the snap target of the first rule painter which accepts the object, for which the view is in scale range and which returns a non null snap target. Null if all rule painters for which the view is in scale range and which accept the object return null.
      See Also:
    • getCursor

      public Cursor getCursor(Graphics aGraphics, int aPainterMode, ILcdGXYContext aGXYContext)
      Feature type style painters do not provide cursors.
      Specified by:
      getCursor in interface ILcdGXYPainter
      Parameters:
      aGraphics - the Graphics on which the representation of the object is painted
      aPainterMode - the rendering mode to return the cursor for.
      aGXYContext - the context in which the rendering occurs.
      Returns:
      always null.
    • addPropertyChangeListener

      public void addPropertyChangeListener(PropertyChangeListener aPropertyChangeListener)
      Feature type style painters do not support property change events.
      Specified by:
      addPropertyChangeListener in interface ILcdPropertyChangeSource
      Parameters:
      aPropertyChangeListener - is ignored.
      See Also:
    • removePropertyChangeListener

      public void removePropertyChangeListener(PropertyChangeListener aPropertyChangeListener)
      Feature type style painters do not support property change events.
      Specified by:
      removePropertyChangeListener in interface ILcdPropertyChangeSource
      Parameters:
      aPropertyChangeListener - is ignored.
      See Also:
    • getGXYPainter

      public ILcdGXYPainter getGXYPainter(Object aObject)
      Always returns this as painter.
      Specified by:
      getGXYPainter in interface ILcdGXYPainterProvider
      Parameters:
      aObject - the object to retrieve a painter for.
      Returns:
      this.
    • getGXYEditor

      public ILcdGXYEditor getGXYEditor(Object aObject)
      Always returns this as editor.
      Specified by:
      getGXYEditor in interface ILcdGXYEditorProvider
      Parameters:
      aObject - the object to retrieve an editor for.
      Returns:
      this
      Since:
      2024.0
    • clone

      public Object clone()
      Description copied from class: ALcdSLDFeatureTypeStylePainter
      Calls super.clone and makes a deep clone of the collection of rule painters.
      Specified by:
      clone in interface ILcdCloneable
      Specified by:
      clone in interface ILcdGXYEditorProvider
      Specified by:
      clone in interface ILcdGXYLabelPainter
      Specified by:
      clone in interface ILcdGXYLabelPainter2
      Specified by:
      clone in interface ILcdGXYLabelPainterProvider
      Specified by:
      clone in interface ILcdGXYPainterProvider
      Overrides:
      clone in class ALcdSLDFeatureTypeStylePainter
      Returns:
      a clone of the current painter.
      See Also:
    • setLabelIndex

      public void setLabelIndex(int aLabelIndex)
      Description copied from interface: ILcdGXYMultiLabelPainter

      Sets the label. The results of any subsequent method calls to ILcdGXYLabelPainter.paintLabel(java.awt.Graphics, int, com.luciad.view.gxy.ILcdGXYContext) and ILcdGXYLabelPainter.labelBoundsSFCT(java.awt.Graphics, int, com.luciad.view.gxy.ILcdGXYContext, java.awt.Rectangle) etc. will apply to the label and sublabel indicated by this label index.

      Specified by:
      setLabelIndex in interface ILcdGXYMultiLabelPainter
      Parameters:
      aLabelIndex - The label index. This should be larger than or equal to 0 and less than the result ILcdGXYMultiLabelPainter.getLabelCount(java.awt.Graphics, com.luciad.view.gxy.ILcdGXYContext).
      See Also:
    • getLabelIndex

      public int getLabelIndex()
      Description copied from interface: ILcdGXYMultiLabelPainter
      Returns the index of the label that is currently painted or scheduled to paint.
      Specified by:
      getLabelIndex in interface ILcdGXYMultiLabelPainter
      Returns:
      the index of the label that is currently painted or scheduled to paint.
      See Also:
    • getLabelCount

      public int getLabelCount(Graphics aGraphics, ILcdGXYContext aGXYContext)
      Description copied from interface: ILcdGXYMultiLabelPainter

      Returns the number of labels for the object set to this label painter.

      Note: when returning multiple (moveable) labels for the same object, it might be useful to use TLcdGXYEditControllerModel2.EDIT_WHAT_FIRST_TOUCHED_LABEL to avoid that a mouse drag moves them all together.
      Specified by:
      getLabelCount in interface ILcdGXYMultiLabelPainter
      Parameters:
      aGraphics - The Graphics currently painting on
      aGXYContext - The ILcdGXYContext currently valid
      Returns:
      The number of label for the given object.
    • getSubLabelIndex

      public int getSubLabelIndex()
      Description copied from interface: ILcdGXYMultiLabelPainter
      Returns the index of the sublabel to paint.
      Specified by:
      getSubLabelIndex in interface ILcdGXYMultiLabelPainter
      Returns:
      the index of the sublabel to paint.
      See Also:
    • setSubLabelIndex

      public void setSubLabelIndex(int aSubLabelIndex)
      Description copied from interface: ILcdGXYMultiLabelPainter
      Sets the sublabel index. The results of any subsequent method calls to ILcdGXYLabelPainter.paintLabel(java.awt.Graphics, int, com.luciad.view.gxy.ILcdGXYContext) and ILcdGXYLabelPainter.labelBoundsSFCT(java.awt.Graphics, int, com.luciad.view.gxy.ILcdGXYContext, java.awt.Rectangle) etc. will apply to the label and sublabel indicated by this sublabel index.
      Specified by:
      setSubLabelIndex in interface ILcdGXYMultiLabelPainter
      Parameters:
      aSubLabelIndex - The sub label index. This should be larger than or equal to 0 and less than the result ILcdGXYMultiLabelPainter.getSubLabelCount(int).
      See Also:
    • getSubLabelCount

      public int getSubLabelCount(int aLabelIndex)
      Description copied from interface: ILcdGXYMultiLabelPainter
      Return the number of sublabels in a label. The value should be 1 or higher.
      Specified by:
      getSubLabelCount in interface ILcdGXYMultiLabelPainter
      Parameters:
      aLabelIndex - the index of the label.
      Returns:
      The number of sublabels of the label with the given index.
    • setLabelLocation

      public void setLabelLocation(TLcdLabelLocation aLabelLocation)
      Description copied from interface: ILcdGXYLabelPainter2

      Sets the label location of the label. This label location will be used to determine what the bounds of the label are, where it must be painted, etc.

      Note that aLabelLocation also contains a label location index. This is independent of the ILcdGXYLabelPainter.getLocationIndex() of the super interface. Contrary to the location index returned by getLocationIndex, the location index in aLabelLocation can be less than 0, in which case the labels are freely placed.

      This method has to be called after ILcdGXYLabelPainter2.setObject(java.lang.Object) has been called, as calling setObject clears this label location.

      Specified by:
      setLabelLocation in interface ILcdGXYLabelPainter2
      Parameters:
      aLabelLocation - The TLcdLabelLocation instance containing all the information about the location of the label.
      See Also:
    • getLabelLocation

      public TLcdLabelLocation getLabelLocation()
      Description copied from interface: ILcdGXYLabelPainter2
      Returns the TLcdLabelLocation that was previously set that contains the information on the whereabouts of the label.
      Specified by:
      getLabelLocation in interface ILcdGXYLabelPainter2
      Returns:
      The label location that was previously set.
      See Also:
    • isLabelTouched

      public boolean isLabelTouched(Graphics aGraphics, int aMode, ILcdGXYContext aGXYContext)
      Description copied from interface: ILcdGXYLabelPainter2
      Tests if the label specified by setObject, setLabelIndex and setSubLabelIndex is touched at view location (specified by aGXYContext.getX() and aGXYContext.getY()), considering the mode and the ILcdGXYContext instance.

      Before calling this method, the domain object, the label index, the sublabel index and the location of the label should be set using the respective methods.

      Specified by:
      isLabelTouched in interface ILcdGXYLabelPainter2
      Parameters:
      aGraphics - The Graphics instance on which the label is painted.
      aMode - the mode to consider. This is a bitwise combinations of several constants. See ILcdGXYLabelPainter2.paintLabel(java.awt.Graphics, int, com.luciad.view.gxy.ILcdGXYContext) for more information.
      aGXYContext - the ILcdGXYContext to consider.
      Returns:
      true if the representation of the Object returned by getObject() is touched, false otherwise
      See Also:
    • labelAnchorPointSFCT

      public void labelAnchorPointSFCT(Graphics aGraphics, int aMode, ILcdGXYContext aGXYContext, Point aPointSFCT) throws TLcdNoBoundsException
      Description copied from interface: ILcdGXYLabelPainter2

      Sets aPointSFCT to the anchor point of the label specified by setObject, setLabelIndex and setSubLabelIndex.

      If the location index is less than 0, the label anchor point is unambiguously determined by the label location. The actual label is to be painted somewhere around this anchor point. This method is typically called to compare the result with the label bounds, thus determining the exact relation between the label and its location.

      Before calling this method, the domain object, the label index, the sublabel index and the location of the label should be set using the respective methods.

      Specified by:
      labelAnchorPointSFCT in interface ILcdGXYLabelPainter2
      Parameters:
      aGraphics - The Graphics instance on which the label is painted.
      aMode - The mode to consider. This can be a bitwise combination of several constants. See ILcdGXYLabelPainter2.paintLabel(java.awt.Graphics, int, com.luciad.view.gxy.ILcdGXYContext) for more information.
      aGXYContext - The ILcdGXYContext that can be used to retrieve extra information.
      aPointSFCT - The point which will be updated to reflect the location of the anchor point.
      Throws:
      TLcdNoBoundsException - if the Object doesn't have any valid anchor point, e.g. if it is always invisible in the current projection.
      See Also:
    • supportLabelSnap

      public boolean supportLabelSnap(Graphics aGraphics, ILcdGXYContext aGXYContext)
      Description copied from interface: ILcdGXYLabelPainter2

      Returns whether this label painter supports snapping for the label specified by setObject, setLabelIndex and setSubLabelIndex, considering the given ILcdGXYContext instance. When the label painter supports snap for the specified label and context, it can return a snap target for this label and context.

      Before calling this method, the domain object, the label index, the sublabel index and the location of the label should be set using the respective methods.

      Specified by:
      supportLabelSnap in interface ILcdGXYLabelPainter2
      Parameters:
      aGraphics - the Graphics on which is worked.
      aGXYContext - the ILcdGXYContext of the snapping.
      Returns:
      true if this label painter supports snapping for the specified label.
      See Also:
    • labelSnapTarget

      public Object labelSnapTarget(Graphics aGraphics, ILcdGXYContext aGXYContext)
      Description copied from interface: ILcdGXYLabelPainter2
      Returns an Object that can be used as snapping target when graphically editing another Object or label than the one this ILcdGXYLabelPainter2 represents. The returned Object can be the Object this ILcdGXYLabelPainter2 represents or any other (e.g. an ILcdPoint if getObject() is an ILcdPointList).
      Specified by:
      labelSnapTarget in interface ILcdGXYLabelPainter2
      Parameters:
      aGraphics - the Graphics on which is worked.
      aGXYContext - the ILcdGXYContext of the snapping.
      Returns:
      an Object that can be used as snapping target when graphically editing another Object or label than the one this ILcdGXYLabelPainter2 represents (returned by getObject()). This object can be null.
    • getLabelCursor

      public Cursor getLabelCursor(Graphics aGraphics, int aMode, ILcdGXYContext aGXYContext)
      Description copied from interface: ILcdGXYLabelPainter2
      Returns a Cursor to indicate the type of editing aMode and aGXYContext.
      Specified by:
      getLabelCursor in interface ILcdGXYLabelPainter2
      Parameters:
      aGraphics - The Graphics instance on which the label is painted.
      aMode - The mode to consider. See ILcdGXYLabelPainter2.paintLabel(java.awt.Graphics, int, ILcdGXYContext) for more information.
      aGXYContext - The ILcdGXYContext containing extra information, such as the layer, the view and the mouse position.
      Returns:
      a Cursor to indicate the type of editing aMode and aGXYContext. Returns null if no particular Cursor is required.