private void mRemoveNode() { String old_node = (String) lstNodes.getSelectedValue(); java.util.List remove_list = ConfigUtilities.getElementsWithDefinition(mBroker.getElements(mContext), old_node); for (int i = 0; i < remove_list.size(); i++) { mBroker.remove(mContext, (ConfigElement) remove_list.get(i)); } }
public void init(Map whiteboard) { mWhiteBoard = whiteboard; // Get handle to broker mBroker = new ConfigBrokerProxy(); // Create a context mContext = (ConfigContext) mWhiteBoard.get("context"); mNodesListModel = new ConfigPtrListModel(mContext); mNodesListModel.addElementType(CLUSTER_NODE_TYPE); mBroker.addConfigListener(mNodesListModel); lstNodes.setModel(mNodesListModel); mHostnameField.setText(""); }