Package edu.ubo.graphicLayer
Class GBounded
- java.lang.Object
-
- edu.ubo.graphicLayer.GElement
-
- edu.ubo.graphicLayer.GBounded
-
- All Implemented Interfaces:
GContainer
public class GBounded extends GElement implements GContainer
-
-
Constructor Summary
Constructors Constructor Description GBounded()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addElement(GElement m)
void
addMouseListener(java.awt.event.MouseListener k)
void
clear()
void
dispatchMouseClicked(java.awt.event.MouseEvent e)
void
dispatchMouseEntered(java.awt.event.MouseEvent e)
void
dispatchMouseExited(java.awt.event.MouseEvent e)
void
dispatchMousePressed(java.awt.event.MouseEvent e)
void
dispatchMouseReleased(java.awt.event.MouseEvent e)
void
draw(java.awt.Graphics2D g)
void
drawContents(java.awt.Graphics2D g)
java.awt.Rectangle
getBounds()
java.awt.Dimension
getDimension()
java.awt.Rectangle
getGlobalBounds()
java.awt.Point
getGlobalPosition()
int
getHeight()
java.awt.Point
getPosition()
GElement[]
getRawContents()
int
getWidth()
int
getX()
int
getY()
void
removeElement(GElement m)
void
setDimension(java.awt.Dimension dim)
void
setHeight(java.lang.Integer height)
void
setPosition(java.awt.Point p)
void
setWidth(java.lang.Integer width)
void
setX(int x)
void
setY(int y)
void
translate(java.awt.Point gap)
void
whenMouseClicked(java.awt.event.MouseEvent e)
void
whenMouseEntered(java.awt.event.MouseEvent e)
void
whenMouseExited(java.awt.event.MouseEvent e)
void
whenMousePressed(java.awt.event.MouseEvent e)
void
whenMouseReleased(java.awt.event.MouseEvent e)
-
Methods inherited from class edu.ubo.graphicLayer.GElement
defaultColor, getContainer, repaint, setColor, setContainer
-
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface edu.ubo.graphicLayer.GContainer
repaint
-
-
-
-
Method Detail
-
addMouseListener
public void addMouseListener(java.awt.event.MouseListener k)
-
getPosition
public java.awt.Point getPosition()
-
setPosition
public void setPosition(java.awt.Point p)
-
getGlobalPosition
public java.awt.Point getGlobalPosition()
- Specified by:
getGlobalPosition
in interfaceGContainer
-
getX
public int getX()
-
getY
public int getY()
-
setX
public void setX(int x)
-
setY
public void setY(int y)
-
getRawContents
public GElement[] getRawContents()
- Specified by:
getRawContents
in interfaceGContainer
-
drawContents
public void drawContents(java.awt.Graphics2D g)
-
getBounds
public java.awt.Rectangle getBounds()
-
getDimension
public java.awt.Dimension getDimension()
-
getGlobalBounds
public java.awt.Rectangle getGlobalBounds()
-
setDimension
public void setDimension(java.awt.Dimension dim)
-
setWidth
public void setWidth(java.lang.Integer width)
-
setHeight
public void setHeight(java.lang.Integer height)
-
addElement
public void addElement(GElement m)
- Specified by:
addElement
in interfaceGContainer
-
removeElement
public void removeElement(GElement m)
- Specified by:
removeElement
in interfaceGContainer
-
clear
public void clear()
- Specified by:
clear
in interfaceGContainer
-
getWidth
public int getWidth()
-
getHeight
public int getHeight()
-
dispatchMouseClicked
public void dispatchMouseClicked(java.awt.event.MouseEvent e)
- Overrides:
dispatchMouseClicked
in classGElement
-
dispatchMousePressed
public void dispatchMousePressed(java.awt.event.MouseEvent e)
- Overrides:
dispatchMousePressed
in classGElement
-
dispatchMouseReleased
public void dispatchMouseReleased(java.awt.event.MouseEvent e)
- Overrides:
dispatchMouseReleased
in classGElement
-
dispatchMouseEntered
public void dispatchMouseEntered(java.awt.event.MouseEvent e)
- Overrides:
dispatchMouseEntered
in classGElement
-
dispatchMouseExited
public void dispatchMouseExited(java.awt.event.MouseEvent e)
- Overrides:
dispatchMouseExited
in classGElement
-
whenMouseClicked
public void whenMouseClicked(java.awt.event.MouseEvent e)
-
whenMousePressed
public void whenMousePressed(java.awt.event.MouseEvent e)
-
whenMouseReleased
public void whenMouseReleased(java.awt.event.MouseEvent e)
-
whenMouseEntered
public void whenMouseEntered(java.awt.event.MouseEvent e)
-
whenMouseExited
public void whenMouseExited(java.awt.event.MouseEvent e)
-
-