Package org.zkoss.canvas

Source Code of org.zkoss.canvas.CompositeDrawable

/* CompositeDrawable.java

{{IS_NOTE
Purpose:
 
Description:
 
History:
  Jun 8, 2011 11:56:44 PM , Created by simonpai
}}IS_NOTE

Copyright (C) 2011 Potix Corporation. All Rights Reserved.

{{IS_RIGHT
}}IS_RIGHT
*/
package org.zkoss.canvas;

import java.util.List;

import org.zkoss.json.JSONArray;
import org.zkoss.json.JSONAware;

/**
*
* @author simonpai
*/
public abstract class CompositeDrawable extends Drawable {
 
  protected abstract List<Drawable> getDrawables();
 
  @SuppressWarnings("unchecked")
  @Override
  public JSONAware getShapeJSONObject() {
    JSONArray result = new JSONArray();
    for(Drawable d : getDrawables())
      result.add(d);
    return result;
  }
 
  @Override
  public String getType() {
    return "comp";
  }
 
}
TOP

Related Classes of org.zkoss.canvas.CompositeDrawable

TOP
Copyright © 2018 www.massapi.com. 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.