コード例 #1
0
ファイル: RuleExplorerNode.java プロジェクト: r1c0/Nuclos
 /**
  * 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));
     }
   }
 }
コード例 #2
0
ファイル: RuleExplorerNode.java プロジェクト: r1c0/Nuclos
 @Override
 public Transferable createTransferable(JTree tree) {
   final RuleNode ruleNode = (RuleNode) this.getTreeNode();
   return new RuleCVOTransferable(Collections.singletonList(ruleNode.getRuleEntity()));
 }