All Packages  Class Hierarchy  This Package  Previous  Next  Index  WEKA's home

Class weka.gui.beans.BeanInstance

java.lang.Object
    |
    +----weka.gui.beans.BeanInstance

public class BeanInstance
extends java.lang.Object
implements java.io.Serializable
Class that manages a set of beans.

Since:
1.0
Version:
$Revision: 1.1 $
Author:
Mark Hall

Variable Index

 o BEAN_EXECUTING
 
 o IDLE
 

Constructor Index

 o BeanInstance(JComponent, Object, int, int)
Creates a new BeanInstance instance.
 o BeanInstance(JComponent, String, int, int)
Creates a new BeanInstance instance given the fully qualified name of the bean

Method Index

 o addAllBeansToContainer(JComponent)
Adds all beans to the supplied component
 o findInstance(Point)
Looks for a bean (if any) whose bounds contain the supplied point
 o getBean()
Gets the bean encapsulated in this instance
 o getBeanInstances()
Return the list of displayed beans
 o getHeight()
Gets the height of this bean
 o getWidth()
Gets the width of this bean
 o getX()
Gets the x coordinate of this bean
 o getY()
Gets the y coordinate of this bean
 o paintLabels(Graphics)
Renders the textual labels for the beans.
 o removeAllBeansFromContainer(JComponent)
Removes all beans from containing component
 o removeBean(JComponent)
Remove this bean from the list of beans and from the containing component
 o reset(JComponent)
Reset the list of beans
 o setBeanInstances(Vector, JComponent)
Describe setBeanInstances method here.
 o setX(int)
Sets the x coordinate of this bean
 o setY(int)
Sets the y coordinate of this bean

Field Detail

 o IDLE
public static final int IDLE
 o BEAN_EXECUTING
public static final int BEAN_EXECUTING

Constructor Detail

 o BeanInstance
public BeanInstance(javax.swing.JComponent container,
                    java.lang.Object bean,
                    int x,
                    int y)
          Creates a new BeanInstance instance.
Parameters:
container - a JComponent to add the bean to
bean - the bean to add
x - the x coordinate of the bean
y - the y coordinate of the bean
 o BeanInstance
public 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
Parameters:
container - a JComponent to add the bean to
beanName - the fully qualified name of the bean
x - the x coordinate of the bean
y - th y coordinate of the bean

Method Detail

 o reset
public static void reset(javax.swing.JComponent container)
          Reset the list of beans
 o removeAllBeansFromContainer
public static void removeAllBeansFromContainer(javax.swing.JComponent container)
          Removes all beans from containing component
Parameters:
container - a JComponent value
 o addAllBeansToContainer
public static void addAllBeansToContainer(javax.swing.JComponent container)
          Adds all beans to the supplied component
Parameters:
container - a JComponent value
 o getBeanInstances
public static java.util.Vector getBeanInstances()
          Return the list of displayed beans
Returns:
a vector of beans
 o setBeanInstances
public static void setBeanInstances(java.util.Vector beanInstances,
                                    javax.swing.JComponent container)
          Describe setBeanInstances method here.
Parameters:
beanInstances - a Vector value
container - a JComponent value
 o paintLabels
public static void paintLabels(java.awt.Graphics gx)
          Renders the textual labels for the beans.
Parameters:
gx - a Graphics object on which to render the labels
 o findInstance
public static BeanInstance findInstance(java.awt.Point p)
          Looks for a bean (if any) whose bounds contain the supplied point
Parameters:
p - a point
Returns:
a bean that contains the supplied point or null if no bean contains the point
 o removeBean
public void removeBean(javax.swing.JComponent container)
          Remove this bean from the list of beans and from the containing component
Parameters:
container - the JComponent that holds the bean
 o getBean
public java.lang.Object getBean()
          Gets the bean encapsulated in this instance
Returns:
an Object value
 o getX
public int getX()
          Gets the x coordinate of this bean
Returns:
an int value
 o getY
public int getY()
          Gets the y coordinate of this bean
Returns:
an int value
 o getWidth
public int getWidth()
          Gets the width of this bean
Returns:
an int value
 o getHeight
public int getHeight()
          Gets the height of this bean
Returns:
an int value
 o setX
public void setX(int newX)
          Sets the x coordinate of this bean
Parameters:
newX - an int value
 o setY
public void setY(int newY)
          Sets the y coordinate of this bean
Parameters:
newY - an int value

All Packages  Class Hierarchy  This Package  Previous  Next  Index  WEKA's home