|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface ViewportPane
The ViewportPane is the display area for a Map.
The default implementation is a java.awt.Pane. It Registers itself with a CompositeRenderer and obtains the image from the CompositeRenderer if the CompositeRenderer is "ready"
Viewport is responsible for:
Method Summary | |
---|---|
void |
addDrawCommand(IDrawCommand command)
Adds a Draw command to the list of draw commands. |
void |
addMouseListener(MapMouseListener l)
See Component.addMouseListener(java.awt.event.MouseListener) |
void |
addMouseMotionListener(MapMouseMotionListener l)
See Component.addMouseMotionListener(java.awt.event.MouseMotionListener) |
void |
addMouseWheelListener(MapMouseWheelListener l)
See Component.addMouseWheelListener(java.awt.event.MouseWheelListener) |
void |
addPaneListener(IMapDisplayListener listener)
Adds a listener interested in size changes to the pane |
void |
dispose()
disposes of any system resources |
void |
enableDrawCommands(boolean enable)
Switches ViewportPainter to run custom IDrawCommand s
during map repainting or disable them. |
Control |
getControl()
Returns the SWT Control that listeners, including drag and drop, can be added to. |
MapPart |
getMapEditor()
Returns the associated MapEditor object. |
java.awt.image.BufferedImage |
image(int w,
int h)
Create a image that is compatable with this ViewportPane. |
boolean |
isDisposed()
returns if the viewportpane has been disposed |
boolean |
isVisible()
Returns true if the viewportPane component is visible. |
void |
removeMouseListener(MapMouseListener l)
See Component.removeMouseListener(java.awt.event.MouseListener) |
void |
removeMouseMotionListener(MapMouseMotionListener l)
See Component.removeMouseMotionListener(java.awt.event.MouseMotionListener) |
void |
removeMouseWheelListener(MapMouseWheelListener l)
See Component.removeMouseWheelListener(java.awt.event.MouseWheelListener) |
void |
removePaneListener(IMapDisplayListener listener)
Removes a MapDisplayListener. |
void |
renderDone()
Called when a renderer has data that can be displayed. |
void |
renderStarting()
Called when rendering is about to start. |
void |
renderUpdate()
Called when renderer has rendered for single Job scheduled run. |
void |
repaint()
Repaints the ViewportPane |
void |
repaint(int x,
int y,
int width,
int height)
Requests that the area indicated is repainted |
void |
setCursor(org.eclipse.swt.graphics.Cursor cursor)
Sets the mouse cursor. |
void |
setRenderManager(RenderManager manager)
Called to set the owning renderManager() |
Method Detail |
---|
java.awt.image.BufferedImage image(int w, int h)
w
- widthh
- height
void repaint()
Requests a repaint actually - may not occur right away.
void repaint(int x, int y, int width, int height)
Requests a repaint actually - may not occur right away.
x
- x coordinate of the top left corner of the box to repainty
- y coordinate of the top left corner of the box to repaintwidth
- width of the box to repaintheight
- height of the box to repaintvoid setCursor(org.eclipse.swt.graphics.Cursor cursor)
Limited to System cursors at the moment. Custom cursors will be forthcoming.
cursor
- The cursor to usevoid removeMouseListener(MapMouseListener l)
l
- A mouse listenervoid removeMouseMotionListener(MapMouseMotionListener l)
l
- A mouse listenervoid removeMouseWheelListener(MapMouseWheelListener l)
l
- A mouse listenervoid addMouseListener(MapMouseListener l)
l
- A mouse listenervoid addMouseMotionListener(MapMouseMotionListener l)
l
- A mouse listenervoid addMouseWheelListener(MapMouseWheelListener l)
l
- A mouse listenervoid addPaneListener(IMapDisplayListener listener)
void removePaneListener(IMapDisplayListener listener)
void dispose()
void addDrawCommand(IDrawCommand command)
command
- The new draw command.void enableDrawCommands(boolean enable)
ViewportPainter
to run custom IDrawCommand
s
during map repainting or disable them.
enable
- true
is to run custom draw commands, false
otherwisevoid renderStarting()
void renderUpdate()
void renderDone()
May be called when a refresh is required because the rendered data has changed
void setRenderManager(RenderManager manager)
MapPart getMapEditor()
Control getControl()
boolean isVisible()
boolean isDisposed()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |