|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectweka.gui.beans.BeanInstance
public class BeanInstance
Class that manages a set of beans.
Field Summary | |
---|---|
static int |
BEAN_EXECUTING
|
static int |
IDLE
|
Constructor Summary | |
---|---|
BeanInstance(javax.swing.JComponent container,
java.lang.Object bean,
int x,
int y)
Creates a new BeanInstance instance. |
|
BeanInstance(javax.swing.JComponent container,
java.lang.String beanName,
int x,
int y)
Creates a new BeanInstance instance given the fully
qualified name of the bean |
Method Summary | |
---|---|
static void |
addAllBeansToContainer(javax.swing.JComponent container)
Adds all beans to the supplied component |
void |
addBean(javax.swing.JComponent container)
Adds this bean to the global list of beans and to the supplied container. |
static BeanInstance |
findInstance(java.awt.Point p)
Looks for a bean (if any) whose bounds contain the supplied point |
static java.util.Vector |
findInstances(java.awt.Rectangle boundingBox)
Looks for all beans (if any) located within the supplied bounding box. |
java.lang.Object |
getBean()
Gets the bean encapsulated in this instance |
static java.util.Vector |
getBeanInstances()
Return the list of displayed beans |
int |
getHeight()
Gets the height of this bean |
int |
getWidth()
Gets the width of this bean |
int |
getX()
Gets the x coordinate of this bean |
int |
getY()
Gets the y coordinate of this bean |
static void |
paintLabels(java.awt.Graphics gx)
Renders the textual labels for the beans. |
static void |
removeAllBeansFromContainer(javax.swing.JComponent container)
Removes all beans from containing component |
void |
removeBean(javax.swing.JComponent container)
Remove this bean from the list of beans and from the containing component |
static void |
reset(javax.swing.JComponent container)
Reset the list of beans |
static void |
setBeanInstances(java.util.Vector beanInstances,
javax.swing.JComponent container)
Describe setBeanInstances method here. |
void |
setX(int newX)
Sets the x coordinate of this bean |
void |
setXY(int newX,
int newY)
Set the x and y coordinates of this bean |
void |
setY(int newY)
Sets the y coordinate of this bean |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int IDLE
public static final int BEAN_EXECUTING
Constructor Detail |
---|
public BeanInstance(javax.swing.JComponent container, java.lang.Object bean, int x, int y)
BeanInstance
instance.
container
- a JComponent
to add the bean tobean
- the bean to addx
- the x coordinate of the beany
- the y coordinate of the beanpublic BeanInstance(javax.swing.JComponent container, java.lang.String beanName, int x, int y)
BeanInstance
instance given the fully
qualified name of the bean
container
- a JComponent
to add the bean tobeanName
- the fully qualified name of the beanx
- the x coordinate of the beany
- th y coordinate of the beanMethod Detail |
---|
public static void reset(javax.swing.JComponent container)
public static void removeAllBeansFromContainer(javax.swing.JComponent container)
container
- a JComponent
valuepublic static void addAllBeansToContainer(javax.swing.JComponent container)
container
- a JComponent
valuepublic static java.util.Vector getBeanInstances()
public static void setBeanInstances(java.util.Vector beanInstances, javax.swing.JComponent container)
setBeanInstances
method here.
beanInstances
- a Vector
valuecontainer
- a JComponent
valuepublic static void paintLabels(java.awt.Graphics gx)
gx
- a Graphics
object on which to render
the labelspublic static BeanInstance findInstance(java.awt.Point p)
p
- a point
public static java.util.Vector findInstances(java.awt.Rectangle boundingBox)
boundingBox
- the bounding rectangle
public void removeBean(javax.swing.JComponent container)
container
- the JComponent
that holds the beanpublic void addBean(javax.swing.JComponent container)
container
- the Component on which this
BeanInstance will be displayedpublic java.lang.Object getBean()
Object
valuepublic int getX()
int
valuepublic int getY()
int
valuepublic int getWidth()
int
valuepublic int getHeight()
int
valuepublic void setXY(int newX, int newY)
newX
- the x coordinatenewY
- the y coordinatepublic void setX(int newX)
newX
- an int
valuepublic void setY(int newY)
newY
- an int
value
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |