コード例 #1
0
 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);
   }
 }
コード例 #2
0
 private void update(Hyperlink hyperlink, Object object) {
   String text = labelProvider != null ? labelProvider.getText(object) : object.toString();
   Image image = labelProvider != null ? labelProvider.getImage(object) : null;
   String tooltip = labelProvider != null ? labelProvider.getToolTipText(object) : text;
   hyperlink.setText(text);
   hyperlink.setToolTipText(tooltip);
   if (hyperlink instanceof ImageHyperlink) ((ImageHyperlink) hyperlink).setImage(image);
   reflow();
 }