⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 scolor.java

📁 openmap java写的开源数字地图程序. 用applet实现,可以像google map 那样放大缩小地图.
💻 JAVA
字号:
// **********************************************************************// // <copyright>// //  BBN Technologies//  10 Moulton Street//  Cambridge, MA 02138//  (617) 873-8000// //  Copyright (C) BBNT Solutions LLC. All rights reserved.// // </copyright>// **********************************************************************// // $Source: /cvs/distapps/openmap/src/corba/com/bbn/openmap/layer/specialist/SColor.java,v $// $RCSfile: SColor.java,v $// $Revision: 1.3.2.1 $// $Date: 2004/10/14 18:26:31 $// $Author: dietrick $// // **********************************************************************package com.bbn.openmap.layer.specialist;import com.bbn.openmap.CSpecialist.*;import com.bbn.openmap.CSpecialist.CColorPackage.*;/** * A SColor is a specialist graphic object parameter that lets you * represent a RGB color. *  * <p> * RGB range from 0 - 65535; */public class SColor extends _CColorStub {    protected EColor self;    /** construct a (0,0,0) color */    public SColor() {        this((short) 0, (short) 0, (short) 0);    }    /**     * construct a color with (r, g, b) for red, green and blue     *      * @param r the red value     * @param g the green value     * @param b the blue value     */    public SColor(short r, short g, short b) {        self = new EColor(this, r, g, b);    }    /**     * construct a color with (r, g, b) from ints. This does NO range     * checking.     *      * @param r the red value     * @param g the green value     * @param b the blue value     */    public SColor(int r, int g, int b) {        this((short) r, (short) g, (short) b);    }    /**     * set the red value     *      * @param r the new red value     */    public void red(short r) {        self.red = r;    }    /**     * get the red value     *      * @return the new red value     */    public short red() {        return self.red;    }    /**     * set the green value     *      * @param g the new green value     */    public void green(short g) {        self.green = g;    }    /**     * get the green value     *      * @return the new green value     */    public short green() {        return self.green;    }    /**     * set the blue value     *      * @param b the new blue value     */    public void blue(short b) {        self.blue = b;    }    /**     * get the blue value     *      * @return the new blue value     */    public short blue() {        return self.blue;    }    public String toString() {        StringBuffer s = new StringBuffer();        s.append("SColor: r = " + red() + ", g = " + green() + ", b = "                + blue());        return s.toString();    }    /**     * get the filled representation of this object. <b>modifying this     * struct will modify the object that created it </b>     */    public EColor fill() {        return self;    }}

⌨️ 快捷键说明

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