alvinalexander.com | career | drupal | java | mac | mysql | perl | scala | uml | unix  

What this is

This file is included in the DevDaily.com "Java Source Code Warehouse" project. The intent of this project is to help you "Learn Java by Example" TM.

Other links

The source code

/*
 *                 Sun Public License Notice
 *
 * The contents of this file are subject to the Sun Public License
 * Version 1.0 (the "License"). You may not use this file except in
 * compliance with the License. A copy of the License is available at
 * http://www.sun.com/
 *
 * The Original Code is NetBeans. The Initial Developer of the Original
 * Code is Sun Microsystems, Inc. Portions Copyright 1997-2002 Sun
 * Microsystems, Inc. All Rights Reserved.
 */

package org.netbeans.modules.tasklist.core.filter;

import org.openide.awt.Mnemonics;
import org.openide.util.NbBundle;

/**
 * Customizes hierarchy criteria (usefull for user tasks)
 *
 * @author  Petr Kuzel
 */
public class HierarchyFilterSubpanel extends javax.swing.JPanel implements FilterSubpanel {

    private static final long serialVersionUID = 1;

    /** Creates new form HiearchyFilterPanel */
    public HierarchyFilterSubpanel() {
        initComponents();

        Mnemonics.setLocalizedText(subtaskLabel, NbBundle.getMessage(
                FilterPanel.class, "CheckSubtasks")); // NOI18N
        Mnemonics.setLocalizedText(bothTasksRadio, NbBundle.getMessage(
                FilterPanel.class, "IncludeTask")); // NOI18N
        Mnemonics.setLocalizedText(onlySubtaskRadio, NbBundle.getMessage(
                FilterPanel.class, "IncludeSubtask")); // NOI18N
        
    }

    public void updateFilter(Filter filter) {
        filter.setFlattened(onlySubtaskRadio.isSelected());
    }
    
    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    private void initComponents() {//GEN-BEGIN:initComponents
        buttonGroup1 = new javax.swing.ButtonGroup();
        subtaskLabel = new javax.swing.JLabel();
        bothTasksRadio = new javax.swing.JRadioButton();
        onlySubtaskRadio = new javax.swing.JRadioButton();

        setLayout(new javax.swing.BoxLayout(this, javax.swing.BoxLayout.Y_AXIS));

        setBorder(new javax.swing.border.EmptyBorder(new java.awt.Insets(0, 11, 0, 0)));
        subtaskLabel.setText(java.util.ResourceBundle.getBundle("org/netbeans/modules/tasklist/core/filter/Bundle").getString("CheckSubtasks"));
        add(subtaskLabel);

        bothTasksRadio.setSelected(true);
        bothTasksRadio.setText(java.util.ResourceBundle.getBundle("org/netbeans/modules/tasklist/core/filter/Bundle").getString("IncludeTask"));
        buttonGroup1.add(bothTasksRadio);
        add(bothTasksRadio);

        onlySubtaskRadio.setText(java.util.ResourceBundle.getBundle("org/netbeans/modules/tasklist/core/filter/Bundle").getString("IncludeSubtask"));
        buttonGroup1.add(onlySubtaskRadio);
        add(onlySubtaskRadio);

    }//GEN-END:initComponents
    
    
    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JRadioButton bothTasksRadio;
    private javax.swing.ButtonGroup buttonGroup1;
    private javax.swing.JRadioButton onlySubtaskRadio;
    private javax.swing.JLabel subtaskLabel;
    // End of variables declaration//GEN-END:variables
    
}
... this post is sponsored by my books ...

#1 New Release!

FP Best Seller

 

new blog posts

 

Copyright 1998-2021 Alvin Alexander, alvinalexander.com
All Rights Reserved.

A percentage of advertising revenue from
pages under the /java/jwarehouse URI on this website is
paid back to open source projects.