public class LayerDrawEvent extends FMapEvent
The LayerDrawEvent
class represents an event produced on a layer about a drawing change.
This event can be a notification before or after a FLayer
, FLayers
, or
GraphicLayer
is drawn.
Modifier and Type | Field and Description |
---|---|
static int |
GRAPHICLAYER_AFTER_DRAW
Public constant that identifies the kind of
LayerDrawEvent as an event produced
after drawing on a GraphicLayer . |
static int |
GRAPHICLAYER_BEFORE_DRAW
Public constant that identifies the kind of
LayerDrawEvent as an event produced
before drawing on a GraphicLayer . |
static int |
LAYER_AFTER_DRAW
|
static int |
LAYER_BEFORE_DRAW
|
Constructor and Description |
---|
LayerDrawEvent(FLayer lyr,
Graphics2D g,
ViewPort vp,
int eventType)
Creates a new layer draw event with all necessary information.
|
Modifier and Type | Method and Description |
---|---|
Graphics2D |
getGraphics()
Returns an object for rendering 2-dimensional shapes, text and images on the Java(tm) platform.
|
FLayer |
getLayer()
Returns a reference to the layer where this event has been produced.
|
ViewPort |
getViewPort()
Returns the view port the information for drawing the layer in which this event has been produced.
|
getEventType, setEventType
public static final int LAYER_BEFORE_DRAW
LayerDrawEvent
as an event produced
before drawing on a FLayer
or FLayers
.public static final int LAYER_AFTER_DRAW
LayerDrawEvent
as an event produced
after drawing on a FLayer
or FLayers
.public static final int GRAPHICLAYER_BEFORE_DRAW
LayerDrawEvent
as an event produced
before drawing on a GraphicLayer
.public static final int GRAPHICLAYER_AFTER_DRAW
LayerDrawEvent
as an event produced
after drawing on a GraphicLayer
.public LayerDrawEvent(FLayer lyr, Graphics2D g, ViewPort vp, int eventType)
Creates a new layer draw event with all necessary information.
lyr
- layer in which the event has been producedg
- object for rendering 2D on the Java(tm) platformvp
- object with information for drawing the layer in which this event has been producedeventType
- identifies the kind of this event: LAYER_BEFORE_DRAW, LAYER_AFTER_DRAW,
GRAPHICLAYER_BEFORE_DRAW or GRAPHICLAYER_AFTER_DRAW.public Graphics2D getGraphics()
Returns an object for rendering 2-dimensional shapes, text and images on the Java(tm) platform.
public ViewPort getViewPort()
Returns the view port the information for drawing the layer in which this event has been produced.
public FLayer getLayer()
Returns a reference to the layer where this event has been produced.