org.pzgui
Interface Drawable

All Known Subinterfaces:
Vertex<E>
All Known Implementing Classes:
AbstractDrawable, AbstractLayoutable, DrawableIcon, Flow, Host, LayoutableIcon, Link, Node, NodeWithPorts, OpenFlowSwitch, SimpleNode, SimpleNodeWithPorts, VirtualOpenFlowSwitch

public interface Drawable

Indicates an object which can be drawn in a PZWindow.

Author:
David Underhill

Method Summary
 boolean contains(int x, int y)
          Whether these x, y coordinates fall are contained by the object
 void drag(int x, int y)
          Called when the object is dragged to position x, y
 void drawBeforeObject(java.awt.Graphics2D gfx)
          Graphics to be drawn before drawObject() is called
 void drawObject(java.awt.Graphics2D gfx)
          Draw this object
 boolean isDrawn()
          Whether this object has been drawn this redraw cycle
 boolean isHovered()
          Whether this object currently has the mouse over it
 boolean isSelected()
          Whether this object is currently selected
 void setHovered(boolean hovering)
          Set whether this object currently has the mouse over it
 void setSelected(boolean selected)
          Set whether this object is currently selected
 void unsetDrawn()
          Flag this object as undrawn for the current redraw cycle
 

Method Detail

drawBeforeObject

void drawBeforeObject(java.awt.Graphics2D gfx)
Graphics to be drawn before drawObject() is called


drawObject

void drawObject(java.awt.Graphics2D gfx)
Draw this object


contains

boolean contains(int x,
                 int y)
Whether these x, y coordinates fall are contained by the object


isDrawn

boolean isDrawn()
Whether this object has been drawn this redraw cycle


unsetDrawn

void unsetDrawn()
Flag this object as undrawn for the current redraw cycle


isSelected

boolean isSelected()
Whether this object is currently selected


setSelected

void setSelected(boolean selected)
Set whether this object is currently selected


isHovered

boolean isHovered()
Whether this object currently has the mouse over it


setHovered

void setHovered(boolean hovering)
Set whether this object currently has the mouse over it


drag

void drag(int x,
          int y)
Called when the object is dragged to position x, y