drawingobj.java

来自「一个数学算法的大集合」· Java 代码 · 共 33 行

JAVA
33
字号
import java.awt.*;/** * Interface for the drawing object to be drawn in the drawing panel. * @see DrawingPanel */public interface DrawingObj {    /**     * Paint method of the drawing object.     * @param g A reference to the graphical context.     */    public void draw(Graphics g);	    /**     * This method repositions the drawing object to the new location     * specified by the paramters.     * @param x The x coordinate of the drawing object's new position.     * @param y The y coordinate of the drawing object's new position.     */    public void move(int x, int y);    /**     * @return The x coordinate of the drawing object's reference point.     */    public int getX();    /**     * @return The y coordinate of the drawing object's reference point.     */    public int getY();} // interface

⌨️ 快捷键说明

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