public class GraphicsLayer extends Layer
Modifier and Type | Class and Description |
---|---|
static class |
GraphicsLayer.Options |
Modifier and Type | Method and Description |
---|---|
void |
add(Graphic graphic)
Adds a graphic.
|
void |
addClickHandler(ClickHandler handler)
Fires when a graphic has been clicked.
|
void |
addDblClickHandler(DblClickHandler handler)
Fires when a graphic has been double clicked.
|
void |
addGraphicAddHandler(GraphicsLayerGraphicAddHandler handler)
Fires when a graphic is added to the GraphicsLayer.
|
void |
addGraphicRemoveHandler(GraphicsLayerGraphicRemoveHandler handler)
Fires when a graphic is removed from the GraphicsLayer.
|
void |
addGraphicsClearHandler(GraphicsLayerGaphicsClearHandler handler)
Fires when all graphics in the GraphicsLayer are cleared.
|
void |
addMouseDownHandler(MouseDownHandler handler)
Fires when a mouse button is pressed down and the mouse cursor is on a graphic.
|
void |
addMouseDragHandler(MouseDragHandler handler)
Fires while the mouse is being dragged until the mouse button is released.
|
void |
addMouseMoveHandler(MouseMoveHandler handler)
Fires as the mouse moves through a graphic on the GraphicsLayer.
|
void |
addMouseOutHandler(MouseOutHandler handler)
Fires as the mouse exits a graphic on the GraphicsLayer.
|
void |
addMouseOverHandler(MouseOverHandler handler)
Fires when the mouse first enters into a graphic on the GraphicsLayer.
|
void |
addMouseUpHandler(MouseUpHandler handler)
Fires when a mouse button is released and the mouse cursor is on a graphic.
|
void |
clear()
Clears all graphics.
|
static GraphicsLayer |
create()
Creates a new graphics layer.
|
static GraphicsLayer |
create(GraphicsLayer.Options options)
Creates a new GraphicsLayer object with parameters.
|
void |
disableMouseEvents()
Disables all mouse events on the graphics layer.
|
void |
enableMouseEvents()
Enables all mouse events on the graphics layer.
|
com.google.gwt.core.client.JsArray<Graphic> |
getGraphics()
The array of graphics that make up the layer.
|
Renderer |
getRenderer()
Renderer assigned to the GraphicsLayer.
|
void |
remove(Graphic graphic)
Removes a graphic.
|
void |
setInfoTemplate(InfoTemplate infoTemplate)
Specify or change the info template for a layer.
|
void |
setOpacity(float opacity)
Initial opacity or transparency of layer.
|
void |
setRenderer(Renderer renderer)
Sets the renderer for the graphics layer.
|
addErrorHandler, addLoadHandler, addOpacityChangeHandler, addUpdateEndHandler, addUpdateHandler, addUpdateStartHandler, addVisibilityChangeHandler, getCredential, getId, getOpacity, getUrl, hide, isloaded, isVisible, setOpacity, setVisibility, show
public static GraphicsLayer create()
public static GraphicsLayer create(GraphicsLayer.Options options)
options
- - see options classpublic final com.google.gwt.core.client.JsArray<Graphic> getGraphics()
public final Renderer getRenderer()
public final void add(Graphic graphic)
graphic
- - The graphic to add.public final void clear()
public final void disableMouseEvents()
public final void enableMouseEvents()
public final void remove(Graphic graphic)
graphic
- - Removes a graphic.public final void setInfoTemplate(InfoTemplate infoTemplate)
infoTemplate
- - The new info template.public final void setOpacity(float opacity)
opacity
- - Value from 0 to 1, where 0 is 100% transparent and 1 has no transparency.
The default value is 1.public final void setRenderer(Renderer renderer)
renderer
- - The renderer used for the graphic.public final void addClickHandler(ClickHandler handler)
handler
- public final void addDblClickHandler(DblClickHandler handler)
handler
- public final void addGraphicAddHandler(GraphicsLayerGraphicAddHandler handler)
handler
- public final void addGraphicRemoveHandler(GraphicsLayerGraphicRemoveHandler handler)
handler
- public final void addGraphicsClearHandler(GraphicsLayerGaphicsClearHandler handler)
handler
- public final void addMouseDownHandler(MouseDownHandler handler)
handler
- public final void addMouseDragHandler(MouseDragHandler handler)
handler
- public final void addMouseMoveHandler(MouseMoveHandler handler)
handler
- public final void addMouseOutHandler(MouseOutHandler handler)
handler
- public final void addMouseOverHandler(MouseOverHandler handler)
handler
- public final void addMouseUpHandler(MouseUpHandler handler)
handler
-