@Override public void init() { initWidget(uiBinder.createAndBindUi(this)); boundWidgets = new Widget[] { starsListBox, extraTextBox, extraListBox, number, name, length, grade, text, fa }; starsListBox.addItem(""); starsListBox.addItem("*"); starsListBox.addItem("**"); starsListBox.addItem("***"); type = ((XmlSimpleModel) this.getModel()).getXml().getNodeName(); if (type.equals("climb")) extraListBox.setVisible(false); else { WidgetUtil.setVisible(lengthSpan, false); extraTextBox.setVisible(false); extraListBox.addItem(""); extraListBox.addItem("(SDS)"); extraListBox.addItem("(Stand)"); extraListBox.addItem("(Hang)"); extraListBox.addItem("(Highball)"); extraListBox.addItem("(Highball, Stand)"); extraListBox.addItem("(Highball, SDS)"); } super.init(); }
@Override public void init() { // realNode = getModel().getNode(); // tempNode = realNode.cloneNode(true); // getModel().setNode(tempNode); /* cellTable = GpsReadNode.setupTable(getModel(), dataProvider); GpsReadNode.initTableCols(cellTable, true); IdentityColumn<XmlSimpleModel> removeColumn = new IdentityColumn<XmlSimpleModel>( new ActionCell<XmlSimpleModel>("Remove", new ActionCell.Delegate<XmlSimpleModel>() { @Override public void execute(XmlSimpleModel model) { // Window.alert("You clicked " + // model.getNode()); if (Window .confirm("Are you sure you want to remove this?\n You wont be able to undo")) { Node node = model.getNode(); node.getParentNode().removeChild(node); updateAllWidgets(); } } })); cellTable.setColumnWidth(removeColumn, 5, Unit.PCT); cellTable.addColumn(removeColumn, ""); */ initWidget(uiBinder.createAndBindUi(this)); super.init(); /* addButton.addClickHandler(new ClickHandler() { @Override public void onClick(ClickEvent event) { Element point = ((XmlSimpleModel) getModel()).createElement("point", ""); mapPanel.addNewPointAndSetToCentre(point); updateAllWidgets(); } }); */ if (!mapInited) { mapInited = true; mapPanel.setDelegate(GpsEditNode.this); mapPanel.setEditable(true); mapPanel.init(mapDrawingObjects); } }