예제 #1
0
 /** View the instance. */
 private Action getViewClsAction() {
   return new AbstractAction("View Cls", Icons.getViewIcon()) {
     public void actionPerformed(ActionEvent event) {
       viewObject();
     }
   };
 }
예제 #2
0
 private Action getRemoveClsAction() {
   return new AbstractAction("Remove Cls", Icons.getRemoveIcon()) {
     public void actionPerformed(ActionEvent event) {
       removeInstance();
     }
   };
 }
예제 #3
0
  /** Get Select(+) Instance Action. */
  private Action getSelectClsAction() {
    return new AbstractAction("Select Cls", Icons.getAddIcon()) {
      public void actionPerformed(ActionEvent event) {

        if (instanceSlot == null) instanceSlot = getSlot();
        if (instanceSlot == null) return;
        Collection clses = instanceSlot.getAllowedParents();
        Instance instance = DisplayUtilities.pickCls(itsComp, getKB(), clses);

        if (instance != null) {
          setDisplayedInstance(instance);
          itsInstance = instance;
        }
        setActionsEnabled(true);
      }
    };
  }