Skip to Content.
Sympa Menu

perfsonar-dev - perfsonar: r2852 - in branches/perfsonarui/src/org/perfsonar/perfsonarui: flowsa/components ui/panels

Subject: perfsonar development work

List archive

perfsonar: r2852 - in branches/perfsonarui/src/org/perfsonar/perfsonarui: flowsa/components ui/panels


Chronological Thread 
  • From:
  • To:
  • Subject: perfsonar: r2852 - in branches/perfsonarui/src/org/perfsonar/perfsonarui: flowsa/components ui/panels
  • Date: Sun, 16 Sep 2007 16:00:39 -0400

Author: michael.bischoff
Date: 2007-09-16 16:00:38 -0400 (Sun, 16 Sep 2007)
New Revision: 2852

Modified:

branches/perfsonarui/src/org/perfsonar/perfsonarui/flowsa/components/DateTimePicker.java

branches/perfsonarui/src/org/perfsonar/perfsonarui/flowsa/components/DefaultDateTimeModel.java

branches/perfsonarui/src/org/perfsonar/perfsonarui/flowsa/components/OptionsPanel.java

branches/perfsonarui/src/org/perfsonar/perfsonarui/flowsa/components/RawSpecificsPanel.java

branches/perfsonarui/src/org/perfsonar/perfsonarui/flowsa/components/RouterPanel.java

branches/perfsonarui/src/org/perfsonar/perfsonarui/flowsa/components/SpecificsPanel.java

branches/perfsonarui/src/org/perfsonar/perfsonarui/flowsa/components/TimeRangePicker.java

branches/perfsonarui/src/org/perfsonar/perfsonarui/flowsa/components/TopParametersPanel.java

branches/perfsonarui/src/org/perfsonar/perfsonarui/flowsa/components/TopSpecificsPanel.java

branches/perfsonarui/src/org/perfsonar/perfsonarui/ui/panels/CheckListModel.java

branches/perfsonarui/src/org/perfsonar/perfsonarui/ui/panels/DefaultCheckListModel.java

branches/perfsonarui/src/org/perfsonar/perfsonarui/ui/panels/DefaultModifiableListModel.java

branches/perfsonarui/src/org/perfsonar/perfsonarui/ui/panels/JCheckList.java

branches/perfsonarui/src/org/perfsonar/perfsonarui/ui/panels/JDualListItemSelector.java
Log:
1.5 <-> 1.6 incompatibility issues fixed.

Modified:
branches/perfsonarui/src/org/perfsonar/perfsonarui/flowsa/components/DateTimePicker.java
===================================================================
---
branches/perfsonarui/src/org/perfsonar/perfsonarui/flowsa/components/DateTimePicker.java
2007-09-16 13:24:35 UTC (rev 2851)
+++
branches/perfsonarui/src/org/perfsonar/perfsonarui/flowsa/components/DateTimePicker.java
2007-09-16 20:00:38 UTC (rev 2852)
@@ -5,9 +5,11 @@
import static java.util.Calendar.MONTH;
import static java.util.Calendar.SECOND;
import static java.util.Calendar.YEAR;
-import static javax.swing.GroupLayout.*;
-import static javax.swing.GroupLayout.Alignment.*;
-import static javax.swing.LayoutStyle.ComponentPlacement.*;
+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.LayoutStyle.RELATED;

import java.awt.LayoutManager;
import java.util.Calendar;
@@ -20,6 +22,8 @@
import javax.swing.event.ChangeEvent;
import javax.swing.event.ChangeListener;

+import org.jdesktop.layout.GroupLayout;
+
public class DateTimePicker extends JPanel {

private static final long serialVersionUID = 1L;
@@ -41,30 +45,30 @@
}

protected LayoutManager createLayoutManager(JComponent dateField,
JComponent timeField) {
- javax.swing.GroupLayout layout = new
javax.swing.GroupLayout(this);
+ org.jdesktop.layout.GroupLayout layout = new
org.jdesktop.layout.GroupLayout(this);
layout.setHorizontalGroup(
layout.createParallelGroup(LEADING)
- .addGroup(
+ .add(
layout.createSequentialGroup()
- .addComponent(dateField, PREFERRED_SIZE,
DEFAULT_SIZE, PREFERRED_SIZE)
+ .add(dateField, PREFERRED_SIZE,
DEFAULT_SIZE, PREFERRED_SIZE)
.addPreferredGap(RELATED)
- .addComponent(timeField, PREFERRED_SIZE,
DEFAULT_SIZE, PREFERRED_SIZE)
+ .add(timeField, PREFERRED_SIZE, DEFAULT_SIZE,
PREFERRED_SIZE)
.addContainerGap()
)
);
layout.setVerticalGroup(
layout.createParallelGroup(LEADING)
- .addGroup(
+ .add(
layout.createParallelGroup(BASELINE)
- .addComponent(dateField, PREFERRED_SIZE,
DEFAULT_SIZE, PREFERRED_SIZE)
- .addComponent(timeField, PREFERRED_SIZE,
DEFAULT_SIZE, PREFERRED_SIZE)
+ .add(dateField, PREFERRED_SIZE, DEFAULT_SIZE,
PREFERRED_SIZE)
+ .add(timeField, PREFERRED_SIZE, DEFAULT_SIZE,
PREFERRED_SIZE)
)
);
return layout;
}

protected LayoutManager createLayoutManager() {
- return new javax.swing.GroupLayout(this);
+ return new GroupLayout(this);
}

protected JComponent createDateField(DateTimeModel model) {
@@ -72,7 +76,6 @@
final JSpinner spinner = new JSpinner(spinnerModel);
spinner.setEditor(new JSpinner.DateEditor(spinner,
"yyyy-MM-dd"));
final ChangeListener listener = new ChangeListener() {
- @Override
public void stateChanged(ChangeEvent e) {
Calendar model =
getCalendar(getModel().getValue());
Calendar newDate =
getCalendar(spinnerModel.getDate());
@@ -86,7 +89,6 @@
};
spinner.addChangeListener(listener);
model.addChangeListener(new ChangeListener() {
- @Override
public void stateChanged(ChangeEvent e) {
if(e.getSource() != spinner.getParent() &&
e.getSource() != spinner) {

spinner.removeChangeListener(listener);
@@ -103,7 +105,6 @@
final JSpinner spinner = new JSpinner(spinnerModel);
spinner.setEditor(new JSpinner.DateEditor(spinner,
"HH:mm:ss"));
final ChangeListener listener = new ChangeListener() {
- @Override
public void stateChanged(ChangeEvent e) {
Calendar model =
getCalendar(getModel().getValue());
Calendar newTime =
getCalendar(spinnerModel.getDate());
@@ -117,7 +118,6 @@
};
spinner.addChangeListener(listener);
model.addChangeListener(new ChangeListener() {
- @Override
public void stateChanged(ChangeEvent e) {
if(e.getSource() != spinner.getParent() &&
e.getSource() != spinner) {

spinner.removeChangeListener(listener);

Modified:
branches/perfsonarui/src/org/perfsonar/perfsonarui/flowsa/components/DefaultDateTimeModel.java
===================================================================
---
branches/perfsonarui/src/org/perfsonar/perfsonarui/flowsa/components/DefaultDateTimeModel.java
2007-09-16 13:24:35 UTC (rev 2851)
+++
branches/perfsonarui/src/org/perfsonar/perfsonarui/flowsa/components/DefaultDateTimeModel.java
2007-09-16 20:00:38 UTC (rev 2852)
@@ -13,22 +13,18 @@
private Calendar calendar = Calendar.getInstance();
private List<ChangeListener> listeners = new Vector<ChangeListener>();

- @Override
public void addChangeListener(ChangeListener listener) {
listeners.add(listener);
}

- @Override
public Date getValue() {
return calendar.getTime();
}

- @Override
public void removeChangeListener(ChangeListener listener) {
listeners.remove(listener);
}

- @Override
public void setValue(Date date) {
this.setValue(date,null);
}
@@ -39,7 +35,6 @@
}
}

- @Override
public void setValue(Date date, Object source) {
calendar.setTime(date);
fireChange(source);

Modified:
branches/perfsonarui/src/org/perfsonar/perfsonarui/flowsa/components/OptionsPanel.java
===================================================================
---
branches/perfsonarui/src/org/perfsonar/perfsonarui/flowsa/components/OptionsPanel.java
2007-09-16 13:24:35 UTC (rev 2851)
+++
branches/perfsonarui/src/org/perfsonar/perfsonarui/flowsa/components/OptionsPanel.java
2007-09-16 20:00:38 UTC (rev 2852)
@@ -9,6 +9,8 @@

import java.awt.LayoutManager;
import java.awt.event.ActionEvent;
+import static org.jdesktop.layout.GroupLayout.*;
+import static org.jdesktop.layout.LayoutStyle.*;

import javax.swing.AbstractAction;
import javax.swing.BorderFactory;
@@ -20,6 +22,7 @@
import javax.swing.event.ChangeEvent;
import javax.swing.event.ChangeListener;

+import org.jdesktop.layout.GroupLayout;
import org.perfsonar.perfsonarui.flowsa.FlowSAUserData;
import org.perfsonar.perfsonarui.plugins.IUserData;

@@ -50,14 +53,12 @@
protected JPanel createPeriodPanel(final FlowSAUserData model) {
final DateTimeModel startTimeModel = new
DefaultDateTimeModel();
startTimeModel.addChangeListener(new ChangeListener() {
- @Override
public void stateChanged(ChangeEvent e) {

model.setQuery(FlowSAUserData.STARTMOMENT,String.valueOf(startTimeModel.getValue().getTime()/1000));
}
});
final DateTimeModel endTimeModel = new DefaultDateTimeModel();
endTimeModel.addChangeListener(new ChangeListener() {
- @Override
public void stateChanged(ChangeEvent e) {

model.setQuery(FlowSAUserData.ENDMOMENT,String.valueOf(endTimeModel.getValue().getTime()/1000));
}
@@ -81,26 +82,25 @@
final JComboBox box = new JComboBox(new
DefaultComboBoxModel(FlowSAUserData.QueryType.values()));
box.addActionListener(new AbstractAction(){
private static final long serialVersionUID = 1L;
- @Override
public void actionPerformed(ActionEvent e) {
model.setQuery(FlowSAUserData.QUERYTYPE,
String.valueOf(box.getSelectedItem()));
}
});

- javax.swing.GroupLayout layout = new
javax.swing.GroupLayout(panel);
+ GroupLayout layout = new GroupLayout(panel);
panel.setLayout(layout);
layout.setHorizontalGroup(
-
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
- .addGroup(layout.createSequentialGroup()
+ layout.createParallelGroup(LEADING)
+ .add(layout.createSequentialGroup()
.addContainerGap()
- .addComponent(box, javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
+ .add(box, PREFERRED_SIZE, DEFAULT_SIZE, PREFERRED_SIZE)
.addContainerGap())
);
layout.setVerticalGroup(
-
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
- .addGroup(layout.createSequentialGroup()
+ layout.createParallelGroup(LEADING)
+ .add(layout.createSequentialGroup()
.addContainerGap()
- .addComponent(box, javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
+ .add(box, PREFERRED_SIZE, DEFAULT_SIZE, PREFERRED_SIZE)
.addContainerGap())
);

@@ -112,33 +112,33 @@
}

protected LayoutManager configureLayout(JComponent queryTypePanel,
JComponent routerPanel, JComponent periodPanel, JComponent specificsPanel) {
- javax.swing.GroupLayout layout = new
javax.swing.GroupLayout(this);
+ GroupLayout layout = new GroupLayout(this);
this.setLayout(layout);
layout.setHorizontalGroup(
-
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
- .addGroup(layout.createSequentialGroup()
+ layout.createParallelGroup(LEADING)
+ .add(layout.createSequentialGroup()
.addContainerGap()
- .addComponent(queryTypePanel,
javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE,
javax.swing.GroupLayout.PREFERRED_SIZE)
-
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
- .addComponent(routerPanel,
javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE,
Short.MAX_VALUE)
+ .add(queryTypePanel, PREFERRED_SIZE, DEFAULT_SIZE,
PREFERRED_SIZE)
+ .addPreferredGap(RELATED)
+ .add(routerPanel, DEFAULT_SIZE, DEFAULT_SIZE,
Short.MAX_VALUE)
.addContainerGap())
- .addGroup(layout.createSequentialGroup()
+ .add(layout.createSequentialGroup()
.addContainerGap()
- .addComponent(periodPanel,
javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE,
Short.MAX_VALUE)
+ .add(periodPanel, DEFAULT_SIZE, DEFAULT_SIZE,
Short.MAX_VALUE)
.addContainerGap())
- .addComponent(specificsPanel,
javax.swing.GroupLayout.DEFAULT_SIZE, 590, Short.MAX_VALUE)
+ .add(specificsPanel, DEFAULT_SIZE, 590, Short.MAX_VALUE)
);
layout.setVerticalGroup(
-
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
- .addGroup(layout.createSequentialGroup()
- .addContainerGap()
-
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING,
false)
- .addComponent(queryTypePanel,
javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE,
Short.MAX_VALUE)
- .addComponent(routerPanel,
javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE,
Short.MAX_VALUE))
-
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
- .addComponent(periodPanel,
javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE,
javax.swing.GroupLayout.PREFERRED_SIZE)
-
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
- .addComponent(specificsPanel,
javax.swing.GroupLayout.DEFAULT_SIZE, 310, Short.MAX_VALUE))
+ layout.createParallelGroup(LEADING)
+ .add(layout.createSequentialGroup()
+ .addContainerGap()
+ .add(layout.createParallelGroup(LEADING, false)
+ .add(queryTypePanel, DEFAULT_SIZE, DEFAULT_SIZE,
Short.MAX_VALUE)
+ .add(routerPanel, DEFAULT_SIZE, DEFAULT_SIZE,
Short.MAX_VALUE))
+ .addPreferredGap(RELATED)
+ .add(periodPanel, PREFERRED_SIZE, DEFAULT_SIZE,
PREFERRED_SIZE)
+ .addPreferredGap(RELATED)
+ .add(specificsPanel, DEFAULT_SIZE, 310,
Short.MAX_VALUE))
);
return layout;
}

Modified:
branches/perfsonarui/src/org/perfsonar/perfsonarui/flowsa/components/RawSpecificsPanel.java
===================================================================
---
branches/perfsonarui/src/org/perfsonar/perfsonarui/flowsa/components/RawSpecificsPanel.java
2007-09-16 13:24:35 UTC (rev 2851)
+++
branches/perfsonarui/src/org/perfsonar/perfsonarui/flowsa/components/RawSpecificsPanel.java
2007-09-16 20:00:38 UTC (rev 2852)
@@ -12,11 +12,15 @@
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.ui.panels.DefaultModifiableListModel;
import org.perfsonar.perfsonarui.ui.panels.JDualListItemSelector;
import org.perfsonar.perfsonarui.ui.panels.ModifiableListModel;

+import static org.jdesktop.layout.GroupLayout.*;
+import static org.jdesktop.layout.LayoutStyle.*;
+
public class RawSpecificsPanel extends JPanel {

private static final long serialVersionUID = 1L;
@@ -37,7 +41,6 @@
}));
final ModifiableListModel<String> selected = new
DefaultModifiableListModel<String>();
selected.addListDataListener(new ListDataListener() {
- @Override
public void contentsChanged(ListDataEvent e) {
StringBuilder builder = new StringBuilder();
for(String item : selected.getAll()) {
@@ -51,9 +54,7 @@

model.setQuery(FlowSAUserData.RAWFIELDS, "N/A");
}
}
- @Override
public void intervalAdded(ListDataEvent e) {/*
ignored */}
- @Override
public void intervalRemoved(ListDataEvent e) {/*
ignored */}
});
selected.addAll(Arrays.asList(new String[] {
@@ -68,7 +69,6 @@
protected JComponent createAggregationComponent(final FlowSAUserData
model) {
final JTextArea aggregationRuleField = new JTextArea(3,20);
aggregationRuleField.addCaretListener(new CaretListener() {
- @Override
public void caretUpdate(CaretEvent e) {
String value = aggregationRuleField.getText();
if(value != null && !value.equals("")) {
@@ -90,7 +90,6 @@
final JTextArea filterField = new JTextArea(3,20);
filterField.setEditable(true);
filterField.addCaretListener(new CaretListener() {
- @Override
public void caretUpdate(CaretEvent e) {
String value = filterField.getText();
if(value != null && !value.equals("")) {
@@ -109,28 +108,28 @@
}

protected LayoutManager createLayout(JComponent filterComponent,
JComponent aggregationRuleComponent, JComponent fieldComponent) {
- javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
+ GroupLayout layout = new GroupLayout(this);
this.setLayout(layout);
layout.setHorizontalGroup(
-
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
- .addGroup(layout.createSequentialGroup()
+ layout.createParallelGroup(LEADING)
+ .add(layout.createSequentialGroup()
.addContainerGap()
-
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
- .addGroup(layout.createSequentialGroup()
- .addComponent(filterComponent,
javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE,
Short.MAX_VALUE)
-
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
- .addComponent(aggregationRuleComponent,
javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE,
Short.MAX_VALUE))
- .addComponent(fieldComponent,
javax.swing.GroupLayout.Alignment.TRAILING,
javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.PREFERRED_SIZE, Short.MAX_VALUE))
+ .add(layout.createParallelGroup(LEADING)
+ .add(layout.createSequentialGroup()
+ .add(filterComponent, DEFAULT_SIZE, DEFAULT_SIZE,
Short.MAX_VALUE)
+ .addPreferredGap(RELATED)
+ .add(aggregationRuleComponent,DEFAULT_SIZE,
DEFAULT_SIZE, Short.MAX_VALUE))
+ .add(fieldComponent, PREFERRED_SIZE,PREFERRED_SIZE,
Short.MAX_VALUE))
.addContainerGap())
);
layout.setVerticalGroup(
-
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
- .addGroup(layout.createSequentialGroup()
-
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
- .addComponent(aggregationRuleComponent, 80, 120,
Short.MAX_VALUE)
- .addComponent(filterComponent, 80, 120, Short.MAX_VALUE))
-
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
- .addComponent(fieldComponent,
javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE,
Short.MAX_VALUE)
+ layout.createParallelGroup(LEADING)
+ .add(layout.createSequentialGroup()
+ .add(layout.createParallelGroup(LEADING)
+ .add(aggregationRuleComponent, 80, 120, Short.MAX_VALUE)
+ .add(filterComponent, 80, 120, Short.MAX_VALUE))
+ .addPreferredGap(RELATED)
+ .add(fieldComponent, DEFAULT_SIZE, DEFAULT_SIZE,
Short.MAX_VALUE)
.addContainerGap())
);
return layout;

Modified:
branches/perfsonarui/src/org/perfsonar/perfsonarui/flowsa/components/RouterPanel.java
===================================================================
---
branches/perfsonarui/src/org/perfsonar/perfsonarui/flowsa/components/RouterPanel.java
2007-09-16 13:24:35 UTC (rev 2851)
+++
branches/perfsonarui/src/org/perfsonar/perfsonarui/flowsa/components/RouterPanel.java
2007-09-16 20:00:38 UTC (rev 2852)
@@ -1,5 +1,9 @@
package org.perfsonar.perfsonarui.flowsa.components;

+import static org.jdesktop.layout.GroupLayout.DEFAULT_SIZE;
+import static org.jdesktop.layout.GroupLayout.LEADING;
+import static org.jdesktop.layout.GroupLayout.PREFERRED_SIZE;
+
import java.awt.LayoutManager;
import java.util.Observable;
import java.util.Observer;
@@ -9,6 +13,7 @@
import javax.swing.JScrollPane;
import javax.swing.ScrollPaneConstants;

+import org.jdesktop.layout.GroupLayout;
import org.perfsonar.perfsonarui.flowsa.FlowSAUserData;
import org.perfsonar.perfsonarui.flowsa.Router;
import org.perfsonar.perfsonarui.plugins.MAEndpoint;
@@ -27,20 +32,20 @@
}

private LayoutManager createLayoutManager(JComponent list) {
- javax.swing.GroupLayout layout = new
javax.swing.GroupLayout(this);
+ GroupLayout layout = new GroupLayout(this);
layout.setHorizontalGroup(
-
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
- .addGroup(layout.createSequentialGroup()
+ layout.createParallelGroup(LEADING)
+ .add(layout.createSequentialGroup()
.addContainerGap()
- .addComponent(list,
javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE,
Short.MAX_VALUE)
+ .add(list, PREFERRED_SIZE, DEFAULT_SIZE,
Short.MAX_VALUE)
.addContainerGap()
)
);
layout.setVerticalGroup(
-
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
- .addGroup(layout.createSequentialGroup()
+ layout.createParallelGroup(LEADING)
+ .add(layout.createSequentialGroup()
.addContainerGap()
- .addComponent(list,
javax.swing.GroupLayout.PREFERRED_SIZE, 80,
javax.swing.GroupLayout.PREFERRED_SIZE)
+ .add(list, PREFERRED_SIZE, 80, PREFERRED_SIZE)
.addContainerGap()
)
);
@@ -54,7 +59,6 @@
model.addObserver(new Observer() {
private String oldEndPoint;

- @Override
public void update(Observable o, Object arg) {
MAEndpoint newEndpoint = model.getEndpoint();
if(oldEndPoint == newEndpoint.getEndpoint()) {
@@ -70,7 +74,6 @@
}
});
list.addCheckListSelectionListener(new
CheckListSelectionListener<Router>() {
- @Override
public void selectionChanged(Router changedItem) {
StringBuilder builder = new StringBuilder();
for(Router item :
checkListModel.getCheckedItems()) {

Modified:
branches/perfsonarui/src/org/perfsonar/perfsonarui/flowsa/components/SpecificsPanel.java
===================================================================
---
branches/perfsonarui/src/org/perfsonar/perfsonarui/flowsa/components/SpecificsPanel.java
2007-09-16 13:24:35 UTC (rev 2851)
+++
branches/perfsonarui/src/org/perfsonar/perfsonarui/flowsa/components/SpecificsPanel.java
2007-09-16 20:00:38 UTC (rev 2852)
@@ -22,7 +22,6 @@
final JComponent topPanel = createTopPanel(model);

model.addObserver(new Observer() {
- @Override
public void update(Observable o, Object arg) {
String typeValue =
model.getQuery(FlowSAUserData.QUERYTYPE);
QueryType type = QueryType.get(typeValue);
@@ -35,9 +34,8 @@
break;
case TOP:
setPanel(topPanel);
- break;
+ break;


-
default:
break;
}
@@ -55,9 +53,8 @@
break;
case TOP:
setPanel(topPanel);
- break;
+ break;

-
default:
break;
}

Modified:
branches/perfsonarui/src/org/perfsonar/perfsonarui/flowsa/components/TimeRangePicker.java
===================================================================
---
branches/perfsonarui/src/org/perfsonar/perfsonarui/flowsa/components/TimeRangePicker.java
2007-09-16 13:24:35 UTC (rev 2851)
+++
branches/perfsonarui/src/org/perfsonar/perfsonarui/flowsa/components/TimeRangePicker.java
2007-09-16 20:00:38 UTC (rev 2852)
@@ -1,4 +1,10 @@
package org.perfsonar.perfsonarui.flowsa.components;
+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 java.awt.LayoutManager;
import java.awt.event.ActionListener;
import java.text.NumberFormat;
@@ -14,6 +20,8 @@
import javax.swing.event.ChangeListener;
import javax.swing.text.JTextComponent;

+import org.jdesktop.layout.GroupLayout;
+
public class TimeRangePicker extends JPanel {
private static final long serialVersionUID = 1L;
private DateTimeModel startTime;
@@ -42,39 +50,37 @@
DateTimePicker startTimePanel, JTextComponent
startUnixField,
JComponent endLabel, DateTimePicker endTimePanel,
JTextComponent endUnixField) {
- javax.swing.GroupLayout layout = new
javax.swing.GroupLayout(this);
+ GroupLayout layout = new GroupLayout(this);

layout.setHorizontalGroup(
-
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
- .addGroup(layout.createSequentialGroup()
+ layout.createParallelGroup(LEADING)
+ .add(layout.createSequentialGroup()
.addContainerGap()
-
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
- .addComponent(endLabel)
- .addComponent(startLabel))
- .addGap(6, 6, 6)
-
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
- .addComponent(startTimePanel,
javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE,
javax.swing.GroupLayout.PREFERRED_SIZE)
- .addComponent(endTimePanel,
javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE,
javax.swing.GroupLayout.PREFERRED_SIZE))
- .addGap(18, 18, 18)
-
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
- .addComponent(startUnixField,
javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE,
javax.swing.GroupLayout.PREFERRED_SIZE)
- .addComponent(endUnixField,
javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE,
javax.swing.GroupLayout.PREFERRED_SIZE))
+ .add(layout.createParallelGroup(LEADING)
+ .add(endLabel)
+ .add(startLabel))
+ .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
+ .add(layout.createParallelGroup(LEADING)
+ .add(startTimePanel, PREFERRED_SIZE, DEFAULT_SIZE,
PREFERRED_SIZE)
+ .add(endTimePanel, PREFERRED_SIZE, DEFAULT_SIZE,
PREFERRED_SIZE))
+ .add(layout.createParallelGroup(LEADING)
+ .add(startUnixField, PREFERRED_SIZE, DEFAULT_SIZE,
PREFERRED_SIZE)
+ .add(endUnixField, PREFERRED_SIZE, DEFAULT_SIZE,
PREFERRED_SIZE))
.addContainerGap())
);
layout.setVerticalGroup(
-
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
- .addGroup(layout.createSequentialGroup()
-
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
- .addGroup(javax.swing.GroupLayout.Alignment.LEADING,
layout.createSequentialGroup()
-
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
- .addComponent(startLabel)
- .addComponent(startTimePanel,
javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE,
javax.swing.GroupLayout.PREFERRED_SIZE)
- .addComponent(startUnixField,
javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE,
javax.swing.GroupLayout.PREFERRED_SIZE))
- .addGap(6, 6, 6)
-
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
- .addComponent(endLabel)
- .addComponent(endTimePanel,
javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE,
javax.swing.GroupLayout.PREFERRED_SIZE)
- .addComponent(endUnixField,
javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE,
javax.swing.GroupLayout.PREFERRED_SIZE))))
+ layout.createParallelGroup(LEADING)
+ .add(layout.createSequentialGroup()
+ .add(layout.createParallelGroup(TRAILING)
+ .add(LEADING, layout.createSequentialGroup()
+ .add(layout.createParallelGroup(BASELINE)
+ .add(startLabel)
+ .add(startTimePanel, PREFERRED_SIZE,
DEFAULT_SIZE, PREFERRED_SIZE)
+ .add(startUnixField, PREFERRED_SIZE,
DEFAULT_SIZE, PREFERRED_SIZE))
+ .add(layout.createParallelGroup(BASELINE)
+ .add(endLabel)
+ .add(endTimePanel, PREFERRED_SIZE,
DEFAULT_SIZE, PREFERRED_SIZE)
+ .add(endUnixField, PREFERRED_SIZE, DEFAULT_SIZE,
PREFERRED_SIZE))))
.addContainerGap())
);
return layout;
@@ -90,7 +96,6 @@
format.setGroupingUsed(false);
final JFormattedTextField field = new
JFormattedTextField(format);
dateTime.addChangeListener(new ChangeListener() {
- @Override
public void stateChanged(ChangeEvent e) {
if(e.getSource() != field) {

field.setText(String.valueOf(dateTime.getValue().getTime()/1000));

Modified:
branches/perfsonarui/src/org/perfsonar/perfsonarui/flowsa/components/TopParametersPanel.java
===================================================================
---
branches/perfsonarui/src/org/perfsonar/perfsonarui/flowsa/components/TopParametersPanel.java
2007-09-16 13:24:35 UTC (rev 2851)
+++
branches/perfsonarui/src/org/perfsonar/perfsonarui/flowsa/components/TopParametersPanel.java
2007-09-16 20:00:38 UTC (rev 2852)
@@ -17,8 +17,12 @@
import javax.swing.event.ChangeEvent;
import javax.swing.event.ChangeListener;

+import org.jdesktop.layout.GroupLayout;
import org.perfsonar.perfsonarui.flowsa.FlowSAUserData;

+import static org.jdesktop.layout.GroupLayout.*;
+import static org.jdesktop.layout.LayoutStyle.*;
+
public class TopParametersPanel extends JPanel {

private static final long serialVersionUID = 1L;
@@ -43,7 +47,6 @@
final SpinnerNumberModel spinnerModel = new
SpinnerNumberModel(10, 0, 1000, 5);
final JSpinner selector = new JSpinner(spinnerModel);
selector.addChangeListener(new ChangeListener() {
- @Override
public void stateChanged(ChangeEvent e) {
model.setQuery(FlowSAUserData.TOPNUMBER,
spinnerModel.getNumber().toString());
selector.requestFocusInWindow();
@@ -56,7 +59,6 @@
private JComponent createGroupProtocolsSelector(final FlowSAUserData
model) {
final JToggleButton selector = new JToggleButton("Group
transport protocols");
selector.addActionListener(new ActionListener() {
- @Override
public void actionPerformed(ActionEvent e) {
if(selector.isSelected()) {

model.setQuery(FlowSAUserData.TOPTRANSGROUP, "yes");
@@ -83,7 +85,6 @@
)
);
box.addItemListener(new ItemListener() {
- @Override
public void itemStateChanged(ItemEvent e) {
model.setQuery(FlowSAUserData.TOPORDERBY,
String.valueOf(box.getSelectedItem()));
box.requestFocusInWindow();
@@ -102,7 +103,6 @@
)
);
box.addItemListener(new ItemListener() {
- @Override
public void itemStateChanged(ItemEvent e) {
model.setQuery(FlowSAUserData.TOPELEMENTS,
String.valueOf(box.getSelectedItem()));
box.requestFocusInWindow();
@@ -121,50 +121,49 @@
}

private LayoutManager createLayout(JComponent elementLabel,
JComponent orderByLabel, JComponent elementBox, JComponent orderByBox,
JComponent flowAmountLabel, JComponent flowAmountSelector, JComponent
groupProtocolsSelector) {
- JSeparator seperator = new
JSeparator(javax.swing.SwingConstants.VERTICAL);
-
- javax.swing.GroupLayout layout = new
javax.swing.GroupLayout(this);
+ JSeparator seperator = new
JSeparator(javax.swing.SwingConstants.VERTICAL);
+ GroupLayout layout = new GroupLayout(this);
layout.setHorizontalGroup(
-
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
- .addGroup(layout.createSequentialGroup()
+ layout.createParallelGroup(LEADING)
+ .add(layout.createSequentialGroup()
.addContainerGap()
-
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
- .addComponent(elementLabel)
- .addComponent(orderByLabel))
-
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
-
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
- .addComponent(elementBox, 0, 228, Short.MAX_VALUE)
- .addComponent(orderByBox, 0, 228, Short.MAX_VALUE))
-
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
- .addComponent(seperator,
javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE,
javax.swing.GroupLayout.PREFERRED_SIZE)
-
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
-
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
- .addGroup(layout.createSequentialGroup()
- .addComponent(flowAmountLabel)
-
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
- .addComponent(flowAmountSelector,
javax.swing.GroupLayout.DEFAULT_SIZE, 109, Short.MAX_VALUE))
- .addComponent(groupProtocolsSelector,
javax.swing.GroupLayout.DEFAULT_SIZE, 228, Short.MAX_VALUE))
+ .add(layout.createParallelGroup(LEADING)
+ .add(elementLabel)
+ .add(orderByLabel))
+ .addPreferredGap(RELATED)
+ .add(layout.createParallelGroup(LEADING)
+ .add(elementBox, 0, 228, Short.MAX_VALUE)
+ .add(orderByBox, 0, 228, Short.MAX_VALUE))
+ .addPreferredGap(RELATED)
+ .add(seperator, PREFERRED_SIZE, DEFAULT_SIZE, PREFERRED_SIZE)
+ .addPreferredGap(RELATED)
+ .add(layout.createParallelGroup(LEADING)
+ .add(layout.createSequentialGroup()
+ .add(flowAmountLabel)
+ .addPreferredGap(RELATED)
+ .add(flowAmountSelector, DEFAULT_SIZE, 109,
Short.MAX_VALUE))
+ .add(groupProtocolsSelector, DEFAULT_SIZE, 228,
Short.MAX_VALUE))
.addContainerGap())
);
layout.setVerticalGroup(
-
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
- .addGroup(layout.createSequentialGroup()
-
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
- .addGroup(javax.swing.GroupLayout.Alignment.LEADING,
layout.createSequentialGroup()
-
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
- .addComponent(flowAmountLabel)
- .addComponent(flowAmountSelector,
javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE,
javax.swing.GroupLayout.PREFERRED_SIZE))
-
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 10,
Short.MAX_VALUE)
- .addComponent(groupProtocolsSelector))
- .addComponent(seperator,
javax.swing.GroupLayout.Alignment.LEADING,
javax.swing.GroupLayout.DEFAULT_SIZE, 59, Short.MAX_VALUE)
- .addGroup(layout.createSequentialGroup()
-
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
- .addComponent(elementLabel)
- .addComponent(elementBox,
javax.swing.GroupLayout.PREFERRED_SIZE, 23,
javax.swing.GroupLayout.PREFERRED_SIZE))
-
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
-
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
- .addComponent(orderByLabel)
- .addComponent(orderByBox,
javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE,
javax.swing.GroupLayout.PREFERRED_SIZE))))
+ layout.createParallelGroup(LEADING)
+ .add(layout.createSequentialGroup()
+ .add(layout.createParallelGroup(TRAILING)
+ .add(LEADING, layout.createSequentialGroup()
+ .add(layout.createParallelGroup(BASELINE)
+ .add(flowAmountLabel)
+ .add(flowAmountSelector, PREFERRED_SIZE,
DEFAULT_SIZE, PREFERRED_SIZE))
+ .addPreferredGap(RELATED, 10, Short.MAX_VALUE)
+ .add(groupProtocolsSelector))
+ .add(seperator, DEFAULT_SIZE, 59, Short.MAX_VALUE)
+ .add(layout.createSequentialGroup()
+ .add(layout.createParallelGroup(BASELINE)
+ .add(elementLabel)
+ .add(elementBox, PREFERRED_SIZE, 23,
PREFERRED_SIZE))
+ .addPreferredGap(RELATED)
+ .add(layout.createParallelGroup(BASELINE)
+ .add(orderByLabel)
+ .add(orderByBox, PREFERRED_SIZE, DEFAULT_SIZE,
PREFERRED_SIZE))))
.addContainerGap())
);
return layout;

Modified:
branches/perfsonarui/src/org/perfsonar/perfsonarui/flowsa/components/TopSpecificsPanel.java
===================================================================
---
branches/perfsonarui/src/org/perfsonar/perfsonarui/flowsa/components/TopSpecificsPanel.java
2007-09-16 13:24:35 UTC (rev 2851)
+++
branches/perfsonarui/src/org/perfsonar/perfsonarui/flowsa/components/TopSpecificsPanel.java
2007-09-16 20:00:38 UTC (rev 2852)
@@ -10,6 +10,9 @@
import javax.swing.event.CaretEvent;
import javax.swing.event.CaretListener;

+import org.jdesktop.layout.GroupLayout;
+import static org.jdesktop.layout.GroupLayout.*;
+import static org.jdesktop.layout.LayoutStyle.*;
import org.perfsonar.perfsonarui.flowsa.FlowSAUserData;

public class TopSpecificsPanel extends JPanel {
@@ -33,7 +36,6 @@
final JTextArea filterField = new JTextArea(3,20);
filterField.setEditable(true);
filterField.addCaretListener(new CaretListener() {
- @Override
public void caretUpdate(CaretEvent e) {
String value = filterField.getText();
if(value != null && !value.equals("")) {
@@ -54,7 +56,6 @@
protected JComponent createAggregationComponent(final FlowSAUserData
model) {
final JTextArea aggregationRuleField = new JTextArea(3,20);
aggregationRuleField.addCaretListener(new CaretListener() {
- @Override
public void caretUpdate(CaretEvent e) {
String value = aggregationRuleField.getText();
if(value != null && !value.equals("")) {
@@ -73,28 +74,28 @@
}

protected LayoutManager createLayout(JComponent parametersComponent,
JComponent aggregationRuleComponent, JComponent filterComponent) {
- javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
+ GroupLayout layout = new GroupLayout(this);
this.setLayout(layout);
layout.setHorizontalGroup(
-
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
- .addGroup(layout.createSequentialGroup()
+ layout.createParallelGroup(LEADING)
+ .add(layout.createSequentialGroup()
.addContainerGap()
-
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
- .addGroup(layout.createSequentialGroup()
- .addComponent(filterComponent,
javax.swing.GroupLayout.DEFAULT_SIZE, 290, Short.MAX_VALUE)
-
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
- .addComponent(aggregationRuleComponent,
javax.swing.GroupLayout.DEFAULT_SIZE, 289, Short.MAX_VALUE))
- .addComponent(parametersComponent,
javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE,
Short.MAX_VALUE))
+ .add(layout.createParallelGroup(LEADING)
+ .add(layout.createSequentialGroup()
+ .add(filterComponent, DEFAULT_SIZE, 290,
Short.MAX_VALUE)
+ .addPreferredGap(RELATED)
+ .add(aggregationRuleComponent, DEFAULT_SIZE, 289,
Short.MAX_VALUE))
+ .add(parametersComponent, DEFAULT_SIZE, DEFAULT_SIZE,
Short.MAX_VALUE))
.addContainerGap())
);
layout.setVerticalGroup(
-
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
- .addGroup(layout.createSequentialGroup()
- .addComponent(parametersComponent, 100,
javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
-
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
-
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
-
.addComponent(aggregationRuleComponent, 100, 178, Short.MAX_VALUE)
- .addComponent(filterComponent, 100, 178,
Short.MAX_VALUE)
+ layout.createParallelGroup(LEADING)
+ .add(layout.createSequentialGroup()
+ .add(parametersComponent, 100, DEFAULT_SIZE,
PREFERRED_SIZE)
+ .addPreferredGap(RELATED)
+ .add(layout.createParallelGroup(LEADING)
+ .add(aggregationRuleComponent, 100,
178, Short.MAX_VALUE)
+ .add(filterComponent, 100, 178, Short.MAX_VALUE)
)
.addContainerGap()
)

Modified:
branches/perfsonarui/src/org/perfsonar/perfsonarui/ui/panels/CheckListModel.java
===================================================================
---
branches/perfsonarui/src/org/perfsonar/perfsonarui/ui/panels/CheckListModel.java
2007-09-16 13:24:35 UTC (rev 2851)
+++
branches/perfsonarui/src/org/perfsonar/perfsonarui/ui/panels/CheckListModel.java
2007-09-16 20:00:38 UTC (rev 2852)
@@ -6,7 +6,6 @@

public interface CheckListModel<Type> extends ListModel {

- @Override
public Type getElementAt(int index);

public Collection<Type> getCheckedItems();

Modified:
branches/perfsonarui/src/org/perfsonar/perfsonarui/ui/panels/DefaultCheckListModel.java
===================================================================
---
branches/perfsonarui/src/org/perfsonar/perfsonarui/ui/panels/DefaultCheckListModel.java
2007-09-16 13:24:35 UTC (rev 2851)
+++
branches/perfsonarui/src/org/perfsonar/perfsonarui/ui/panels/DefaultCheckListModel.java
2007-09-16 20:00:38 UTC (rev 2852)
@@ -25,12 +25,10 @@
list = new ArrayList<CheckableItem<Type>>();
}

- @Override
public int getSize() {
return list.size();
}

- @Override
public Collection<Type> getCheckedItems() {
Collection<Type> checkedItems = new ArrayList<Type>();
for(CheckableItem<Type> item: list) {
@@ -41,13 +39,11 @@
return checkedItems;
}

- @Override
public Type getElementAt(int index) {
CheckableItem<Type> type = list.get(index);
return type==null? null : type.getValue();
}

- @Override
public void clear() {
int end = list.size();
list.clear();
@@ -55,14 +51,12 @@
fireIntervalRemoved(this, 0, end);
}

- @Override
public void addItem(Type item) {
list.add(new CheckableItem<Type>(item));
fireContentsChanged(this, list.indexOf(item),
list.indexOf(item));
fireIntervalAdded(this, list.indexOf(item),
list.indexOf(item));
}

- @Override
public Type checkItem(int index) {
CheckableItem<Type> item = list.get(index);
item.setSelected(true);
@@ -70,7 +64,6 @@
return item.getValue();
}

- @Override
public Type troggleItem(int index) {
CheckableItem<Type> item = list.get(index);
item.setSelected(!item.isSelected());
@@ -78,13 +71,11 @@
return item.getValue();
}

- @Override
public boolean isChecked(int index) {
CheckableItem<Type> item = list.get(index);
return item.isSelected();
}

- @Override
public Type checkItem(Type item) {
int index = list.indexOf(new
JCheckList.CheckableItem<Type>(item));
if(index==-1) return null;

Modified:
branches/perfsonarui/src/org/perfsonar/perfsonarui/ui/panels/DefaultModifiableListModel.java
===================================================================
---
branches/perfsonarui/src/org/perfsonar/perfsonarui/ui/panels/DefaultModifiableListModel.java
2007-09-16 13:24:35 UTC (rev 2851)
+++
branches/perfsonarui/src/org/perfsonar/perfsonarui/ui/panels/DefaultModifiableListModel.java
2007-09-16 20:00:38 UTC (rev 2852)
@@ -18,12 +18,10 @@
/* default no arg constructor */
}

- @Override
public Object getElementAt(int index) {
return list.get(index);
}

- @Override
public int getSize() {
return list.size();
}
@@ -148,7 +146,6 @@
return list.toArray(a);
}

- @Override
public Collection<Type> getAll() {
return Collections.unmodifiableList(list);
}

Modified:
branches/perfsonarui/src/org/perfsonar/perfsonarui/ui/panels/JCheckList.java
===================================================================
---
branches/perfsonarui/src/org/perfsonar/perfsonarui/ui/panels/JCheckList.java
2007-09-16 13:24:35 UTC (rev 2851)
+++
branches/perfsonarui/src/org/perfsonar/perfsonarui/ui/panels/JCheckList.java
2007-09-16 20:00:38 UTC (rev 2852)
@@ -42,15 +42,12 @@
}
});
myDataListener = new ListDataListener() {
- @Override
public void contentsChanged(ListDataEvent e) {
fireCheckListSelectionChanged(null);
}
- @Override
public void intervalAdded(ListDataEvent e) {
fireCheckListSelectionChanged(null);
}
- @Override
public void intervalRemoved(ListDataEvent e) {
fireCheckListSelectionChanged(null);
}

Modified:
branches/perfsonarui/src/org/perfsonar/perfsonarui/ui/panels/JDualListItemSelector.java
===================================================================
---
branches/perfsonarui/src/org/perfsonar/perfsonarui/ui/panels/JDualListItemSelector.java
2007-09-16 13:24:35 UTC (rev 2851)
+++
branches/perfsonarui/src/org/perfsonar/perfsonarui/ui/panels/JDualListItemSelector.java
2007-09-16 20:00:38 UTC (rev 2852)
@@ -1,11 +1,11 @@
package org.perfsonar.perfsonarui.ui.panels;

-import static javax.swing.GroupLayout.DEFAULT_SIZE;
-import static javax.swing.GroupLayout.PREFERRED_SIZE;
-import static javax.swing.GroupLayout.Alignment.BASELINE;
-import static javax.swing.GroupLayout.Alignment.LEADING;
-import static javax.swing.GroupLayout.Alignment.TRAILING;
-import static javax.swing.LayoutStyle.ComponentPlacement.RELATED;
+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.LayoutManager;
import java.awt.event.ActionEvent;
@@ -13,7 +13,6 @@
import java.util.Collection;

import javax.swing.AbstractAction;
-import javax.swing.GroupLayout;
import javax.swing.JComponent;
import javax.swing.JLabel;
import javax.swing.JList;
@@ -22,6 +21,8 @@
import javax.swing.JToolBar;
import javax.swing.SwingConstants;

+import org.jdesktop.layout.GroupLayout;
+
public class JDualListItemSelector<Type> extends JPanel {

private static final long serialVersionUID = 1L;
@@ -93,38 +94,38 @@
GroupLayout layout = new GroupLayout(this);
setLayout(layout);
layout.setHorizontalGroup(layout.createParallelGroup(LEADING)
- .addGroup(layout.createSequentialGroup()
+ .add(layout.createSequentialGroup()
.addContainerGap()
- .addGroup(layout.createParallelGroup(LEADING)
- .addComponent(availLabel)
- .addComponent(availItemsList, PREFERRED_SIZE, 150,
PREFERRED_SIZE)
+ .add(layout.createParallelGroup(LEADING)
+ .add(availLabel)
+ .add(availItemsList, PREFERRED_SIZE, 150, PREFERRED_SIZE)
)
.addPreferredGap(RELATED)
- .addComponent(controlls, PREFERRED_SIZE, PREFERRED_SIZE,
PREFERRED_SIZE)
+ .add(controlls, PREFERRED_SIZE, PREFERRED_SIZE,
PREFERRED_SIZE)
.addPreferredGap(RELATED)
- .addGroup(layout.createParallelGroup(LEADING)
- .addComponent(selectedLabel)
- .addComponent(selectedItemList,PREFERRED_SIZE, 150,
PREFERRED_SIZE)
+ .add(layout.createParallelGroup(LEADING)
+ .add(selectedLabel)
+ .add(selectedItemList,PREFERRED_SIZE, 150,
PREFERRED_SIZE)
)
.addContainerGap()
)
);
layout.setVerticalGroup(layout.createParallelGroup(LEADING)
- .addGroup(TRAILING, layout.createSequentialGroup()
- .addGroup(layout.createParallelGroup(TRAILING)
- .addGroup(layout.createSequentialGroup()
+ .add(TRAILING, layout.createSequentialGroup()
+ .add(layout.createParallelGroup(TRAILING)
+ .add(layout.createSequentialGroup()
.addContainerGap()
- .addComponent(controlls, DEFAULT_SIZE, DEFAULT_SIZE,
Short.MAX_VALUE)
+ .add(controlls, DEFAULT_SIZE, DEFAULT_SIZE,
Short.MAX_VALUE)
)
- .addGroup(layout.createSequentialGroup()
- .addGroup(layout.createParallelGroup(BASELINE)
- .addComponent(availLabel)
- .addComponent(selectedLabel)
+ .add(layout.createSequentialGroup()
+ .add(layout.createParallelGroup(BASELINE)
+ .add(availLabel)
+ .add(selectedLabel)
)
.addPreferredGap(RELATED)
- .addGroup(layout.createParallelGroup(LEADING)
- .addComponent(availItemsList, DEFAULT_SIZE,
DEFAULT_SIZE, Short.MAX_VALUE)
- .addComponent(selectedItemList, DEFAULT_SIZE,
DEFAULT_SIZE, Short.MAX_VALUE)
+ .add(layout.createParallelGroup(LEADING)
+ .add(availItemsList, DEFAULT_SIZE, DEFAULT_SIZE,
Short.MAX_VALUE)
+ .add(selectedItemList, DEFAULT_SIZE,
DEFAULT_SIZE, Short.MAX_VALUE)
)
)
)
@@ -150,7 +151,6 @@
}

@SuppressWarnings("unchecked")
- @Override
public void actionPerformed(ActionEvent e) {
Collection<Type> items = (Collection<Type>)
Arrays.asList(availibleItemsList.getSelectedValues());
selectedModel.addAll(items);
@@ -167,7 +167,6 @@
}

@SuppressWarnings("unchecked")
- @Override
public void actionPerformed(ActionEvent e) {
Collection<Type> items = (Collection<Type>)
Arrays.asList(selectedItemsList.getSelectedValues());
availModel.addAll(items);
@@ -183,7 +182,6 @@
super(">>");
}

- @Override
public void actionPerformed(ActionEvent e) {
Collection<Type> items = availModel.getAll();
selectedModel.addAll(items);
@@ -198,7 +196,6 @@
super("<<");
}

- @Override
public void actionPerformed(ActionEvent e) {
Collection<Type> items = selectedModel.getAll();
availModel.addAll(items);



  • perfsonar: r2852 - in branches/perfsonarui/src/org/perfsonar/perfsonarui: flowsa/components ui/panels, svnlog, 09/16/2007

Archive powered by MHonArc 2.6.16.

Top of Page