Package gov.nasa.arc.mct.graphics.brush

Examples of gov.nasa.arc.mct.graphics.brush.Fill


   * @return a list of brushes
   */
  public List<Brush> getLayers() {
    List<Brush> brushes = new ArrayList<Brush>();
   
    brushes.add(new Fill((Color) getSetting(GRAPHICAL_BACKGROUND_COLOR)));
    FillProvider provider = fillMap.get((String) getSetting(GRAPHICAL_FOREGROUND_FILL));
    Object evaluator = getSetting(GRAPHICAL_EVALUATOR);
    if (evaluator == NO_EVALUATOR) {
      Brush b = provider.getFill((Color) getSetting(GRAPHICAL_FOREGROUND_COLOR));
      Double minimum = Double.parseDouble((String) getSetting(GRAPHICAL_FOREGROUND_MIN));
      Double maximum = Double.parseDouble((String) getSetting(GRAPHICAL_FOREGROUND_MAX));
      if (b instanceof StateSensitive) ((StateSensitive) b).setInterval(minimum, maximum);
      brushes.add(b);
    } else {
      // Build evaluator brushes
      Object evMapSetting = getSetting(GRAPHICAL_EVALUATOR_MAP);
      if (evMapSetting instanceof Map) {
        Map evMap = (Map) evMapSetting;
        for (Object entry : evMap.entrySet()) {
          if (entry instanceof Map.Entry) {
            Object key = ((Map.Entry) entry).getKey();
            Object value = ((Map.Entry) entry).getValue();
            if (value instanceof Color && key instanceof String) {
              Fill b = provider.getFill((Color) value);
              Double minimum = Double.parseDouble((String) getSetting(GRAPHICAL_FOREGROUND_MIN));
              Double maximum = Double.parseDouble((String) getSetting(GRAPHICAL_FOREGROUND_MAX));
              b.setInterval(minimum, maximum);
              brushes.add(new ConditionalBrush(b, (String) key));
            }
          }
        }
      }
View Full Code Here


    return s.toString();
  }
 
  private static class FillProvider {
    public Fill getFill(Color color) {
      return new Fill(color);
    }
View Full Code Here

TOP

Related Classes of gov.nasa.arc.mct.graphics.brush.Fill

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.