public void reset() { Road road = edgenode.getRoad(); if (road != null) { roadLink.setText(road.getName()); roadLink.setEnabled(true); nodeLink.setText(road.getOtherNode(edgenode).getName()); nodeLink.setEnabled(true); } else { roadLink.setText("null"); roadLink.setEnabled(false); nodeLink.setText("null"); nodeLink.setEnabled(false); } }
public void actionPerformed(ActionEvent e) { Object source = e.getSource(); if (source == roadLink) confd.selectObject(edgenode.getRoad()); else if (source == nodeLink) confd.selectObject(edgenode.getRoad().getOtherNode(edgenode)); }
public void setEdgeNode(EdgeNode e) { edgenode = e; confd.setTitle(edgenode.getName()); reset(); }