コード例 #1
0
 void setMemoryIndicatorVisible(final boolean visible) {
   if (myMemoryWidget != null) {
     myMemoryWidget.setShowing(visible);
     if (!SystemInfo.isMac) {
       myStatusBar.setBorder(BorderFactory.createEmptyBorder(1, 4, 0, visible ? 0 : 2));
     }
   }
 }
コード例 #2
0
 private void updateStatusBarVisibility() {
   myStatusBar.setVisible(myUISettings.SHOW_STATUS_BAR);
 }
コード例 #3
-1
  private void createStatusBar(IdeFrame frame) {
    myUISettings.addUISettingsListener(this, myApplication);

    myStatusBar = new IdeStatusBarImpl();
    myStatusBar.install(frame);

    myMemoryWidget = new MemoryUsagePanel();

    if (myStatusBarCustomComponentFactories != null) {
      for (final StatusBarCustomComponentFactory<JComponent> componentFactory :
          myStatusBarCustomComponentFactories) {
        final JComponent c = componentFactory.createComponent(myStatusBar);
        myStatusBar.addWidget(
            new CustomStatusBarWidget() {
              public JComponent getComponent() {
                return c;
              }

              @NotNull
              public String ID() {
                return c.getClass().getSimpleName();
              }

              public WidgetPresentation getPresentation(@NotNull PlatformType type) {
                return null;
              }

              public void install(@NotNull StatusBar statusBar) {}

              public void dispose() {
                componentFactory.disposeComponent(myStatusBar, c);
              }
            },
            "before " + MemoryUsagePanel.WIDGET_ID);
      }
    }

    myStatusBar.addWidget(myMemoryWidget);
    myStatusBar.addWidget(
        new IdeMessagePanel(MessagePool.getInstance()), "before " + MemoryUsagePanel.WIDGET_ID);

    setMemoryIndicatorVisible(myUISettings.SHOW_MEMORY_INDICATOR);
  }