程序包 weka.gui.beans

类 BeanInstance

java.lang.Object
weka.gui.beans.BeanInstance
所有已实现的接口:
Serializable

public class BeanInstance extends Object implements Serializable
Class that manages a set of beans.
从以下版本开始:
1.0
版本:
$Revision: 7059 $
作者:
Mark Hall
另请参阅:
  • 字段详细资料

    • IDLE

      public static final int IDLE
      另请参阅:
    • BEAN_EXECUTING

      public static final int BEAN_EXECUTING
      另请参阅:
  • 构造器详细资料

    • BeanInstance

      public BeanInstance(JComponent container, Object bean, int x, int y)
      Creates a new BeanInstance instance.
      参数:
      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
    • BeanInstance

      public BeanInstance(JComponent container, String beanName, int x, int y)
      Creates a new BeanInstance instance given the fully qualified name of the bean
      参数:
      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
  • 方法详细资料

    • reset

      public static void reset(JComponent container)
      Reset the list of beans
    • removeAllBeansFromContainer

      public static void removeAllBeansFromContainer(JComponent container)
      Removes all beans from containing component
      参数:
      container - a JComponent value
    • addAllBeansToContainer

      public static void addAllBeansToContainer(JComponent container)
      Adds all beans to the supplied component
      参数:
      container - a JComponent value
    • getBeanInstances

      public static Vector getBeanInstances()
      Return the list of displayed beans
      返回:
      a vector of beans
    • setBeanInstances

      public static void setBeanInstances(Vector beanInstances, JComponent container)
      Describe setBeanInstances method here.
      参数:
      beanInstances - a Vector value
      container - a JComponent value
    • paintLabels

      public static void paintLabels(Graphics gx)
      Renders the textual labels for the beans.
      参数:
      gx - a Graphics object on which to render the labels
    • findInstance

      public static BeanInstance findInstance(Point p)
      Looks for a bean (if any) whose bounds contain the supplied point
      参数:
      p - a point
      返回:
      a bean that contains the supplied point or null if no bean contains the point
    • findInstances

      public static Vector findInstances(Rectangle boundingBox)
      Looks for all beans (if any) located within the supplied bounding box. Also adjusts the bounding box to be a tight fit around all contained beans
      参数:
      boundingBox - the bounding rectangle
      返回:
      a Vector of BeanInstances
    • removeBean

      public void removeBean(JComponent container)
      Remove this bean from the list of beans and from the containing component
      参数:
      container - the JComponent that holds the bean
    • addBean

      public void addBean(JComponent container)
      Adds this bean to the global list of beans and to the supplied container. The constructor calls this method, so a client should not need to unless they have called removeBean and then wish to have it added again.
      参数:
      container - the Component on which this BeanInstance will be displayed
    • getBean

      public Object getBean()
      Gets the bean encapsulated in this instance
      返回:
      an Object value
    • getX

      public int getX()
      Gets the x coordinate of this bean
      返回:
      an int value
    • getY

      public int getY()
      Gets the y coordinate of this bean
      返回:
      an int value
    • getWidth

      public int getWidth()
      Gets the width of this bean
      返回:
      an int value
    • getHeight

      public int getHeight()
      Gets the height of this bean
      返回:
      an int value
    • setXY

      public void setXY(int newX, int newY)
      Set the x and y coordinates of this bean
      参数:
      newX - the x coordinate
      newY - the y coordinate
    • setX

      public void setX(int newX)
      Sets the x coordinate of this bean
      参数:
      newX - an int value
    • setY

      public void setY(int newY)
      Sets the y coordinate of this bean
      参数:
      newY - an int value