genericpropertyholder.java

来自「PIY(Program It Yourself)是一个基于Java的应用程序开发」· Java 代码 · 共 47 行

JAVA
47
字号
package piytest.support;

import java.awt.Color;
import piy.FixedProperty;

/**
* This is a standard class which can be used to ensure
* properties are being handled correctly.
* For testing new property types, the relevent properties
* with those types can just be added to this class.
* All non-primitive property types should be initialised to null - 
* the tests can reset them to whatever's needed.
*
* @author David Vivash
* @version 1.1, 26/4/01
*/
public class GenericPropertyHolder {
	//primitive types
	private boolean booleanValue	= false;
	private int intValue			= 0;
	private float floatValue		= 0f;
	
	//objects
	private String stringValue	= null;
	private Color colorValue	= null;

	private FixedProperty fixed	= null;

	public boolean getBooleanValue() { return booleanValue;	}
	public void setBooleanValue(boolean val) { booleanValue = val; }

	public int getIntValue() { return intValue;	}
	public void setIntValue(int val) { intValue = val; }
	
	public float getFloatValue() { return floatValue;	}
	public void setFloatValue(float val) { floatValue = val; }

	public String getStringValue() { return stringValue;	}
	public void setStringValue(String val) { stringValue = val; }

	public Color getColorValue() { return colorValue;	}
	public void setColorValue(Color val) { colorValue = val; }

	public FixedProperty getFixedProperty() { return fixed; }
	public void setFixedProperty(FixedProperty val) { fixed = val; }

}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?