Beispiel #1
0
 /**
  * command: show the details of the leased object represented by the given explorernode
  *
  * @param tree
  * @param loexplorernode
  */
 private void cmdShowDetails(JTree tree, final RuleExplorerNode explorerNode) {
   RuleNode ruleNode = (RuleNode) explorerNode.getTreeNode();
   RuleVO rulevo = ruleNode.getRuleVo();
   if (rulevo != null) {
     final CollectControllerFactorySingleton factory =
         CollectControllerFactorySingleton.getInstance();
     if (ruleNode.isTimeLimitRule) {
       TimelimitRuleCollectController ctl = factory.newTimelimitRuleCollectController(null);
       try {
         ctl.runViewSingleCollectableWithId(rulevo.getId());
       } catch (CommonBusinessException e) {
         Errors.getInstance().showExceptionDialog(Main.getInstance().getMainFrame(), e);
       }
     } else {
       RuleCollectController ctl = factory.newRuleCollectController(null);
       ctl.runViewSingleCollectable(new CollectableRule(rulevo));
     }
   }
 }
Beispiel #2
0
 @Override
 public Transferable createTransferable(JTree tree) {
   final RuleNode ruleNode = (RuleNode) this.getTreeNode();
   return new RuleCVOTransferable(Collections.singletonList(ruleNode.getRuleEntity()));
 }