public interface WorkspaceWidget
| Modifier and Type | Method and Description |
|---|---|
void |
addBlock(RenderableBlock block)
Adds the specified block to this widget interally and graphically.
|
void |
addBlocks(java.util.Collection<RenderableBlock> blocks)
Adds a collection of blocks to this widget internally and graphically.
|
void |
blockDragged(RenderableBlock block)
Called by RenderableBlocks as they are dragged over this Widget.
|
void |
blockDropped(RenderableBlock block)
Called by RenderableBlocks that get "dropped" onto this Widget
|
void |
blockEntered(RenderableBlock block)
Called when a RenderableBlock is being dragged and goes from being
outside this Widget to being inside the Widget.
|
void |
blockExited(RenderableBlock block)
Called when a RenderableBlock that was being dragged over this Widget
goes from being inside this Widget to being outside the Widget.
|
boolean |
contains(int x,
int y)
Widgets must be able to report whether a given point is inside them
|
java.lang.Iterable<RenderableBlock> |
getBlocks()
Returns the set of blocks that abstract "lives" inside this widget.
|
javax.swing.JComponent |
getJComponent()
Very Java Swing dependent method
|
void |
removeBlock(RenderableBlock block)
Used by RenderableBlocks to tell their originating Widgets that
they're moving somewhere else and so should be removed.
|
void blockDropped(RenderableBlock block)
block - the RenderableBlock that is "dropped" onto this Widgetvoid blockDragged(RenderableBlock block)
block - the RenderableBlock being draggedvoid blockEntered(RenderableBlock block)
block - the RenderableBlock being draggedvoid blockExited(RenderableBlock block)
block - the RenderableBlock being draggedvoid removeBlock(RenderableBlock block)
block - the RenderableBlockvoid addBlock(RenderableBlock block)
block - the desired RenderableBlock to add to thisvoid addBlocks(java.util.Collection<RenderableBlock> blocks)
blocks - the Collection of RenderableBlocks to addboolean contains(int x,
int y)
x - y - javax.swing.JComponent getJComponent()
java.lang.Iterable<RenderableBlock> getBlocks()