changeset 707:3d4608e2e01f

Remove unused HostPanel* classes This commit simply removes HostPanel, HostPanelFacade and HostPanelFacadeImpl, which are not referenced by any class. Their functionality has been replaced by the HostInformationController. Reviewed-by: omajid Review-thread: http://icedtea.classpath.org/pipermail/thermostat/2012-October/003789.html
author Elliott Baron <ebaron@redhat.com>
date Fri, 19 Oct 2012 15:33:45 -0400
parents 836bac77a113
children da7f134762f6
files client/core/src/main/java/com/redhat/thermostat/client/internal/HostPanelFacade.java client/core/src/main/java/com/redhat/thermostat/client/internal/HostPanelFacadeImpl.java client/core/src/main/java/com/redhat/thermostat/client/ui/HostPanel.java
diffstat 3 files changed, 0 insertions(+), 220 deletions(-) [+]
line wrap: on
line diff
--- a/client/core/src/main/java/com/redhat/thermostat/client/internal/HostPanelFacade.java	Fri Oct 19 19:59:30 2012 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,51 +0,0 @@
-/*
- * Copyright 2012 Red Hat, Inc.
- *
- * This file is part of Thermostat.
- *
- * Thermostat is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published
- * by the Free Software Foundation; either version 2, or (at your
- * option) any later version.
- *
- * Thermostat is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with Thermostat; see the file COPYING.  If not see
- * <http://www.gnu.org/licenses/>.
- *
- * Linking this code with other modules is making a combined work
- * based on this code.  Thus, the terms and conditions of the GNU
- * General Public License cover the whole combination.
- *
- * As a special exception, the copyright holders of this code give
- * you permission to link this code with independent modules to
- * produce an executable, regardless of the license terms of these
- * independent modules, and to copy and distribute the resulting
- * executable under terms of your choice, provided that you also
- * meet, for each linked independent module, the terms and conditions
- * of the license of that module.  An independent module is a module
- * which is not derived from or based on this code.  If you modify
- * this code, you may extend this exception to your version of the
- * library, but you are not obligated to do so.  If you do not wish
- * to do so, delete this exception statement from your version.
- */
-
-package com.redhat.thermostat.client.internal;
-
-import com.redhat.thermostat.client.ui.HostCpuController;
-import com.redhat.thermostat.client.ui.HostMemoryController;
-import com.redhat.thermostat.client.ui.HostOverviewController;
-
-public interface HostPanelFacade  {
-
-    public HostOverviewController getOverviewController();
-
-    public HostCpuController getCpuController();
-
-    public HostMemoryController getMemoryController();
-
-}
--- a/client/core/src/main/java/com/redhat/thermostat/client/internal/HostPanelFacadeImpl.java	Fri Oct 19 19:59:30 2012 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,85 +0,0 @@
-/*
- * Copyright 2012 Red Hat, Inc.
- *
- * This file is part of Thermostat.
- *
- * Thermostat is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published
- * by the Free Software Foundation; either version 2, or (at your
- * option) any later version.
- *
- * Thermostat is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with Thermostat; see the file COPYING.  If not see
- * <http://www.gnu.org/licenses/>.
- *
- * Linking this code with other modules is making a combined work
- * based on this code.  Thus, the terms and conditions of the GNU
- * General Public License cover the whole combination.
- *
- * As a special exception, the copyright holders of this code give
- * you permission to link this code with independent modules to
- * produce an executable, regardless of the license terms of these
- * independent modules, and to copy and distribute the resulting
- * executable under terms of your choice, provided that you also
- * meet, for each linked independent module, the terms and conditions
- * of the license of that module.  An independent module is a module
- * which is not derived from or based on this code.  If you modify
- * this code, you may extend this exception to your version of the
- * library, but you are not obligated to do so.  If you do not wish
- * to do so, delete this exception statement from your version.
- */
-
-package com.redhat.thermostat.client.internal;
-
-import com.redhat.thermostat.client.core.views.HostCpuViewProvider;
-import com.redhat.thermostat.client.core.views.HostMemoryViewProvider;
-import com.redhat.thermostat.client.core.views.HostOverviewViewProvider;
-import com.redhat.thermostat.client.ui.HostCpuController;
-import com.redhat.thermostat.client.ui.HostMemoryController;
-import com.redhat.thermostat.client.ui.HostOverviewController;
-import com.redhat.thermostat.common.dao.CpuStatDAO;
-import com.redhat.thermostat.common.dao.HostInfoDAO;
-import com.redhat.thermostat.common.dao.HostRef;
-import com.redhat.thermostat.common.dao.MemoryStatDAO;
-import com.redhat.thermostat.common.dao.NetworkInterfaceInfoDAO;
-import com.redhat.thermostat.common.utils.OSGIUtils;
-
-public class HostPanelFacadeImpl implements HostPanelFacade {
-
-    private final HostOverviewController overviewController;
-    private final HostCpuController cpuController;
-    private final HostMemoryController memoryController;
-
-    public HostPanelFacadeImpl(HostInfoDAO hostInfoDao,
-            CpuStatDAO cpuStatDao, MemoryStatDAO memoryStatDao,
-            NetworkInterfaceInfoDAO networkInfoDao, HostRef ref) {
-        OSGIUtils utils = OSGIUtils.getInstance();
-        HostOverviewViewProvider hostOverviewProvider = utils.getService(HostOverviewViewProvider.class);
-        overviewController = new HostOverviewController(hostInfoDao, networkInfoDao, ref, hostOverviewProvider);
-        HostCpuViewProvider cpuProvider = utils.getService(HostCpuViewProvider.class);
-        cpuController = new HostCpuController(hostInfoDao, cpuStatDao, ref, cpuProvider);
-        HostMemoryViewProvider memoryProvider = utils.getService(HostMemoryViewProvider.class);
-        memoryController = new HostMemoryController(hostInfoDao, memoryStatDao, ref, memoryProvider);
-    }
-
-    @Override
-    public HostOverviewController getOverviewController() {
-        return overviewController;
-    }
-
-    @Override
-    public HostCpuController getCpuController() {
-        return cpuController;
-    }
-
-    @Override
-    public HostMemoryController getMemoryController() {
-        return memoryController;
-    }
-
-}
--- a/client/core/src/main/java/com/redhat/thermostat/client/ui/HostPanel.java	Fri Oct 19 19:59:30 2012 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,84 +0,0 @@
-/*
- * Copyright 2012 Red Hat, Inc.
- *
- * This file is part of Thermostat.
- *
- * Thermostat is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published
- * by the Free Software Foundation; either version 2, or (at your
- * option) any later version.
- *
- * Thermostat is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with Thermostat; see the file COPYING.  If not see
- * <http://www.gnu.org/licenses/>.
- *
- * Linking this code with other modules is making a combined work
- * based on this code.  Thus, the terms and conditions of the GNU
- * General Public License cover the whole combination.
- *
- * As a special exception, the copyright holders of this code give
- * you permission to link this code with independent modules to
- * produce an executable, regardless of the license terms of these
- * independent modules, and to copy and distribute the resulting
- * executable under terms of your choice, provided that you also
- * meet, for each linked independent module, the terms and conditions
- * of the license of that module.  An independent module is a module
- * which is not derived from or based on this code.  If you modify
- * this code, you may extend this exception to your version of the
- * library, but you are not obligated to do so.  If you do not wish
- * to do so, delete this exception statement from your version.
- */
-
-package com.redhat.thermostat.client.ui;
-
-import java.awt.BorderLayout;
-
-import javax.swing.JPanel;
-import javax.swing.JTabbedPane;
-
-import com.redhat.thermostat.client.internal.HostPanelFacade;
-import com.redhat.thermostat.client.locale.LocaleResources;
-import com.redhat.thermostat.common.locale.Translate;
-
-public class HostPanel extends JPanel {
-
-    private static final Translate<LocaleResources> translator = LocaleResources.createLocalizer();
-
-    /*
-     * This entire class needs to be more dynamic. We should try to avoid
-     * creating objects and should just update them when necessary
-     */
-
-    private static final long serialVersionUID = 4835316442841009133L;
-
-    private final HostPanelFacade facade;
-
-    public HostPanel(final HostPanelFacade facade) {
-        this.facade = facade;
-
-        init();
-    }
-
-    private void init() {
-        setLayout(new BorderLayout());
-
-        JTabbedPane tabPane = new JTabbedPane();
-
-        // FIXME: Fix how we get old of the view impl specific UI component.
-        tabPane.insertTab(translator.localize(LocaleResources.HOST_INFO_TAB_OVERVIEW), null, ((HostOverviewPanel)facade.getOverviewController().getView()).getUiComponent(), null, 0);
-        tabPane.insertTab(translator.localize(LocaleResources.HOST_INFO_TAB_CPU), null, ((HostCpuPanel)facade.getCpuController().getView()).getUiComponent(), null, 1);
-        tabPane.insertTab(translator.localize(LocaleResources.HOST_INFO_TAB_MEMORY), null, ((HostMemoryPanel)facade.getMemoryController().getView()).getUiComponent(), null, 2);
-
-        // TODO additional tabs provided by plugins
-        // tabPane.insertTab(title, icon, component, tip, 3)
-
-        this.add(tabPane);
-
-    }
-
-}