示例#1
0
 public void process(InputOutputStream stream) throws IOException, IXMLStreamableException {
   if (stream.isInputStream()) // XXX: only support read-in at the moment :(
   {
     pixmap = stream.processChild("Pixmap", pixmap, null, Pixmap.class);
   }
   useAlternateBlending =
       stream.processAttribute("alternateBlending", useAlternateBlending, false);
   modulationColor = stream.processChild("color", modulationColor, Color.WHITE, Color.class);
 }
示例#2
0
  /** Reads in appearance related parameters from streams (e.g. XML). */
  @Override
  public void process(InputOutputStream stream) throws IOException, IXMLStreamableException {
    setExpandable(stream.processAttribute("expandable", isExpandable(), true));
    setShrinkable(stream.processAttribute("shrinkable", isShrinkable(), true));
    setWidth(stream.processAttribute("width", getWidth(), 10));
    setHeight(stream.processAttribute("height", getHeight(), 10));
    setMinSize(
        stream.processAttribute("minWidth", getMinWidth(), 50),
        stream.processAttribute("minHeight", getMinHeight(), 50));
    setX(stream.processAttribute("x", getX(), 10));
    setY(stream.processAttribute("y", getY(), 10));

    setTitle(stream.processAttribute("title", getTitle(), "No Title"));

    stream.processInherentChild("TitleLabel", this.title);

    stream.processInherentChild("TitleBar", this.titleBar);

    if (closeButton != null) stream.processInherentChild("CloseButton", this.closeButton);

    if (minimizeButton != null) stream.processInherentChild("MinimizeButton", this.minimizeButton);

    if (maximizeButton != null) stream.processInherentChild("MaximizeButton", this.maximizeButton);

    stream.processInherentChild("Content", this.content);

    //		if(stream.startSubcontext("Content"))
    //		{
    //			//System.out.println(content.getClass().getCanonicalName());
    //			content = (IContainer) stream.processChild((StandardWidget)content,
    // XMLTheme.TYPE_REGISTRY);
    //			content.setParent(this);
    //			stream.endSubcontext();
    //		}

    if (stream.startSubcontext("Appearance")) {
      getAppearance().process(stream);
      stream.endSubcontext();
    }
  }
示例#3
0
 public void process(InputOutputStream stream) throws IOException, IXMLStreamableException {
   label = stream.processAttribute("label", label, label);
   reactingOnEnabled =
       stream.processAttribute("reactingOnEnabled", reactingOnEnabled, reactingOnEnabled);
 }