Search in sources :

Example 1 with TreeExplorer

use of cern.gp.explorer.TreeExplorer in project ACS by ACS-Community.

the class PrintUtil method print.

/* (non-Javadoc)
   * @see cern.gp.printing.PrintStrategy#print(java.awt.print.Printable)
   */
public void print(Component component) {
    Printable printable = null;
    if (component instanceof TreeExplorer) {
        printable = new PrintableTreeExplorer((TreeExplorer) component);
    } else if (component instanceof ListTableExplorer) {
        printable = new PrintableListTableExplorer((ListTableExplorer) component);
    } else {
        printable = new PrintableComponent(component);
    }
    printPDF(component.getName(), printable);
}
Also used : TreeExplorer(cern.gp.explorer.TreeExplorer) ListTableExplorer(cern.gp.explorer.ListTableExplorer) Printable(java.awt.print.Printable)

Example 2 with TreeExplorer

use of cern.gp.explorer.TreeExplorer 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 3 with TreeExplorer

use of cern.gp.explorer.TreeExplorer 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)

Example 4 with TreeExplorer

use of cern.gp.explorer.TreeExplorer in project ACS by ACS-Community.

the class TestTreeExplorerWithButtons method main.

public static void main(String[] args) {
    TreeExplorer expl = createTreeExplorer();
    JPanel panel = ActionUtils.createJButtonPanel(new Class[] { PropertiesAction.class, OpenLocalExplorerAction.class });
    expl.add(panel, BorderLayout.SOUTH);
    WindowUtils.openInMode(expl, "TestTreeExplorer");
}
Also used : TreeExplorer(cern.gp.explorer.TreeExplorer) JPanel(javax.swing.JPanel)

Aggregations

TreeExplorer (cern.gp.explorer.TreeExplorer)4 RecursiveChildrenListManager (cern.gp.explorer.test.helpers.RecursiveChildrenListManager)2 SimpleDemoBean (cern.gp.explorer.test.helpers.SimpleDemoBean)2 GPNode (cern.gp.nodes.GPNode)2 IntrospectionException (java.beans.IntrospectionException)2 ListTableExplorer (cern.gp.explorer.ListTableExplorer)1 Printable (java.awt.print.Printable)1 JPanel (javax.swing.JPanel)1