eventslider.java

来自「Java程序设计(美) David D. Riley著 机械工业出版社 书籍配套」· Java 代码 · 共 29 行

JAVA
29
字号
import javax.swing.event.*;import javax.swing.JSlider;/** EventSlider class (abstract) *  Author: David Riley *  Date: May, 2004  */public abstract class EventSlider extends JSlider implements ChangeListener  {    /** pre:    orient == HORIZONTAL or orient == VERTICAL     *          and  min <= val <= max <br>     *  post:   a new slider is instantiated      *          and  the value of the slider is val     *          and the minimum (left end) value is min     *          and the maximum (right end) value is max     *          and the slider is oriented to pull according to orient      */    public EventSlider(int orient, int min, int max, int val)  {    	super(orient, min, max, val);        addChangeListener( this );    }        /** EVENT HANDLER - called in response to each scheduled event	 *		(This method is designed to be overridden.)      */    public void stateChanged( ChangeEvent e )  {    }    	}

⌨️ 快捷键说明

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