propertymanager.java
字号:
package piy;
import java.util.ArrayList;
import java.lang.reflect.*;
/**
* Uses ClassSupport to offer a property editting interface for users. A "holder" class, ie. one
* with some properties to edit is fed in to this class, which determines which of the properties
* in "holder" can be editted by PIY, and can return an array of ClassSupport objects set
* up and ready to be used.
* @author David Vivash
* @version 1.0.2, 10/02/01
*/
public class PropertyManager
{
/**
* Each of these classes is a ClassSupport class, which have not yet been instatiated.
* To find out which classes they support, you must first instatiate them and then
* call the "getSupportedType()" method.
*/
private Class[] support;
/**
* Start the property manager with the specified class support classes.
* @param support the classes representing ClassSupport classes - each ClassSupport class
* supports a particular "datatype"
*/
public PropertyManager(Class[] support) {
this.support = support;
}
/**
* Retrieves all of the class support objects (which are implicitly bound to the properties)
* which offer editting support for all of the properties in the holder class.
* @param holder the object for which to get property object support for
* @param baseClass how far up the object heirarchy to go in retrieving properties
* @param standard if the class is a standard GUI component, setting this to true ensures the position
* and size are counted as properties
* @param standardRoute if standard properties are being used, this should be set to null to imply
* the properties get routed directly through the holder, or can be set to point to a different
* object if the properties should be set indirectly. Note: the properties get rediected to
* the names S
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -