Package project.gluebooster.math.functions

Examples of project.gluebooster.math.functions.InvocationContext


           }
          
           Pair<BoostFunction<RootDoc, RootDoc, InvocationContext>, Class> transformerAndDoclet = parseOptions(rootDoc.options());
          
          if (transformerAndDoclet.getFirst() != null)
             rootDoc = transformerAndDoclet.getFirst().valueOf(rootDoc, new InvocationContext());
         
         
          transformerAndDoclet.getSecond().getMethod("start", RootDoc.class).invoke(null, rootDoc);
         
          //System.out.println("DocletWithTransformerAndInternalDoclet ends");
View Full Code Here


    Graph graph = SampleGraphFactory.createSampleGraph1();
   
    TreeNode rootNode = SampleTreeFactory.createSampleTree1();
   
    BoostFunction<String, Boolean,?> leafFilter = new ReflectionFunctions(ReflectionFunctions.Operation.invokeMethod,"equals", "a");
    TreeNode newRootNode = TreeNodeFactory.createLeafFilteringTreeNode(rootNode, FunctionFactory.concatenation(/*<TreeNode, Boolean>*/ new ReflectionFunctions(ReflectionFunctions.Operation.invokeMethod/*<ComputedTreeNode<File>, File>(*/,"getUserObject"), leafFilter), new InvocationContext());
   
    JFrame frame = JComponentBoostUtils.createDisposingJFrameWithOneComponent( transformer.valueOf(graph,null), 800, 800);
  }
View Full Code Here

    TreeNode rootNode = SampleTreeFactory.createSampleTree1();
    BoostFunction/*<String, Boolean>*/ leafFilter = new ReflectionFunctions(ReflectionFunctions.Operation.invokeMethod, "equals", "a");
   
    
   
    TreeNode newRootNode = TreeNodeFactory.createChildrenFilteringTreeNode(rootNode, FunctionFactory.concatenation(/*<TreeNode, Boolea*/ new ReflectionFunctions(ReflectionFunctions.Operation.invokeMethod/*<ComputedTreeNode<File>, File>(*/,"getUserObject"), leafFilter), new InvocationContext());
    //only the a leaf is resulting, no other leafs or folder should be present

    JFrame frame1 = JComponentBoostUtils.createDisposingJFrameWithOneComponent("Original", new JTree(rootNode), 800, 800);
    JFrame frame = JComponentBoostUtils.createDisposingJFrameWithOneComponent("Filtered", new JTree(newRootNode), 800, 800);
    //ThreadBoostUtils.sleep(30000);
View Full Code Here

  public void testCreateLeafFilteringTreeNode() throws Exception
  {
    TreeNode rootNode = SampleTreeFactory.createSampleTree1();
    BoostFunction<String, Boolean, ?> leafFilter = new ReflectionFunctions(ReflectionFunctions.Operation.invokeMethod,"equals", "a");
   
    TreeNode newRootNode = TreeNodeFactory.createLeafFilteringTreeNode(rootNode, /*<TreeNode, Boolean>*/new ModifyingFunction(ModifyingFunction.Operation.concatenatedFunctions, new ReflectionFunctions(ReflectionFunctions.Operation.invokeMethod/*<ComputedTreeNode<File>, File>(*/,"getUserObject"), leafFilter), new InvocationContext());
    //only the a leaf is resulting, no other leafs or folder should be present

    JFrame frame1 = JComponentBoostUtils.createDisposingJFrameWithOneComponent("Original", new JTree(rootNode), 800, 800);
    JFrame frame = JComponentBoostUtils.createDisposingJFrameWithOneComponent("Filtered", new JTree(newRootNode), 800, 800);
    //ThreadBoostUtils.sleep(30000);
View Full Code Here

   public void testCreateCreateResourceTagletLayout()
   throws Exception
   {
      TagletByFunction taglet = (TagletByFunction) GlueboosterTaglets.createCreateResourceTaglet();
      FunctionByEventsourceGraph function = (FunctionByEventsourceGraph) taglet.getFunction();
      InvocationContext context = new InvocationContext();
      JComponent graph =FunctionGraphUtils.asGraph(function, 800, 800, context);
      System.out.println("got graph " + graph);
      System.out.println("got size " + graph.getSize());
      System.out.println("got preferred size " + graph.getPreferredSize());
     
View Full Code Here

      File a1 = FileBoostUtils.createTempFile(dirA);
      File a2 = FileBoostUtils.createTempFile(dirA);
      File a3 = FileBoostUtils.createTempFile(dirA);
     
      System.out.println(a3.getAbsolutePath());
      TreeNode rootNode = FileBoostUtils.createTreeNode(tempDir, new InvocationContext());
      assertEquals(2, rootNode.getChildCount());
      assertFalse(rootNode.isLeaf());
     
      Enumeration<TreeNode> subdirs = rootNode.children();
      assertTrue(subdirs.hasMoreElements());
View Full Code Here

    * TODO not yet working
    */
   public static void displayDirectory(String rootDir, BoostFunction/*<File, Boolean>*/ allowedFilesFilter) throws Exception
   {
      TreeNode rootNode;
      ComputedTreeNode<File> root = FileBoostUtils.createTreeNode( new File(rootDir), new InvocationContext());
      rootNode = root;
      if (allowedFilesFilter != null)
      {
         rootNode = TreeNodeFactory.createLeafFilteringTreeNode(root, FunctionFactory.concatenation(/*<TreeNode, Boolean>*/ new ReflectionFunctions(ReflectionFunctions.Operation.invokeMethod/*<ComputedTreeNode<File>, File>(*/,"getObject"), allowedFilesFilter), new InvocationContext());
      }
      JFrame frame = JComponentBoostUtils.createDisposingJFrameWithOneComponent(new JTree(rootNode), 800, 800);
   }
View Full Code Here

    if ( ! root.exists())
      return; //skip test
    List ignore = Arrays.asList( new String[]{".gif", ".GIF"});
    List text = Arrays.asList( new String[]{"FileContainsTextFilter", "XXX"});
   
    Collection<File> result = IOFilterBoostUtils.getFilesContainingText(root, ignore, null, text, new InvocationContext());
    log.debug(result);
   
  }
View Full Code Here

   {
      ComponentGraph<String, String> graph = new ComponentGraph<String, String>();
      graph.setGraph(SampleGraphFactory.createSampleGraph1());
      graph.setVertexComponentGetter(new ComponentFunctions(ComponentFunctions.Operation.toJTextArea));
      graph.setEdgeComponentGetter(new ComponentFunctions(ComponentFunctions.Operation.toJTextArea));
      graph.setContext(new InvocationContext());
      graph.afterPropertiesSet();
     
      JFrame frame = JComponentBoostUtils.createDisposingJFrameWithOneComponent(graph, 800, 800);
      //ThreadBoostUtils.sleep(10000);
      //frame.dispose();
View Full Code Here

   public static JComponent createSampleGraphJComponent() throws Exception
   {
     
      FunctionByEventsourceGraph<BigDecimal, BigDecimal> function = createGraphFunction();
      function.addChangeListener(new SleepingListener(2000));
      JComponent result = FunctionGraphUtils.asGraph(function, 770, 770, new InvocationContext());
      MethodExecutingRunnable.startMethodExecution(function, "get", new BigDecimal(2));//start the method after the listeners are registered.
      return result;
     
   }
View Full Code Here

TOP

Related Classes of project.gluebooster.math.functions.InvocationContext

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.