Last change
on this file since 346 was 1, checked in by Wouter Pasman, 6 years ago |
Initial import : Genius 9.0.0
|
File size:
1.0 KB
|
Rev | Line | |
---|
[1] | 1 | package genius.gui.tournamentvars;
|
---|
| 2 |
|
---|
| 3 | import java.awt.Panel;
|
---|
| 4 | import java.awt.Frame;
|
---|
| 5 | import java.awt.BorderLayout;
|
---|
| 6 | import javax.swing.JTextField;
|
---|
| 7 |
|
---|
| 8 | import genius.gui.panels.DefaultOKCancelDialog;
|
---|
| 9 |
|
---|
| 10 | import javax.swing.JLabel;
|
---|
| 11 | /**
|
---|
| 12 | * this shows a dialog where the user can enter the parameter values
|
---|
| 13 | * These should be comma-separated doubles.
|
---|
| 14 | * @author wouter
|
---|
| 15 | *
|
---|
| 16 | */
|
---|
| 17 |
|
---|
| 18 | public class ParameterValueUI extends DefaultOKCancelDialog {
|
---|
| 19 |
|
---|
| 20 | private static final long serialVersionUID = -5857332044292237979L;
|
---|
| 21 | Panel panel;
|
---|
| 22 | JTextField values;
|
---|
| 23 |
|
---|
| 24 | ParameterValueUI(Frame owner,String paraname,String initialvalue) throws Exception {
|
---|
| 25 | super(owner, "Value(s) of parameter "+paraname+" editor");
|
---|
| 26 | panel=new Panel(new BorderLayout());
|
---|
| 27 | JLabel label=new JLabel("Please enter a comma-separated list of doubles as possible values for parameter "+paraname);
|
---|
| 28 | values=new JTextField(initialvalue);
|
---|
| 29 | panel.add(label,BorderLayout.NORTH);
|
---|
| 30 | panel.add(values,BorderLayout.CENTER);
|
---|
| 31 | }
|
---|
| 32 |
|
---|
| 33 | public Panel getPanel() {
|
---|
| 34 | return panel;
|
---|
| 35 | }
|
---|
| 36 |
|
---|
| 37 | public Object ok() {
|
---|
| 38 | return values.getText();
|
---|
| 39 | }
|
---|
| 40 | } |
---|
Note:
See
TracBrowser
for help on using the repository browser.