Mercurial > hg > release > thermostat-0.4
changeset 518:82ddaad8c1fd
Refactor view into reusabled components (part 2)
review-thread: http://icedtea.classpath.org/pipermail/thermostat/2012-August/002587.html
reviewed-by: omajid
line wrap: on
line diff
--- a/client/core/src/main/java/com/redhat/thermostat/client/osgi/service/BasicView.java Thu Aug 02 21:07:02 2012 +0200 +++ b/client/core/src/main/java/com/redhat/thermostat/client/osgi/service/BasicView.java Thu Aug 02 21:08:03 2012 +0200 @@ -62,10 +62,4 @@ protected void notify(Action action) { notifier.fireAction(action); } - - /** - * - * @return a basic view which can be returned by a controller. - */ - public abstract BasicView getView(); }
--- a/client/core/src/main/java/com/redhat/thermostat/client/ui/HostCpuPanel.java Thu Aug 02 21:07:02 2012 +0200 +++ b/client/core/src/main/java/com/redhat/thermostat/client/ui/HostCpuPanel.java Thu Aug 02 21:08:03 2012 +0200 @@ -210,10 +210,4 @@ ); visiblePanel.setLayout(groupLayout); } - - @Override - public BasicView getView() { - return this; - } - }
--- a/client/core/src/main/java/com/redhat/thermostat/client/ui/HostInformationPanel.java Thu Aug 02 21:07:02 2012 +0200 +++ b/client/core/src/main/java/com/redhat/thermostat/client/ui/HostInformationPanel.java Thu Aug 02 21:08:03 2012 +0200 @@ -94,10 +94,4 @@ public Component getUiComponent() { return visiblePanel; } - - @Override - public BasicView getView() { - return this; - } - }
--- a/client/core/src/main/java/com/redhat/thermostat/client/ui/HostMemoryPanel.java Thu Aug 02 21:07:02 2012 +0200 +++ b/client/core/src/main/java/com/redhat/thermostat/client/ui/HostMemoryPanel.java Thu Aug 02 21:08:03 2012 +0200 @@ -344,10 +344,4 @@ } } - - @Override - public BasicView getView() { - return this; - } - }
--- a/client/core/src/main/java/com/redhat/thermostat/client/ui/HostOverviewPanel.java Thu Aug 02 21:07:02 2012 +0200 +++ b/client/core/src/main/java/com/redhat/thermostat/client/ui/HostOverviewPanel.java Thu Aug 02 21:08:03 2012 +0200 @@ -300,9 +300,4 @@ panel.add(header, BorderLayout.PAGE_START); visiblePanel.setLayout(gl_visiblePanel); } - - @Override - public BasicView getView() { - return this; - } }
--- a/client/core/src/main/java/com/redhat/thermostat/client/ui/SummaryPanel.java Thu Aug 02 21:07:02 2012 +0200 +++ b/client/core/src/main/java/com/redhat/thermostat/client/ui/SummaryPanel.java Thu Aug 02 21:08:03 2012 +0200 @@ -212,10 +212,4 @@ return delegate.get(index); } } - - @Override - public BasicView getView() { - return this; - } - }
--- a/client/core/src/main/java/com/redhat/thermostat/client/ui/VmCpuPanel.java Thu Aug 02 21:07:02 2012 +0200 +++ b/client/core/src/main/java/com/redhat/thermostat/client/ui/VmCpuPanel.java Thu Aug 02 21:08:03 2012 +0200 @@ -149,10 +149,4 @@ } }); } - - @Override - public BasicView getView() { - return this; - } - }
--- a/client/core/src/main/java/com/redhat/thermostat/client/ui/VmGcPanel.java Thu Aug 02 21:07:02 2012 +0200 +++ b/client/core/src/main/java/com/redhat/thermostat/client/ui/VmGcPanel.java Thu Aug 02 21:08:03 2012 +0200 @@ -205,9 +205,4 @@ } }); } - - @Override - public BasicView getView() { - return this; - } }
--- a/client/core/src/main/java/com/redhat/thermostat/client/ui/VmInformationPanel.java Thu Aug 02 21:07:02 2012 +0200 +++ b/client/core/src/main/java/com/redhat/thermostat/client/ui/VmInformationPanel.java Thu Aug 02 21:08:03 2012 +0200 @@ -90,10 +90,4 @@ public int getNumChildren() { return tabPane.getComponentCount(); } - - @Override - public BasicView getView() { - return this; - } - }
--- a/client/core/src/main/java/com/redhat/thermostat/client/ui/VmOverviewPanel.java Thu Aug 02 21:07:02 2012 +0200 +++ b/client/core/src/main/java/com/redhat/thermostat/client/ui/VmOverviewPanel.java Thu Aug 02 21:08:03 2012 +0200 @@ -47,7 +47,6 @@ import com.redhat.thermostat.client.internal.ChangeableText; import com.redhat.thermostat.client.locale.LocaleResources; -import com.redhat.thermostat.client.osgi.service.BasicView; import com.redhat.thermostat.client.ui.SimpleTable.Section; import com.redhat.thermostat.client.ui.SimpleTable.TableEntry; import com.redhat.thermostat.common.ActionListener; @@ -185,10 +184,4 @@ table.setBorder(Components.smallBorder()); visiblePanel.add(table, BorderLayout.PAGE_START); } - - @Override - public BasicView getView() { - return this; - } - }
--- a/client/heapdumper/src/main/java/com/redhat/thermostat/client/heap/swing/HeapDetailsSwing.java Thu Aug 02 21:07:02 2012 +0200 +++ b/client/heapdumper/src/main/java/com/redhat/thermostat/client/heap/swing/HeapDetailsSwing.java Thu Aug 02 21:08:03 2012 +0200 @@ -45,7 +45,6 @@ import com.redhat.thermostat.client.heap.HeapDumpDetailsView; import com.redhat.thermostat.client.heap.HeapHistogramView; import com.redhat.thermostat.client.heap.ObjectDetailsView; -import com.redhat.thermostat.client.osgi.service.BasicView; import com.redhat.thermostat.client.ui.SwingComponent; public class HeapDetailsSwing extends HeapDumpDetailsView implements SwingComponent { @@ -105,11 +104,6 @@ } @Override - public BasicView getView() { - return this; - } - - @Override public JPanel getUiComponent() { return visiblePane; }
--- a/client/heapdumper/src/main/java/com/redhat/thermostat/client/heap/swing/HeapSwingView.java Thu Aug 02 21:07:02 2012 +0200 +++ b/client/heapdumper/src/main/java/com/redhat/thermostat/client/heap/swing/HeapSwingView.java Thu Aug 02 21:08:03 2012 +0200 @@ -47,15 +47,10 @@ import javax.swing.event.ListSelectionEvent; import javax.swing.event.ListSelectionListener; -import org.osgi.framework.BundleContext; -import org.osgi.framework.FrameworkUtil; -import org.osgi.framework.ServiceReference; - import com.redhat.thermostat.client.heap.HeapView; import com.redhat.thermostat.client.heap.LocaleResources; import com.redhat.thermostat.client.heap.Translate; import com.redhat.thermostat.client.heap.chart.OverviewChart; -import com.redhat.thermostat.client.osgi.service.ApplicationService; import com.redhat.thermostat.client.osgi.service.BasicView; import com.redhat.thermostat.client.ui.ComponentVisibleListener; import com.redhat.thermostat.client.ui.SwingComponent; @@ -73,8 +68,6 @@ private JPanel visiblePane; public HeapSwingView() { - BundleContext ctx = FrameworkUtil.getBundle(getClass()).getBundleContext(); - ServiceReference ref = ctx.getServiceReference(ApplicationService.class.getName()); stats = new StatsPanel(); stats.addHeapDumperListener(new ActionListener() { @Override @@ -201,9 +194,4 @@ public Component getUiComponent() { return visiblePane; } - - @Override - public BasicView getView() { - return this; - } }
--- a/client/heapdumper/src/main/java/com/redhat/thermostat/client/heap/swing/HistogramPanel.java Thu Aug 02 21:07:02 2012 +0200 +++ b/client/heapdumper/src/main/java/com/redhat/thermostat/client/heap/swing/HistogramPanel.java Thu Aug 02 21:08:03 2012 +0200 @@ -52,7 +52,6 @@ import com.redhat.thermostat.client.heap.HeapHistogramView; import com.redhat.thermostat.client.heap.LocaleResources; import com.redhat.thermostat.client.heap.Translate; -import com.redhat.thermostat.client.osgi.service.BasicView; import com.redhat.thermostat.client.ui.SwingComponent; import com.redhat.thermostat.common.heap.HistogramRecord; import com.redhat.thermostat.common.heap.ObjectHistogram; @@ -178,9 +177,4 @@ public Component getUiComponent() { return panel; } - - @Override - public BasicView getView() { - return this; - } }
--- a/client/heapdumper/src/main/java/com/redhat/thermostat/client/heap/swing/ObjectDetailsPanel.java Thu Aug 02 21:07:02 2012 +0200 +++ b/client/heapdumper/src/main/java/com/redhat/thermostat/client/heap/swing/ObjectDetailsPanel.java Thu Aug 02 21:08:03 2012 +0200 @@ -58,7 +58,6 @@ import com.redhat.thermostat.client.heap.LocaleResources; import com.redhat.thermostat.client.heap.ObjectDetailsView; import com.redhat.thermostat.client.heap.Translate; -import com.redhat.thermostat.client.osgi.service.BasicView; import com.redhat.thermostat.client.ui.SearchFieldSwingView; import com.redhat.thermostat.client.ui.SearchFieldView.SearchAction; import com.redhat.thermostat.client.ui.SwingComponent; @@ -91,7 +90,6 @@ /** * A Panel that displays JavaHeapObjects and referrers and references. */ -@SuppressWarnings("serial") public class ObjectDetailsPanel extends ObjectDetailsView implements SwingComponent { /** For TESTING ONLY! */ @@ -432,9 +430,4 @@ public Component getUiComponent() { return panel; } - - @Override - public BasicView getView() { - return this; - } }
--- a/client/vmclassstat/src/main/java/com/redhat/thermostat/client/vmclassstat/VmClassStatPanel.java Thu Aug 02 21:07:02 2012 +0200 +++ b/client/vmclassstat/src/main/java/com/redhat/thermostat/client/vmclassstat/VmClassStatPanel.java Thu Aug 02 21:08:03 2012 +0200 @@ -58,7 +58,6 @@ import org.jfree.data.time.TimeSeriesCollection; import com.redhat.thermostat.client.locale.LocaleResources; -import com.redhat.thermostat.client.osgi.service.BasicView; import com.redhat.thermostat.client.ui.ComponentVisibleListener; import com.redhat.thermostat.client.ui.Components; import com.redhat.thermostat.client.ui.RecentTimeSeriesChartController; @@ -168,10 +167,4 @@ public Component getUiComponent() { return visiblePanel; } - - @Override - public BasicView getView() { - return this; - } - }