KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > netbeans > modules > java > navigation > JavaMembersPanel


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.java.navigation;
21
22 import java.awt.Cursor JavaDoc;
23 import java.awt.Point JavaDoc;
24 import java.awt.Toolkit JavaDoc;
25 import java.awt.Window JavaDoc;
26 import java.awt.event.ActionEvent JavaDoc;
27 import java.awt.event.ActionListener JavaDoc;
28 import java.awt.event.KeyEvent JavaDoc;
29 import java.awt.event.MouseAdapter JavaDoc;
30 import java.awt.event.MouseEvent JavaDoc;
31 import java.awt.event.WindowAdapter JavaDoc;
32 import java.awt.event.WindowEvent JavaDoc;
33 import java.net.URL JavaDoc;
34 import java.util.List JavaDoc;
35 import javax.lang.model.element.Element;
36 import javax.lang.model.element.TypeElement;
37 import javax.swing.JComponent JavaDoc;
38 import javax.swing.JRootPane JavaDoc;
39 import javax.swing.KeyStroke JavaDoc;
40 import javax.swing.SwingUtilities JavaDoc;
41 import javax.swing.ToolTipManager JavaDoc;
42 import javax.swing.event.DocumentEvent JavaDoc;
43 import javax.swing.event.DocumentListener JavaDoc;
44 import javax.swing.event.HyperlinkEvent JavaDoc;
45 import javax.swing.event.HyperlinkListener JavaDoc;
46 import javax.swing.event.TreeSelectionEvent JavaDoc;
47 import javax.swing.event.TreeSelectionListener JavaDoc;
48 import javax.swing.text.html.HTMLEditorKit JavaDoc;
49 import javax.swing.tree.TreePath JavaDoc;
50 import javax.swing.tree.TreeSelectionModel JavaDoc;
51 import org.netbeans.api.java.source.CompilationInfo;
52 import org.openide.awt.HtmlBrowser;
53 import org.openide.filesystems.FileObject;
54
55 /**
56  *
57  * @author Sandip Chitale (Sandip.Chitale@Sun.Com)
58  */

59 public class JavaMembersPanel extends javax.swing.JPanel JavaDoc {
60     private FileObject fileObject;
61     private JavaMembersModel javaMembersModel;
62
63     /**
64      *
65      * @param fileObject
66      * @param elements
67      * @param compilationInfo
68      */

69     public JavaMembersPanel(FileObject fileObject, Element[] elements, CompilationInfo compilationInfo) {
70         this.fileObject = fileObject;
71         initComponents();
72
73         ToolTipManager.sharedInstance().registerComponent(javaMembersTree);
74         ToolTipManager.sharedInstance().setLightWeightPopupEnabled(false);
75
76         caseSensitiveFilterCheckBox.setSelected(JavaMembersAndHierarchyOptions.isCaseSensitive());
77         showInheritedToggleButton.setSelected(JavaMembersAndHierarchyOptions.isShowInherited());
78         showFQNToggleButton.setSelected(JavaMembersAndHierarchyOptions.isShowFQN());
79         showInnerToggleButton.setSelected(JavaMembersAndHierarchyOptions.isShowInner());
80         showConstructorsToggleButton.setSelected(JavaMembersAndHierarchyOptions.isShowConstructors());
81         showMethodsToggleButton.setSelected(JavaMembersAndHierarchyOptions.isShowMethods());
82         showFieldsToggleButton.setSelected(JavaMembersAndHierarchyOptions.isShowFields());
83         showEnumConstantsToggleButton.setSelected(JavaMembersAndHierarchyOptions.isShowEnumConstants());
84         showProtectedToggleButton.setSelected(JavaMembersAndHierarchyOptions.isShowProtected());
85         showPackageToggleButton.setSelected(JavaMembersAndHierarchyOptions.isShowPackage());
86         showPrivateToggleButton.setSelected(JavaMembersAndHierarchyOptions.isShowPrivate());
87         showStaticToggleButton.setSelected(JavaMembersAndHierarchyOptions.isShowStatic());
88
89         javaMembersTree.getSelectionModel().setSelectionMode(TreeSelectionModel.SINGLE_TREE_SELECTION);
90         javaMembersTree.setRootVisible(false);
91         javaMembersTree.setShowsRootHandles(true);
92         javaMembersTree.setCellRenderer(new JavaTreeCellRenderer());
93
94         javaMembersModel = new JavaMembersModel(fileObject, elements, compilationInfo);
95         javaMembersTree.setModel(javaMembersModel);
96         javaDocPane.setEditorKitForContentType("text/html", new HTMLEditorKit JavaDoc()); // NOI18N
97
javaDocPane.setContentType("text/html"); // NOI18N
98

99         filterTextField.getDocument().addDocumentListener(
100                 new DocumentListener JavaDoc() {
101                     public void changedUpdate(DocumentEvent JavaDoc e) {
102                         applyFilter();
103                     }
104                     public void insertUpdate(DocumentEvent JavaDoc e) {
105                         applyFilter();
106                     }
107                     public void removeUpdate(DocumentEvent JavaDoc e) {
108                         applyFilter();
109                     }
110                 });
111
112         filterTextField.registerKeyboardAction(
113                 new ActionListener JavaDoc() {
114                     public void actionPerformed(ActionEvent JavaDoc actionEvent) {
115                         Utils.firstRow(javaMembersTree);
116                     }
117                 },
118                 KeyStroke.getKeyStroke(KeyEvent.VK_HOME, 0, true),
119                 JComponent.WHEN_FOCUSED);
120
121         filterTextField.registerKeyboardAction(
122                 new ActionListener JavaDoc() {
123                     public void actionPerformed(ActionEvent JavaDoc actionEvent) {
124                         Utils.previousRow(javaMembersTree);
125                     }
126                 },
127                 KeyStroke.getKeyStroke(KeyEvent.VK_UP, 0, true),
128                 JComponent.WHEN_FOCUSED);
129
130         filterTextField.registerKeyboardAction(
131                 new ActionListener JavaDoc() {
132                     public void actionPerformed(ActionEvent JavaDoc actionEvent) {
133                         Utils.nextRow(javaMembersTree);
134                     }
135                 },
136                 KeyStroke.getKeyStroke(KeyEvent.VK_DOWN, 0, true),
137                 JComponent.WHEN_FOCUSED);
138
139         filterTextField.registerKeyboardAction(
140                 new ActionListener JavaDoc() {
141                     public void actionPerformed(ActionEvent JavaDoc actionEvent) {
142                         Utils.lastRow(javaMembersTree);
143                     }
144                 },
145                 KeyStroke.getKeyStroke(KeyEvent.VK_END, 0, true),
146                 JComponent.WHEN_FOCUSED);
147
148         signatureEditorPane.putClientProperty(
149             "HighlightsLayerExcludes", // NOI18N
150
"^org\\.netbeans\\.modules\\.editor\\.lib2\\.highlighting\\.CaretRowHighlighting$" // NOI18N
151
);
152
153         signatureEditorPane.registerKeyboardAction(
154                 new ActionListener JavaDoc() {
155                     public void actionPerformed(ActionEvent JavaDoc actionEvent) {
156                         Utils.firstRow(javaMembersTree);
157                     }
158                 },
159                 KeyStroke.getKeyStroke(KeyEvent.VK_HOME, 0, true),
160                 JComponent.WHEN_FOCUSED);
161
162         signatureEditorPane.registerKeyboardAction(
163                 new ActionListener JavaDoc() {
164                     public void actionPerformed(ActionEvent JavaDoc actionEvent) {
165                         Utils.previousRow(javaMembersTree);
166                     }
167                 },
168                 KeyStroke.getKeyStroke(KeyEvent.VK_UP, 0, true),
169                 JComponent.WHEN_FOCUSED);
170
171         signatureEditorPane.registerKeyboardAction(
172                 new ActionListener JavaDoc() {
173                     public void actionPerformed(ActionEvent JavaDoc actionEvent) {
174                         Utils.nextRow(javaMembersTree);
175                     }
176                 },
177                 KeyStroke.getKeyStroke(KeyEvent.VK_DOWN, 0, true),
178                 JComponent.WHEN_FOCUSED);
179
180         signatureEditorPane.registerKeyboardAction(
181                 new ActionListener JavaDoc() {
182                     public void actionPerformed(ActionEvent JavaDoc actionEvent) {
183                         Utils.lastRow(javaMembersTree);
184                     }
185                 },
186                 KeyStroke.getKeyStroke(KeyEvent.VK_END, 0, true),
187                 JComponent.WHEN_FOCUSED);
188
189         filterTextField.registerKeyboardAction(
190                 new ActionListener JavaDoc() {
191                     public void actionPerformed(ActionEvent JavaDoc actionEvent) {
192                         TreePath JavaDoc treePath = javaMembersTree.getSelectionPath();
193                         if (treePath != null) {
194                             Object JavaDoc node = treePath.getLastPathComponent();
195                             if (node instanceof JavaElement) {
196                                 JavaElement javaToolsJavaElement = (JavaElement) node;
197                                 applyFilter();
198                             }
199                         }
200                     }
201                 },
202                 KeyStroke.getKeyStroke(KeyEvent.VK_ENTER, Toolkit.getDefaultToolkit().getMenuShortcutKeyMask(), true),
203                 JComponent.WHEN_FOCUSED);
204
205         filterTextField.registerKeyboardAction(
206                 new ActionListener JavaDoc() {
207                     public void actionPerformed(ActionEvent JavaDoc actionEvent) {
208                         TreePath JavaDoc treePath = javaMembersTree.getSelectionPath();
209                         if (treePath != null) {
210                             Object JavaDoc node = treePath.getLastPathComponent();
211                             if (node instanceof JavaElement) {
212                                 gotoElement((JavaElement) node);
213                             }
214                         }
215                     }
216                 },
217                 KeyStroke.getKeyStroke(KeyEvent.VK_ENTER, 0, true), JComponent.WHEN_FOCUSED);
218
219         caseSensitiveFilterCheckBox.addActionListener(new ActionListener JavaDoc() {
220             public void actionPerformed(ActionEvent JavaDoc actionEvent) {
221                 applyFilter();
222             }
223         });
224
225         javaMembersTree.addMouseListener(
226                 new MouseAdapter JavaDoc() {
227             public void mouseClicked(MouseEvent JavaDoc me) {
228                 Point JavaDoc point = me.getPoint();
229                 TreePath JavaDoc treePath = javaMembersTree.getPathForLocation(point.x, point.y);
230                 if (treePath != null) {
231                     Object JavaDoc node = treePath.getLastPathComponent();
232                     if (node instanceof JavaElement) {
233                         if (me.getClickCount() == 1) {
234                             if (me.isControlDown()) {
235                                 filterTextField.setText("");
236                                 JavaElement javaToolsJavaElement = (JavaElement) node;
237                                 applyFilter();
238                             }
239                         } else if (me.getClickCount() == 2) {
240                             gotoElement((JavaElement) node);
241                         }
242                     }
243                 }
244
245             }
246         }
247         );
248
249         javaMembersTree.addTreeSelectionListener(new TreeSelectionListener JavaDoc() {
250             public void valueChanged(TreeSelectionEvent JavaDoc e) {
251                 showSignature();
252                 showJavaDoc();
253             }
254         });
255
256         javaMembersTree.registerKeyboardAction(
257                 new ActionListener JavaDoc() {
258                     public void actionPerformed(ActionEvent JavaDoc actionEvent) {
259                         TreePath JavaDoc treePath = javaMembersTree.getLeadSelectionPath();
260                         if (treePath != null) {
261                             Object JavaDoc node = treePath.getLastPathComponent();
262                             if (node instanceof JavaElement) {
263                                 gotoElement((JavaElement) node);
264                             }
265                         }
266                     }
267                 },
268                 KeyStroke.getKeyStroke(KeyEvent.VK_ENTER, 0, true),
269                 JComponent.WHEN_FOCUSED);
270
271         javaMembersTree.registerKeyboardAction(
272                 new ActionListener JavaDoc() {
273                     public void actionPerformed(ActionEvent JavaDoc actionEvent) {
274                         TreePath JavaDoc treePath = javaMembersTree.getLeadSelectionPath();
275                         if (treePath != null) {
276                             Object JavaDoc node = treePath.getLastPathComponent();
277                             if (node instanceof JavaElement) {
278                                 filterTextField.setText("");
279         // JavaMembersPanel.this.JavaMembersModel = new JavaMembersModel(((JavaElement)node).getElementHandle());
280
// javaMembersTree.setModel(JavaMembersPanel.this.JavaMembersModel);
281
applyFilter();
282                             }
283                         }
284                     }
285                 },
286                 KeyStroke.getKeyStroke(KeyEvent.VK_ENTER, Toolkit.getDefaultToolkit().getMenuShortcutKeyMask(), true),
287                 JComponent.WHEN_FOCUSED);
288
289         javaDocPane.addHyperlinkListener(new HyperlinkListener JavaDoc() {
290             public void hyperlinkUpdate(HyperlinkEvent JavaDoc e) {
291                 if (e.getEventType() == HyperlinkEvent.EventType.ACTIVATED) {
292                     URL JavaDoc url = e.getURL();
293                     if (url != null //&& url.getProtocol().equals("http")
294
) {
295                         HtmlBrowser.URLDisplayer.getDefault().showURL(url);
296                     }
297                 }
298             }
299         });
300
301         showInheritedToggleButton.addActionListener(new ActionListener JavaDoc() {
302             public void actionPerformed(ActionEvent JavaDoc actionEvent) {
303                 applyFilter();
304             }
305         });
306
307         showFQNToggleButton.addActionListener(new ActionListener JavaDoc() {
308             public void actionPerformed(ActionEvent JavaDoc actionEvent) {
309                 applyFilter();
310             }
311         });
312
313         showInnerToggleButton.addActionListener(new ActionListener JavaDoc() {
314             public void actionPerformed(ActionEvent JavaDoc actionEvent) {
315                 applyFilter();
316             }
317         });
318
319         showConstructorsToggleButton.addActionListener(new ActionListener JavaDoc() {
320             public void actionPerformed(ActionEvent JavaDoc actionEvent) {
321                 applyFilter();
322             }
323         });
324
325         showMethodsToggleButton.addActionListener(new ActionListener JavaDoc() {
326             public void actionPerformed(ActionEvent JavaDoc actionEvent) {
327                 applyFilter();
328             }
329         });
330
331         showFieldsToggleButton.addActionListener(new ActionListener JavaDoc() {
332             public void actionPerformed(ActionEvent JavaDoc actionEvent) {
333                 applyFilter();
334             }
335         });
336
337         showEnumConstantsToggleButton.addActionListener(new ActionListener JavaDoc() {
338             public void actionPerformed(ActionEvent JavaDoc actionEvent) {
339                 applyFilter();
340             }
341         });
342
343         showProtectedToggleButton.addActionListener(new ActionListener JavaDoc() {
344             public void actionPerformed(ActionEvent JavaDoc actionEvent) {
345                 applyFilter();
346             }
347         });
348
349         showPackageToggleButton.addActionListener(new ActionListener JavaDoc() {
350             public void actionPerformed(ActionEvent JavaDoc actionEvent) {
351                 applyFilter();
352             }
353         });
354
355         showPrivateToggleButton.addActionListener(new ActionListener JavaDoc() {
356             public void actionPerformed(ActionEvent JavaDoc actionEvent) {
357                 applyFilter();
358             }
359         });
360
361         showStaticToggleButton.addActionListener(new ActionListener JavaDoc() {
362             public void actionPerformed(ActionEvent JavaDoc actionEvent) {
363                 applyFilter();
364             }
365         });
366
367         closeButton.addActionListener(new ActionListener JavaDoc() {
368                     public void actionPerformed(ActionEvent JavaDoc actionEvent) {
369                         close();
370                     }
371                 });
372     }
373
374     private boolean showingSubDialog = false;
375
376     public void addNotify() {
377         super.addNotify();
378         SwingUtilities.getRootPane(this).registerKeyboardAction(
379                 new ActionListener JavaDoc() {
380                     public void actionPerformed(ActionEvent JavaDoc actionEvent) {
381                         close();
382                     }
383                 },
384                 KeyStroke.getKeyStroke(KeyEvent.VK_ESCAPE, 0, true),
385                 JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT);
386         SwingUtilities.getWindowAncestor(JavaMembersPanel.this).addWindowListener(
387                 new WindowAdapter JavaDoc() {
388             public void windowDeactivated(WindowEvent JavaDoc windowEvent) {
389                 if (!showingSubDialog) {
390                     close();
391                 }
392             }});
393         applyFilter();
394     }
395
396     private void applyFilter() {
397         // show wait cursor
398
SwingUtilities.invokeLater(
399                 new Runnable JavaDoc() {
400             public void run() {
401                 JRootPane JavaDoc rootPane = SwingUtilities.getRootPane(JavaMembersPanel.this);
402                 if (rootPane != null) {
403                     rootPane.setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR));
404                 }
405             }
406         });
407
408         // apply filters and update the tree
409
SwingUtilities.invokeLater(
410             new Runnable JavaDoc() {
411             public void run() {
412                 javaMembersModel.setPattern(filterTextField.getText());
413
414                 JavaMembersAndHierarchyOptions.setCaseSensitive(caseSensitiveFilterCheckBox.isSelected());
415                 JavaMembersAndHierarchyOptions.setShowInherited(showInheritedToggleButton.isSelected());
416                 JavaMembersAndHierarchyOptions.setShowFQN(showFQNToggleButton.isSelected());
417                 JavaMembersAndHierarchyOptions.setShowInner(showInnerToggleButton.isSelected());
418                 JavaMembersAndHierarchyOptions.setShowConstructors(showConstructorsToggleButton.isSelected());
419                 JavaMembersAndHierarchyOptions.setShowMethods(showMethodsToggleButton.isSelected());
420                 JavaMembersAndHierarchyOptions.setShowFields(showFieldsToggleButton.isSelected());
421                 JavaMembersAndHierarchyOptions.setShowEnumConstants(showEnumConstantsToggleButton.isSelected());
422                 JavaMembersAndHierarchyOptions.setShowProtected(showProtectedToggleButton.isSelected());
423                 JavaMembersAndHierarchyOptions.setShowPackage(showPackageToggleButton.isSelected());
424                 JavaMembersAndHierarchyOptions.setShowPrivate(showPrivateToggleButton.isSelected());
425                 JavaMembersAndHierarchyOptions.setShowStatic(showStaticToggleButton.isSelected());
426
427                 javaMembersModel.update();
428
429                 // expand the tree
430
for (int row = 0; row < javaMembersTree.getRowCount(); row++) {
431                     TreePath JavaDoc treePath = javaMembersTree.getPathForRow(row);
432                     javaMembersTree.expandRow(row);
433                 }
434
435                 // select first matching
436
for (int row = 0; row < javaMembersTree.getRowCount(); row++) {
437                     Object JavaDoc o = javaMembersTree.getPathForRow(row).getLastPathComponent();
438                     if (o instanceof JavaElement) {
439                         if (javaMembersModel.patternMatch((JavaElement)o)) {
440                             javaMembersTree.setSelectionRow(row);
441                             break;
442                         }
443                     }
444                 }
445
446                 JRootPane JavaDoc rootPane = SwingUtilities.getRootPane(JavaMembersPanel.this);
447                 if (rootPane != null) {
448                     rootPane.setCursor(Cursor.getDefaultCursor());
449                 }
450             }
451         });
452     }
453
454     private void gotoElement(JavaElement javaElement) {
455         try {
456             javaElement.gotoElement();
457         } finally {
458             close();
459         }
460     }
461
462     private void showSignature() {
463         signatureEditorPane.setText("");
464         signatureEditorPane.setToolTipText(null);
465         TreePath JavaDoc treePath = javaMembersTree.getSelectionPath();
466         if (treePath != null) {
467             Object JavaDoc node = treePath.getLastPathComponent();
468             if (node instanceof JavaElement) {
469                 signatureEditorPane.setText(((JavaElement)node).getTooltip());
470                 signatureEditorPane.setCaretPosition(0);
471                 signatureEditorPane.setToolTipText(((JavaElement)node).getTooltip());
472             }
473         }
474     }
475
476     private void showJavaDoc() {
477         TreePath JavaDoc treePath = javaMembersTree.getSelectionPath();
478         if (treePath != null) {
479             Object JavaDoc node = treePath.getLastPathComponent();
480             if (node instanceof JavaElement) {
481                 Utils.showJavaDoc((JavaElement)node, javaDocPane);
482             }
483         }
484     }
485
486     private void close() {
487         Window JavaDoc window = SwingUtilities.getWindowAncestor(JavaMembersPanel.this);
488         if (window != null) {
489             window.setVisible(false);
490         }
491     }
492
493     private void gotoClass(TypeElement javaClass) {
494 // PositionBounds bounds = null;
495
// if (javaClass.getResource() != null) {
496
// bounds = JavaMetamodel.getManager().getElementPosition(javaClass);
497
// if (bounds == null) {
498
// ClassDefinition classDefinition = ((JMManager)JavaMetamodel.getManager()).getSourceElementIfExists(javaClass);
499
// if (classDefinition != null) {
500
// javaClass = (JavaClass) classDefinition;
501
// }
502
// }
503
// }
504
// Resource resource = javaClass.getResource();
505
// if (resource != null) {
506
// JavaMembersModel = new JavaMembersModel(resource);
507
// } else {
508
// JavaMembersModel = new JavaMembersModel(javaClass);
509
// }
510
// javaMembersTree.setModel(JavaMembersModel);
511
// applyFilter();
512
}
513
514     /** This method is called from within the constructor to
515      * initialize the form.
516      * WARNING: Do NOT modify this code. The content of this method is
517      * always regenerated by the Form Editor.
518      */

519     // <editor-fold defaultstate="collapsed" desc=" Generated Code ">//GEN-BEGIN:initComponents
520
private void initComponents() {
521
522         filterLabel = new javax.swing.JLabel JavaDoc();
523         filterTextField = new javax.swing.JTextField JavaDoc();
524         caseSensitiveFilterCheckBox = new javax.swing.JCheckBox JavaDoc();
525         splitPane = new javax.swing.JSplitPane JavaDoc();
526         javaMembersTreeScrollPane = new javax.swing.JScrollPane JavaDoc();
527         javaMembersTree = new javax.swing.JTree JavaDoc();
528         javaDocScrollPane = new javax.swing.JScrollPane JavaDoc();
529         javaDocPane = new javax.swing.JEditorPane JavaDoc();
530         signatureEditorPane = new javax.swing.JEditorPane JavaDoc();
531         filtersLabel = new javax.swing.JLabel JavaDoc();
532         showInheritedToggleButton = new javax.swing.JToggleButton JavaDoc();
533         showFQNToggleButton = new javax.swing.JToggleButton JavaDoc();
534         showInnerToggleButton = new javax.swing.JToggleButton JavaDoc();
535         showConstructorsToggleButton = new javax.swing.JToggleButton JavaDoc();
536         showMethodsToggleButton = new javax.swing.JToggleButton JavaDoc();
537         showFieldsToggleButton = new javax.swing.JToggleButton JavaDoc();
538         showEnumConstantsToggleButton = new javax.swing.JToggleButton JavaDoc();
539         showProtectedToggleButton = new javax.swing.JToggleButton JavaDoc();
540         showPackageToggleButton = new javax.swing.JToggleButton JavaDoc();
541         showPrivateToggleButton = new javax.swing.JToggleButton JavaDoc();
542         showStaticToggleButton = new javax.swing.JToggleButton JavaDoc();
543         closeButton = new javax.swing.JButton JavaDoc();
544
545         setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color JavaDoc(0, 0, 0)));
546
547         filterLabel.setDisplayedMnemonic('F');
548         filterLabel.setLabelFor(filterTextField);
549         filterLabel.setText(org.openide.util.NbBundle.getBundle(JavaMembersPanel.class).getString("LABEL_filterLabel")); // NOI18N
550

551         filterTextField.setToolTipText(org.openide.util.NbBundle.getBundle(JavaMembersPanel.class).getString("TOOLTIP_filterTextField")); // NOI18N
552

553         caseSensitiveFilterCheckBox.setMnemonic('C');
554         caseSensitiveFilterCheckBox.setText(org.openide.util.NbBundle.getBundle(JavaMembersPanel.class).getString("LABEL_caseSensitiveFilterCheckBox")); // NOI18N
555
caseSensitiveFilterCheckBox.setBorder(javax.swing.BorderFactory.createEmptyBorder(0, 0, 0, 0));
556         caseSensitiveFilterCheckBox.setFocusable(false);
557         caseSensitiveFilterCheckBox.setMargin(new java.awt.Insets JavaDoc(0, 0, 0, 0));
558
559         splitPane.setDividerLocation(400);
560         splitPane.setOneTouchExpandable(true);
561
562         javaMembersTreeScrollPane.setBorder(null);
563         javaMembersTreeScrollPane.setViewportView(javaMembersTree);
564
565         splitPane.setLeftComponent(javaMembersTreeScrollPane);
566
567         javaDocPane.setEditable(false);
568         javaDocScrollPane.setViewportView(javaDocPane);
569
570         splitPane.setRightComponent(javaDocScrollPane);
571
572         signatureEditorPane.setBorder(javax.swing.BorderFactory.createLineBorder(javax.swing.UIManager.getDefaults().getColor("Nb.ScrollPane.Border.color")));
573         signatureEditorPane.setContentType("text/x-java");
574         signatureEditorPane.setEditable(false);
575
576         filtersLabel.setText(org.openide.util.NbBundle.getMessage(JavaMembersPanel.class, "LABEL_filtersLabel")); // NOI18N
577

578         showInheritedToggleButton.setIcon(JavaMembersAndHierarchyIcons.INHERITED_ICON);
579         showInheritedToggleButton.setToolTipText(org.openide.util.NbBundle.getBundle(JavaMembersPanel.class).getString("TOOLTIP_showInheritedToggleButton")); // NOI18N
580
showInheritedToggleButton.setFocusPainted(false);
581         showInheritedToggleButton.setMargin(new java.awt.Insets JavaDoc(2, 2, 2, 2));
582
583         showFQNToggleButton.setIcon(JavaMembersAndHierarchyIcons.FQN_ICON);
584         showFQNToggleButton.setSelected(true);
585         showFQNToggleButton.setToolTipText(org.openide.util.NbBundle.getBundle(JavaMembersPanel.class).getString("TOOLTIP_showFQNToggleButton")); // NOI18N
586
showFQNToggleButton.setFocusPainted(false);
587         showFQNToggleButton.setMargin(new java.awt.Insets JavaDoc(2, 2, 2, 2));
588
589         showInnerToggleButton.setIcon(JavaMembersAndHierarchyIcons.INNER_CLASS_ICON);
590         showInnerToggleButton.setSelected(true);
591         showInnerToggleButton.setToolTipText(org.openide.util.NbBundle.getBundle(JavaMembersPanel.class).getString("TOOLTIP_showInnerToggleButton")); // NOI18N
592
showInnerToggleButton.setFocusPainted(false);
593         showInnerToggleButton.setMargin(new java.awt.Insets JavaDoc(2, 2, 2, 2));
594
595         showConstructorsToggleButton.setIcon(JavaMembersAndHierarchyIcons.CONSTRUCTOR_ICON);
596         showConstructorsToggleButton.setSelected(true);
597         showConstructorsToggleButton.setToolTipText(org.openide.util.NbBundle.getBundle(JavaMembersPanel.class).getString("TOOLTIP_showConstructorsToggleButton")); // NOI18N
598
showConstructorsToggleButton.setFocusPainted(false);
599         showConstructorsToggleButton.setMargin(new java.awt.Insets JavaDoc(2, 2, 2, 2));
600
601         showMethodsToggleButton.setIcon(JavaMembersAndHierarchyIcons.METHOD_ICON);
602         showMethodsToggleButton.setSelected(true);
603         showMethodsToggleButton.setToolTipText(org.openide.util.NbBundle.getBundle(JavaMembersPanel.class).getString("TOOLTIP_showMethodsToggleButton")); // NOI18N
604
showMethodsToggleButton.setFocusPainted(false);
605         showMethodsToggleButton.setMargin(new java.awt.Insets JavaDoc(2, 2, 2, 2));
606
607         showFieldsToggleButton.setIcon(JavaMembersAndHierarchyIcons.FIELD_ICON);
608         showFieldsToggleButton.setSelected(true);
609         showFieldsToggleButton.setToolTipText(org.openide.util.NbBundle.getBundle(JavaMembersPanel.class).getString("TOOLTIP_showFieldsToggleButton")); // NOI18N
610
showFieldsToggleButton.setFocusPainted(false);
611         showFieldsToggleButton.setMargin(new java.awt.Insets JavaDoc(2, 2, 2, 2));
612
613         showEnumConstantsToggleButton.setIcon(JavaMembersAndHierarchyIcons.ENUM_CONSTANTS_ICON);
614         showEnumConstantsToggleButton.setSelected(true);
615         showEnumConstantsToggleButton.setToolTipText(org.openide.util.NbBundle.getBundle(JavaMembersPanel.class).getString("TOOLTIP_showFieldsToggleButton")); // NOI18N
616
showEnumConstantsToggleButton.setFocusPainted(false);
617         showEnumConstantsToggleButton.setMargin(new java.awt.Insets JavaDoc(2, 2, 2, 2));
618
619         showProtectedToggleButton.setIcon(JavaMembersAndHierarchyIcons.PROTECTED_ICON);
620         showProtectedToggleButton.setSelected(true);
621         showProtectedToggleButton.setToolTipText(org.openide.util.NbBundle.getBundle(JavaMembersPanel.class).getString("TOOLTIP_showProtectedToggleButton")); // NOI18N
622
showProtectedToggleButton.setFocusPainted(false);
623         showProtectedToggleButton.setMargin(new java.awt.Insets JavaDoc(2, 2, 2, 2));
624
625         showPackageToggleButton.setIcon(JavaMembersAndHierarchyIcons.PACKAGE_ICON);
626         showPackageToggleButton.setSelected(true);
627         showPackageToggleButton.setToolTipText(org.openide.util.NbBundle.getBundle(JavaMembersPanel.class).getString("TOOLTIP_showPackageToggleButton")); // NOI18N
628
showPackageToggleButton.setFocusPainted(false);
629         showPackageToggleButton.setMargin(new java.awt.Insets JavaDoc(2, 2, 2, 2));
630
631         showPrivateToggleButton.setIcon(JavaMembersAndHierarchyIcons.PRIVATE_ICON);
632         showPrivateToggleButton.setSelected(true);
633         showPrivateToggleButton.setToolTipText(org.openide.util.NbBundle.getBundle(JavaMembersPanel.class).getString("TOOLTIP_showPrivateToggleButton")); // NOI18N
634
showPrivateToggleButton.setFocusPainted(false);
635         showPrivateToggleButton.setMargin(new java.awt.Insets JavaDoc(2, 2, 2, 2));
636
637         showStaticToggleButton.setIcon(JavaMembersAndHierarchyIcons.STATIC_ICON);
638         showStaticToggleButton.setSelected(true);
639         showStaticToggleButton.setToolTipText(org.openide.util.NbBundle.getBundle(JavaMembersPanel.class).getString("TOOLTIP_showStaticToggleButton")); // NOI18N
640
showStaticToggleButton.setFocusPainted(false);
641         showStaticToggleButton.setMargin(new java.awt.Insets JavaDoc(2, 2, 2, 2));
642
643         closeButton.setMnemonic('l');
644         closeButton.setText(org.openide.util.NbBundle.getMessage(JavaMembersPanel.class, "LABEL_Close")); // NOI18N
645

646         org.jdesktop.layout.GroupLayout layout = new org.jdesktop.layout.GroupLayout(this);
647         this.setLayout(layout);
648         layout.setHorizontalGroup(
649             layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
650             .add(layout.createSequentialGroup()
651                 .addContainerGap()
652                 .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
653                     .add(splitPane, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 700, Short.MAX_VALUE)
654                     .add(layout.createSequentialGroup()
655                         .add(filterLabel, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 28, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
656                         .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
657                         .add(filterTextField, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 566, Short.MAX_VALUE)
658                         .add(15, 15, 15)
659                         .add(caseSensitiveFilterCheckBox, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 87, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
660                     .add(signatureEditorPane, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 700, Short.MAX_VALUE)
661                     .add(layout.createSequentialGroup()
662                         .add(filtersLabel)
663                         .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
664                         .add(showInheritedToggleButton)
665                         .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
666                         .add(showFQNToggleButton)
667                         .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
668                         .add(showInnerToggleButton)
669                         .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
670                         .add(showConstructorsToggleButton)
671                         .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
672                         .add(showMethodsToggleButton)
673                         .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
674                         .add(showFieldsToggleButton)
675                         .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
676                         .add(showEnumConstantsToggleButton)
677                         .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
678                         .add(showProtectedToggleButton)
679                         .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
680                         .add(showPackageToggleButton)
681                         .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
682                         .add(showPrivateToggleButton)
683                         .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
684                         .add(showStaticToggleButton)
685                         .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED, 456, Short.MAX_VALUE)
686                         .add(closeButton)))
687                 .addContainerGap())
688         );
689         layout.setVerticalGroup(
690             layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
691             .add(layout.createSequentialGroup()
692                 .addContainerGap()
693                 .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
694                     .add(caseSensitiveFilterCheckBox)
695                     .add(filterLabel)
696                     .add(filterTextField, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
697                 .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
698                 .add(splitPane, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 329, Short.MAX_VALUE)
699                 .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
700                 .add(signatureEditorPane, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
701                 .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
702                 .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
703                     .add(filtersLabel)
704                     .add(showInheritedToggleButton)
705                     .add(showFQNToggleButton)
706                     .add(showInnerToggleButton)
707                     .add(showConstructorsToggleButton)
708                     .add(showMethodsToggleButton)
709                     .add(showFieldsToggleButton)
710                     .add(showEnumConstantsToggleButton)
711                     .add(showProtectedToggleButton)
712                     .add(showPackageToggleButton)
713                     .add(showPrivateToggleButton)
714                     .add(showStaticToggleButton)
715                     .add(closeButton))
716                 .addContainerGap())
717         );
718     }// </editor-fold>//GEN-END:initComponents
719

720     // Variables declaration - do not modify//GEN-BEGIN:variables
721
public javax.swing.JCheckBox JavaDoc caseSensitiveFilterCheckBox;
722     public javax.swing.JButton JavaDoc closeButton;
723     public javax.swing.JLabel JavaDoc filterLabel;
724     public javax.swing.JTextField JavaDoc filterTextField;
725     public javax.swing.JLabel JavaDoc filtersLabel;
726     public javax.swing.JEditorPane JavaDoc javaDocPane;
727     public javax.swing.JScrollPane JavaDoc javaDocScrollPane;
728     public javax.swing.JTree JavaDoc javaMembersTree;
729     public javax.swing.JScrollPane JavaDoc javaMembersTreeScrollPane;
730     public javax.swing.JToggleButton JavaDoc showConstructorsToggleButton;
731     public javax.swing.JToggleButton JavaDoc showEnumConstantsToggleButton;
732     public javax.swing.JToggleButton JavaDoc showFQNToggleButton;
733     public javax.swing.JToggleButton JavaDoc showFieldsToggleButton;
734     public javax.swing.JToggleButton JavaDoc showInheritedToggleButton;
735     public javax.swing.JToggleButton JavaDoc showInnerToggleButton;
736     public javax.swing.JToggleButton JavaDoc showMethodsToggleButton;
737     public javax.swing.JToggleButton JavaDoc showPackageToggleButton;
738     public javax.swing.JToggleButton JavaDoc showPrivateToggleButton;
739     public javax.swing.JToggleButton JavaDoc showProtectedToggleButton;
740     public javax.swing.JToggleButton JavaDoc showStaticToggleButton;
741     public javax.swing.JEditorPane JavaDoc signatureEditorPane;
742     public javax.swing.JSplitPane JavaDoc splitPane;
743     // End of variables declaration//GEN-END:variables
744

745 }
746
Popular Tags