1 19 20 package org.netbeans.modules.java.navigation; 21 22 import java.awt.Cursor ; 23 import java.awt.Point ; 24 import java.awt.Toolkit ; 25 import java.awt.Window ; 26 import java.awt.event.ActionEvent ; 27 import java.awt.event.ActionListener ; 28 import java.awt.event.KeyEvent ; 29 import java.awt.event.MouseAdapter ; 30 import java.awt.event.MouseEvent ; 31 import java.awt.event.WindowAdapter ; 32 import java.awt.event.WindowEvent ; 33 import java.net.URL ; 34 import java.util.List ; 35 import javax.lang.model.element.Element; 36 import javax.lang.model.element.TypeElement; 37 import javax.swing.JComponent ; 38 import javax.swing.JRootPane ; 39 import javax.swing.KeyStroke ; 40 import javax.swing.SwingUtilities ; 41 import javax.swing.ToolTipManager ; 42 import javax.swing.event.DocumentEvent ; 43 import javax.swing.event.DocumentListener ; 44 import javax.swing.event.HyperlinkEvent ; 45 import javax.swing.event.HyperlinkListener ; 46 import javax.swing.event.TreeSelectionEvent ; 47 import javax.swing.event.TreeSelectionListener ; 48 import javax.swing.text.html.HTMLEditorKit ; 49 import javax.swing.tree.TreePath ; 50 import javax.swing.tree.TreeSelectionModel ; 51 import org.netbeans.api.java.source.CompilationInfo; 52 import org.openide.awt.HtmlBrowser; 53 import org.openide.filesystems.FileObject; 54 55 59 public class JavaMembersPanel extends javax.swing.JPanel { 60 private FileObject fileObject; 61 private JavaMembersModel javaMembersModel; 62 63 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 ()); javaDocPane.setContentType("text/html"); 99 filterTextField.getDocument().addDocumentListener( 100 new DocumentListener () { 101 public void changedUpdate(DocumentEvent e) { 102 applyFilter(); 103 } 104 public void insertUpdate(DocumentEvent e) { 105 applyFilter(); 106 } 107 public void removeUpdate(DocumentEvent e) { 108 applyFilter(); 109 } 110 }); 111 112 filterTextField.registerKeyboardAction( 113 new ActionListener () { 114 public void actionPerformed(ActionEvent 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 () { 123 public void actionPerformed(ActionEvent 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 () { 132 public void actionPerformed(ActionEvent 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 () { 141 public void actionPerformed(ActionEvent 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", "^org\\.netbeans\\.modules\\.editor\\.lib2\\.highlighting\\.CaretRowHighlighting$" ); 152 153 signatureEditorPane.registerKeyboardAction( 154 new ActionListener () { 155 public void actionPerformed(ActionEvent 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 () { 164 public void actionPerformed(ActionEvent 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 () { 173 public void actionPerformed(ActionEvent 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 () { 182 public void actionPerformed(ActionEvent 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 () { 191 public void actionPerformed(ActionEvent actionEvent) { 192 TreePath treePath = javaMembersTree.getSelectionPath(); 193 if (treePath != null) { 194 Object 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 () { 207 public void actionPerformed(ActionEvent actionEvent) { 208 TreePath treePath = javaMembersTree.getSelectionPath(); 209 if (treePath != null) { 210 Object 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 () { 220 public void actionPerformed(ActionEvent actionEvent) { 221 applyFilter(); 222 } 223 }); 224 225 javaMembersTree.addMouseListener( 226 new MouseAdapter () { 227 public void mouseClicked(MouseEvent me) { 228 Point point = me.getPoint(); 229 TreePath treePath = javaMembersTree.getPathForLocation(point.x, point.y); 230 if (treePath != null) { 231 Object 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 () { 250 public void valueChanged(TreeSelectionEvent e) { 251 showSignature(); 252 showJavaDoc(); 253 } 254 }); 255 256 javaMembersTree.registerKeyboardAction( 257 new ActionListener () { 258 public void actionPerformed(ActionEvent actionEvent) { 259 TreePath treePath = javaMembersTree.getLeadSelectionPath(); 260 if (treePath != null) { 261 Object 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 () { 273 public void actionPerformed(ActionEvent actionEvent) { 274 TreePath treePath = javaMembersTree.getLeadSelectionPath(); 275 if (treePath != null) { 276 Object node = treePath.getLastPathComponent(); 277 if (node instanceof JavaElement) { 278 filterTextField.setText(""); 279 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 () { 290 public void hyperlinkUpdate(HyperlinkEvent e) { 291 if (e.getEventType() == HyperlinkEvent.EventType.ACTIVATED) { 292 URL url = e.getURL(); 293 if (url != null ) { 295 HtmlBrowser.URLDisplayer.getDefault().showURL(url); 296 } 297 } 298 } 299 }); 300 301 showInheritedToggleButton.addActionListener(new ActionListener () { 302 public void actionPerformed(ActionEvent actionEvent) { 303 applyFilter(); 304 } 305 }); 306 307 showFQNToggleButton.addActionListener(new ActionListener () { 308 public void actionPerformed(ActionEvent actionEvent) { 309 applyFilter(); 310 } 311 }); 312 313 showInnerToggleButton.addActionListener(new ActionListener () { 314 public void actionPerformed(ActionEvent actionEvent) { 315 applyFilter(); 316 } 317 }); 318 319 showConstructorsToggleButton.addActionListener(new ActionListener () { 320 public void actionPerformed(ActionEvent actionEvent) { 321 applyFilter(); 322 } 323 }); 324 325 showMethodsToggleButton.addActionListener(new ActionListener () { 326 public void actionPerformed(ActionEvent actionEvent) { 327 applyFilter(); 328 } 329 }); 330 331 showFieldsToggleButton.addActionListener(new ActionListener () { 332 public void actionPerformed(ActionEvent actionEvent) { 333 applyFilter(); 334 } 335 }); 336 337 showEnumConstantsToggleButton.addActionListener(new ActionListener () { 338 public void actionPerformed(ActionEvent actionEvent) { 339 applyFilter(); 340 } 341 }); 342 343 showProtectedToggleButton.addActionListener(new ActionListener () { 344 public void actionPerformed(ActionEvent actionEvent) { 345 applyFilter(); 346 } 347 }); 348 349 showPackageToggleButton.addActionListener(new ActionListener () { 350 public void actionPerformed(ActionEvent actionEvent) { 351 applyFilter(); 352 } 353 }); 354 355 showPrivateToggleButton.addActionListener(new ActionListener () { 356 public void actionPerformed(ActionEvent actionEvent) { 357 applyFilter(); 358 } 359 }); 360 361 showStaticToggleButton.addActionListener(new ActionListener () { 362 public void actionPerformed(ActionEvent actionEvent) { 363 applyFilter(); 364 } 365 }); 366 367 closeButton.addActionListener(new ActionListener () { 368 public void actionPerformed(ActionEvent 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 () { 380 public void actionPerformed(ActionEvent 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 () { 388 public void windowDeactivated(WindowEvent windowEvent) { 389 if (!showingSubDialog) { 390 close(); 391 } 392 }}); 393 applyFilter(); 394 } 395 396 private void applyFilter() { 397 SwingUtilities.invokeLater( 399 new Runnable () { 400 public void run() { 401 JRootPane rootPane = SwingUtilities.getRootPane(JavaMembersPanel.this); 402 if (rootPane != null) { 403 rootPane.setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR)); 404 } 405 } 406 }); 407 408 SwingUtilities.invokeLater( 410 new Runnable () { 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 for (int row = 0; row < javaMembersTree.getRowCount(); row++) { 431 TreePath treePath = javaMembersTree.getPathForRow(row); 432 javaMembersTree.expandRow(row); 433 } 434 435 for (int row = 0; row < javaMembersTree.getRowCount(); row++) { 437 Object 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 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 treePath = javaMembersTree.getSelectionPath(); 466 if (treePath != null) { 467 Object 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 treePath = javaMembersTree.getSelectionPath(); 478 if (treePath != null) { 479 Object node = treePath.getLastPathComponent(); 480 if (node instanceof JavaElement) { 481 Utils.showJavaDoc((JavaElement)node, javaDocPane); 482 } 483 } 484 } 485 486 private void close() { 487 Window window = SwingUtilities.getWindowAncestor(JavaMembersPanel.this); 488 if (window != null) { 489 window.setVisible(false); 490 } 491 } 492 493 private void gotoClass(TypeElement javaClass) { 494 } 513 514 519 private void initComponents() { 521 522 filterLabel = new javax.swing.JLabel (); 523 filterTextField = new javax.swing.JTextField (); 524 caseSensitiveFilterCheckBox = new javax.swing.JCheckBox (); 525 splitPane = new javax.swing.JSplitPane (); 526 javaMembersTreeScrollPane = new javax.swing.JScrollPane (); 527 javaMembersTree = new javax.swing.JTree (); 528 javaDocScrollPane = new javax.swing.JScrollPane (); 529 javaDocPane = new javax.swing.JEditorPane (); 530 signatureEditorPane = new javax.swing.JEditorPane (); 531 filtersLabel = new javax.swing.JLabel (); 532 showInheritedToggleButton = new javax.swing.JToggleButton (); 533 showFQNToggleButton = new javax.swing.JToggleButton (); 534 showInnerToggleButton = new javax.swing.JToggleButton (); 535 showConstructorsToggleButton = new javax.swing.JToggleButton (); 536 showMethodsToggleButton = new javax.swing.JToggleButton (); 537 showFieldsToggleButton = new javax.swing.JToggleButton (); 538 showEnumConstantsToggleButton = new javax.swing.JToggleButton (); 539 showProtectedToggleButton = new javax.swing.JToggleButton (); 540 showPackageToggleButton = new javax.swing.JToggleButton (); 541 showPrivateToggleButton = new javax.swing.JToggleButton (); 542 showStaticToggleButton = new javax.swing.JToggleButton (); 543 closeButton = new javax.swing.JButton (); 544 545 setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color (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")); 551 filterTextField.setToolTipText(org.openide.util.NbBundle.getBundle(JavaMembersPanel.class).getString("TOOLTIP_filterTextField")); 553 caseSensitiveFilterCheckBox.setMnemonic('C'); 554 caseSensitiveFilterCheckBox.setText(org.openide.util.NbBundle.getBundle(JavaMembersPanel.class).getString("LABEL_caseSensitiveFilterCheckBox")); caseSensitiveFilterCheckBox.setBorder(javax.swing.BorderFactory.createEmptyBorder(0, 0, 0, 0)); 556 caseSensitiveFilterCheckBox.setFocusable(false); 557 caseSensitiveFilterCheckBox.setMargin(new java.awt.Insets (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")); 578 showInheritedToggleButton.setIcon(JavaMembersAndHierarchyIcons.INHERITED_ICON); 579 showInheritedToggleButton.setToolTipText(org.openide.util.NbBundle.getBundle(JavaMembersPanel.class).getString("TOOLTIP_showInheritedToggleButton")); showInheritedToggleButton.setFocusPainted(false); 581 showInheritedToggleButton.setMargin(new java.awt.Insets (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")); showFQNToggleButton.setFocusPainted(false); 587 showFQNToggleButton.setMargin(new java.awt.Insets (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")); showInnerToggleButton.setFocusPainted(false); 593 showInnerToggleButton.setMargin(new java.awt.Insets (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")); showConstructorsToggleButton.setFocusPainted(false); 599 showConstructorsToggleButton.setMargin(new java.awt.Insets (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")); showMethodsToggleButton.setFocusPainted(false); 605 showMethodsToggleButton.setMargin(new java.awt.Insets (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")); showFieldsToggleButton.setFocusPainted(false); 611 showFieldsToggleButton.setMargin(new java.awt.Insets (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")); showEnumConstantsToggleButton.setFocusPainted(false); 617 showEnumConstantsToggleButton.setMargin(new java.awt.Insets (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")); showProtectedToggleButton.setFocusPainted(false); 623 showProtectedToggleButton.setMargin(new java.awt.Insets (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")); showPackageToggleButton.setFocusPainted(false); 629 showPackageToggleButton.setMargin(new java.awt.Insets (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")); showPrivateToggleButton.setFocusPainted(false); 635 showPrivateToggleButton.setMargin(new java.awt.Insets (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")); showStaticToggleButton.setFocusPainted(false); 641 showStaticToggleButton.setMargin(new java.awt.Insets (2, 2, 2, 2)); 642 643 closeButton.setMnemonic('l'); 644 closeButton.setText(org.openide.util.NbBundle.getMessage(JavaMembersPanel.class, "LABEL_Close")); 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 } 720 public javax.swing.JCheckBox caseSensitiveFilterCheckBox; 722 public javax.swing.JButton closeButton; 723 public javax.swing.JLabel filterLabel; 724 public javax.swing.JTextField filterTextField; 725 public javax.swing.JLabel filtersLabel; 726 public javax.swing.JEditorPane javaDocPane; 727 public javax.swing.JScrollPane javaDocScrollPane; 728 public javax.swing.JTree javaMembersTree; 729 public javax.swing.JScrollPane javaMembersTreeScrollPane; 730 public javax.swing.JToggleButton showConstructorsToggleButton; 731 public javax.swing.JToggleButton showEnumConstantsToggleButton; 732 public javax.swing.JToggleButton showFQNToggleButton; 733 public javax.swing.JToggleButton showFieldsToggleButton; 734 public javax.swing.JToggleButton showInheritedToggleButton; 735 public javax.swing.JToggleButton showInnerToggleButton; 736 public javax.swing.JToggleButton showMethodsToggleButton; 737 public javax.swing.JToggleButton showPackageToggleButton; 738 public javax.swing.JToggleButton showPrivateToggleButton; 739 public javax.swing.JToggleButton showProtectedToggleButton; 740 public javax.swing.JToggleButton showStaticToggleButton; 741 public javax.swing.JEditorPane signatureEditorPane; 742 public javax.swing.JSplitPane splitPane; 743 745 } 746 | Popular Tags |