コード例 #1
0
 private void updateImmediately() {
   if (myProject.isDisposed()) return;
   checkNodeValidity((DefaultMutableTreeNode) myTree.getModel().getRoot());
   if (myUsagePreviewPanel != null) {
     myUsagePreviewPanel.updateLayout(getSelectedUsageInfos());
   }
 }
コード例 #2
0
  private void setupCentralPanel() {
    myCentralPanel.removeAll();
    if (myUsagePreviewPanel != null) {
      Disposer.dispose(myUsagePreviewPanel);
      myUsagePreviewPanel = null;
    }
    JScrollPane pane = ScrollPaneFactory.createScrollPane(myTree);

    if (UsageViewSettings.getInstance().IS_PREVIEW_USAGES) {
      Splitter splitter =
          new Splitter(false, UsageViewSettings.getInstance().PREVIEW_USAGES_SPLITTER_PROPORTIONS);
      pane.putClientProperty(UIUtil.KEEP_BORDER_SIDES, SideBorder.RIGHT);

      splitter.setFirstComponent(pane);
      myUsagePreviewPanel = new UsagePreviewPanel(myProject);
      myUsagePreviewPanel.setBorder(IdeBorderFactory.createBorder(SideBorder.LEFT));
      Disposer.register(this, myUsagePreviewPanel);
      splitter.setSecondComponent(myUsagePreviewPanel);
      myCentralPanel.add(splitter, BorderLayout.CENTER);
    } else {
      myCentralPanel.add(pane, BorderLayout.CENTER);
    }
    myCentralPanel.add(myButtonPanel, BorderLayout.SOUTH);

    myRootPanel.revalidate();
  }
コード例 #3
0
 @Override
 public void dispose() {
   synchronized (lock) {
     isDisposed = true;
     ToolTipManager.sharedInstance().unregisterComponent(myTree);
     myModelTracker.removeListener(this);
     myUpdateAlarm.cancelAllRequests();
     if (myUsagePreviewPanel != null) {
       UsageViewSettings.getInstance().PREVIEW_USAGES_SPLITTER_PROPORTIONS =
           ((Splitter) myUsagePreviewPanel.getParent()).getProportion();
       myUsagePreviewPanel = null;
     }
   }
 }