public abstract class AbstractCanvas<V extends AbstractCanvas.View> extends Object implements Canvas<Shape>, HasCanvasListeners<CanvasShapeListener>
| Modifier and Type | Class and Description |
|---|---|
static class |
AbstractCanvas.Cursors |
static interface |
AbstractCanvas.View<P> |
| Modifier and Type | Field and Description |
|---|---|
protected javax.enterprise.event.Event<CanvasClearEvent> |
canvasClearEvent |
protected javax.enterprise.event.Event<CanvasDrawnEvent> |
canvasDrawnEvent |
protected javax.enterprise.event.Event<CanvasFocusedEvent> |
canvasFocusedEvent |
protected javax.enterprise.event.Event<CanvasShapeAddedEvent> |
canvasShapeAddedEvent |
protected javax.enterprise.event.Event<CanvasShapeRemovedEvent> |
canvasShapeRemovedEvent |
protected CanvasGrid |
grid |
protected Layer |
layer |
protected List<CanvasShapeListener> |
listeners |
protected List<Shape> |
shapes |
protected V |
view |
| Constructor and Description |
|---|
AbstractCanvas(javax.enterprise.event.Event<CanvasClearEvent> canvasClearEvent,
javax.enterprise.event.Event<CanvasShapeAddedEvent> canvasShapeAddedEvent,
javax.enterprise.event.Event<CanvasShapeRemovedEvent> canvasShapeRemovedEvent,
javax.enterprise.event.Event<CanvasDrawnEvent> canvasDrawnEvent,
javax.enterprise.event.Event<CanvasFocusedEvent> canvasFocusedEvent,
Layer layer,
V view) |
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitgetShapeAt, initializeprotected Layer layer
protected V extends AbstractCanvas.View view
protected CanvasGrid grid
protected javax.enterprise.event.Event<CanvasClearEvent> canvasClearEvent
protected javax.enterprise.event.Event<CanvasShapeAddedEvent> canvasShapeAddedEvent
protected javax.enterprise.event.Event<CanvasShapeRemovedEvent> canvasShapeRemovedEvent
protected javax.enterprise.event.Event<CanvasDrawnEvent> canvasDrawnEvent
protected javax.enterprise.event.Event<CanvasFocusedEvent> canvasFocusedEvent
protected final List<CanvasShapeListener> listeners
@Inject public AbstractCanvas(javax.enterprise.event.Event<CanvasClearEvent> canvasClearEvent, javax.enterprise.event.Event<CanvasShapeAddedEvent> canvasShapeAddedEvent, javax.enterprise.event.Event<CanvasShapeRemovedEvent> canvasShapeRemovedEvent, javax.enterprise.event.Event<CanvasDrawnEvent> canvasDrawnEvent, javax.enterprise.event.Event<CanvasFocusedEvent> canvasFocusedEvent, Layer layer, V view)
protected <P> void show(P panel,
int width,
int height,
Layer layer)
public abstract void addControl(com.google.gwt.user.client.ui.IsWidget controlView)
public abstract void deleteControl(com.google.gwt.user.client.ui.IsWidget controlView)
public double getAbsoluteX()
public double getAbsoluteY()
public Canvas setGrid(CanvasGrid grid)
public CanvasGrid getGrid()
public Canvas deleteShape(Shape shape)
deleteShape in interface Canvas<Shape>public AbstractCanvas draw()
public AbstractCanvas clear()
public HasCanvasListeners<CanvasShapeListener> addRegistrationListener(CanvasShapeListener instance)
addRegistrationListener in interface HasCanvasListeners<CanvasShapeListener>public HasCanvasListeners<CanvasShapeListener> removeRegistrationListener(CanvasShapeListener instance)
removeRegistrationListener in interface HasCanvasListeners<CanvasShapeListener>public HasCanvasListeners<CanvasShapeListener> clearRegistrationListeners()
clearRegistrationListeners in interface HasCanvasListeners<CanvasShapeListener>protected void fireCanvasShapeAdded(Shape shape)
protected void fireCanvasShapeRemoved(Shape shape)
protected void fireCanvasClear()
protected void afterDrawCanvas()
public V getView()
public void setLoadingObserverCallback(CanvasLoadingObserver.Callback loadingObserverCallback)
public void loadingStarted()
public void loadingCompleted()
Copyright © 2001–2017 JBoss by Red Hat. All rights reserved.