Search in sources :

Example 1 with SimpleDemoBean

use of cern.gp.explorer.test.helpers.SimpleDemoBean in project ACS by ACS-Community.

the class TestListExplorer method main.

public static void main(String[] args) throws Exception {
    int numberOfBeans = 6;
    // create the beans you want to display
    SimpleDemoBean[] beans = new SimpleDemoBean[numberOfBeans];
    for (int ix = 0; ix < numberOfBeans; ix++) {
        beans[ix] = new SimpleDemoBean("bean_" + ix);
    }
    // create nodes associated with the beans
    GPNode[] nodes = NodeFactory.createNode(beans);
    // create the explorer and set the columns it shall display
    ListExplorer expl = new ListExplorer(nodes);
    //  open the explorer in a NetBeans "Mode"
    WindowUtils.openInMode(expl, "TestListExplorer");
    expl.requestFocus();
}
Also used : SimpleDemoBean(cern.gp.explorer.test.helpers.SimpleDemoBean) ListExplorer(cern.gp.explorer.ListExplorer) GPNode(cern.gp.nodes.GPNode)

Example 2 with SimpleDemoBean

use of cern.gp.explorer.test.helpers.SimpleDemoBean in project ACS by ACS-Community.

the class TestListTableExplorer method main.

public static void main(String[] args) throws Exception {
    int numberOfBeans = 6;
    // create the beans you want to display
    SimpleDemoBean[] beans = new SimpleDemoBean[numberOfBeans];
    for (int ix = 0; ix < numberOfBeans; ix++) {
        beans[ix] = new SimpleDemoBean("bean_" + ix);
    }
    // create nodes associated with the beans
    GPNode[] nodes = NodeFactory.createNode(beans);
    // create the explorer and set the columns it shall display
    ListTableExplorer expl = new ListTableExplorer(nodes);
    expl.setTableColumns(new String[] { "name", "value" });
    //  open the explorer in a NetBeans "Mode"
    WindowUtils.openInMode(expl, "TestListTableExplorer");
    expl.requestFocus();
}
Also used : SimpleDemoBean(cern.gp.explorer.test.helpers.SimpleDemoBean) ListTableExplorer(cern.gp.explorer.ListTableExplorer) GPNode(cern.gp.nodes.GPNode)

Example 3 with SimpleDemoBean

use of cern.gp.explorer.test.helpers.SimpleDemoBean in project ACS by ACS-Community.

the class TestMultiListExplorer method main.

public static void main(String[] args) throws Exception {
    GPNode root = NodeFactory.createNode(new SimpleDemoBean("parent"), new RecursiveChildrenListManager());
    MultiListExplorer expl = new MultiListExplorer();
    expl.setRootNode(root);
    expl.setListCount(3);
    WindowUtils.openInMode(expl, "TestMultiListExplorer");
}
Also used : SimpleDemoBean(cern.gp.explorer.test.helpers.SimpleDemoBean) RecursiveChildrenListManager(cern.gp.explorer.test.helpers.RecursiveChildrenListManager) MultiListExplorer(cern.gp.explorer.MultiListExplorer) GPNode(cern.gp.nodes.GPNode)

Example 4 with SimpleDemoBean

use of cern.gp.explorer.test.helpers.SimpleDemoBean in project ACS by ACS-Community.

the class TestTreeExplorer method createTreeExplorer.

public static TreeExplorer createTreeExplorer() {
    TreeExplorer expl = null;
    try {
        GPNode root = NodeFactory.createNode(new SimpleDemoBean("parent"), new RecursiveChildrenListManager());
        expl = new TreeExplorer();
        expl.setRootNode(root);
    } catch (IntrospectionException ex) {
        ex.printStackTrace();
    }
    return expl;
}
Also used : TreeExplorer(cern.gp.explorer.TreeExplorer) SimpleDemoBean(cern.gp.explorer.test.helpers.SimpleDemoBean) RecursiveChildrenListManager(cern.gp.explorer.test.helpers.RecursiveChildrenListManager) IntrospectionException(java.beans.IntrospectionException) GPNode(cern.gp.nodes.GPNode)

Example 5 with SimpleDemoBean

use of cern.gp.explorer.test.helpers.SimpleDemoBean in project ACS by ACS-Community.

the class TestTreeExplorerWithButtons method createTreeExplorer.

public static TreeExplorer createTreeExplorer() {
    TreeExplorer expl = null;
    try {
        GPNode root = NodeFactory.createNode(new SimpleDemoBean("parent"), new RecursiveChildrenListManager());
        expl = new TreeExplorer();
        expl.setRootNode(root);
    } catch (IntrospectionException ex) {
        ex.printStackTrace();
    }
    return expl;
}
Also used : TreeExplorer(cern.gp.explorer.TreeExplorer) SimpleDemoBean(cern.gp.explorer.test.helpers.SimpleDemoBean) RecursiveChildrenListManager(cern.gp.explorer.test.helpers.RecursiveChildrenListManager) IntrospectionException(java.beans.IntrospectionException) GPNode(cern.gp.nodes.GPNode)

Aggregations

SimpleDemoBean (cern.gp.explorer.test.helpers.SimpleDemoBean)7 GPNode (cern.gp.nodes.GPNode)7 RecursiveChildrenListManager (cern.gp.explorer.test.helpers.RecursiveChildrenListManager)5 IntrospectionException (java.beans.IntrospectionException)3 TreeExplorer (cern.gp.explorer.TreeExplorer)2 TreeTableExplorer (cern.gp.explorer.TreeTableExplorer)2 ListExplorer (cern.gp.explorer.ListExplorer)1 ListTableExplorer (cern.gp.explorer.ListTableExplorer)1 MultiListExplorer (cern.gp.explorer.MultiListExplorer)1