コード例 #1
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();
  }
コード例 #2
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;
     }
   }
 }
コード例 #3
0
 @Override
 protected void setOptionValue(boolean value) {
   UsageViewSettings.getInstance().setFilterDuplicatedLine(value);
 }
コード例 #4
0
 @Override
 protected boolean getOptionValue() {
   return UsageViewSettings.getInstance().isFilterDuplicatedLine();
 }
コード例 #5
0
 @Override
 public void setAutoScrollMode(boolean state) {
   UsageViewSettings.getInstance().IS_AUTOSCROLL_TO_SOURCE = state;
 }
コード例 #6
0
 @Override
 public boolean isAutoScrollMode() {
   return UsageViewSettings.getInstance().IS_AUTOSCROLL_TO_SOURCE;
 }