程序包 weka.gui.beans
类 BeanInstance
java.lang.Object
weka.gui.beans.BeanInstance
- 所有已实现的接口:
Serializable
Class that manages a set of beans.
-
字段概要
字段 -
构造器概要
构造器构造器说明BeanInstance
(JComponent container, Object bean, int x, int y) Creates a newBeanInstance
instance.BeanInstance
(JComponent container, String beanName, int x, int y) Creates a newBeanInstance
instance given the fully qualified name of the bean -
方法概要
修饰符和类型方法说明static void
addAllBeansToContainer
(JComponent container) Adds all beans to the supplied componentvoid
addBean
(JComponent container) Adds this bean to the global list of beans and to the supplied container.static BeanInstance
Looks for a bean (if any) whose bounds contain the supplied pointstatic Vector
findInstances
(Rectangle boundingBox) Looks for all beans (if any) located within the supplied bounding box.getBean()
Gets the bean encapsulated in this instancestatic Vector
Return the list of displayed beansint
Gets the height of this beanint
getWidth()
Gets the width of this beanint
getX()
Gets the x coordinate of this beanint
getY()
Gets the y coordinate of this beanstatic void
paintLabels
(Graphics gx) Renders the textual labels for the beans.static void
removeAllBeansFromContainer
(JComponent container) Removes all beans from containing componentvoid
removeBean
(JComponent container) Remove this bean from the list of beans and from the containing componentstatic void
reset
(JComponent container) Reset the list of beansstatic void
setBeanInstances
(Vector beanInstances, JComponent container) DescribesetBeanInstances
method here.void
setX
(int newX) Sets the x coordinate of this beanvoid
setXY
(int newX, int newY) Set the x and y coordinates of this beanvoid
setY
(int newY) Sets the y coordinate of this bean
-
字段详细资料
-
构造器详细资料
-
BeanInstance
Creates a newBeanInstance
instance.- 参数:
container
- aJComponent
to add the bean tobean
- the bean to addx
- the x coordinate of the beany
- the y coordinate of the bean
-
BeanInstance
Creates a newBeanInstance
instance given the fully qualified name of the bean- 参数:
container
- aJComponent
to add the bean tobeanName
- the fully qualified name of the beanx
- the x coordinate of the beany
- th y coordinate of the bean
-
-
方法详细资料
-
reset
Reset the list of beans -
removeAllBeansFromContainer
Removes all beans from containing component- 参数:
container
- aJComponent
value
-
addAllBeansToContainer
Adds all beans to the supplied component- 参数:
container
- aJComponent
value
-
getBeanInstances
Return the list of displayed beans- 返回:
- a vector of beans
-
setBeanInstances
DescribesetBeanInstances
method here.- 参数:
beanInstances
- aVector
valuecontainer
- aJComponent
value
-
paintLabels
Renders the textual labels for the beans.- 参数:
gx
- aGraphics
object on which to render the labels
-
findInstance
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
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
Remove this bean from the list of beans and from the containing component- 参数:
container
- theJComponent
that holds the bean
-
addBean
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
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 coordinatenewY
- the y coordinate
-
setX
public void setX(int newX) Sets the x coordinate of this bean- 参数:
newX
- anint
value
-
setY
public void setY(int newY) Sets the y coordinate of this bean- 参数:
newY
- anint
value
-