public interface ILcdGXYContext extends Serializable
ILcdGXYContext
defines the context to be used by
an ILcdGXYPainter
(respectively an ILcdGXYEditor
)
for drawing (editing) on an ILcdGXYView
an Object
belonging to an ILcdModel
.
It contains information such as:
ILcdGXYView
where the drawing or editing occurs,
ILcdGXYLayer
and therefor the ILcdModel
the Object
belongs to,
Graphics
where to perform the drawing,
ILcdModelXYWorldTransformation
to transform model
coordinates into world coordinates and vice versa.
ILcdGXYViewXYWorldTransformation
to transform world
coordinates into view coordinates and vice versa.
ILcdGXYPen
for supporting drawing and editing on a
Graphics
.
.
Note:
As of 10.0 implementing or wrapping ILcdGXYContext
from scratch is strongly discouraged.
Please extend from TLcdGXYContext
for your own implementations. If you want to wrap an
ILcdGXYContext
, extend ALcdGXYContextWrapper
.
ILcdGXYPainter
,
ILcdGXYEditor
,
ILcdGXYLayer
Modifier and Type | Method and Description |
---|---|
int |
getDeltaX()
Returns the delta x for the first input point.
|
int |
getDeltaX(int aIndex)
Returns the delta x for the input point at index
aIndex . |
int |
getDeltaY()
Returns the delta y for the first input point.
|
int |
getDeltaY(int aIndex)
Returns the delta y for the input point at index
aIndex . |
ILcdGXYLayer |
getGXYLayer() |
ILcdGXYPen |
getGXYPen() |
ILcdGXYView |
getGXYView() |
ILcdGXYViewXYWorldTransformation |
getGXYViewXYWorldTransformation() |
int |
getInputPointCount()
Returns the number of input points.
|
ILcdModelXYWorldTransformation |
getModelXYWorldTransformation() |
Map<Object,Object> |
getProperties()
Returns a modifiable map to store and retrieve implementation specific context information.
|
int |
getSensitivity()
Returns the sensitivity that should be used for painting and editing purposes.
|
Object |
getSnapTarget()
Short for
getSnapTarget( 0 ) |
Object |
getSnapTarget(int aIndex)
The snap target at index
aIndex if the painting or editing action requires one. |
ILcdGXYLayer |
getSnapTargetLayer()
Short for
getSnapTargetLayer( 0 ) |
ILcdGXYLayer |
getSnapTargetLayer(int aIndex)
|
int |
getX()
Returns the current x coordinate of the first input point.
|
int |
getX(int aIndex)
Returns the current x coordinate of the input point at the given index.
|
int |
getY()
Returns the current y coordinate of the first input point.
|
int |
getY(int aIndex)
Returns the current y coordinate of the input point at the given index.
|
ILcdGXYView getGXYView()
ILcdGXYView
where the drawing or editing occurs.ILcdGXYView
ILcdGXYLayer getGXYLayer()
ILcdGXYLayer
(and therefor the
ILcdModel
) the Object
to paint or edit belongs to.ILcdLayer.getModel()
ILcdGXYViewXYWorldTransformation getGXYViewXYWorldTransformation()
ILcdGXYViewXYWorldTransformation
that can be used as support for
painting or editing.ILcdGXYPen
ILcdModelXYWorldTransformation getModelXYWorldTransformation()
ILcdModelXYWorldTransformation
that can be used as support for
painting or editing.ILcdGXYPen
ILcdGXYPen getGXYPen()
ILcdGXYPen
that can be used as support for
painting or editing.ILcdGXYPen
int getInputPointCount()
int getX()
getInputPointCount()
== 0, 0 will be returned.ILcdGXYPainter.paint(java.awt.Graphics, int, com.luciad.view.gxy.ILcdGXYContext)
,
ILcdGXYEditor.edit(java.awt.Graphics, int, com.luciad.view.gxy.ILcdGXYContext)
,
getInputPointCount()
,
getX(int)
int getX(int aIndex) throws IndexOutOfBoundsException
aIndex
- the index of the input pointaIndex
, expressed in view coordinatesIndexOutOfBoundsException
- if the index is out of range (index < 0 || index >=
getInputPointCount())ILcdGXYPainter.paint(java.awt.Graphics, int, com.luciad.view.gxy.ILcdGXYContext)
,
ILcdGXYEditor.edit(java.awt.Graphics, int, com.luciad.view.gxy.ILcdGXYContext)
,
getInputPointCount()
int getY()
getInputPointCount()
== 0, 0 will be returned.ILcdGXYPainter.paint(java.awt.Graphics, int, com.luciad.view.gxy.ILcdGXYContext)
,
ILcdGXYEditor.edit(java.awt.Graphics, int, com.luciad.view.gxy.ILcdGXYContext)
,
getInputPointCount()
,
getY(int)
int getY(int aIndex) throws IndexOutOfBoundsException
aIndex
- the index of the input pointaIndex
, expressed in view coordinatesIndexOutOfBoundsException
- if the index is out of range (index < 0 || index >=
getInputPointCount())ILcdGXYPainter.paint(java.awt.Graphics, int, com.luciad.view.gxy.ILcdGXYContext)
,
ILcdGXYEditor.edit(java.awt.Graphics, int, com.luciad.view.gxy.ILcdGXYContext)
,
getInputPointCount()
int getDeltaX()
Returns the delta x for the first input point. This is typically the difference between the current x value and the original x value triggering an interaction.
getInputPointCount()
== 0.getInputPointCount()
,
getDeltaX(int)
int getDeltaX(int aIndex) throws IndexOutOfBoundsException
Returns the delta x for the input point at index aIndex
.
This is typically the difference between the current x value and the original x value
triggering an interaction.
aIndex
- the indexaIndex
, expressed in view coordinatesIndexOutOfBoundsException
- if the index is out of range (index < 0 || index >=
getInputPointCount())getInputPointCount()
int getDeltaY()
Returns the delta y for the first input point. This is typically the difference between the current y value and the original y value triggering the interaction.
getInputPointCount()
== 0.getInputPointCount()
,
getDeltaY(int)
int getDeltaY(int aIndex) throws IndexOutOfBoundsException
Returns the delta y for the input point at index aIndex
.
This is typically the difference between the current x value and the original y value
triggering an interaction.
aIndex
- the indexaIndex
, expressed in view coordinatesIndexOutOfBoundsException
- if the index is out of range (index < 0 || index >=
getInputPointCount())getInputPointCount()
Object getSnapTarget()
Short for getSnapTarget( 0 )
When getInputPointCount()
()} == 0, this method will return null
, while
getSnapTarget( 0 )
will throw an IndexOutOfBoundsException
.
null
when no snap target is availablegetSnapTarget(int)
Object getSnapTarget(int aIndex) throws IndexOutOfBoundsException
aIndex
if the painting or editing action requires one. This
snap target should correspond to the input point at index aIndex
.aIndex
- the indexaIndex
IndexOutOfBoundsException
- if the index is out of range (index < 0 || index >=
getInputPointCount())ILcdGXYLayer getSnapTargetLayer()
Short for getSnapTargetLayer( 0 )
When getInputPointCount()
()} == 0, this method will return null
, while
getSnapTarget( 0 )
will throw an IndexOutOfBoundsException
.
null
when no snap target is
availableILcdGXYLayer getSnapTargetLayer(int aIndex) throws IndexOutOfBoundsException
Returns the ILcdGXYLayer
of the snap target at
index aIndex
.
aIndex
- the indexILcdGXYLayer
of the snap target at
index aIndex
IndexOutOfBoundsException
- if the index is out of range (index < 0 || index >=
getInputPointCount())int getSensitivity()
Map<Object,Object> getProperties()