};
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));
}