org.openflow.gui.drawables
Class LayoutableIcon

java.lang.Object
  extended by org.pzgui.AbstractDrawable
      extended by org.pzgui.layout.AbstractLayoutable
          extended by org.openflow.gui.drawables.LayoutableIcon
All Implemented Interfaces:
Drawable, Layoutable, Vertex<Link>

public class LayoutableIcon
extends AbstractLayoutable
implements Vertex<Link>


Constructor Summary
LayoutableIcon(long id, Icon icon, int x, int y)
           
LayoutableIcon(long id, Icon icon, int x, int y, int w, int h)
           
 
Method Summary
 boolean contains(int x, int y)
          returns true if the area described by getHeight()/getWidth() contains x, y
 void drawObject(java.awt.Graphics2D gfx)
          Draw this object
 java.lang.Iterable<Link> getEdges()
          Return an iterator over the edges in a Vertex
 int getHeight()
          gets the height of this object
 long getID()
          Returns a unique ID for this node
 int getWidth()
          gets the width of this object
 
Methods inherited from class org.pzgui.layout.AbstractLayoutable
canPositionChange, drag, getPos, getX, getY, hasPositionChanged, setCanPositionChange, setPos, setXPos, setYPos, unsetPositionChanged
 
Methods inherited from class org.pzgui.AbstractDrawable
drawBeforeObject, isDrawn, isHovered, isSelected, setHovered, setSelected, unsetDrawn
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.pzgui.Drawable
drag, drawBeforeObject, isDrawn, isHovered, isSelected, setHovered, setSelected, unsetDrawn
 
Methods inherited from interface org.pzgui.layout.Layoutable
canPositionChange, getPos, getX, getY, hasPositionChanged, setCanPositionChange, setPos, setXPos, setYPos, unsetPositionChanged
 

Constructor Detail

LayoutableIcon

public LayoutableIcon(long id,
                      Icon icon,
                      int x,
                      int y)

LayoutableIcon

public LayoutableIcon(long id,
                      Icon icon,
                      int x,
                      int y,
                      int w,
                      int h)
Method Detail

drawObject

public void drawObject(java.awt.Graphics2D gfx)
Description copied from interface: Drawable
Draw this object

Specified by:
drawObject in interface Drawable
Specified by:
drawObject in class AbstractDrawable

contains

public boolean contains(int x,
                        int y)
Description copied from class: AbstractLayoutable
returns true if the area described by getHeight()/getWidth() contains x, y

Specified by:
contains in interface Drawable
Overrides:
contains in class AbstractLayoutable

getEdges

public java.lang.Iterable<Link> getEdges()
Description copied from interface: Vertex
Return an iterator over the edges in a Vertex

Specified by:
getEdges in interface Vertex<Link>

getHeight

public int getHeight()
Description copied from interface: Layoutable
gets the height of this object

Specified by:
getHeight in interface Layoutable

getID

public long getID()
Description copied from interface: Layoutable
Returns a unique ID for this node

Specified by:
getID in interface Layoutable

getWidth

public int getWidth()
Description copied from interface: Layoutable
gets the width of this object

Specified by:
getWidth in interface Layoutable