Package qubexplorer

Examples of qubexplorer.Summary


    private void tableSummaryValueChanged(javax.swing.event.TreeSelectionEvent evt) {//GEN-FIRST:event_tableSummaryValueChanged
        int row = tableSummary.getSelectedRow();
        if (row != -1) {
            Object selectedNode = tableSummary.getPathForRow(row).getLastPathComponent();
            showRuleInfoAction.setEnabled(selectedNode instanceof Rule);
            Summary summary = ((SummaryModel) tableSummary.getTreeTableModel()).getSummary();
            int count;
            if (selectedNode instanceof Summary) {
                count = summary.getCount();
            } else if (selectedNode instanceof Severity) {
                count = summary.getCount((Severity) selectedNode);
            } else if (selectedNode instanceof Rule) {
                count = summary.getCount((Rule) selectedNode);
            } else {
                count = 0;
            }
            listIssuesAction.setEnabled(count > 0);
        } else {
View Full Code Here


        return 2;
    }

    @Override
    public Object getValueAt(Object node, int i) {
        Summary summary = getSummary();
        if(node instanceof Summary){
            if(i == 0){
                return "Issues";
            }else{
                return summary.getCount();
            }
        }else if (node instanceof Severity) {
            if (i == 0) {
                return ((Severity) node).name();
            } else {
                return summary.getCount((Severity) node);
            }
        } else if (node instanceof Rule) {
           if(i == 0) {
               return ((Rule)node).getDescription();
           }else{
               return summary.getCount((Rule) node);
           }
        } else {
            return null;
        }
    }
View Full Code Here

TOP

Related Classes of qubexplorer.Summary

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.