📄 integerproperty.java
字号:
package jmathlib.core.graphics.properties;import java.text.DecimalFormat;import jmathlib.core.graphics.*;public class IntegerProperty extends Property{ private int value; public IntegerProperty(PropertySet parent, String name, int value) { super(parent, name); this.value = value; } public Object get() { return new Integer(value); } public void set(Object val) throws PropertyException { if (val instanceof Number) value = ((Number)val).intValue(); else throw new PropertyException("invalid property value - " + val.toString()); } public double intValue() { return value; } public double doubleValue() { return (double)value; } public float floatValue() { return (float)value; } public String toString() { DecimalFormat fmt = new DecimalFormat("0.0000"); return fmt.format(value); }}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -