perfsonar-dev - perfsonar: r4890 - in branches/perfsonarui: ant jars jars/swingx src src/org/perfsonar/perfsonarui/ippm src/org/perfsonar/perfsonarui/ippm/ui/panels src/org/perfsonar/perfsonarui/ma src/org/perfsonar/perfsonarui/ma/ui/panels src/org/perfsonar/perfsonarui/playground src/org/perfsonar/perfsonarui/ui src/org/perfsonar/perfsonarui/ui/panels
Subject: perfsonar development work
List archive
perfsonar: r4890 - in branches/perfsonarui: ant jars jars/swingx src src/org/perfsonar/perfsonarui/ippm src/org/perfsonar/perfsonarui/ippm/ui/panels src/org/perfsonar/perfsonarui/ma src/org/perfsonar/perfsonarui/ma/ui/panels src/org/perfsonar/perfsonarui/playground src/org/perfsonar/perfsonarui/ui src/org/perfsonar/perfsonarui/ui/panels
Chronological Thread
- From:
- To:
- Subject: perfsonar: r4890 - in branches/perfsonarui: ant jars jars/swingx src src/org/perfsonar/perfsonarui/ippm src/org/perfsonar/perfsonarui/ippm/ui/panels src/org/perfsonar/perfsonarui/ma src/org/perfsonar/perfsonarui/ma/ui/panels src/org/perfsonar/perfsonarui/playground src/org/perfsonar/perfsonarui/ui src/org/perfsonar/perfsonarui/ui/panels
- Date: Sun, 18 Jan 2009 10:28:00 -0500
Author: nina
Date: 2009-01-18 10:27:59 -0500 (Sun, 18 Jan 2009)
New Revision: 4890
Added:
branches/perfsonarui/jars/swingx/
branches/perfsonarui/jars/swingx/swingx-0.9.5.jar
branches/perfsonarui/src/org/perfsonar/perfsonarui/ui/PerfsonarPaneUI.java
branches/perfsonarui/src/org/perfsonar/perfsonarui/ui/PerfsonarTaskPaneContainerUI.java
branches/perfsonarui/src/org/perfsonar/perfsonarui/ui/PluginMainContainer.java
branches/perfsonarui/src/org/perfsonar/perfsonarui/ui/error.png
branches/perfsonarui/src/org/perfsonar/perfsonarui/ui/success.png
branches/perfsonarui/src/org/perfsonar/perfsonarui/ui/unknown.png
Removed:
branches/perfsonarui/jars/l2fprod/
Modified:
branches/perfsonarui/ant/build.xml
branches/perfsonarui/ant/javadoc.xml
branches/perfsonarui/src/org/perfsonar/perfsonarui/ippm/HoplistRequest.java
branches/perfsonarui/src/org/perfsonar/perfsonarui/ippm/ui/panels/IPPMResponseChartPanel.java
branches/perfsonarui/src/org/perfsonar/perfsonarui/ippm/ui/panels/MainPanelIPPM.java
branches/perfsonarui/src/org/perfsonar/perfsonarui/ma/MAPerfsonarModel.java
branches/perfsonarui/src/org/perfsonar/perfsonarui/ma/ui/panels/BarChartPanel.java
branches/perfsonarui/src/org/perfsonar/perfsonarui/ma/ui/panels/MAResponseChartPanel.java
branches/perfsonarui/src/org/perfsonar/perfsonarui/ma/ui/panels/MainPanelMA.java
branches/perfsonarui/src/org/perfsonar/perfsonarui/ma/ui/panels/MetaDataPanel.java
branches/perfsonarui/src/org/perfsonar/perfsonarui/ma/ui/panels/RadarChartPanel.java
branches/perfsonarui/src/org/perfsonar/perfsonarui/ma/ui/panels/SearchPanel.java
branches/perfsonarui/src/org/perfsonar/perfsonarui/playground/PerfsonarPlaygroundModel.java
branches/perfsonarui/src/org/perfsonar/perfsonarui/playground/PlaygroundPanel.java
branches/perfsonarui/src/org/perfsonar/perfsonarui/playground/PlaygroundPredefined.java
branches/perfsonarui/src/org/perfsonar/perfsonarui/ui/MANIFESTAPP.MFT
branches/perfsonarui/src/org/perfsonar/perfsonarui/ui/PerfSonarApp.java
branches/perfsonarui/src/org/perfsonar/perfsonarui/ui/PerfsonarTaskPane.java
branches/perfsonarui/src/org/perfsonar/perfsonarui/ui/panels/BusyIdleEvent.java
branches/perfsonarui/src/org/perfsonar/perfsonarui/ui/panels/PSPanel.java
branches/perfsonarui/src/org/perfsonar/perfsonarui/ui/panels/StatusBar.java
branches/perfsonarui/src/org/perfsonar/perfsonarui/ui/warning.png
branches/perfsonarui/src/resources.files
Log:
- introduced main plugin panel with set of collapsible set of panels;
- Interfaces, Circuits and Playground tab redesigned
- swingx replaces l2fprod library
- playground error reporting refactored for better integration with psUI
error reporting
version moved to 0.15
Modified: branches/perfsonarui/ant/build.xml
===================================================================
--- branches/perfsonarui/ant/build.xml 2009-01-17 14:08:32 UTC (rev 4889)
+++ branches/perfsonarui/ant/build.xml 2009-01-18 15:27:59 UTC (rev 4890)
@@ -22,7 +22,7 @@
-->
<project basedir="../" default="all" name="perfsonar">
- <property name="version" value="0.14b" />
+ <property name="version" value="0.15" />
<!-- compile options -->
<property name="build.sysclasspath" value="ignore" />
<property name="build.compiler" value="modern" />
@@ -60,7 +60,7 @@
<fileset dir="./jars/ui/">
<include name="*.jar"/>
</fileset>
- <fileset dir="./jars/l2fprod/">
+ <fileset dir="./jars/swingx/">
<include name="*.jar"/>
</fileset>
<fileset dir="./jars/dns/">
@@ -319,7 +319,7 @@
<mkdir dir="${appdist.dir}/bin/jars/axis" />
<mkdir dir="${appdist.dir}/bin/jars/ui" />
<mkdir dir="${appdist.dir}/bin/jars/xml" />
- <mkdir dir="${appdist.dir}/bin/jars/l2fprod" />
+ <mkdir dir="${appdist.dir}/bin/jars/swingx" />
<mkdir dir="${appdist.dir}/bin/jars/dns" />
<copy todir="${appdist.dir}/bin/jars">
@@ -341,7 +341,7 @@
<target name="javadoc">
<javadoc access="public" author="true"
-
classpath="jars/axis/jaxrpc.jar;jars/ui/jfreechart-1.0.6.jar;jars/ui/jcommon-1.0.10.jar;jars/axis/axis-ant.jar;jars/axis/commons-discovery-0.2.jar;jars/axis/log4j-1.2.15.jar;jars/axis/commons-logging-1.0.4.jar;jars/xml/mail.jar;jars/axis/axis.jar;jars/xml/activation.jar;jars/axis/saaj.jar;jars/xml/commons-cli-1.0.jar;jars/l2fprod/l2fprod-common-all.jar;jars/ui/junit.jar;C:\nina\bin\eclipse\plugins\org.junit_3.8.1\junit.jar;jars/axis/wsdl4j-1.5.1.jar;jars/xml/jdom.jar"
+
classpath="jars/axis/jaxrpc.jar;jars/ui/jfreechart-1.0.6.jar;jars/ui/jcommon-1.0.10.jar;jars/axis/axis-ant.jar;jars/axis/commons-discovery-0.2.jar;jars/axis/log4j-1.2.15.jar;jars/axis/commons-logging-1.0.4.jar;jars/xml/mail.jar;jars/axis/axis.jar;jars/xml/activation.jar;jars/axis/saaj.jar;jars/xml/commons-cli-1.0.jar;jars/swingx/swingx-0.9.5.jar;jars/ui/junit.jar;C:\nina\bin\eclipse\plugins\org.junit_3.8.1\junit.jar;jars/axis/wsdl4j-1.5.1.jar;jars/xml/jdom.jar"
destdir="doc"
doctitle="PerfsonarUI " nodeprecated="false"
nodeprecatedlist="false" noindex="false" nonavbar="false"
notree="false"
Modified: branches/perfsonarui/ant/javadoc.xml
===================================================================
--- branches/perfsonarui/ant/javadoc.xml 2009-01-17 14:08:32 UTC (rev
4889)
+++ branches/perfsonarui/ant/javadoc.xml 2009-01-18 15:27:59 UTC (rev
4890)
@@ -2,7 +2,7 @@
<project default="javadoc">
<property name="version" value="0.12" />
<target name="javadoc">
-<javadoc access="public" author="true"
classpath="../jars/xml/activation.jar;../jars/axis/wsdl4j-1.5.1.jar;../jars/axis/commons-discovery-0.2.jar;../jars/ui/junit.jar;../jars/xml/commons-cli-1.0.jar;../jars/ui/jfreechart-1.0.3.jar;../jars/axis/log4j-1.2.8.jar;C:\eclipse\plugins\org.junit_3.8.1\junit.jar;../jars/axis/axis-ant.jar;../jars/axis/jaxrpc.jar;../jars/ui/jcommon-1.0.8.jar;../jars/axis/axis.jar;../jars/l2fprod/l2fprod-common-all.jar;j../ars/xml/mail.jar;../jars/xml/jdom.jar;../jars/axis/commons-logging-1.0.4.jar;../jars/axis/saaj.jar"
destdir="../dist/PerfsonarUI-v${version}/doc" doctitle="Perfsonar UI"
nodeprecated="false" nodeprecatedlist="false" noindex="false"
nonavbar="false" notree="false" overview="../src/overview.html"
packagenames="org.perfsonar.perfsonarui.playground,org.perfsonar.perfsonarui.ui,org.perfsonar.perfsonarui,org.perfsonar.perfsonarui.ma.ui.panels,org.perfsonar.perfsonarui.ippm.ui.panels,org.perfsonar.perfsonarui.demo,org.perfsonar.perfsonarui.m
a,org.perfsonar.perfsonarui.test.misc,org.perfsonar.perfsonarui.test,org.perfsonar.perfsonarui.ui.panels,org.perfsonar.perfsonarui.ippm.ui.actions,org.perfsonar.perfsonarui.ippm,org.perfsonar.perfsonarui.ma.ui.actions,org.perfsonar.perfsonarui.plugins,org.perfsonar.perfsonarui.ui.actions"
source="1.5" sourcepath="../src" splitindex="true" use="true" version="true">
+<javadoc access="public" author="true"
classpath="../jars/xml/activation.jar;../jars/axis/wsdl4j-1.5.1.jar;../jars/axis/commons-discovery-0.2.jar;../jars/ui/junit.jar;../jars/xml/commons-cli-1.0.jar;../jars/ui/jfreechart-1.0.3.jar;../jars/axis/log4j-1.2.8.jar;C:\eclipse\plugins\org.junit_3.8.1\junit.jar;../jars/axis/axis-ant.jar;../jars/axis/jaxrpc.jar;../jars/ui/jcommon-1.0.8.jar;../jars/axis/axis.jar;../jars/swingx/swingx-0.9.5.jar;j../ars/xml/mail.jar;../jars/xml/jdom.jar;../jars/axis/commons-logging-1.0.4.jar;../jars/axis/saaj.jar"
destdir="../dist/PerfsonarUI-v${version}/doc" doctitle="Perfsonar UI"
nodeprecated="false" nodeprecatedlist="false" noindex="false"
nonavbar="false" notree="false" overview="../src/overview.html"
packagenames="org.perfsonar.perfsonarui.playground,org.perfsonar.perfsonarui.ui,org.perfsonar.perfsonarui,org.perfsonar.perfsonarui.ma.ui.panels,org.perfsonar.perfsonarui.ippm.ui.panels,org.perfsonar.perfsonarui.demo,org.perfsonar.perfsonarui.ma,org.p
erfsonar.perfsonarui.test.misc,org.perfsonar.perfsonarui.test,org.perfsonar.perfsonarui.ui.panels,org.perfsonar.perfsonarui.ippm.ui.actions,org.perfsonar.perfsonarui.ippm,org.perfsonar.perfsonarui.ma.ui.actions,org.perfsonar.perfsonarui.plugins,org.perfsonar.perfsonarui.ui.actions"
source="1.5" sourcepath="../src" splitindex="true" use="true" version="true">
<link href="http://www.jfree.org/jfreechart/api/javadoc"/>
<link href="../dist/PerfsonarUI-v${version}/doc/"/>
<link href="http://ws.apache.org/axis/java/apiDocs"/>
Added: branches/perfsonarui/jars/swingx/swingx-0.9.5.jar
Property changes on: branches/perfsonarui/jars/swingx/swingx-0.9.5.jar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Modified:
branches/perfsonarui/src/org/perfsonar/perfsonarui/ippm/HoplistRequest.java
===================================================================
---
branches/perfsonarui/src/org/perfsonar/perfsonarui/ippm/HoplistRequest.java
2009-01-17 14:08:32 UTC (rev 4889)
+++
branches/perfsonarui/src/org/perfsonar/perfsonarui/ippm/HoplistRequest.java
2009-01-18 15:27:59 UTC (rev 4890)
@@ -18,6 +18,7 @@
*/
package org.perfsonar.perfsonarui.ippm;
+import java.io.IOException;
import java.io.InputStream;
import java.util.ArrayList;
import java.util.Iterator;
@@ -110,7 +111,8 @@
builder = factory.newDocumentBuilder();
stream =
getClass().getClassLoader().getResourceAsStream(inputFile);
-
+ if (stream == null)
+ throw new IOException("Can't find "+inputFile);
request = builder.parse(stream);
String src = userData.getQuery(IPPMUserData.IFNAME_SRC);
Modified:
branches/perfsonarui/src/org/perfsonar/perfsonarui/ippm/ui/panels/IPPMResponseChartPanel.java
===================================================================
---
branches/perfsonarui/src/org/perfsonar/perfsonarui/ippm/ui/panels/IPPMResponseChartPanel.java
2009-01-17 14:08:32 UTC (rev 4889)
+++
branches/perfsonarui/src/org/perfsonar/perfsonarui/ippm/ui/panels/IPPMResponseChartPanel.java
2009-01-18 15:27:59 UTC (rev 4890)
@@ -342,4 +342,8 @@
public void chartMouseMoved(ChartMouseEvent event) {
}
+ @Override
+ public String toString() {
+ return "Measurements";
+ }
}
Modified:
branches/perfsonarui/src/org/perfsonar/perfsonarui/ippm/ui/panels/MainPanelIPPM.java
===================================================================
---
branches/perfsonarui/src/org/perfsonar/perfsonarui/ippm/ui/panels/MainPanelIPPM.java
2009-01-17 14:08:32 UTC (rev 4889)
+++
branches/perfsonarui/src/org/perfsonar/perfsonarui/ippm/ui/panels/MainPanelIPPM.java
2009-01-18 15:27:59 UTC (rev 4890)
@@ -22,9 +22,12 @@
import java.awt.BorderLayout;
import java.awt.Component;
import java.awt.Dimension;
+import java.util.Arrays;
+import java.util.Collection;
+
+import javax.swing.JComponent;
import javax.swing.JLabel;
import javax.swing.JPanel;
-import javax.swing.JSplitPane;
import org.perfsonar.perfsonarui.PSLogger;
import org.perfsonar.perfsonarui.ippm.IPPMCalendarSyncAction;
@@ -33,7 +36,7 @@
import org.perfsonar.perfsonarui.ippm.IPPMUserData;
import org.perfsonar.perfsonarui.plugins.IPerfsonarTab;
import org.perfsonar.perfsonarui.ui.PerfsonarModel;
-import org.perfsonar.perfsonarui.ui.PluginMainPanel;
+import org.perfsonar.perfsonarui.ui.PluginMainContainer;
import org.perfsonar.perfsonarui.ui.actions.ITimeSet;
import org.perfsonar.perfsonarui.ui.actions.ITimeSetAction;
import org.perfsonar.perfsonarui.ui.panels.DatePanel;
@@ -47,8 +50,7 @@
* @author Nina Jeliazkova
* <b>Modified</b> 2005-12-4
*/
-public class MainPanelIPPM extends PluginMainPanel {
- protected JSplitPane panel = null;
+public class MainPanelIPPM extends PluginMainContainer {
protected ResponseChartPanel responsePanel = null;
@@ -64,11 +66,17 @@
private static final long serialVersionUID = 1238792955927845643L;
public MainPanelIPPM(Component parentFrame, IPPMPerfsonarModel
psModel) {
- super(parentFrame, psModel, new BorderLayout());
+ super(parentFrame, psModel);
}
- protected void addWidgets() {
- bottomPanel = new JPanel(new BorderLayout());
+ @Override
+ protected Collection<JComponent> createComponents() {
+ bottomPanel = new JPanel(new BorderLayout()) {
+ @Override
+ public String toString() {
+ return "Measurements";
+ }
+ };
IPPMPerfsonarModel psModel = (IPPMPerfsonarModel) model;
@@ -76,10 +84,16 @@
datePanel.addTimeAction(psModel.getTimeAction());
datePanel.addTimeAction((ITimeSet)psModel.getMetadataRequestAction());
- topPanel = new JPanel(new BorderLayout());
+ topPanel = new JPanel(new BorderLayout()) {
+ @Override
+ public String toString() {
+ return "Query";
+ }
+ };
QueryDetailsPanel scrollPaneQuery = new
QueryDetailsPanel("Query parameters ",
psModel.getUserData(),psModel.getDataList());
+
JPanel leftP = new JPanel();
leftP.setLayout(new BorderLayout());
@@ -119,9 +133,7 @@
model.getDataList().addObserver(responsePanel);
bottomPanel.add(responsePanel, BorderLayout.CENTER);
- panel = new JSplitPane(JSplitPane.VERTICAL_SPLIT,topPanel,
bottomPanel);
- panel.setDividerLocation(300);
- add(panel,BorderLayout.CENTER);
+ return Arrays.asList(new JComponent[]
{topPanel,bottomPanel});
}
@Override
Modified:
branches/perfsonarui/src/org/perfsonar/perfsonarui/ma/MAPerfsonarModel.java
===================================================================
---
branches/perfsonarui/src/org/perfsonar/perfsonarui/ma/MAPerfsonarModel.java
2009-01-17 14:08:32 UTC (rev 4889)
+++
branches/perfsonarui/src/org/perfsonar/perfsonarui/ma/MAPerfsonarModel.java
2009-01-18 15:27:59 UTC (rev 4890)
@@ -21,6 +21,7 @@
import java.awt.Color;
import java.awt.Component;
+import java.awt.Dimension;
import java.awt.event.ActionEvent;
import java.util.ArrayList;
import java.util.Collections;
@@ -35,6 +36,7 @@
import javax.swing.text.Document;
import org.apache.commons.cli.CommandLine;
+import org.jdesktop.swingx.border.IconBorder;
import org.perfsonar.perfsonarui.AbstractUserData;
import org.perfsonar.perfsonarui.IPerfsonarSchema;
import org.perfsonar.perfsonarui.PSException;
@@ -51,6 +53,7 @@
import org.perfsonar.perfsonarui.ma.ui.actions.TracerouteAction;
import org.perfsonar.perfsonarui.ma.ui.panels.MainPanelMA;
import org.perfsonar.perfsonarui.ma.ui.panels.MetricsOptionPanel;
+import org.perfsonar.perfsonarui.ma.ui.panels.RadarChartPanel;
import org.perfsonar.perfsonarui.plugins.IPerfsonarRequest;
import org.perfsonar.perfsonarui.plugins.IPerfsonarTab;
import org.perfsonar.perfsonarui.plugins.ITimeValueResponse;
@@ -381,7 +384,16 @@
s,
false,
false);
- return new JComponent[] {scrollPaneResponse};
+
+ RadarChartPanel radarPanel = new RadarChartPanel(this);
+ radarPanel.setMinimumSize(new Dimension(150,180));
+ radarPanel.setPreferredSize(new Dimension(200,200));
+ radarPanel.setBorder(new IconBorder());
+ try {
+
radarPanel.setToolTipText(getResourceBundle().getString("msg_radar_help"));
+ } catch (Exception x) {}
+
+ return new JComponent[] {scrollPaneResponse,radarPanel};
}
/**
* Creates
{@link
MainPanelMA}.
Modified:
branches/perfsonarui/src/org/perfsonar/perfsonarui/ma/ui/panels/BarChartPanel.java
===================================================================
---
branches/perfsonarui/src/org/perfsonar/perfsonarui/ma/ui/panels/BarChartPanel.java
2009-01-17 14:08:32 UTC (rev 4889)
+++
branches/perfsonarui/src/org/perfsonar/perfsonarui/ma/ui/panels/BarChartPanel.java
2009-01-18 15:27:59 UTC (rev 4890)
@@ -110,26 +110,12 @@
}
/**
- * @param isDoubleBuffered
- */
- public BarChartPanel(MAPerfsonarModel model, boolean
isDoubleBuffered) {
- super(model,isDoubleBuffered);
- }
-
- /**
* @param layout
*/
public BarChartPanel(MAPerfsonarModel model,LayoutManager layout) {
super(model,layout);
}
- /**
- * @param layout
- * @param isDoubleBuffered
- */
- public BarChartPanel(MAPerfsonarModel model,LayoutManager layout,
boolean isDoubleBuffered) {
- super(model,layout, isDoubleBuffered);
- }
@Override
public void addWidgets(IPerfsonarTab pm) {
setLayout(new BorderLayout());
@@ -187,11 +173,6 @@
utilizationBox.setSelected(((MetadataChartSet)
dataset).isUtilization());
popup.add(utilizationBox);
- setLayout(new BorderLayout());
-
- //JScrollPane sp = new JScrollPane(chartPanel);
-
-
add(chartPanel,BorderLayout.CENTER);
setPreferredSize(prefDimension);
@@ -248,7 +229,6 @@
pagePanel.add(label);
add(pagePanel,BorderLayout.EAST);
updateLabels(((MetadataChartSet) dataset));
- //chartPanel.setPreferredSize(new Dimension(300,200));
}
protected JButton createLabel(String caption, String tooltip, String
iconfile ) {
JButton label = //new JLabel("<html><u> "+caption+" </u></html>",
@@ -501,5 +481,8 @@
}
}
-
+ @Override
+ public String toString() {
+ return "Summary";
+ }
}
Modified:
branches/perfsonarui/src/org/perfsonar/perfsonarui/ma/ui/panels/MAResponseChartPanel.java
===================================================================
---
branches/perfsonarui/src/org/perfsonar/perfsonarui/ma/ui/panels/MAResponseChartPanel.java
2009-01-17 14:08:32 UTC (rev 4889)
+++
branches/perfsonarui/src/org/perfsonar/perfsonarui/ma/ui/panels/MAResponseChartPanel.java
2009-01-18 15:27:59 UTC (rev 4890)
@@ -308,5 +308,9 @@
}
}
+ @Override
+ public String toString() {
+ return "Measurements";
+ }
}
Modified:
branches/perfsonarui/src/org/perfsonar/perfsonarui/ma/ui/panels/MainPanelMA.java
===================================================================
---
branches/perfsonarui/src/org/perfsonar/perfsonarui/ma/ui/panels/MainPanelMA.java
2009-01-17 14:08:32 UTC (rev 4889)
+++
branches/perfsonarui/src/org/perfsonar/perfsonarui/ma/ui/panels/MainPanelMA.java
2009-01-18 15:27:59 UTC (rev 4890)
@@ -22,19 +22,33 @@
import java.awt.BorderLayout;
import java.awt.Component;
import java.awt.Dimension;
-import java.awt.GridLayout;
import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent;
+import java.util.Arrays;
+import java.util.Collection;
+import java.util.Hashtable;
+import java.util.List;
import javax.swing.BorderFactory;
+import javax.swing.JComponent;
import javax.swing.JPanel;
-import javax.swing.JSplitPane;
+import javax.swing.JScrollPane;
import javax.swing.JTable;
+import javax.swing.UIManager;
+import javax.swing.plaf.BorderUIResource;
+import org.jdesktop.swingx.JXTaskPane;
+import org.jdesktop.swingx.JXTaskPaneContainer;
+import org.jdesktop.swingx.border.DropShadowBorder;
+import org.jdesktop.swingx.border.IconBorder;
import org.perfsonar.perfsonarui.ma.MAPerfsonarModel;
import org.perfsonar.perfsonarui.plugins.IPerfsonarTab;
+import org.perfsonar.perfsonarui.ui.PerfsonarPaneUI;
+import org.perfsonar.perfsonarui.ui.PerfsonarTaskPaneContainerUI;
+import org.perfsonar.perfsonarui.ui.PluginMainContainer;
import org.perfsonar.perfsonarui.ui.PluginMainPanel;
import org.perfsonar.perfsonarui.ui.panels.PerfsonarTimeSeriesDataset;
+import org.perfsonar.perfsonarui.util.Collections;
/**
*
@@ -42,8 +56,8 @@
* @author Nina Jeliazkova
* <b>Modified</b> 2005-12-4
*/
-public class MainPanelMA extends PluginMainPanel {
- protected JSplitPane panel = null;
+public class MainPanelMA extends PluginMainContainer {
+
protected MetaDataPanel metadataPanel = null;
protected BarChartPanel barPanel = null;
protected MAResponseChartPanel responsePanel = null;
@@ -58,18 +72,19 @@
private static final long serialVersionUID = 1238792955927845643L;
public MainPanelMA(Component parentFrame, MAPerfsonarModel psModel) {
- super(parentFrame,psModel,new BorderLayout());
+ super(parentFrame,psModel);
}
-
- protected void addWidgets() {
+ @Override
+ protected Collection<JComponent> createComponents() {
//Create panels
responsePanel = new
MAResponseChartPanel(model,(PerfsonarTimeSeriesDataset)model.getResponseListener());
model.getDataList().addObserver(responsePanel);
metadataPanel = new MetaDataPanel(model);
+
barPanel = new BarChartPanel(model);
- metadataPanel.addMouseListener(new MouseAdapter() {
+ metadataPanel.addTableMouseListener(new MouseAdapter() {
@Override
public void mouseClicked(MouseEvent arg0) {
if (arg0.getButton() != MouseEvent.BUTTON1 )
return;
@@ -86,80 +101,15 @@
model.getRequest().addPropertyChangeListener(responsePanel);
- //PSLogger.configureLog4j(true); //console
- /*
- requestTask = new TimerTask() {
- public void run() {
-
psModel.getMetadataRequestAction().actionPerformed(new
ActionEvent(this,0,""));
- }
- };
- timer = new Timer();
-
- //timer.scheduleAtFixedRate(requestTask,0,600000);
- */
-
- JPanel topPanel = new JPanel(new BorderLayout());
-
SearchPanel searchPanel = new
SearchPanel((MAPerfsonarModel)model);
searchPanel.setMinimumSize(new Dimension(200,160));
searchPanel.setPreferredSize(new Dimension(360,200));
//fills the panel with traceroute outcome
((MAPerfsonarModel)model).getTracerouteShell().addPropertyChangeListener(searchPanel);
- topPanel.add(searchPanel,BorderLayout.CENTER);
-
-
- Dimension d = new Dimension(100,100);
- //Metadata, barchart
- //Dimension d = new Dimension(width,height/4-100);
- //Dimension d2 = new Dimension(width,height/2);
- //barPanel.setPreferredSize(d);
-
- RadarChartPanel radarPanel = new RadarChartPanel(model);
- radarPanel.setMinimumSize(new Dimension(150,180));
- radarPanel.setPreferredSize(new Dimension(200,580));
-
radarPanel.setBorder(BorderFactory.createTitledBorder("Summary"));
- try {
-
radarPanel.setToolTipText(model.getResourceBundle().getString("msg_radar_help"));
- } catch (Exception x) {}
- JPanel newPanel = new JPanel(new BorderLayout());
- newPanel.setMinimumSize(new Dimension(100,100));
- //radarToolbar.add(radarPanel);
- topPanel.add(radarPanel,BorderLayout.EAST);
- newPanel.add(barPanel,BorderLayout.CENTER);
-
-
-
- JPanel ifpanel = new JPanel(new BorderLayout());
- ifpanel.setMinimumSize(d);
- ifpanel.add(metadataPanel,BorderLayout.CENTER);
- //ifpanel.add(actionPanel,BorderLayout.EAST);
- panel = new JSplitPane(JSplitPane.VERTICAL_SPLIT,topPanel,
ifpanel);
- panel.setMinimumSize(new Dimension(300,320));
- panel.setPreferredSize(new Dimension(300,320));
-
- /*
- panel.setPreferredSize(new Dimension(width,height/2));
- panel.setMinimumSize(d);
- panel.setMaximumSize(d2);
- panel.setDividerLocation(height/4);
- */
-
- JSplitPane bottomPanel = new
JSplitPane(JSplitPane.VERTICAL_SPLIT,newPanel,responsePanel);
- bottomPanel.setMinimumSize(new Dimension(300,320));
- bottomPanel.setPreferredSize(new Dimension(300,320));
-
- JPanel pane1 = new JPanel(new GridLayout(2,1));
- pane1.add(panel);
- pane1.add(bottomPanel);
- //pane1.setPreferredSize(new Dimension(width,height));
- pane1.setMinimumSize(d);
-
-
- add(pane1,BorderLayout.CENTER);
-
-
+ return Arrays.asList(new JComponent[]
{searchPanel,metadataPanel,barPanel,responsePanel});
}
+
@Override
public void setModel(IPerfsonarTab model) {
if (model instanceof MAPerfsonarModel)
Modified:
branches/perfsonarui/src/org/perfsonar/perfsonarui/ma/ui/panels/MetaDataPanel.java
===================================================================
---
branches/perfsonarui/src/org/perfsonar/perfsonarui/ma/ui/panels/MetaDataPanel.java
2009-01-17 14:08:32 UTC (rev 4889)
+++
branches/perfsonarui/src/org/perfsonar/perfsonarui/ma/ui/panels/MetaDataPanel.java
2009-01-18 15:27:59 UTC (rev 4890)
@@ -32,6 +32,7 @@
import java.util.Observer;
import javax.swing.BorderFactory;
+import javax.swing.JButton;
import javax.swing.JScrollPane;
import javax.swing.JTable;
import javax.swing.ListSelectionModel;
@@ -42,6 +43,7 @@
import javax.swing.table.TableColumn;
import javax.swing.table.TableColumnModel;
+import org.jdesktop.swingx.JXCollapsiblePane;
import org.perfsonar.perfsonarui.AbstractUserData;
import org.perfsonar.perfsonarui.ma.MAResourceKeys;
import org.perfsonar.perfsonarui.plugins.IPerfsonarTab;
@@ -67,26 +69,17 @@
super(psModel);
}
- public MetaDataPanel(IPerfsonarTab psModel,boolean arg0) {
- super(psModel,arg0);
- }
-
public MetaDataPanel(IPerfsonarTab psModel,LayoutManager arg0) {
super(psModel,arg0);
}
- public MetaDataPanel(IPerfsonarTab psModel,LayoutManager arg0,
boolean arg1) {
- super(psModel,arg0, arg1);
- }
@Override
public void addWidgets(IPerfsonarTab psModel) {
setMinimumSize(minDimension);
setLayout(new BorderLayout());
-
setBorder(BorderFactory.createTitledBorder(psModel.getResourceBundle().getString(MAResourceKeys.msg_select_interface)));
-
psModel.getDataList().addObserver(this);
dataTable = new JTable(new
MetaDataTableModel(psModel.getDataList()),
createColumnModel());
@@ -108,7 +101,6 @@
add(scrollPane, BorderLayout.CENTER);
-
JTableHeader header = dataTable.getTableHeader();
header.addMouseListener(new MouseAdapter() {
@@ -129,6 +121,9 @@
}
});
+ setMinimumSize(new Dimension(200,200));
+ setPreferredSize(new Dimension(200,200));
+
}
public TableColumnModel createColumnModel() {
@@ -148,8 +143,8 @@
ListSelectionModel rowSM = dataTable.getSelectionModel();
rowSM.addListSelectionListener(listener);
}
- @Override
- public synchronized void addMouseListener(MouseListener arg0) {
+
+ public synchronized void addTableMouseListener(MouseListener arg0) {
dataTable.addMouseListener(arg0);
}
public void update(Observable arg0, Object arg1) {
@@ -161,9 +156,13 @@
dataTable.scrollRectToVisible(dataTable.getCellRect(record, 0, true));
}
-}
+ }
}
+ @Override
+ public String toString() {
+ return "Select interface";
+ }
}
Modified:
branches/perfsonarui/src/org/perfsonar/perfsonarui/ma/ui/panels/RadarChartPanel.java
===================================================================
---
branches/perfsonarui/src/org/perfsonar/perfsonarui/ma/ui/panels/RadarChartPanel.java
2009-01-17 14:08:32 UTC (rev 4889)
+++
branches/perfsonarui/src/org/perfsonar/perfsonarui/ma/ui/panels/RadarChartPanel.java
2009-01-18 15:27:59 UTC (rev 4890)
@@ -24,6 +24,7 @@
import java.awt.Dimension;
import java.awt.Font;
+import javax.swing.BorderFactory;
import javax.swing.JOptionPane;
import javax.swing.JPopupMenu;
@@ -193,7 +194,6 @@
setPreferredSize(prefDimension);
-
}
private JFreeChart createChart(MAMetadataList dataList) {
@@ -241,5 +241,9 @@
public void chartMouseMoved(ChartMouseEvent arg0) {
}
+ @Override
+ public String toString() {
+ return "Summary";
+ }
}
Modified:
branches/perfsonarui/src/org/perfsonar/perfsonarui/ma/ui/panels/SearchPanel.java
===================================================================
---
branches/perfsonarui/src/org/perfsonar/perfsonarui/ma/ui/panels/SearchPanel.java
2009-01-17 14:08:32 UTC (rev 4889)
+++
branches/perfsonarui/src/org/perfsonar/perfsonarui/ma/ui/panels/SearchPanel.java
2009-01-18 15:27:59 UTC (rev 4890)
@@ -66,9 +66,10 @@
public SearchPanel(MAPerfsonarModel psModel) {
super(psModel,"Search by interface IP");
this.model = psModel;
- add(createMenuPanel(model),BorderLayout.EAST);
+ add(createMenuPanel(model),BorderLayout.NORTH);
createPopupmenu(model);
textArea.getDocument().addDocumentListener(this);
+ setBorder(null);
}
@@ -78,9 +79,11 @@
textArea.setToolTipText("Enter one IP address per row or paste a
traceroute output");
}
protected JComponent createMenuPanel(final MAPerfsonarModel psModel) {
- JToolBar bar = new JToolBar(SwingConstants.VERTICAL);
+ JToolBar bar = new JToolBar(SwingConstants.HORIZONTAL);
+ /* available via popup menu
bar.add(new JButton(loadFromFileAction));
bar.add(new JButton(pasteAction));
+ */
bar.add(new JButton(psModel.getSearchAction()));
bar.add(new JButton(psModel.getTraceAction()));
JCheckBox gls = new JCheckBox("Use Lookup Service");
@@ -90,7 +93,6 @@
psModel.getTraceAction().setUseGLS(
e.getStateChange() ==
ItemEvent.SELECTED
);
-
System.out.println(psModel.getTraceAction().isUseGLS());
}
});
bar.add(gls);
@@ -225,5 +227,9 @@
}
}
+ @Override
+ public String toString() {
+ return "Traceroute";
+ }
}
Modified:
branches/perfsonarui/src/org/perfsonar/perfsonarui/playground/PerfsonarPlaygroundModel.java
===================================================================
---
branches/perfsonarui/src/org/perfsonar/perfsonarui/playground/PerfsonarPlaygroundModel.java
2009-01-17 14:08:32 UTC (rev 4889)
+++
branches/perfsonarui/src/org/perfsonar/perfsonarui/playground/PerfsonarPlaygroundModel.java
2009-01-18 15:27:59 UTC (rev 4890)
@@ -66,6 +66,7 @@
break;
}
}
+ PlaygroundPredefined.getInstance().setPlugin(this);
}
@Override
public IUserData createUserData() {
Modified:
branches/perfsonarui/src/org/perfsonar/perfsonarui/playground/PlaygroundPanel.java
===================================================================
---
branches/perfsonarui/src/org/perfsonar/perfsonarui/playground/PlaygroundPanel.java
2009-01-17 14:08:32 UTC (rev 4889)
+++
branches/perfsonarui/src/org/perfsonar/perfsonarui/playground/PlaygroundPanel.java
2009-01-18 15:27:59 UTC (rev 4890)
@@ -29,11 +29,14 @@
import java.awt.event.ActionListener;
import java.awt.event.FocusEvent;
import java.awt.event.FocusListener;
+import java.util.Arrays;
+import java.util.Collection;
import java.util.Observable;
import java.util.Observer;
import javax.swing.BorderFactory;
import javax.swing.JComboBox;
+import javax.swing.JComponent;
import javax.swing.JFormattedTextField;
import javax.swing.JLabel;
import javax.swing.JPanel;
@@ -50,6 +53,7 @@
import org.perfsonar.perfsonarui.plugins.IUserData;
import org.perfsonar.perfsonarui.plugins.MAEndpoint;
import org.perfsonar.perfsonarui.plugins.MAEndpointList;
+import org.perfsonar.perfsonarui.ui.PluginMainContainer;
import org.perfsonar.perfsonarui.ui.PluginMainPanel;
import org.perfsonar.perfsonarui.ui.panels.ActionPanel;
import org.perfsonar.perfsonarui.ui.panels.TextPanel;
@@ -59,7 +63,7 @@
* @author Nina Jeliazkova
*
*/
-public class PlaygroundPanel extends PluginMainPanel implements Observer,
DocumentListener, FocusListener, ActionListener {
+public class PlaygroundPanel extends PluginMainContainer implements
Observer, DocumentListener, FocusListener, ActionListener {
protected TextPanel query;
protected TextPanel response;
@@ -87,31 +91,28 @@
super(parentFrame,psModel);
}
@Override
- public void addWidgets() {
- setLayout(new BorderLayout());
+ protected Collection<JComponent> createComponents() {
query = new TextPanel(getModel(),"Query");
-
+ query.setBorder(null);
query.getTextArea().getDocument().addDocumentListener(this);
query.getTextArea().setToolTipText("XML message to be sent as
a query");
- query.setBorder(BorderFactory.createTitledBorder("Query"));
query.setMinimumSize(new Dimension(200,200));
query.getTextArea().setEditable(true);
- response = new
TextPanel(getModel(),"Response","action_filesave_help");
+ response = new
TextPanel(getModel(),"Response","action_filesave_help") {
+ @Override
+ public String toString() {
+ return "Response";
+ }
+ };
response.getTextArea().setEditable(false);
-
-
response.setBorder(BorderFactory.createTitledBorder("Response"));
response.getTextArea().setToolTipText("XML response");
response.setMinimumSize(new Dimension(200,200));
-
+ response.setPreferredSize(new Dimension(400,400));
response.setBackground(new Color(238,238,238));
- JPanel split = new JPanel(new GridLayout(2,1));
- split.add(new
JScrollPane(query,ScrollPaneConstants.VERTICAL_SCROLLBAR_AS_NEEDED,ScrollPaneConstants.HORIZONTAL_SCROLLBAR_AS_NEEDED));
- split.add(new
JScrollPane(response,ScrollPaneConstants.VERTICAL_SCROLLBAR_AS_NEEDED,ScrollPaneConstants.HORIZONTAL_SCROLLBAR_AS_NEEDED));
-
- add(split,BorderLayout.CENTER);
+
IUserData data = model.getUserData();
@@ -135,11 +136,16 @@
urlField.addFocusListener(this);
t.add(urlField);
- add(t,BorderLayout.NORTH);
- queryStatus = new JLabel("Response status:
unknown",ActionPanel.createImageIcon(PlaygroundPredefined.UNK_ICO),SwingConstants.LEFT);
- PlaygroundPredefined.getInstance().setStatusLabel(queryStatus);
- add(queryStatus,BorderLayout.SOUTH);
-
+ JPanel toppanel = new JPanel(new BorderLayout()) {
+ @Override
+ public String toString() {
+ return "Query";
+ }
+ };
+ toppanel.add(t,BorderLayout.NORTH);
+ toppanel.add(query,BorderLayout.CENTER);
+ toppanel.setPreferredSize(new Dimension(400,400));
+ return Arrays.asList(new JComponent[] {toppanel,response});
}
@Override
public String toString() {
Modified:
branches/perfsonarui/src/org/perfsonar/perfsonarui/playground/PlaygroundPredefined.java
===================================================================
---
branches/perfsonarui/src/org/perfsonar/perfsonarui/playground/PlaygroundPredefined.java
2009-01-17 14:08:32 UTC (rev 4889)
+++
branches/perfsonarui/src/org/perfsonar/perfsonarui/playground/PlaygroundPredefined.java
2009-01-18 15:27:59 UTC (rev 4890)
@@ -4,7 +4,6 @@
import java.util.ArrayList;
import java.util.Hashtable;
-import javax.swing.JLabel;
import javax.xml.transform.Transformer;
import javax.xml.transform.TransformerFactory;
import javax.xml.transform.dom.DOMSource;
@@ -12,20 +11,25 @@
import org.perfsonar.perfsonarui.AbstractMARequest;
import org.perfsonar.perfsonarui.EchoMARequest;
+import org.perfsonar.perfsonarui.PSException;
import org.perfsonar.perfsonarui.ippm.HoplistRequest;
import org.perfsonar.perfsonarui.ippm.IPPMRequest;
import org.perfsonar.perfsonarui.ippm.IPPMUserData;
import org.perfsonar.perfsonarui.plugins.IPerfsonarRequest;
+import org.perfsonar.perfsonarui.plugins.IPerfsonarTab;
import org.perfsonar.perfsonarui.plugins.IUserData;
-import org.perfsonar.perfsonarui.ui.panels.ActionPanel;
+import org.perfsonar.perfsonarui.ui.panels.BusyIdleEvent;
import org.w3c.dom.Document;
public class PlaygroundPredefined {
- public static String SUCC_ICO =
"org/perfsonar/perfsonarui/ui/playground_success.png";
- public static String ERR_ICO =
"org/perfsonar/perfsonarui/ui/playground_error.png";
- public static String WARN_ICO =
"org/perfsonar/perfsonarui/ui/playground_warn.png";
- public static String UNK_ICO =
"org/perfsonar/perfsonarui/ui/playground_unknown.png";
-
+ protected IPerfsonarTab plugin;
+ public IPerfsonarTab getPlugin() {
+ return plugin;
+ }
+ public void setPlugin(IPerfsonarTab plugin) {
+ this.plugin = plugin;
+ }
+
private static String[] predefined = {
"echo request,null,success,error,warning",
"self-test request,null,success,error,warning",
@@ -35,15 +39,19 @@
};
private static PlaygroundPredefined instance;
- private JLabel statusLabel;
+ //private JLabel statusLabel;
private String selectedItem;;
private ArrayList<String> requests;
private Hashtable<String,String> schemaLookup;
private Hashtable<String,String> successLookup;
private Hashtable<String,String> errorLookup;
private Hashtable<String,String> warnLookup;
-
+
public PlaygroundPredefined(){
+ this(null);
+ }
+ public PlaygroundPredefined(IPerfsonarTab plugin){
+ this.plugin = plugin;
this.requests = new ArrayList<String>();
requests.add("none - I'll write my own");
this.schemaLookup = new Hashtable<String, String>();
@@ -73,10 +81,7 @@
}
}
- public void setStatusLabel(JLabel status){
- this.statusLabel = status;
- }
-
+
public String getPredefinedRequest(){
Document xml = getXMLDocumentForType(selectedItem);
return getStringFromXMLDocument(xml);
@@ -96,7 +101,11 @@
try {
doc = request.createRequest(data,
IPerfsonarRequest.MA_EchoRequest);
} catch (Exception e) {
- e.printStackTrace();
+ if (plugin ==null) e.printStackTrace();
+ else
+ plugin.getRequest().firePropertyChange(new
BusyIdleEvent(this,BusyIdleEvent.PROPERTY_ERROR,
+ null,e
+ ));
}
}
else if(type.equals("self-test request")){
@@ -105,7 +114,11 @@
try {
doc = request.createRequest(data,
IPerfsonarRequest.MA_EchoRequest);
} catch (Exception e) {
- e.printStackTrace();
+ if (plugin ==null) e.printStackTrace();
+ else
+ plugin.getRequest().firePropertyChange(new
BusyIdleEvent(this,BusyIdleEvent.PROPERTY_ERROR,
+ null,e
+ ));
}
}
else if(type.equals("IPPM meta-data request")){
@@ -116,7 +129,11 @@
try {
doc =
request.createRequest(data,IPerfsonarRequest.MA_MetadataKeyRequest);
} catch (Exception e) {
- e.printStackTrace();
+ if (plugin ==null) e.printStackTrace();
+ else
+ plugin.getRequest().firePropertyChange(new
BusyIdleEvent(this,BusyIdleEvent.PROPERTY_ERROR,
+ null,e
+ ));
}
}
else if(type.equals("IPPM data request")){
@@ -129,7 +146,11 @@
try {
doc =
request.createRequest(data,IPerfsonarRequest.MA_SetupDataRequest);
} catch (Exception e) {
- e.printStackTrace();
+ if (plugin ==null) e.printStackTrace();
+ else
+ plugin.getRequest().firePropertyChange(new
BusyIdleEvent(this,BusyIdleEvent.PROPERTY_ERROR,
+ null,e
+ ));
}
}
else if(type.equals("Hoplist request")){
@@ -142,7 +163,11 @@
try {
doc =
request.createRequest(data,IPerfsonarRequest.MA_SetupDataRequest);
} catch (Exception e) {
- e.printStackTrace();
+ if (plugin ==null) e.printStackTrace();
+ else
+ plugin.getRequest().firePropertyChange(new
BusyIdleEvent(this,BusyIdleEvent.PROPERTY_ERROR,
+ null,e
+ ));
}
}
return doc;
@@ -155,7 +180,11 @@
Transformer serializer =
TransformerFactory.newInstance().newTransformer();
serializer.transform(new DOMSource(arg), new
StreamResult(stw));
}catch (Exception e) {
- e.printStackTrace();
+ if (plugin ==null) e.printStackTrace();
+ else
+ plugin.getRequest().firePropertyChange(new
BusyIdleEvent(this,BusyIdleEvent.PROPERTY_ERROR,
+ null,e
+ ));
}
return stw.toString();
}
@@ -191,10 +220,39 @@
}
public void setStatus(String status, int icon){
+ switch (icon) {
+ case 0: {
+ plugin.getRequest().firePropertyChange(new
BusyIdleEvent(this,BusyIdleEvent.PROPERTY_UNKNOWN,
+ "",status
+ ));
+ break;
+ }
+ case 1: {
+ plugin.getRequest().firePropertyChange(new
BusyIdleEvent(this,BusyIdleEvent.PROPERTY_SUCCESS,
+ "",status
+ ));
+ break;
+ }
+ case 2: {
+ plugin.getRequest().firePropertyChange(new
BusyIdleEvent(this,BusyIdleEvent.PROPERTY_ERROR,
+ null,new PSException(status)
+ ));
+ break;
+ }
+ case 3: {
+ plugin.getRequest().firePropertyChange(new
BusyIdleEvent(this,BusyIdleEvent.PROPERTY_WARNING,
+ null,status
+ ));
+ break;
+ }
+ }
+/*
+ * TODO swing jlabel should not be here; communicate via listeners
this.statusLabel.setText("Response status: "+status);
if(icon ==
0)statusLabel.setIcon(ActionPanel.createImageIcon(UNK_ICO));
else if(icon ==
1)statusLabel.setIcon(ActionPanel.createImageIcon(SUCC_ICO));
else if(icon ==
2)statusLabel.setIcon(ActionPanel.createImageIcon(ERR_ICO));
else if(icon ==
3)statusLabel.setIcon(ActionPanel.createImageIcon(WARN_ICO));
+ */
}
}
Modified:
branches/perfsonarui/src/org/perfsonar/perfsonarui/ui/MANIFESTAPP.MFT
===================================================================
--- branches/perfsonarui/src/org/perfsonar/perfsonarui/ui/MANIFESTAPP.MFT
2009-01-17 14:08:32 UTC (rev 4889)
+++ branches/perfsonarui/src/org/perfsonar/perfsonarui/ui/MANIFESTAPP.MFT
2009-01-18 15:27:59 UTC (rev 4890)
@@ -1,12 +1,12 @@
Manifest-version: 1.0
Main-Class: org.perfsonar.perfsonarui.ui.PerfSonarApp
-Class-Path: jars/axis/axis-ant.jar jars/axis/axis.jar
jars/axis/bcprov-jdk15-138.jar jars/axis/codec-1.0.jar
jars/axis/commons-collections-3.1.jar jars/axis/commons-discovery-0.2.jar
jars/axis/commons-lang-2.1.jar jars/axis/commons-logging-1.0.4.jar
jars/axis/edugain-1.0-RC2.jar jars/axis/javolution-3.7.jar
jars/axis/jaxrpc.jar jars/axis/joda-time-1.4.jar
jars/logging/log4j-1.2.15.jar jars/axis/opensaml-1.1.jar
jars/axis/opensaml-trunk-jdk-1.5.jar jars/axis/openws-trunk-jdk-1.5.jar
jars/axis/perfsonar-base-1.0.20080924.jar jars/axis/sasl-ca-1.0.jar
jars/logging/slf4j-api-1.5.5.jar jars/logging/jcl-over-slf4j-1.5.5.jar
jars/logging/slf4j-log4j12-1.5.5.jar jars/axis/velocity-1.5.jar
jars/axis/wsdl4j-1.5.1.jar jars/axis/wss4j-1.5.3.jar
jars/axis/xmlsec-1.4.1.jar jars/axis/xmltooling-trunk-jdk-1.5.jar
jars/dns/dnsjava-2.0.3.jar jars/l2fprod/l2fprod-common-all.jar
jars/ui/jcommon-1.0.14.jar jars/ui/jfreechart-1.0.11.jar jars/ui/junit.jar
jars/ui/swing-layout-1.0.jar jars/xalan/xa
lan-2.7.0.jar jars/xalan/xalan-serializer-2.7.0.jar
jars/xalan/xerces-2.9.1-xercesImpl.jar jars/xalan/xerces-2.9.1-xml-apis.jar
jars/xml/commons-cli-1.0.jar jars/xml/jdom.jar jars/xml/mail.jar
jars/xml/xercesImpl.jar jars/xml/saaj-api-1.3.jar jars/xml/saaj-impl-1.3.jar
jars/xml/wstx-lgpl-3.2.7.jar jars/ls/activation-1.1.jar
jars/ls/LS-client-api-1.0RC2.jar
jars/ls/LSclient-Implementation-1.0-BETA2.jar jars/xml/stax-api-1.0.1.jar
jars/xml/jaxb-api-2.1.jar jars/xml/jaxb-impl-2.1.7.jar
+Class-Path: jars/axis/axis-ant.jar jars/axis/axis.jar
jars/axis/bcprov-jdk15-138.jar jars/axis/codec-1.0.jar
jars/axis/commons-collections-3.1.jar jars/axis/commons-discovery-0.2.jar
jars/axis/commons-lang-2.1.jar jars/axis/commons-logging-1.0.4.jar
jars/axis/edugain-1.0-RC2.jar jars/axis/javolution-3.7.jar
jars/axis/jaxrpc.jar jars/axis/joda-time-1.4.jar
jars/logging/log4j-1.2.15.jar jars/axis/opensaml-1.1.jar
jars/axis/opensaml-trunk-jdk-1.5.jar jars/axis/openws-trunk-jdk-1.5.jar
jars/axis/perfsonar-base-1.0.20080924.jar jars/axis/sasl-ca-1.0.jar
jars/logging/slf4j-api-1.5.5.jar jars/logging/jcl-over-slf4j-1.5.5.jar
jars/logging/slf4j-log4j12-1.5.5.jar jars/axis/velocity-1.5.jar
jars/axis/wsdl4j-1.5.1.jar jars/axis/wss4j-1.5.3.jar
jars/axis/xmlsec-1.4.1.jar jars/axis/xmltooling-trunk-jdk-1.5.jar
jars/dns/dnsjava-2.0.3.jar jars/swingx/swingx-0.9.5.jar
jars/ui/jcommon-1.0.14.jar jars/ui/jfreechart-1.0.11.jar jars/ui/junit.jar
jars/ui/swing-layout-1.0.jar jars/xalan/xalan-2.7
.0.jar jars/xalan/xalan-serializer-2.7.0.jar
jars/xalan/xerces-2.9.1-xercesImpl.jar jars/xalan/xerces-2.9.1-xml-apis.jar
jars/xml/commons-cli-1.0.jar jars/xml/jdom.jar jars/xml/mail.jar
jars/xml/xercesImpl.jar jars/xml/saaj-api-1.3.jar jars/xml/saaj-impl-1.3.jar
jars/xml/wstx-lgpl-3.2.7.jar jars/ls/activation-1.1.jar
jars/ls/LS-client-api-1.0RC2.jar
jars/ls/LSclient-Implementation-1.0-BETA2.jar jars/xml/stax-api-1.0.1.jar
jars/xml/jaxb-api-2.1.jar jars/xml/jaxb-impl-2.1.7.jar
Specification-Title: perfSonar test application
-Specification-Version: 0.14b
+Specification-Version: 0.15
Specification-Vendor: perfsonar.acad.bg
Package-Title: org.perfsonar.perfsonarui
-Package-Version: 0.14b
+Package-Version: 0.15
Package-Vendor: acad.bg
Implementation-Title: Perfsonar UI
-Implementation-Version: 0.14b
+Implementation-Version: 0.15
Implementation-Vendor:
\ No newline at end of file
Modified:
branches/perfsonarui/src/org/perfsonar/perfsonarui/ui/PerfSonarApp.java
===================================================================
--- branches/perfsonarui/src/org/perfsonar/perfsonarui/ui/PerfSonarApp.java
2009-01-17 14:08:32 UTC (rev 4889)
+++ branches/perfsonarui/src/org/perfsonar/perfsonarui/ui/PerfSonarApp.java
2009-01-18 15:27:59 UTC (rev 4890)
@@ -50,6 +50,7 @@
import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory;
+import org.jdesktop.swingx.JXTaskPane;
import org.perfsonar.perfsonarui.AbstractMARequest;
import org.perfsonar.perfsonarui.JAXPCheck;
import org.perfsonar.perfsonarui.PSLogger;
@@ -89,7 +90,7 @@
{@link
org.perfsonar.perfsonarui.ui.PerfsonarTaskPane} is created and added as a
new tab.
<li>The tab consist of a:
<ul>
- <li>a panel of clickable actions
{@link
com.l2fprod.common.swing.JTaskPane} on the left. Actions are taken from
{@link
org.perfsonar.perfsonarui.plugins.IPerfsonarTab#getActions}.
+ <li>a panel of clickable actions
{@link
JXTaskPane} on the left. Actions are taken from
{@link
org.perfsonar.perfsonarui.plugins.IPerfsonarTab#getActions}.
If
{@link
org.perfsonar.perfsonarui.plugins.IPerfsonarTab#createDetailsComponent}
returns non null component, it is added below actions in the left pane.
<li>a
{@link
PluginMainPanel} on the right, created by
{@link
org.perfsonar.perfsonarui.plugins.IPerfsonarTab#createMainComponent(java.awt.Component)}
<li>a status bar, which is configured as a listener to
{@link
org.perfsonar.perfsonarui.plugins.IPerfsonarTab#.getRequest}
@@ -242,6 +243,7 @@
}
@SuppressWarnings("boxing")
protected void loadLsclient() {
+ System.out.println("Load LS client - start");
String value;
try {
value =
System.getProperty("application.perfsonar.lsclient.eagerRootLses");
@@ -252,6 +254,7 @@
// trigger creation.
LsResources.getClient();
}
+ System.out.println("Load LS client - done");
}
public void loadPlugins(PerfsonarTabsList perfsonarTabs,String[]
cmdOpts) {
try {
Added:
branches/perfsonarui/src/org/perfsonar/perfsonarui/ui/PerfsonarPaneUI.java
Modified:
branches/perfsonarui/src/org/perfsonar/perfsonarui/ui/PerfsonarTaskPane.java
===================================================================
---
branches/perfsonarui/src/org/perfsonar/perfsonarui/ui/PerfsonarTaskPane.java
2009-01-17 14:08:32 UTC (rev 4889)
+++
branches/perfsonarui/src/org/perfsonar/perfsonarui/ui/PerfsonarTaskPane.java
2009-01-18 15:27:59 UTC (rev 4890)
@@ -20,26 +20,29 @@
package org.perfsonar.perfsonarui.ui;
import java.awt.BorderLayout;
+import java.awt.Color;
import java.awt.Dimension;
import java.util.Enumeration;
import java.util.Hashtable;
+import javax.swing.BorderFactory;
import javax.swing.BoxLayout;
import javax.swing.JComponent;
import javax.swing.JMenu;
import javax.swing.JPanel;
import javax.swing.JScrollPane;
import javax.swing.JSplitPane;
+import javax.swing.UIManager;
+import javax.swing.plaf.BorderUIResource;
+import org.jdesktop.swingx.JXTaskPane;
+import org.jdesktop.swingx.JXTaskPaneContainer;
import org.perfsonar.perfsonarui.plugins.IPerfsonarTab;
import org.perfsonar.perfsonarui.ui.actions.PSActionMap;
import org.perfsonar.perfsonarui.ui.actions.PSUIAction;
import org.perfsonar.perfsonarui.ui.panels.ActionPanel;
import org.perfsonar.perfsonarui.ui.panels.StatusBar;
-import com.l2fprod.common.swing.JTaskPane;
-import com.l2fprod.common.swing.JTaskPaneGroup;
-
/**
* A panel with
{@link
JTaskPane} on the left, a status bar and a component on the right, created
by
*
{@link
IPerfsonarTab#createMainComponent(java.awt.Component)}. Actions are taken
from
{@link
org.perfsonar.perfsonarui.plugins.IPerfsonarTab#getActions}
@@ -51,28 +54,30 @@
* Comment for <code>serialVersionUID</code>
*/
private static final long serialVersionUID = -970820688140537230L;
- protected JTaskPane taskPane = null;
+ protected JXTaskPaneContainer taskPane = null;
protected JMenu menu = null;
public PerfsonarTaskPane(IPerfsonarTab perfsonarModel) {
super();
addWidgets(perfsonarModel);
}
public void addWidgets(IPerfsonarTab perfsonarModel) {
+
+ taskPane = new JXTaskPaneContainer();
+
menu = createMenu(perfsonarModel);
- taskPane = new JTaskPane();
+
PSActionMap actions = perfsonarModel.getActions();
Object[] keys = actions.keys();
- Hashtable<String, JTaskPaneGroup> groups = new
Hashtable<String, JTaskPaneGroup>();
+ Hashtable<String, JXTaskPane> groups = new
Hashtable<String, JXTaskPane>();
for (int i=0; i < keys.length;i++) {
PSUIAction a = (PSUIAction) actions.get(keys[i]);
if (a.getGroup().equals("HIDDEN")) continue;
- JTaskPaneGroup aGroup = groups.get(a.getGroup());
+ JXTaskPane aGroup = groups.get(a.getGroup());
if (aGroup == null) {
- aGroup = new JTaskPaneGroup();
+ aGroup = new JXTaskPane();
aGroup.setName(a.getGroup());
- aGroup.setExpanded(true);
aGroup.setTitle(a.getGroup());
aGroup.setSpecial(true);
groups.put(a.getGroup(),aGroup);
@@ -85,16 +90,16 @@
Enumeration<String> e = groups.keys();
while (e.hasMoreElements()) {
- JTaskPaneGroup group = groups.get(e.nextElement());
+ JXTaskPane group = groups.get(e.nextElement());
taskPane.add(group);
}
JComponent details[] =
perfsonarModel.createDetailsComponent(this);
if (details != null)
for (int i=0; i < details.length;i++) {
- JTaskPaneGroup aGroup = new JTaskPaneGroup();
+ JXTaskPane aGroup = new JXTaskPane();
aGroup.setName(details[i].toString());
- aGroup.setExpanded(true);
+ //aGroup.setExpanded(true);
aGroup.setTitle(details[i].toString());
aGroup.setSpecial(true);
aGroup.add(details[i]);
Added:
branches/perfsonarui/src/org/perfsonar/perfsonarui/ui/PerfsonarTaskPaneContainerUI.java
Added:
branches/perfsonarui/src/org/perfsonar/perfsonarui/ui/PluginMainContainer.java
Added: branches/perfsonarui/src/org/perfsonar/perfsonarui/ui/error.png
Property changes on:
branches/perfsonarui/src/org/perfsonar/perfsonarui/ui/error.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Modified:
branches/perfsonarui/src/org/perfsonar/perfsonarui/ui/panels/BusyIdleEvent.java
===================================================================
---
branches/perfsonarui/src/org/perfsonar/perfsonarui/ui/panels/BusyIdleEvent.java
2009-01-17 14:08:32 UTC (rev 4889)
+++
branches/perfsonarui/src/org/perfsonar/perfsonarui/ui/panels/BusyIdleEvent.java
2009-01-18 15:27:59 UTC (rev 4890)
@@ -40,6 +40,9 @@
public static final String PROPERTY_BUSY = "STATUS_BUSY";
public static final String PROPERTY_INDETERMINATE =
"STATUS_INDETERMINATE";
public static final String PROPERTY_ERROR = "STATUS_ERROR";
+ public static final String PROPERTY_WARNING = "STATUS_WARNING";
+ public static final String PROPERTY_SUCCESS = "STATUS_SUCCESS";
+ public static final String PROPERTY_UNKNOWN = "STATUS_UNKNOWN";
public static final String PROPERTY_CLEAR = "ACTION_CLEAR";
/**
Modified:
branches/perfsonarui/src/org/perfsonar/perfsonarui/ui/panels/PSPanel.java
===================================================================
--- branches/perfsonarui/src/org/perfsonar/perfsonarui/ui/panels/PSPanel.java
2009-01-17 14:08:32 UTC (rev 4889)
+++ branches/perfsonarui/src/org/perfsonar/perfsonarui/ui/panels/PSPanel.java
2009-01-18 15:27:59 UTC (rev 4890)
@@ -24,6 +24,7 @@
package org.perfsonar.perfsonarui.ui.panels;
+import java.awt.BorderLayout;
import java.awt.Dimension;
import java.awt.LayoutManager;
@@ -31,7 +32,7 @@
import org.perfsonar.perfsonarui.plugins.IPerfsonarTab;
-public abstract class PSPanel extends JPanel {
+public abstract class PSPanel extends JPanel {
protected Dimension minDimension = new Dimension(100,100);
protected Dimension prefDimension = new Dimension(200,200);
/**
@@ -40,24 +41,20 @@
private static final long serialVersionUID = -3349004972625714709L;
public PSPanel(IPerfsonarTab psModel) {
- super();
- addWidgets(psModel);
+ this(psModel,new BorderLayout());
+
}
- public PSPanel(IPerfsonarTab psModel,boolean arg0) {
- super(arg0);
- addWidgets(psModel);
- }
public PSPanel(IPerfsonarTab psModel,LayoutManager arg0) {
super(arg0);
addWidgets(psModel);
}
-
- public PSPanel(IPerfsonarTab psModel,LayoutManager arg0, boolean
arg1) {
- super(arg0, arg1);
- addWidgets(psModel);
- }
+
public abstract void addWidgets(IPerfsonarTab psModel);
-
+ @Override
+ public String toString() {
+ return "Override toString() method to get your title here";
+ }
+
}
Modified:
branches/perfsonarui/src/org/perfsonar/perfsonarui/ui/panels/StatusBar.java
===================================================================
---
branches/perfsonarui/src/org/perfsonar/perfsonarui/ui/panels/StatusBar.java
2009-01-17 14:08:32 UTC (rev 4889)
+++
branches/perfsonarui/src/org/perfsonar/perfsonarui/ui/panels/StatusBar.java
2009-01-18 15:27:59 UTC (rev 4890)
@@ -35,8 +35,10 @@
import java.io.File;
import java.io.PrintWriter;
import java.io.StringWriter;
+import java.util.logging.Level;
import javax.swing.BorderFactory;
+import javax.swing.Icon;
import javax.swing.ImageIcon;
import javax.swing.JLabel;
import javax.swing.JOptionPane;
@@ -47,6 +49,8 @@
import javax.swing.border.BevelBorder;
import org.apache.axis.AxisFault;
+import org.jdesktop.swingx.JXErrorPane;
+import org.jdesktop.swingx.error.ErrorInfo;
import org.perfsonar.perfsonarui.PSErrorCodeException;
import org.perfsonar.perfsonarui.PSException;
import org.perfsonar.perfsonarui.PerfsonarResponseEvent;
@@ -67,6 +71,9 @@
protected Exception theError;
protected JLabel errorsLabel;
protected ImageIcon errorIcon;
+ protected ImageIcon warnIcon;
+ protected ImageIcon okIcon;
+ protected ImageIcon unknownIcon;
/**
* Comment for <code>serialVersionUID</code>
@@ -84,36 +91,21 @@
* @param psModel
* @param arg0
*/
- public StatusBar(IPerfsonarTab psModel, boolean arg0) {
- super(psModel, arg0);
-
- }
-
- /**
- * @param psModel
- * @param arg0
- */
public StatusBar(IPerfsonarTab psModel, LayoutManager arg0) {
super(psModel, arg0);
}
- /**
- * @param psModel
- * @param arg0
- * @param arg1
- */
- public StatusBar(IPerfsonarTab psModel, LayoutManager arg0, boolean
arg1) {
- super(psModel, arg0, arg1);
- }
-
/* (non-Javadoc)
* @see
org.perfsonar.perfsonarui.ui.panels.PSPanel#addWidgets(org.perfsonar.perfsonarui.ui.PerfsonarModel)
*/
@Override
public void addWidgets(IPerfsonarTab psModel) {
- errorIcon =
ActionPanel.createImageIcon("org/perfsonar/perfsonarui/ui/warning.png");
+ errorIcon =
ActionPanel.createImageIcon("org/perfsonar/perfsonarui/ui/error.png");
+ warnIcon =
ActionPanel.createImageIcon("org/perfsonar/perfsonarui/ui/warning.png");
+ okIcon =
ActionPanel.createImageIcon("org/perfsonar/perfsonarui/ui/success.png");
+ unknownIcon =
ActionPanel.createImageIcon("org/perfsonar/perfsonarui/ui/unknown.png");
theError = null;
setLayout(new GridLayout(1,2));
@@ -187,6 +179,16 @@
} else if
(arg0.getPropertyName().equals(BusyIdleEvent.PROPERTY_ERROR)) {
handleException((Exception ) arg0.getNewValue());
+ } else if
(arg0.getPropertyName().equals(BusyIdleEvent.PROPERTY_WARNING)) {
+ if (arg0.getNewValue() instanceof Exception)
+ handleWarning((Exception )
arg0.getNewValue());
+ else
+ handleStatus(arg0.getNewValue(),warnIcon);
+ } else if
(arg0.getPropertyName().equals(BusyIdleEvent.PROPERTY_SUCCESS)) {
+ handleStatus(arg0.getNewValue(),okIcon);
+ } else if
(arg0.getPropertyName().equals(BusyIdleEvent.PROPERTY_UNKNOWN)) {
+ handleStatus(arg0.getNewValue(),unknownIcon);
+
} else if
(arg0.getPropertyName().equals(BusyIdleEvent.PROPERTY_CLEAR)) {
progressBar.setString("");
label.setText("");
@@ -210,7 +212,7 @@
}
- protected void handleException(Exception x) {
+ protected void handleStatus(Exception x) {
theError = x;
if (theError != null) {
//errorsLabel.setText(theError.getMessage());
@@ -223,40 +225,62 @@
//errorsLabel.setBackground(getBackground());
errorsLabel.setToolTipText("");
}
+ }
+ protected void handleStatus(Object status, Icon icon) {
+ if (theError == null) {
+ //don't overwrite existing error
+ errorsLabel.setIcon(icon);
+ errorsLabel.setToolTipText(status.toString());
+ }
}
+
+ protected void handleException(Exception x, Icon icon) {
+ theError = x;
+ if (theError != null) {
+ errorsLabel.setIcon(icon);
+ errorsLabel.setToolTipText("Click here for error details");
+ } else {
+ errorsLabel.setIcon(null);
+ errorsLabel.setToolTipText("");
+ }
+ }
+ protected void handleException(Exception x) {
+ handleException(x, errorIcon);
+ }
+ protected void handleWarning(Exception x) {
+ handleException(x, warnIcon);
+ }
public void showErrorlog(Exception x) {
if (x == null) return;
- JPanel p = new JPanel(new BorderLayout());
+ String category = "";
+ String basic = x.getMessage();
-
- JTextArea t;
- String top = x.toString();
-
if (x instanceof PSException) {
MAEndpoint mae = ((PSException)x).getMaEndpoint();
if (mae!=null) {
- top = mae.getTitle() +" " +mae.getEndpoint();
+ basic = basic + "\n"+ mae.getTitle() +" "
+mae.getEndpoint();
}
};
- p.add(new JLabel(top),BorderLayout.NORTH);
- StringBuffer errorText = new StringBuffer();
-
if (x instanceof AxisFault) {
- AxisFault axisFault = (AxisFault) x;
- errorText.append(axisFault.dumpToString());
+ category = "AxisFault";
+ basic = ((AxisFault)x).getFaultNode() + '\n' +
((AxisFault)x).getFaultReason();
-
} else if (x instanceof RequestInterruptedException) {
- errorText.append(x.getMessage());
+
+ category = "Request interrupted";
} else if (x instanceof PSErrorCodeException) {
+ category = "Perfsonar error code";
+ StringBuilder errorText = new StringBuilder();
PSErrorCodeException px = (PSErrorCodeException) x;
if ((px.getErrorCode()!= null)
&&(!"".equals(px.getErrorCode()))) {
errorText.append("Error code \t");
errorText.append(px.getErrorCode());
errorText.append('\n');
+ category = x.getMessage();
+ basic = px.getErrorCode();
}
if ((px.getErrordescription() != null) &&
(!"".equals(px.getErrordescription()))) {
@@ -264,14 +288,21 @@
errorText.append(px.getErrordescription());
errorText.append('\n');
}
+ errorText.append("\n\nSee the
"+System.getProperty("user.dir")+File.separator+"perfsonar.log file for
further error details.");
+ ErrorInfo info = new ErrorInfo(category,
+ basic,
+ errorText.toString(),
+ category,
+ null,
+ Level.WARNING,
+ null);
+ JXErrorPane.showDialog(getParent(),info);
+ return;
} else {
- StringWriter w = new StringWriter();
- x.printStackTrace(new PrintWriter(w));
- errorText.append(w.toString());
- w = null;
+ category = "unknown";
}
-
+ /*
errorText.append("\n\nSee the
"+System.getProperty("user.dir")+File.separator+"perfsonar.log file for
further error details.");
t = new JTextArea(errorText.toString());
@@ -287,7 +318,16 @@
Object[] options = {"Hide",
"Clear"
};
-
+ */
+ ErrorInfo info = new ErrorInfo(category,
+ basic + "\n\nSee the
"+System.getProperty("user.dir")+File.separator+"perfsonar.log file for
further error details.",
+ null,
+ category,
+ x,
+ Level.SEVERE,
+ null);
+ JXErrorPane.showDialog(getParent(),info);
+/*
if (JOptionPane.showOptionDialog(this,
p,
"Last error",
@@ -298,11 +338,9 @@
options[1]) == 1) {
handleException(null);
}
- /*
- JOptionPane.showConfirmDialog(
- this,p,"Last error",JOptionPane.ERROR_MESSAGE,null);
- */
+ */
+
}
}
Added: branches/perfsonarui/src/org/perfsonar/perfsonarui/ui/success.png
Property changes on:
branches/perfsonarui/src/org/perfsonar/perfsonarui/ui/success.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: branches/perfsonarui/src/org/perfsonar/perfsonarui/ui/unknown.png
Property changes on:
branches/perfsonarui/src/org/perfsonar/perfsonarui/ui/unknown.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Modified: branches/perfsonarui/src/org/perfsonar/perfsonarui/ui/warning.png
===================================================================
(Binary files differ)
Modified: branches/perfsonarui/src/resources.files
===================================================================
--- branches/perfsonarui/src/resources.files 2009-01-17 14:08:32 UTC (rev
4889)
+++ branches/perfsonarui/src/resources.files 2009-01-18 15:27:59 UTC (rev
4890)
@@ -1,6 +1,9 @@
org/perfsonar/perfsonarui/ui/perfSONAR_transparent_small.png
org/perfsonar/perfsonarui/ui/PerfSONAR_icon.png
org/perfsonar/perfsonarui/ui/warning.png
+org/perfsonar/perfsonarui/ui/error.png
+org/perfsonar/perfsonarui/ui/success.png
+org/perfsonar/perfsonarui/ui/unknown.png
org/perfsonar/perfsonarui/ui/perfSONARidle-154x32.gif
org/perfsonar/perfsonarui/ui/perfSONARbusy-154x32.gif
org/perfsonar/perfsonarui/ui/flowsa-left.png
- perfsonar: r4890 - in branches/perfsonarui: ant jars jars/swingx src src/org/perfsonar/perfsonarui/ippm src/org/perfsonar/perfsonarui/ippm/ui/panels src/org/perfsonar/perfsonarui/ma src/org/perfsonar/perfsonarui/ma/ui/panels src/org/perfsonar/perfsonarui/playground src/org/perfsonar/perfsonarui/ui src/org/perfsonar/perfsonarui/ui/panels, svnlog, 01/18/2009
Archive powered by MHonArc 2.6.16.