Package org.beryl.gui

Examples of org.beryl.gui.WidgetInfo$PropertyEntry


  };

  public AddPropertyDialog(Frame frame, WidgetUserObject userObject) throws GUIException {
    this.userObject = userObject;

    WidgetInfo info = userObject.widget.getWidgetInfo();

    if (info != null) {
      ArrayList properties = new ArrayList();
      NodeList childNodes = userObject.element.getChildNodes();

      for (int i = 0; i < childNodes.getLength(); i++) {
        Node node = childNodes.item(i);

        if (node.getNodeType() == Node.ELEMENT_NODE) {
          if (node.getNodeName().equals("property")) {
            properties.add(((Element) node).getAttribute("name"));
          } else if (node.getNodeName().equals("anchor")) {
            properties.add("anchor");
          } else if (node.getNodeName().equals("layout")) {
            properties.add("layout");
          }
        }

      }

      TableDataModel tableModel = new TableDataModel();
      for (Iterator i = info.getPropertyEntries().iterator(); i.hasNext();) {
        WidgetInfo.PropertyEntry entry = (WidgetInfo.PropertyEntry) i.next();

        if (!properties.contains(entry.propertyName)) {

          if (entry.propertyName.equals("anchor")) {
            if (info.getSupportsAnchor()) {
              tableModel.addRow(new PropertyEntryTableRow(entry));
            }
          } else {
            tableModel.addRow(new PropertyEntryTableRow(entry));
          }
View Full Code Here


  }

  public void doInsert(String className) throws GUIException {
    TreeItem items[] = (TreeItem[]) dataModel.getValue("tree.selected");
    if (items.length == 1) {
      WidgetInfo info = constructWidget(null, className, null, null).getWidgetInfo();
      Element anchorElement =
        ((WidgetUserObject) rootNode.getUserObject()).element.getOwnerDocument().createElement("anchor");
      new InsertDialog(this, className, info, anchorElement);
    }
  }
View Full Code Here

TOP

Related Classes of org.beryl.gui.WidgetInfo$PropertyEntry

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.