Package org.gnome.gtk

Examples of org.gnome.gtk.TreeViewColumn


    private void initTreeView(TreeView tree)
    {
        tree.getSelection().setMode(SelectionMode.MULTIPLE);

        final TreeViewColumn nameCol = tree.appendColumn();
        nameCol.setResizable(true);
        nameCol.setTitle("Name");
        final CellRendererText nameText = new CellRendererText(nameCol);
        nameText.setText(name);

        final TreeViewColumn progressCol = tree.appendColumn();
        progressCol.setResizable(true);
        progressCol.setTitle("Progress");
        final CellRendererText progressText = new CellRendererText(progressCol);
        progressText.setText(progress);

        final TreeViewColumn sizeCol = tree.appendColumn();
        sizeCol.setResizable(true);
        sizeCol.setTitle("Size");
        final CellRendererText sizeText = new CellRendererText(sizeCol);
        sizeText.setText(size);

        final TreeViewColumn totalsizeCol = tree.appendColumn();
        totalsizeCol.setResizable(true);
        totalsizeCol.setTitle("Total Size");
        final CellRendererText totalsizeText = new CellRendererText(totalsizeCol);
        totalsizeText.setText(totalsize);
       
        final TreeViewColumn speedCol = tree.appendColumn();
        speedCol.setResizable(true);
        speedCol.setTitle("Speed");
        final CellRendererText speedText = new CellRendererText(speedCol);
        speedText.setText(speed);

        final TreeViewColumn statusCol = tree.appendColumn();
        statusCol.setResizable(true);
        statusCol.setTitle("Status");
        final CellRendererText statusText = new CellRendererText(statusCol);
        statusText.setText(status);

        tree.setModel(model);
    }
View Full Code Here

TOP

Related Classes of org.gnome.gtk.TreeViewColumn

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.