From: Konstantin Kolosovsky Date: Fri, 4 Nov 2016 13:34:39 +0000 (+0300) Subject: platform: Removed unused "TabbedRefreshablePanel" X-Git-Tag: appcode/171.1026~27 X-Git-Url: https://git.jetbrains.org/?p=idea%2Fcommunity.git;a=commitdiff_plain;h=3af8f8d321d9fc5a0f16a760150931c3643a89b8 platform: Removed unused "TabbedRefreshablePanel" --- diff --git a/platform/platform-impl/src/com/intellij/openapi/vcs/changes/TabbedRefreshablePanel.java b/platform/platform-impl/src/com/intellij/openapi/vcs/changes/TabbedRefreshablePanel.java deleted file mode 100644 index b7c80c10581c..000000000000 --- a/platform/platform-impl/src/com/intellij/openapi/vcs/changes/TabbedRefreshablePanel.java +++ /dev/null @@ -1,97 +0,0 @@ -/* - * Copyright 2000-2012 JetBrains s.r.o. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.intellij.openapi.vcs.changes; - -import com.intellij.openapi.util.Disposer; -import com.intellij.ui.components.JBTabbedPane; - -import javax.swing.*; -import java.awt.*; -import java.util.ArrayList; -import java.util.List; - -/** - * Created with IntelliJ IDEA. - * User: Irina.Chernushina - * Date: 4/25/12 - * Time: 4:53 PM - */ -public class TabbedRefreshablePanel implements RefreshablePanel { - private final JBTabbedPane myPane; - private final JPanel myPanel; - private final List myPanels; - - public TabbedRefreshablePanel() { - myPanels = new ArrayList<>(); - myPane = new JBTabbedPane(); - myPanel = new JPanel(new BorderLayout()); - myPanel.add(myPane, BorderLayout.CENTER); - } - - public void addTab(final String title, final RefreshablePanel panel) { - myPanels.add(panel); - myPane.add(title, panel.getPanel()); - } - - @Override - public boolean refreshDataSynch() { - for (RefreshablePanel panel : myPanels) { - if (! panel.refreshDataSynch()) return false; - } - return true; - } - - @Override - public boolean isStillValid(Object o) { - for (RefreshablePanel panel : myPanels) { - if (! panel.isStillValid(o)) return false; - } - return true; - } - - @Override - public void dataChanged() { - for (RefreshablePanel panel : myPanels) { - panel.dataChanged(); - } - } - - @Override - public void refresh() { - for (RefreshablePanel panel : myPanels) { - panel.refresh(); - } - } - - @Override - public JPanel getPanel() { - return myPanel; - } - - @Override - public void away() { - for (RefreshablePanel panel : myPanels) { - panel.away(); - } - } - - @Override - public void dispose() { - for (RefreshablePanel panel : myPanels) { - Disposer.dispose(panel); - } - } -}