KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > netbeans > modules > tasklist > core > filter > HierarchyFilterSubpanel


1 /*
2  * The contents of this file are subject to the terms of the Common Development
3  * and Distribution License (the License). You may not use this file except in
4  * compliance with the License.
5  *
6  * You can obtain a copy of the License at http://www.netbeans.org/cddl.html
7  * or http://www.netbeans.org/cddl.txt.
8  *
9  * When distributing Covered Code, include this CDDL Header Notice in each file
10  * and include the License file at http://www.netbeans.org/cddl.txt.
11  * If applicable, add the following below the CDDL Header, with the fields
12  * enclosed by brackets [] replaced by your own identifying information:
13  * "Portions Copyrighted [year] [name of copyright owner]"
14  *
15  * The Original Software is NetBeans. The Initial Developer of the Original
16  * Software is Sun Microsystems, Inc. Portions Copyright 1997-2006 Sun
17  * Microsystems, Inc. All Rights Reserved.
18  */

19
20 package org.netbeans.modules.tasklist.core.filter;
21
22 import org.openide.awt.Mnemonics;
23 import org.openide.util.NbBundle;
24
25 /**
26  * Customizes hierarchy criteria (usefull for user tasks)
27  *
28  * @author Petr Kuzel
29  */

30 public class HierarchyFilterSubpanel extends javax.swing.JPanel JavaDoc implements FilterSubpanel {
31
32     private static final long serialVersionUID = 1;
33
34     /** Creates new form HiearchyFilterPanel */
35     public HierarchyFilterSubpanel() {
36         initComponents();
37
38         Mnemonics.setLocalizedText(subtaskLabel, NbBundle.getMessage(
39                 FilterPanel.class, "CheckSubtasks")); // NOI18N
40
Mnemonics.setLocalizedText(bothTasksRadio, NbBundle.getMessage(
41                 FilterPanel.class, "IncludeTask")); // NOI18N
42
Mnemonics.setLocalizedText(onlySubtaskRadio, NbBundle.getMessage(
43                 FilterPanel.class, "IncludeSubtask")); // NOI18N
44

45     }
46
47     public void updateFilter(Filter filter) {
48         filter.setFlattened(onlySubtaskRadio.isSelected());
49     }
50     
51     /** This method is called from within the constructor to
52      * initialize the form.
53      * WARNING: Do NOT modify this code. The content of this method is
54      * always regenerated by the Form Editor.
55      */

56     private void initComponents() {//GEN-BEGIN:initComponents
57
buttonGroup1 = new javax.swing.ButtonGroup JavaDoc();
58         subtaskLabel = new javax.swing.JLabel JavaDoc();
59         bothTasksRadio = new javax.swing.JRadioButton JavaDoc();
60         onlySubtaskRadio = new javax.swing.JRadioButton JavaDoc();
61
62         setLayout(new javax.swing.BoxLayout JavaDoc(this, javax.swing.BoxLayout.Y_AXIS));
63
64         setBorder(new javax.swing.border.EmptyBorder JavaDoc(new java.awt.Insets JavaDoc(0, 11, 0, 0)));
65         subtaskLabel.setText(java.util.ResourceBundle.getBundle("org/netbeans/modules/tasklist/core/filter/Bundle").getString("CheckSubtasks"));
66         add(subtaskLabel);
67
68         bothTasksRadio.setSelected(true);
69         bothTasksRadio.setText(java.util.ResourceBundle.getBundle("org/netbeans/modules/tasklist/core/filter/Bundle").getString("IncludeTask"));
70         buttonGroup1.add(bothTasksRadio);
71         add(bothTasksRadio);
72
73         onlySubtaskRadio.setText(java.util.ResourceBundle.getBundle("org/netbeans/modules/tasklist/core/filter/Bundle").getString("IncludeSubtask"));
74         buttonGroup1.add(onlySubtaskRadio);
75         add(onlySubtaskRadio);
76
77     }//GEN-END:initComponents
78

79     
80     // Variables declaration - do not modify//GEN-BEGIN:variables
81
private javax.swing.JRadioButton JavaDoc bothTasksRadio;
82     private javax.swing.ButtonGroup JavaDoc buttonGroup1;
83     private javax.swing.JRadioButton JavaDoc onlySubtaskRadio;
84     private javax.swing.JLabel JavaDoc subtaskLabel;
85     // End of variables declaration//GEN-END:variables
86

87 }
88
Popular Tags