SColor.java
上传用户:hainatieta
上传日期:2019-07-13
资源大小:1076k
文件大小:1k
- package cn.seejava.lei2;
- import java.awt.Color;
- import java.awt.color.ColorSpace;
- public class SColor extends Color {
- public SColor(int arg1,int arg2,int arg3){
- super(arg1,arg2,arg3);
- }
- public SColor(ColorSpace arg0, float[] arg1, float arg2) {
- super(arg0, arg1, arg2);
- // TODO Auto-generated constructor stub
- }
- /**
- *
- */
- private static final long serialVersionUID = 1L;
- public boolean sequals(Color color){
- if(this.getRed()<(color.getRed()+6)&&this.getRed()>(color.getRed()-6)){
- if(this.getGreen()<(color.getGreen()+6)&&this.getGreen()>(color.getGreen()-6)){
- if(this.getBlue()<(color.getBlue()+6)&&this.getBlue()>(color.getBlue()-6)){
- return true;
- }else{
- return false;
- }
- } else{
- return false;
- }
- }else{
- return false;
- }
- }
- }