示例#1
0
  public void addFileVar() {
    XParamListParam param = new XParamListParam();
    param.setName("New parameter");
    param.setContent(0.0);
    m_history.record("addFileVar");

    m_glyph.getHead().getHeadGlobal().addParamListParam(param);
  }
示例#2
0
 /**
  * Makes an XML text representation.
  *
  * @param buffer
  */
 public void makeTextElement(PrintWriter buffer) {
   int size;
   size = this.paramListParam_.size();
   for (int i = 0; i < size; i++) {
     XParamListParam value = (XParamListParam) this.paramListParam_.get(i);
     value.makeTextElement(buffer);
   }
 }
示例#3
0
 private void loadVar() {
   XParamListParam[] params = m_glyph.getHead().getHeadGlobal().getParamListParam();
   int i;
   for (i = 0; i < params.length; i++) {
     XParamListParam param = params[i];
     addVar(param.getName(), param.getContent());
   } // for i
 }
示例#4
0
 /**
  * Creates a DOM representation of the object. Result is appended to the Node <code>parent</code>.
  *
  * @param parent
  */
 public void makeElement(Node parent) {
   Document doc = parent.getOwnerDocument();
   Element element = (Element) parent;
   int size;
   size = this.paramListParam_.size();
   for (int i = 0; i < size; i++) {
     XParamListParam value = (XParamListParam) this.paramListParam_.get(i);
     value.makeElement(element);
   }
 }
示例#5
0
 /**
  * Sets the XParamListParam property <b>paramListParam</b>.
  *
  * @param paramListParam
  */
 public void setParamListParam(XParamListParam paramListParam) {
   this.paramListParam_.clear();
   addParamListParam(paramListParam);
   if (paramListParam != null) {
     paramListParam.rSetParentRNode(this);
   }
 }
示例#6
0
 /**
  * Initializes the <code>XParamList</code> by the Stack <code>stack</code> that contains Elements.
  * This constructor is supposed to be used internally by the Relaxer system.
  *
  * @param stack
  */
 public void setup(RStack stack) {
   Element element = stack.getContextElement();
   IGlyphFactory factory = GlyphFactory.getFactory();
   paramListParam_.clear();
   while (true) {
     if (XParamListParam.isMatch(stack)) {
       addParamListParam(factory.createXParamListParam(stack));
     } else {
       break;
     }
   }
 }
示例#7
0
 /**
  * Tests if elements contained in a Stack <code>stack</code> is valid for the <code>XParamList
  * </code>. This method consumes the stack contents during matching operation. This mehtod is
  * supposed to be used internally by the Relaxer system.
  *
  * @param stack
  * @return boolean
  */
 public static boolean isMatchHungry(RStack stack) {
   RStack target = stack;
   boolean $match$ = false;
   Element element = stack.peekElement();
   IGlyphFactory factory = GlyphFactory.getFactory();
   Element child;
   while (true) {
     if (!XParamListParam.isMatchHungry(target)) {
       break;
     }
     $match$ = true;
   }
   return ($match$);
 }
示例#8
0
 /**
  * Adds the XParamListParam property <b>paramListParam</b> by index.
  *
  * @param index
  * @param paramListParam
  */
 public void addParamListParam(int index, XParamListParam paramListParam) {
   this.paramListParam_.add(index, paramListParam);
   if (paramListParam != null) {
     paramListParam.rSetParentRNode(this);
   }
 }