KickJava   Java API By Example, From Geeks To Geeks.

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


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 javax.lang.model.element.Element;
35 import javax.swing.JComponent JavaDoc;
36 import javax.swing.JRootPane JavaDoc;
37 import javax.swing.JRootPane JavaDoc;
38 import javax.swing.KeyStroke JavaDoc;
39 import javax.swing.SwingUtilities 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 JavaHierarchyPanel extends javax.swing.JPanel JavaDoc {
60     private FileObject fileObject;
61     private JavaHierarchyModel javaHierarchyModel;
62
63     /**
64      *
65      * @param fileObject
66      * @param elements
67      * @param compilationInfo
68      */

69     public JavaHierarchyPanel(FileObject fileObject, Element[] elements, CompilationInfo compilationInfo) {
70         this.fileObject = fileObject;
71         initComponents();
72
73         ToolTipManager.sharedInstance().registerComponent(javaHierarchyTree);
74         ToolTipManager.sharedInstance().setLightWeightPopupEnabled(false);
75
76         caseSensitiveFilterCheckBox.setSelected(JavaMembersAndHierarchyOptions.isCaseSensitive());
77         showSuperTypeHierarchyToggleButton.setSelected(JavaMembersAndHierarchyOptions.isShowSuperTypeHierarchy());
78         showSubTypeHierarchyToggleButton.setSelected(JavaMembersAndHierarchyOptions.isShowSubTypeHierarchy());
79         showFQNToggleButton.setSelected(JavaMembersAndHierarchyOptions.isShowFQN());
80         showInnerToggleButton.setSelected(JavaMembersAndHierarchyOptions.isShowInner());
81
82         javaHierarchyTree.getSelectionModel().setSelectionMode(TreeSelectionModel.SINGLE_TREE_SELECTION);
83         javaHierarchyTree.setRootVisible(false);
84         javaHierarchyTree.setShowsRootHandles(true);
85         javaHierarchyTree.setCellRenderer(new JavaTreeCellRenderer());
86
87         javaHierarchyModel = new JavaHierarchyModel(fileObject, elements, compilationInfo);
88         javaHierarchyTree.setModel(javaHierarchyModel);
89         javaDocPane.setEditorKitForContentType("text/html", new HTMLEditorKit JavaDoc()); // NOI18N
90
javaDocPane.setContentType("text/html"); // NOI18N
91

92         filterTextField.getDocument().addDocumentListener(
93                 new DocumentListener JavaDoc() {
94             public void changedUpdate(DocumentEvent JavaDoc e) {
95                 applyFilter();
96             }
97             public void insertUpdate(DocumentEvent JavaDoc e) {
98                 applyFilter();
99             }
100             public void removeUpdate(DocumentEvent JavaDoc e) {
101                 applyFilter();
102             }
103         }
104         );
105
106         filterTextField.registerKeyboardAction(
107                 new ActionListener JavaDoc() {
108             public void actionPerformed(ActionEvent JavaDoc actionEvent) {
109                 Utils.firstRow(javaHierarchyTree);
110             }
111         },
112                 KeyStroke.getKeyStroke(KeyEvent.VK_HOME, 0, true),
113                 JComponent.WHEN_FOCUSED);
114
115         filterTextField.registerKeyboardAction(
116                 new ActionListener JavaDoc() {
117             public void actionPerformed(ActionEvent JavaDoc actionEvent) {
118                 Utils.previousRow(javaHierarchyTree);
119             }
120         },
121                 KeyStroke.getKeyStroke(KeyEvent.VK_UP, 0, true),
122                 JComponent.WHEN_FOCUSED);
123
124         filterTextField.registerKeyboardAction(
125                 new ActionListener JavaDoc() {
126             public void actionPerformed(ActionEvent JavaDoc actionEvent) {
127                 Utils.nextRow(javaHierarchyTree);
128             }
129         },
130                 KeyStroke.getKeyStroke(KeyEvent.VK_DOWN, 0, true),
131                 JComponent.WHEN_FOCUSED);
132
133         filterTextField.registerKeyboardAction(
134                 new ActionListener JavaDoc() {
135             public void actionPerformed(ActionEvent JavaDoc actionEvent) {
136                 Utils.lastRow(javaHierarchyTree);
137             }
138         },
139                 KeyStroke.getKeyStroke(KeyEvent.VK_END, 0, true),
140                 JComponent.WHEN_FOCUSED);
141
142         signatureEditorPane.putClientProperty(
143             "HighlightsLayerExcludes", // NOI18N
144
"^org\\.netbeans\\.modules\\.editor\\.lib2\\.highlighting\\.CaretRowHighlighting$" // NOI18N
145
);
146
147         signatureEditorPane.registerKeyboardAction(
148                 new ActionListener JavaDoc() {
149             public void actionPerformed(ActionEvent JavaDoc actionEvent) {
150                 Utils.firstRow(javaHierarchyTree);
151             }
152         },
153                 KeyStroke.getKeyStroke(KeyEvent.VK_HOME, 0, true),
154                 JComponent.WHEN_FOCUSED);
155
156         signatureEditorPane.registerKeyboardAction(
157                 new ActionListener JavaDoc() {
158             public void actionPerformed(ActionEvent JavaDoc actionEvent) {
159                 Utils.previousRow(javaHierarchyTree);
160             }
161         },
162                 KeyStroke.getKeyStroke(KeyEvent.VK_UP, 0, true),
163                 JComponent.WHEN_FOCUSED);
164
165         signatureEditorPane.registerKeyboardAction(
166                 new ActionListener JavaDoc() {
167             public void actionPerformed(ActionEvent JavaDoc actionEvent) {
168                 Utils.nextRow(javaHierarchyTree);
169             }
170         },
171                 KeyStroke.getKeyStroke(KeyEvent.VK_DOWN, 0, true),
172                 JComponent.WHEN_FOCUSED);
173
174         signatureEditorPane.registerKeyboardAction(
175                 new ActionListener JavaDoc() {
176             public void actionPerformed(ActionEvent JavaDoc actionEvent) {
177                 Utils.lastRow(javaHierarchyTree);
178             }
179         },
180                 KeyStroke.getKeyStroke(KeyEvent.VK_END, 0, true),
181                 JComponent.WHEN_FOCUSED);
182
183         filterTextField.registerKeyboardAction(
184                 new ActionListener JavaDoc() {
185             public void actionPerformed(ActionEvent JavaDoc actionEvent) {
186                 TreePath JavaDoc treePath = javaHierarchyTree.getSelectionPath();
187                 if (treePath != null) {
188                     Object JavaDoc node = treePath.getLastPathComponent();
189                     if (node instanceof JavaElement) {
190                         // TODO
191
applyFilter();
192                     }
193                 }
194             }
195         },
196                 KeyStroke.getKeyStroke(KeyEvent.VK_ENTER, Toolkit.getDefaultToolkit().getMenuShortcutKeyMask(), true),
197                 JComponent.WHEN_FOCUSED);
198
199         filterTextField.registerKeyboardAction(
200                 new ActionListener JavaDoc() {
201             public void actionPerformed(ActionEvent JavaDoc actionEvent) {
202                 TreePath JavaDoc treePath = javaHierarchyTree.getSelectionPath();
203                 if (treePath != null) {
204                     Object JavaDoc node = treePath.getLastPathComponent();
205                     if (node instanceof JavaElement) {
206                         gotoElement((JavaElement) node);
207                     }
208                 }
209             }
210         },
211                 KeyStroke.getKeyStroke(KeyEvent.VK_ENTER, 0, true),
212                 JComponent.WHEN_FOCUSED);
213
214         caseSensitiveFilterCheckBox.addActionListener(new ActionListener JavaDoc() {
215             public void actionPerformed(ActionEvent JavaDoc actionEvent) {
216                 applyFilter();
217             }
218         });
219
220         javaHierarchyTree.addMouseListener(
221                 new MouseAdapter JavaDoc() {
222             public void mouseClicked(MouseEvent JavaDoc me) {
223                 Point JavaDoc point = me.getPoint();
224                 TreePath JavaDoc treePath = javaHierarchyTree.getPathForLocation(point.x, point.y);
225                 if (treePath != null) {
226                     Object JavaDoc node = treePath.getLastPathComponent();
227                     if (node instanceof JavaElement) {
228                         if (me.getClickCount() == 1) {
229                             if (me.isControlDown()) {
230                                 JavaElement javaToolsJavaElement = (JavaElement) node;
231                                 applyFilter();
232                             }
233                         } else if (me.getClickCount() == 2){
234                             gotoElement((JavaElement) node);
235                         }
236                     }
237                 }
238             }
239         }
240         );
241
242         javaHierarchyTree.addTreeSelectionListener(new TreeSelectionListener JavaDoc() {
243             public void valueChanged(TreeSelectionEvent JavaDoc e) {
244                 showSignature();
245                 showJavaDoc();
246             }
247         });
248
249         javaHierarchyTree.registerKeyboardAction(
250                 new ActionListener JavaDoc() {
251             public void actionPerformed(ActionEvent JavaDoc actionEvent) {
252                 TreePath JavaDoc treePath = javaHierarchyTree.getLeadSelectionPath();
253                 if (treePath != null) {
254                     Object JavaDoc node = treePath.getLastPathComponent();
255                     if (node instanceof JavaElement) {
256                         gotoElement((JavaElement) node);
257                     }
258                 }
259             }
260         },
261                 KeyStroke.getKeyStroke(KeyEvent.VK_ENTER, 0, true),
262                 JComponent.WHEN_FOCUSED);
263
264         javaHierarchyTree.registerKeyboardAction(
265                 new ActionListener JavaDoc() {
266             public void actionPerformed(ActionEvent JavaDoc actionEvent) {
267                 TreePath JavaDoc treePath = javaHierarchyTree.getLeadSelectionPath();
268                 if (treePath != null) {
269                     Object JavaDoc node = treePath.getLastPathComponent();
270                     if (node instanceof JavaElement) {
271                         // TODO
272
applyFilter();
273                     }
274                 }
275             }
276         },
277                 KeyStroke.getKeyStroke(KeyEvent.VK_ENTER, Toolkit.getDefaultToolkit().getMenuShortcutKeyMask(), true),
278                 JComponent.WHEN_FOCUSED);
279
280         javaDocPane.addHyperlinkListener(new HyperlinkListener JavaDoc() {
281             public void hyperlinkUpdate(HyperlinkEvent JavaDoc e) {
282                 if (e.getEventType() == HyperlinkEvent.EventType.ACTIVATED) {
283                     URL JavaDoc url = e.getURL();
284                     if (url != null //&& url.getProtocol().equals("http")
285
) {
286                         HtmlBrowser.URLDisplayer.getDefault().showURL(url);
287                     }
288                 }
289             }
290         });
291
292         showSuperTypeHierarchyToggleButton.addActionListener(new ActionListener JavaDoc() {
293             public void actionPerformed(ActionEvent JavaDoc actionEvent) {
294                 applyFilter();
295             }
296         });
297
298         showSubTypeHierarchyToggleButton.addActionListener(new ActionListener JavaDoc() {
299             public void actionPerformed(ActionEvent JavaDoc actionEvent) {
300                 applyFilter();
301             }
302         });
303
304         showFQNToggleButton.addActionListener(new ActionListener JavaDoc() {
305             public void actionPerformed(ActionEvent JavaDoc actionEvent) {
306                 applyFilter();
307             }
308         });
309
310         showInnerToggleButton.addActionListener(new ActionListener JavaDoc() {
311             public void actionPerformed(ActionEvent JavaDoc actionEvent) {
312                 applyFilter();
313             }
314         });
315
316         closeButton.addActionListener(new ActionListener JavaDoc() {
317                     public void actionPerformed(ActionEvent JavaDoc actionEvent) {
318                         close();
319                     }
320                 });
321     }
322
323     private boolean showingSubDialog = false;
324
325     public void addNotify() {
326         super.addNotify();
327         SwingUtilities.getRootPane(this).registerKeyboardAction(
328                 new ActionListener JavaDoc() {
329             public void actionPerformed(ActionEvent JavaDoc actionEvent) {
330                 close();
331             }
332         },
333                 KeyStroke.getKeyStroke(KeyEvent.VK_ESCAPE, 0, true),
334                 JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT);
335         SwingUtilities.getWindowAncestor(JavaHierarchyPanel.this).addWindowListener(
336                 new WindowAdapter JavaDoc() {
337             public void windowDeactivated(WindowEvent JavaDoc windowEvent) {
338                 if (!showingSubDialog) {
339                     close();
340                 }
341             }
342         });
343         applyFilter();
344     }
345
346     private void applyFilter() {
347         SwingUtilities.invokeLater(
348                 new Runnable JavaDoc() {
349             public void run() {
350                 JRootPane JavaDoc rootPane = SwingUtilities.getRootPane(JavaHierarchyPanel.this);
351                 if (rootPane != null) {
352                     rootPane.setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR));
353                 }
354             }
355         }
356         );
357
358         SwingUtilities.invokeLater(
359                 new Runnable JavaDoc() {
360             public void run() {
361                 javaHierarchyModel.setPattern(filterTextField.getText());
362
363                 JavaMembersAndHierarchyOptions.setCaseSensitive(caseSensitiveFilterCheckBox.isSelected());
364                 JavaMembersAndHierarchyOptions.setShowSuperTypeHierarchy(showSuperTypeHierarchyToggleButton.isSelected());
365                 JavaMembersAndHierarchyOptions.setShowSubTypeHierarchy(showSubTypeHierarchyToggleButton.isSelected());
366                 JavaMembersAndHierarchyOptions.setShowFQN(showFQNToggleButton.isSelected());
367                 JavaMembersAndHierarchyOptions.setShowInner(showInnerToggleButton.isSelected());
368
369                 javaHierarchyModel.update();
370
371                 // expand the tree
372
for (int row = 0; row < javaHierarchyTree.getRowCount(); row++) {
373                     TreePath JavaDoc treePath = javaHierarchyTree.getPathForRow(row);
374                     javaHierarchyTree.expandRow(row);
375                 }
376
377                 // select first matching
378
for (int row = 0; row < javaHierarchyTree.getRowCount(); row++) {
379                     Object JavaDoc o = javaHierarchyTree.getPathForRow(row).getLastPathComponent();
380                     if (o instanceof JavaElement) {
381                         if (javaHierarchyModel.patternMatch((JavaElement)o)) {
382                             javaHierarchyTree.setSelectionRow(row);
383                             break;
384                         }
385                     }
386                 }
387
388                 JRootPane JavaDoc rootPane = SwingUtilities.getRootPane(JavaHierarchyPanel.this);
389                 if (rootPane != null) {
390                     rootPane.setCursor(Cursor.getDefaultCursor());
391                 }
392             }
393         }
394         );
395     }
396
397     private void gotoElement(JavaElement javaToolsJavaElement) {
398         try {
399             javaToolsJavaElement.gotoElement();
400         } finally {
401             close();
402         }
403     }
404
405     private void showSignature() {
406         signatureEditorPane.setText("");
407         signatureEditorPane.setToolTipText(null);
408         TreePath JavaDoc treePath = javaHierarchyTree.getSelectionPath();
409         if (treePath != null) {
410             Object JavaDoc node = treePath.getLastPathComponent();
411             if (node instanceof JavaElement) {
412                 signatureEditorPane.setText(((JavaElement)node).getTooltip());
413                 signatureEditorPane.setCaretPosition(0);
414                 signatureEditorPane.setToolTipText(((JavaElement)node).getTooltip());
415             }
416         }
417     }
418
419     private void showJavaDoc() {
420         TreePath JavaDoc treePath = javaHierarchyTree.getSelectionPath();
421         if (treePath != null) {
422             Object JavaDoc node = treePath.getLastPathComponent();
423             if (node instanceof JavaElement) {
424                 Utils.showJavaDoc((JavaElement)node, javaDocPane);
425             }
426         }
427     }
428
429     private void close() {
430         Window JavaDoc window = SwingUtilities.getWindowAncestor(JavaHierarchyPanel.this);
431         if (window != null) {
432             window.setVisible(false);
433         }
434     }
435     
436     /** This method is called from within the constructor to
437      * initialize the form.
438      * WARNING: Do NOT modify this code. The content of this method is
439      * always regenerated by the Form Editor.
440      */

441     // <editor-fold defaultstate="collapsed" desc=" Generated Code ">//GEN-BEGIN:initComponents
442
private void initComponents() {
443
444         javaHierarchyModeButtonGroup = new javax.swing.ButtonGroup JavaDoc();
445         filterLabel = new javax.swing.JLabel JavaDoc();
446         filterTextField = new javax.swing.JTextField JavaDoc();
447         caseSensitiveFilterCheckBox = new javax.swing.JCheckBox JavaDoc();
448         splitPane = new javax.swing.JSplitPane JavaDoc();
449         javaHierarchyTreeScrollPane = new javax.swing.JScrollPane JavaDoc();
450         javaHierarchyTree = new javax.swing.JTree JavaDoc();
451         javaDocScrollPane = new javax.swing.JScrollPane JavaDoc();
452         javaDocPane = new javax.swing.JEditorPane JavaDoc();
453         signatureEditorPane = new javax.swing.JEditorPane JavaDoc();
454         filtersLabel = new javax.swing.JLabel JavaDoc();
455         showSuperTypeHierarchyToggleButton = new javax.swing.JToggleButton JavaDoc();
456         showSubTypeHierarchyToggleButton = new javax.swing.JToggleButton JavaDoc();
457         showFQNToggleButton = new javax.swing.JToggleButton JavaDoc();
458         showInnerToggleButton = new javax.swing.JToggleButton JavaDoc();
459         closeButton = new javax.swing.JButton JavaDoc();
460
461         setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color JavaDoc(0, 0, 0)));
462
463         filterLabel.setDisplayedMnemonic('F');
464         filterLabel.setLabelFor(filterTextField);
465         filterLabel.setText(org.openide.util.NbBundle.getBundle(JavaHierarchyPanel.class).getString("LABEL_filterLabel")); // NOI18N
466

467         filterTextField.setToolTipText(org.openide.util.NbBundle.getBundle(JavaHierarchyPanel.class).getString("TOOLTIP_filterTextField")); // NOI18N
468

469         caseSensitiveFilterCheckBox.setMnemonic('C');
470         caseSensitiveFilterCheckBox.setText(org.openide.util.NbBundle.getBundle(JavaHierarchyPanel.class).getString("LABEL_caseSensitiveFilterCheckBox")); // NOI18N
471
caseSensitiveFilterCheckBox.setBorder(javax.swing.BorderFactory.createEmptyBorder(0, 0, 0, 0));
472         caseSensitiveFilterCheckBox.setFocusable(false);
473         caseSensitiveFilterCheckBox.setMargin(new java.awt.Insets JavaDoc(0, 0, 0, 0));
474
475         splitPane.setDividerLocation(400);
476         splitPane.setOneTouchExpandable(true);
477
478         javaHierarchyTreeScrollPane.setBorder(null);
479         javaHierarchyTreeScrollPane.setViewportView(javaHierarchyTree);
480
481         splitPane.setLeftComponent(javaHierarchyTreeScrollPane);
482
483         javaDocPane.setEditable(false);
484         javaDocScrollPane.setViewportView(javaDocPane);
485
486         splitPane.setRightComponent(javaDocScrollPane);
487
488         signatureEditorPane.setBorder(javax.swing.BorderFactory.createLineBorder(javax.swing.UIManager.getDefaults().getColor("Nb.ScrollPane.Border.color")));
489         signatureEditorPane.setContentType("text/x-java");
490         signatureEditorPane.setEditable(false);
491
492         filtersLabel.setText(org.openide.util.NbBundle.getMessage(JavaHierarchyPanel.class, "LABEL_filtersLabel")); // NOI18N
493

494         javaHierarchyModeButtonGroup.add(showSuperTypeHierarchyToggleButton);
495         showSuperTypeHierarchyToggleButton.setIcon(JavaMembersAndHierarchyIcons.SUPER_TYPE_HIERARCHY_ICON);
496         showSuperTypeHierarchyToggleButton.setSelected(true);
497         showSuperTypeHierarchyToggleButton.setToolTipText(org.openide.util.NbBundle.getBundle(JavaHierarchyPanel.class).getString("TOOLTIP_showSuperTypeHierarchyToggleButton")); // NOI18N
498
showSuperTypeHierarchyToggleButton.setFocusPainted(false);
499         showSuperTypeHierarchyToggleButton.setMargin(new java.awt.Insets JavaDoc(2, 2, 2, 2));
500
501         javaHierarchyModeButtonGroup.add(showSubTypeHierarchyToggleButton);
502         showSubTypeHierarchyToggleButton.setIcon(JavaMembersAndHierarchyIcons.SUB_TYPE_HIERARCHY_ICON);
503         showSubTypeHierarchyToggleButton.setToolTipText(org.openide.util.NbBundle.getBundle(JavaHierarchyPanel.class).getString("TOOLTIP_showSubTypeHierarchyToggleButton")); // NOI18N
504
showSubTypeHierarchyToggleButton.setFocusPainted(false);
505         showSubTypeHierarchyToggleButton.setMargin(new java.awt.Insets JavaDoc(2, 2, 2, 2));
506
507         showFQNToggleButton.setIcon(JavaMembersAndHierarchyIcons.FQN_ICON);
508         showFQNToggleButton.setToolTipText(org.openide.util.NbBundle.getBundle(JavaHierarchyPanel.class).getString("TOOLTIP_showFQNToggleButton")); // NOI18N
509
showFQNToggleButton.setFocusPainted(false);
510         showFQNToggleButton.setMargin(new java.awt.Insets JavaDoc(2, 2, 2, 2));
511
512         showInnerToggleButton.setIcon(JavaMembersAndHierarchyIcons.INNER_CLASS_ICON);
513         showInnerToggleButton.setSelected(true);
514         showInnerToggleButton.setToolTipText(org.openide.util.NbBundle.getBundle(JavaHierarchyPanel.class).getString("TOOLTIP_showInnerToggleButton")); // NOI18N
515
showInnerToggleButton.setFocusPainted(false);
516         showInnerToggleButton.setMargin(new java.awt.Insets JavaDoc(2, 2, 2, 2));
517
518         closeButton.setMnemonic('l');
519         closeButton.setText(org.openide.util.NbBundle.getMessage(JavaHierarchyPanel.class, "LABEL_Close")); // NOI18N
520

521         org.jdesktop.layout.GroupLayout layout = new org.jdesktop.layout.GroupLayout(this);
522         this.setLayout(layout);
523         layout.setHorizontalGroup(
524             layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
525             .add(layout.createSequentialGroup()
526                 .addContainerGap()
527                 .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
528                     .add(splitPane, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 716, Short.MAX_VALUE)
529                     .add(layout.createSequentialGroup()
530                         .add(filterLabel)
531                         .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
532                         .add(filterTextField, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 583, Short.MAX_VALUE)
533                         .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
534                         .add(caseSensitiveFilterCheckBox, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 95, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
535                         .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED))
536                     .add(signatureEditorPane, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 716, Short.MAX_VALUE)
537                     .add(layout.createSequentialGroup()
538                         .add(filtersLabel)
539                         .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
540                         .add(showSuperTypeHierarchyToggleButton)
541                         .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
542                         .add(showSubTypeHierarchyToggleButton)
543                         .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
544                         .add(showFQNToggleButton)
545                         .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
546                         .add(showInnerToggleButton)
547                         .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED, 570, Short.MAX_VALUE)
548                         .add(closeButton)))
549                 .addContainerGap())
550         );
551         layout.setVerticalGroup(
552             layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
553             .add(layout.createSequentialGroup()
554                 .addContainerGap()
555                 .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
556                     .add(filterLabel)
557                     .add(filterTextField, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
558                     .add(caseSensitiveFilterCheckBox))
559                 .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
560                 .add(splitPane, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 350, Short.MAX_VALUE)
561                 .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
562                 .add(signatureEditorPane, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
563                 .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
564                 .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
565                     .add(filtersLabel)
566                     .add(showSuperTypeHierarchyToggleButton)
567                     .add(showSubTypeHierarchyToggleButton)
568                     .add(showFQNToggleButton)
569                     .add(showInnerToggleButton)
570                     .add(closeButton))
571                 .addContainerGap())
572         );
573     }// </editor-fold>//GEN-END:initComponents
574

575     // Variables declaration - do not modify//GEN-BEGIN:variables
576
public javax.swing.JCheckBox JavaDoc caseSensitiveFilterCheckBox;
577     public javax.swing.JButton JavaDoc closeButton;
578     public javax.swing.JLabel JavaDoc filterLabel;
579     public javax.swing.JTextField JavaDoc filterTextField;
580     public javax.swing.JLabel JavaDoc filtersLabel;
581     public javax.swing.JEditorPane JavaDoc javaDocPane;
582     public javax.swing.JScrollPane JavaDoc javaDocScrollPane;
583     public javax.swing.ButtonGroup JavaDoc javaHierarchyModeButtonGroup;
584     public javax.swing.JTree JavaDoc javaHierarchyTree;
585     public javax.swing.JScrollPane JavaDoc javaHierarchyTreeScrollPane;
586     public javax.swing.JToggleButton JavaDoc showFQNToggleButton;
587     public javax.swing.JToggleButton JavaDoc showInnerToggleButton;
588     public javax.swing.JToggleButton JavaDoc showSubTypeHierarchyToggleButton;
589     public javax.swing.JToggleButton JavaDoc showSuperTypeHierarchyToggleButton;
590     public javax.swing.JEditorPane JavaDoc signatureEditorPane;
591     public javax.swing.JSplitPane JavaDoc splitPane;
592     // End of variables declaration//GEN-END:variables
593

594 }
595
Popular Tags