Package com.scriptographer.ai

Examples of com.scriptographer.ai.Color


    if (super.has(name, start))
      return super.get(name, start);
    // Determine conversion type from property name
    Class type = colorPropertyToClass.get(name);
    if (type != null) {
      Color color = ((Color) javaObject).convert(type);
      if (color != null) {
                Scriptable scriptable = Context.toObject(color, start);
                return scriptable.get(name, start);
      }
    }
View Full Code Here


      super.put(name, start, value);
    } else {
      // Determine conversion type from property name
      Class type = colorPropertyToClass.get(name);
      if (type != null) {
        Color fromColor = (Color) javaObject;
        Color toColor = fromColor.convert(type);
        if (toColor != null) {
                  Scriptable scriptable = Context.toObject(toColor, start);
                  scriptable.put(name, start, value);
                  toColor = toColor.convert(fromColor.getClass());
                  fromColor.set(toColor);
        }
      }
    }
  }
View Full Code Here

      // No need to call onChange, as setSelectionIndex already does:
      callOnChange = false;
    }
    break;
    case COLOR: {
      Color color = ScriptEngine.convertToJava(value, Color.class);
      if (color == null)
        color = new RGBColor(0, 0, 0);
      ((ColorButton) item).setColor(color);
    }
    break;
View Full Code Here

    setColor(color);
  }

  protected void onNotify(Notifier notifier) {
    if (notifier == Notifier.USER_CHANGED) {
      Color color = Dialog.chooseColor(this.color);
      if(color == null)
        return;
      setColor(color);
    }
    super.onNotify(notifier);
View Full Code Here

TOP

Related Classes of com.scriptographer.ai.Color

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.