コード例 #1
0
    public DescPropPopup() {
      super("Descriptor Properties");
      v = new JCheckBoxMenuItem("Valid");
      v.addActionListener(new ValidAction());
      p = new JCheckBoxMenuItem("Propagating");
      p.addActionListener(new PropAction());
      delete = new JMenuItem("Delete");
      delete.addActionListener(new DeleteAction());
      duplicate = new JMenuItem("Duplicate");
      duplicate.addActionListener(new DuplicateAction());
      interp = new JMenuItem("Interpolate...");
      interp.addActionListener(new InterpAction());
      interpToMark = new JMenu("Interpolate to Mark");
      interpToMark.setEnabled(false);
      itmAction = new InterpToMarkAction();
      shift = new JMenuItem("Shift...");
      shift.addActionListener(new ShiftAction());
      shiftToMark = new JMenu("Shift to Mark");
      shiftToMark.setEnabled(false);
      stmAction = new ShiftToMarkAction();

      occlusions = new JMenuItem("Occlusions...");
      occAction = new OccAction();
      occlusions.addActionListener(occAction);
      occSeparator = new JSeparator();

      wrt = new JCheckBoxMenuItem("Display with Respect To", false);
      wrt.addActionListener(new WithRespectToAction());

      add(occlusions);
      add(occSeparator);
      add(v);
      add(p);
      add(occSeparator);
      add(delete);
      add(duplicate);
      add(occSeparator);
      add(interp);
      add(interpToMark);
      add(occSeparator);
      add(shift);
      add(shiftToMark);
      add(occSeparator);
      add(wrt);
    }
コード例 #2
0
 private void resetMarks() {
   interpToMark.removeAll();
   shiftToMark.removeAll();
   Iterator marks = mediator.getMarkerModel().getLabels().iterator();
   boolean hasMark = false;
   while (marks.hasNext()) {
     String mark = (String) marks.next();
     if (!ChronicleViewer.CURR_FRAME_LABEL.equals(mark)) {
       JMenuItem mi = new JMenuItem(mark);
       mi.addActionListener(itmAction);
       interpToMark.add(mi);
       mi = new JMenuItem(mark);
       mi.addActionListener(stmAction);
       shiftToMark.add(mi);
       hasMark = true;
     }
   }
   shiftToMark.setEnabled(hasMark);
   interpToMark.setEnabled(hasMark);
 }