Пример #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));
 }
Пример #2
0
 /**
  * Sets the path icons for display
  *
  * @param pathChanged
  */
 protected void updatePath(boolean pathChanged) {
   // to avoid ConcurrentModificationException now set data
   Iterator<Positionable> iter = _pathGroup.iterator();
   while (iter.hasNext()) {
     Positionable pos = iter.next();
     if (pos instanceof IndicatorTrack) {
       ((IndicatorTrack) pos).addPath(TEST_PATH);
     } else {
       ((PortalIcon) pos).setStatus(PortalIcon.PATH);
     }
   }
   _pathChange = pathChanged;
   String name = _pathName.getText();
   if (name == null || name.length() == 0) {
     JOptionPane.showMessageDialog(
         this,
         Bundle.getMessage("needPathName"),
         Bundle.getMessage("makePath"),
         JOptionPane.INFORMATION_MESSAGE);
   } else {
   }
 }