Skip to Content.
Sympa Menu

perfsonar-dev - perfsonar: r2826 - in branches/perfsonarui/src/org/perfsonar/perfsonarui/flowsa: . panels

Subject: perfsonar development work

List archive

perfsonar: r2826 - in branches/perfsonarui/src/org/perfsonar/perfsonarui/flowsa: . panels


Chronological Thread 
  • From:
  • To:
  • Subject: perfsonar: r2826 - in branches/perfsonarui/src/org/perfsonar/perfsonarui/flowsa: . panels
  • Date: Wed, 12 Sep 2007 12:07:13 -0400

Author: gijs
Date: 2007-09-12 12:07:13 -0400 (Wed, 12 Sep 2007)
New Revision: 2826

Modified:
branches/perfsonarui/src/org/perfsonar/perfsonarui/flowsa/FlowSAModel.java

branches/perfsonarui/src/org/perfsonar/perfsonarui/flowsa/FlowSAUserData.java

branches/perfsonarui/src/org/perfsonar/perfsonarui/flowsa/panels/MainOptionsPanel.java

branches/perfsonarui/src/org/perfsonar/perfsonarui/flowsa/panels/QueryResultPanel.java

branches/perfsonarui/src/org/perfsonar/perfsonarui/flowsa/panels/RawOptionsPanel.java
Log:
Clean up
direct updates
restructure

Modified:
branches/perfsonarui/src/org/perfsonar/perfsonarui/flowsa/FlowSAModel.java
===================================================================
---
branches/perfsonarui/src/org/perfsonar/perfsonarui/flowsa/FlowSAModel.java
2007-09-12 14:40:23 UTC (rev 2825)
+++
branches/perfsonarui/src/org/perfsonar/perfsonarui/flowsa/FlowSAModel.java
2007-09-12 16:07:13 UTC (rev 2826)
@@ -43,11 +43,11 @@

private static final PerfsonarSchema PERFSONAR_SCHEMA = new
PerfsonarSchema("flowsa");

- private final MainOptionsPanel mainOptionsPanel = new
MainOptionsPanel();
- private final MomentOptionsPanel momentOptionsPanel = new
MomentOptionsPanel();
- private final RouterOptionsPanel routerOptionsPanel = new
RouterOptionsPanel();
- private final RawOptionsPanel rawOptionsPanel = new RawOptionsPanel();
- private final TopOptionsPanel topOptionsPanel = new TopOptionsPanel();
+ private final MainOptionsPanel mainOptionsPanel;
+ private final MomentOptionsPanel momentOptionsPanel;
+ private final RouterOptionsPanel routerOptionsPanel;
+ private final RawOptionsPanel rawOptionsPanel;
+ private final TopOptionsPanel topOptionsPanel;

/**
* Default constructor
@@ -64,11 +64,37 @@
*/
public FlowSAModel(MAEndpointList endpoints) {
super(endpoints);
+ mainOptionsPanel = createMainOptionsPanel();
+ momentOptionsPanel = createMomentOptionsPanel();
+ routerOptionsPanel = createRouterOptionsPanel();
+ rawOptionsPanel = createRawOptionsPanel();
+ topOptionsPanel = createTopOptionsPanel();
MAEndpoint currentEndPoint =
initialiseEndPoints(this.endpointList);
logger.debug("currentEndpoint = "+currentEndPoint);
getUserData().setEndpoint(currentEndPoint);
}
+
+ protected MomentOptionsPanel createMomentOptionsPanel() {
+ return new MomentOptionsPanel();
+ }

+ protected MainOptionsPanel createMainOptionsPanel() {
+ return new MainOptionsPanel(getUserData());
+ }
+
+ protected RouterOptionsPanel createRouterOptionsPanel() {
+ return new RouterOptionsPanel();
+ }
+
+ protected RawOptionsPanel createRawOptionsPanel() {
+ return new RawOptionsPanel(getUserData());
+ }
+
+ protected TopOptionsPanel createTopOptionsPanel() {
+ return new TopOptionsPanel();
+ }
+
+
/**
* Looks through the list and selects the fist avail endpoint if
* none are available then it picks the first from the list enables
@@ -157,13 +183,9 @@
@SuppressWarnings("synthetic-access")
@Override
protected void confirm(JComponent[] optionPanels) {
-
getUserData().setQuery(FlowSAUserData.QUERYTYPE,
mainOptionsPanel.getQueryType());

getUserData().setQuery(FlowSAUserData.STARTMOMENT,
momentOptionsPanel.getStartMoment());

getUserData().setQuery(FlowSAUserData.ENDMOMENT,
momentOptionsPanel.getEndMoment());

getUserData().setQuery(FlowSAUserData.ROUTERS,
routerOptionsPanel.getRouters());
-
getUserData().setQuery(FlowSAUserData.RAWFILTER, rawOptionsPanel.getFilter());
-
getUserData().setQuery(FlowSAUserData.RAWAGGREGATION,
rawOptionsPanel.getAggregation());
-
getUserData().setQuery(FlowSAUserData.RAWFIELDS, rawOptionsPanel.getFields());

getUserData().setQuery(FlowSAUserData.TOPELEMENTS,
topOptionsPanel.getElement());

getUserData().setQuery(FlowSAUserData.TOPORDERBY,
topOptionsPanel.getOrderBy());

getUserData().setQuery(FlowSAUserData.TOPNUMBER, topOptionsPanel.getNumber());

Modified:
branches/perfsonarui/src/org/perfsonar/perfsonarui/flowsa/FlowSAUserData.java
===================================================================
---
branches/perfsonarui/src/org/perfsonar/perfsonarui/flowsa/FlowSAUserData.java
2007-09-12 14:40:23 UTC (rev 2825)
+++
branches/perfsonarui/src/org/perfsonar/perfsonarui/flowsa/FlowSAUserData.java
2007-09-12 16:07:13 UTC (rev 2826)
@@ -35,6 +35,13 @@
public final static String TOPFILTER = "Top Filter rule";
public final static String TOPAGGREGATION = "Top Aggregation rule";

+ public final static String[] FIELDS = {
+ "Address family", "Timer first seen", "Msec first seen",
"Time last seen", "Msec last seen",
+ "Protocol", "Source address", "Source port", "Destination
address", "Destination port", "Source AS",
+ "Destination AS", "Input interface", "Output interface", "TCP
flags", "Tos", "Packets", "Bytes"
+ };
+
+
public enum QueryType {
RAW("Raw"),
STATISTICAL("Statistical"),

Modified:
branches/perfsonarui/src/org/perfsonar/perfsonarui/flowsa/panels/MainOptionsPanel.java
===================================================================
---
branches/perfsonarui/src/org/perfsonar/perfsonarui/flowsa/panels/MainOptionsPanel.java
2007-09-12 14:40:23 UTC (rev 2825)
+++
branches/perfsonarui/src/org/perfsonar/perfsonarui/flowsa/panels/MainOptionsPanel.java
2007-09-12 16:07:13 UTC (rev 2826)
@@ -7,60 +7,102 @@

package org.perfsonar.perfsonarui.flowsa.panels;

-public class MainOptionsPanel extends javax.swing.JPanel {
+import static org.jdesktop.layout.GroupLayout.BASELINE;
+import static org.jdesktop.layout.GroupLayout.DEFAULT_SIZE;
+import static org.jdesktop.layout.GroupLayout.LEADING;
+import static org.jdesktop.layout.GroupLayout.PREFERRED_SIZE;
+import static org.jdesktop.layout.GroupLayout.TRAILING;
+import static org.jdesktop.layout.LayoutStyle.RELATED;

+import java.awt.event.ActionEvent;
+
+import javax.swing.AbstractAction;
+import javax.swing.DefaultComboBoxModel;
+import javax.swing.JComboBox;
+import javax.swing.JLabel;
+import javax.swing.JPanel;
+
+import org.jdesktop.layout.GroupLayout;
+import org.perfsonar.perfsonarui.flowsa.FlowSAUserData;
+import org.perfsonar.perfsonarui.plugins.IUserData;
+
+public class MainOptionsPanel extends JPanel {
+
private static final long serialVersionUID = 1L;

- public javax.swing.JComboBox QueryTypeBox;
- private javax.swing.JLabel QueryTypeLabel;
- private javax.swing.JPanel jPanel1;
+ private IUserData model;
+
+ public MainOptionsPanel(IUserData model) {
+ super(null);
+ this.model = model;
+ GroupLayout myLayout = new GroupLayout(this);
+ setLayout(myLayout);
+ JPanel queryPanel = createQueryTypePanel();
+ configureLayout(myLayout, queryPanel);
+ }

- public MainOptionsPanel() {
- addWidgets();
+ protected JPanel createQueryTypePanel() {
+ JPanel panel = new JPanel(null);
+
+ JLabel label = new JLabel("Query type:");
+ final JComboBox box = new JComboBox(new
DefaultComboBoxModel(FlowSAUserData.QueryType.values()));
+ box.addActionListener(new AbstractAction(){
+ @Override
+ public void actionPerformed(ActionEvent e) {
+ model.setQuery(FlowSAUserData.QUERYTYPE,
String.valueOf(box.getSelectedItem()));
+ }
+ });
+
+ GroupLayout layout = new GroupLayout(panel);
+ panel.setLayout(layout);
+ layout.setHorizontalGroup(
+ layout.createParallelGroup(LEADING).add(
+ TRAILING,
+ layout.createSequentialGroup()
+ .addContainerGap()
+ .add(label)
+ .addPreferredGap(RELATED,
DEFAULT_SIZE, Short.MAX_VALUE)
+ .add(box, PREFERRED_SIZE,
DEFAULT_SIZE, PREFERRED_SIZE)
+ .add(79, 79, 79)
+ )
+ );
+ layout.setVerticalGroup(
+ layout.createParallelGroup(LEADING).add(
+ layout.createSequentialGroup()
+ .addContainerGap()
+
.add(layout.createParallelGroup(BASELINE)
+ .add(box,
PREFERRED_SIZE, DEFAULT_SIZE, PREFERRED_SIZE)
+ .add(label))
+ .addContainerGap(59,
Short.MAX_VALUE)
+ )
+ );
+
+ return panel;
}

+ protected void configureLayout(GroupLayout layout, JPanel queryPanel)
{
+ layout.setHorizontalGroup(
+ layout.createParallelGroup(LEADING)
+ .add(
+ layout.createSequentialGroup()
+ .addContainerGap()
+ .add(queryPanel,
DEFAULT_SIZE, DEFAULT_SIZE, Short.MAX_VALUE)
+ .addContainerGap()
+ )
+ );
+ layout.setVerticalGroup(
+ layout.createParallelGroup(LEADING)
+ .add(
+ layout.createSequentialGroup()
+ .addContainerGap()
+ .add(queryPanel,
DEFAULT_SIZE, DEFAULT_SIZE, Short.MAX_VALUE)
+ .addContainerGap()
+ )
+ );
+ }
+
@Override
public String toString() {
return "Main";
}
-
- public String getQueryType() {
- return QueryTypeBox.getSelectedItem().toString();
- }
-
- private void addWidgets() {
- jPanel1 = new javax.swing.JPanel();
- QueryTypeBox = new javax.swing.JComboBox();
- QueryTypeLabel = new javax.swing.JLabel();
-
- QueryTypeBox.setModel(new
javax.swing.DefaultComboBoxModel(new String[] { "Raw", "Top", "Statistical"
}));
-
- QueryTypeLabel.setText("query type:");
-
- org.jdesktop.layout.GroupLayout jPanel1Layout = new
org.jdesktop.layout.GroupLayout(jPanel1);
- jPanel1.setLayout(jPanel1Layout);
-
jPanel1Layout.setHorizontalGroup(jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING).add(
- org.jdesktop.layout.GroupLayout.TRAILING,
-
jPanel1Layout.createSequentialGroup().addContainerGap().add(QueryTypeLabel).addPreferredGap(
-
org.jdesktop.layout.LayoutStyle.RELATED,
org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
- .add(QueryTypeBox,
org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
-
org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
org.jdesktop.layout.GroupLayout.PREFERRED_SIZE).add(79,
- 79, 79)));
-
jPanel1Layout.setVerticalGroup(jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING).add(
-
jPanel1Layout.createSequentialGroup().addContainerGap().add(
-
jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE).add(QueryTypeBox,
-
org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
-
org.jdesktop.layout.GroupLayout.PREFERRED_SIZE).add(QueryTypeLabel)).addContainerGap(59,
- Short.MAX_VALUE)));
-
- org.jdesktop.layout.GroupLayout layout = new
org.jdesktop.layout.GroupLayout(this);
- this.setLayout(layout);
-
layout.setHorizontalGroup(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING).add(
-
layout.createSequentialGroup().addContainerGap().add(jPanel1,
org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
-
org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
Short.MAX_VALUE).addContainerGap()));
-
layout.setVerticalGroup(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING).add(
-
layout.createSequentialGroup().addContainerGap().add(jPanel1,
org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
-
org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
Short.MAX_VALUE).addContainerGap()));
- }
-
}
\ No newline at end of file

Modified:
branches/perfsonarui/src/org/perfsonar/perfsonarui/flowsa/panels/QueryResultPanel.java
===================================================================
---
branches/perfsonarui/src/org/perfsonar/perfsonarui/flowsa/panels/QueryResultPanel.java
2007-09-12 14:40:23 UTC (rev 2825)
+++
branches/perfsonarui/src/org/perfsonar/perfsonarui/flowsa/panels/QueryResultPanel.java
2007-09-12 16:07:13 UTC (rev 2826)
@@ -17,9 +17,9 @@

public QueryResultPanel(Component parentFrame, IPerfsonarTab model,
FlowSAUserData userData) {
super(parentFrame, model, null);
- setLayout(myLayout);
this.userData = userData;
userData.addObserver(this);
+ setLayout(myLayout);
myLayout.show(this, "Raw");
}


Modified:
branches/perfsonarui/src/org/perfsonar/perfsonarui/flowsa/panels/RawOptionsPanel.java
===================================================================
---
branches/perfsonarui/src/org/perfsonar/perfsonarui/flowsa/panels/RawOptionsPanel.java
2007-09-12 14:40:23 UTC (rev 2825)
+++
branches/perfsonarui/src/org/perfsonar/perfsonarui/flowsa/panels/RawOptionsPanel.java
2007-09-12 16:07:13 UTC (rev 2826)
@@ -7,126 +7,117 @@

package org.perfsonar.perfsonarui.flowsa.panels;

+import java.awt.BorderLayout;
+
+import javax.swing.DefaultListModel;
+import javax.swing.JLabel;
+import javax.swing.JList;
+import javax.swing.JPanel;
+import javax.swing.JScrollPane;
+import javax.swing.JTextField;
+import javax.swing.ListModel;
+import javax.swing.event.ListDataEvent;
+import javax.swing.event.ListDataListener;
+
+import org.jdesktop.layout.GroupLayout;
+import org.perfsonar.perfsonarui.flowsa.FlowSAUserData;
+import org.perfsonar.perfsonarui.plugins.IUserData;
+
+import static org.jdesktop.layout.GroupLayout.*;
+import static org.jdesktop.layout.LayoutStyle.RELATED;
+
public class RawOptionsPanel extends javax.swing.JPanel {

private static final long serialVersionUID = 1L;
+
+ private final IUserData model;

- private javax.swing.JPanel FilterAggregationPanel;
- private javax.swing.JTextField rawAggregationField;
- private javax.swing.JLabel rawAggregationLabel;
- private javax.swing.JPanel rawFieldPanel;
- private javax.swing.JScrollPane rawFieldScrollPane;
- private javax.swing.JList rawFieldsList;
- private javax.swing.JTextField rawFilterField;
- private javax.swing.JLabel rawFilterlabel;
-
- public RawOptionsPanel() {
- addWidgets();
+ public RawOptionsPanel(IUserData model) {
+ super(null);
+ this.model = model;
+ GroupLayout layout = new GroupLayout(this);
+ JPanel rulePanel = createRulePanel();
+ JPanel fieldPanel = createFieldsPanel();
+ setLayout(layout);
+ configureLayout(layout, rulePanel, fieldPanel);
}

- @Override
- public String toString() {
- return "Raw query";
+ protected JPanel createRulePanel() {
+ return new RulesPanel(model);
}

- private void addWidgets() {
- rawFieldPanel = new javax.swing.JPanel();
- rawFieldScrollPane = new javax.swing.JScrollPane();
- rawFieldsList = new javax.swing.JList();
- FilterAggregationPanel = new javax.swing.JPanel();
- rawFilterlabel = new javax.swing.JLabel();
- rawFilterField = new javax.swing.JTextField();
- rawAggregationLabel = new javax.swing.JLabel();
- rawAggregationField = new javax.swing.JTextField();
+ protected JPanel createFieldsPanel() {
+ JPanel panel = new JPanel(new BorderLayout());
+
panel.setBorder(javax.swing.BorderFactory.createTitledBorder("Fields"));
+ JList rawFieldsList = new JList();
+ JScrollPane rawFieldScrollPane = new
JScrollPane(rawFieldsList);
+
+ final DefaultListModel fieldsModel = new DefaultListModel();
+
+ for(String field : FlowSAUserData.FIELDS) {
+ fieldsModel.addElement(field);
+ }
+
+ fieldsModel.addListDataListener(new ListDataListener() {
+ @Override
+ public void contentsChanged(ListDataEvent e) {
+ model.setQuery(FlowSAUserData.RAWFIELDS,
toString(fieldsModel.toArray()));
+ }

-
rawFieldPanel.setBorder(javax.swing.BorderFactory.createTitledBorder("Fields"));
- rawFieldsList.setModel(new javax.swing.AbstractListModel() {
- private static final long serialVersionUID = 1L;
- String[] strings = { "Address family", "Timer first
seen", "Msec first seen", "Time last seen", "Msec last seen",
- "Protocol", "Source address", "Source
port", "Destination address", "Destination port", "Source AS",
- "Destination AS", "Input interface",
"Output interface", "TCP flags", "Tos", "Packets", "Bytes" };
-
- public int getSize() {
- return strings.length;
+ @Override
+ public void intervalAdded(ListDataEvent e) {
+ model.setQuery(FlowSAUserData.RAWFIELDS,
toString(fieldsModel.toArray()));
}

- public Object getElementAt(int i) {
- return strings[i];
+ @Override
+ public void intervalRemoved(ListDataEvent e) {
+ model.setQuery(FlowSAUserData.RAWFIELDS,
toString(fieldsModel.toArray()));
}
+
+ private String toString(Object[] objects) {
+ StringBuffer buffer = new StringBuffer();
+ for (Object value : objects) {
+ buffer.append(String.valueOf(value));
+ buffer.append(" ");
+ }
+ return buffer.toString();
+ }
+
});
- rawFieldScrollPane.setViewportView(rawFieldsList);
-
- org.jdesktop.layout.GroupLayout rawFieldPanelLayout = new
org.jdesktop.layout.GroupLayout(rawFieldPanel);
- rawFieldPanel.setLayout(rawFieldPanelLayout);
-
rawFieldPanelLayout.setHorizontalGroup(rawFieldPanelLayout.createParallelGroup(
- org.jdesktop.layout.GroupLayout.LEADING).add(
-
rawFieldPanelLayout.createSequentialGroup().addContainerGap().add(rawFieldScrollPane,
-
org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
-
org.jdesktop.layout.GroupLayout.PREFERRED_SIZE).addContainerGap(
-
org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)));
-
rawFieldPanelLayout.setVerticalGroup(rawFieldPanelLayout.createParallelGroup(
- org.jdesktop.layout.GroupLayout.LEADING).add(
-
rawFieldPanelLayout.createSequentialGroup().addContainerGap().add(rawFieldScrollPane,
-
org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 232,
Short.MAX_VALUE).addContainerGap()));
-
-
FilterAggregationPanel.setBorder(javax.swing.BorderFactory.createTitledBorder("Filter
and Aggregation"));
- rawFilterlabel.setText("Filter rule");
-
- rawAggregationLabel.setText("Aggregation rule");
-
- org.jdesktop.layout.GroupLayout FilterAggregationPanelLayout
= new org.jdesktop.layout.GroupLayout(
- FilterAggregationPanel);
-
FilterAggregationPanel.setLayout(FilterAggregationPanelLayout);
-
FilterAggregationPanelLayout.setHorizontalGroup(FilterAggregationPanelLayout.createParallelGroup(
- org.jdesktop.layout.GroupLayout.LEADING).add(
-
FilterAggregationPanelLayout.createSequentialGroup().addContainerGap().add(
-
FilterAggregationPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING,
false).add(
-
rawFilterlabel).add(rawAggregationLabel).add(rawFilterField,
-
org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 313,
Short.MAX_VALUE).add(rawAggregationField))
-
.addContainerGap(org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
Short.MAX_VALUE)));
-
FilterAggregationPanelLayout.setVerticalGroup(FilterAggregationPanelLayout.createParallelGroup(
- org.jdesktop.layout.GroupLayout.LEADING).add(
-
FilterAggregationPanelLayout.createSequentialGroup().add(rawFilterlabel).addPreferredGap(
-
org.jdesktop.layout.LayoutStyle.RELATED).add(rawFilterField,
-
org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
-
org.jdesktop.layout.GroupLayout.PREFERRED_SIZE).addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
-
.add(rawAggregationLabel).addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED).add(rawAggregationField,
-
org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
-
org.jdesktop.layout.GroupLayout.PREFERRED_SIZE).addContainerGap(170,
Short.MAX_VALUE)));
-
- org.jdesktop.layout.GroupLayout layout = new
org.jdesktop.layout.GroupLayout(this);
-
- this.setLayout(layout);
-
layout.setHorizontalGroup(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING).add(
-
layout.createSequentialGroup().addContainerGap().add(rawFieldPanel,
-
org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
-
org.jdesktop.layout.GroupLayout.PREFERRED_SIZE).addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
- .add(FilterAggregationPanel,
org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
-
org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
-
.addContainerGap(org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
Short.MAX_VALUE)));
-
layout.setVerticalGroup(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING).add(
-
layout.createSequentialGroup().addContainerGap().add(
-
layout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING,
false).add(
-
org.jdesktop.layout.GroupLayout.LEADING, FilterAggregationPanel,
-
org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
-
Short.MAX_VALUE).add(org.jdesktop.layout.GroupLayout.LEADING, rawFieldPanel,
-
org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
-
Short.MAX_VALUE)).addContainerGap(org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
Short.MAX_VALUE)));
+
+ rawFieldsList.setModel(fieldsModel);
+ panel.add(rawFieldScrollPane);
+
+ return panel;
}

- public String getFields() {
- StringBuffer buffer = new StringBuffer();
- for (Object value : rawFieldsList.getSelectedValues())
- buffer.append(value.toString() + " ");
- return buffer.toString();
+ @Override
+ public String toString() {
+ return "Raw query";
}

- public String getAggregation() {
- return this.rawAggregationField.getText();
+ protected void configureLayout(GroupLayout layout, JPanel rulePanel,
JPanel fieldPanel) {
+ layout.setHorizontalGroup(
+ layout.createParallelGroup(LEADING)
+ .add(layout.createSequentialGroup()
+ .addContainerGap()
+ .add(fieldPanel, PREFERRED_SIZE,
DEFAULT_SIZE, PREFERRED_SIZE)
+ .addPreferredGap(RELATED)
+ .add(rulePanel, PREFERRED_SIZE, DEFAULT_SIZE,
PREFERRED_SIZE)
+ .addContainerGap(DEFAULT_SIZE,
Short.MAX_VALUE)
+ )
+ );
+ layout.setVerticalGroup(
+ layout.createParallelGroup(LEADING).add(
+ layout.createSequentialGroup()
+ .addContainerGap()
+ .add(
+
layout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING, false)
+ .add(LEADING,
rulePanel, DEFAULT_SIZE, DEFAULT_SIZE, Short.MAX_VALUE)
+ .add(LEADING,
fieldPanel, DEFAULT_SIZE, DEFAULT_SIZE, Short.MAX_VALUE)
+ )
+ .addContainerGap(DEFAULT_SIZE,
Short.MAX_VALUE)
+ )
+ );
}
-
- public String getFilter() {
- return this.rawFilterField.getText();
- }
-
}
\ No newline at end of file



  • perfsonar: r2826 - in branches/perfsonarui/src/org/perfsonar/perfsonarui/flowsa: . panels, svnlog, 09/12/2007

Archive powered by MHonArc 2.6.16.

Top of Page