Ejemplo n.º 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);
  }
Ejemplo n.º 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);
   }
 }
Ejemplo n.º 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
 }
Ejemplo n.º 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);
   }
 }
Ejemplo n.º 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);
   }
 }
Ejemplo n.º 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;
     }
   }
 }
Ejemplo n.º 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$);
 }
Ejemplo n.º 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);
   }
 }