abstractxypainter.java

来自「CroftSoft Code Library是一个开源的可移植的纯Java游戏库」· Java 代码 · 共 60 行

JAVA
60
字号
     package com.croftsoft.core.animation.painter;

     /*********************************************************************
     * Abstract XYPainter implementation of (x,y) accessor/mutator ops.
     *
     * @version
     *   2003-07-05
     * @since
     *   2002-03-05
     * @author
     *   <a href="http://www.croftsoft.com/">David Wallace Croft</a>
     *********************************************************************/

     public abstract class  AbstractXYPainter
       implements XYPainter
     //////////////////////////////////////////////////////////////////////
     //////////////////////////////////////////////////////////////////////
     {

     protected int  x;

     protected int  y;

     //////////////////////////////////////////////////////////////////////
     // constructor methods
     //////////////////////////////////////////////////////////////////////

     /*********************************************************************
     * Main constructor.
     *********************************************************************/
     public  AbstractXYPainter (
       int  x,
       int  y )
     //////////////////////////////////////////////////////////////////////
     {
       this.x = x;

       this.y = y;
     }

     //////////////////////////////////////////////////////////////////////
     // accessor methods
     //////////////////////////////////////////////////////////////////////

     public int   getX  ( ) { return x;  }

     public int   getY  ( ) { return y;  }

     //////////////////////////////////////////////////////////////////////
     // mutator methods
     //////////////////////////////////////////////////////////////////////

     public void  setX ( int  x ) { this.x = x; }

     public void  setY ( int  y ) { this.y = y; }

     //////////////////////////////////////////////////////////////////////
     //////////////////////////////////////////////////////////////////////
     }

⌨️ 快捷键说明

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