📄 fillcolorevent.java
字号:
package examples.beans;
import java.awt.Color;
import java.util.EventObject;
/** A user-defined event class
*/
public class FillColorEvent extends EventObject {
/** event type identifier */
public static final int COLOR_CHANGE = 0;
private int id;
private Color color;
/** Construct an event object
* @param source the object initiating the event
* @param id the event identifier
* @param c the color for the event
*/
public FillColorEvent( Object source, int id,
Color c ) {
super( source );
id = id;
color = c;
}
/** Return the color associated with the event
* @return The color
*/
public Color getColor() {
return color;
}
/** Return the event identifier
* @return The event identifier
*/
public int getID() {
return id;
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -