public class RadioCanvas extends java.lang.Object implements MapDisplayProvider
Constructor and Description |
---|
RadioCanvas(int width,
int height)
Construct a blank canvas
|
RadioCanvas(int width,
int height,
java.awt.Image image)
Construct a new canvas with the given image as the background
|
Modifier and Type | Method and Description |
---|---|
java.util.List<RadioIcon> |
getIcons() |
Frame |
getSource()
Get a
Frame from this provider at any time |
void |
interactAt(org.bukkit.entity.Entity entity,
DisplayInteract action,
int x,
int y)
Interaction with an entity on the board
|
void |
loadIcon(RadioIcon icon,
int x,
int y)
Load a given icon at specific coordinates
|
void |
provideFor(MapDisplay display)
Start providing frames for the given display
|
void |
stopProviding()
Terminate this MapDisplayProvider and stop providing frames for any display
|
void |
unloadIcon(RadioIcon icon)
Unload a given RadioIcon and remove it completely
|
void |
update(RadioIcon icon)
Update and send a radio icon, calls
update(RadioIcon, boolean) |
void |
update(RadioIcon icon,
boolean send)
Update an icon and optionally update the map display; follows the same principle as
updateBuffer() but more complicated |
void |
updateBuffer()
Update the buffer entirely without sending an update
|
public RadioCanvas(int width, int height)
width
- height
- public RadioCanvas(int width, int height, java.awt.Image image)
width
- height
- image
- public Frame getSource()
MapDisplayProvider
Frame
from this provider at any timegetSource
in interface MapDisplayProvider
public void interactAt(org.bukkit.entity.Entity entity, DisplayInteract action, int x, int y)
MapDisplayProvider
interactAt
in interface MapDisplayProvider
entity
- Either a player or a projectileaction
- Will only be DisplayInteract.PROJECTILE
if entity is a projectilex
- The X relative to the top left cornery
- The Y relative to the top left cornerpublic void loadIcon(RadioIcon icon, int x, int y)
icon
- x
- y
- public void update(RadioIcon icon)
update(RadioIcon, boolean)
icon
- public void update(RadioIcon icon, boolean send)
updateBuffer()
but more complicatedicon
- send
- public void updateBuffer()
public void unloadIcon(RadioIcon icon)
icon
- public java.util.List<RadioIcon> getIcons()
public void provideFor(MapDisplay display)
MapDisplayProvider
provideFor
in interface MapDisplayProvider
public void stopProviding()
MapDisplayProvider
stopProviding
in interface MapDisplayProvider