Exemple #1
0
 private void clearPath() {
   for (int i = 0; i < _pathGroup.size(); i++) {
     Positionable pos = _pathGroup.get(i);
     if (pos instanceof PortalIcon) {
       ((PortalIcon) pos).setStatus(PortalIcon.VISIBLE);
     } else {
       ((IndicatorTrack) pos).removePath(TEST_PATH);
     }
   }
   int state = _block.getState() & ~OBlock.ALLOCATED;
   _pathGroup = new ArrayList<Positionable>();
   _block.pseudoPropertyChange("state", Integer.valueOf(0), Integer.valueOf(state));
 }
Exemple #2
0
 public void valueChanged(ListSelectionEvent e) {
   clearPath();
   OPath path = _pathList.getSelectedValue();
   if (path != null) {
     _pathName.setText(path.getName());
     if (_units.isSelected()) {
       _length.setText(Float.toString(path.getLengthIn()));
     } else {
       _length.setText(Float.toString(path.getLengthCm()));
     }
     showPath(path);
   } else {
     checkForSavePath();
     _pathName.setText(null);
     _length.setText("");
   }
   int state = _block.getState() | OBlock.ALLOCATED;
   _block.pseudoPropertyChange("state", Integer.valueOf(0), Integer.valueOf(state));
 }
Exemple #3
0
 /** *********************** end setup ************************* */
 private void clearListSelection() {
   _pathList.clearSelection();
   int state = _block.getState() & ~OBlock.ALLOCATED;
   _block.pseudoPropertyChange("state", Integer.valueOf(0), Integer.valueOf(state));
   _length.setText("");
 }