Last change
on this file since 346 was 127, checked in by Wouter Pasman, 6 years ago |
#41 ROLL BACK of rev.126 . So this version is equal to rev. 125
|
File size:
867 bytes
|
Line | |
---|
1 | package genius.gui.tournamentvars;
|
---|
2 |
|
---|
3 | import java.awt.Frame;
|
---|
4 | import java.awt.Panel;
|
---|
5 | import javax.swing.BoxLayout;
|
---|
6 | import javax.swing.JTextField;
|
---|
7 |
|
---|
8 | import genius.core.tournament.VariablesAndValues.TotalSessionNumberValue;
|
---|
9 | import genius.gui.panels.DefaultOKCancelDialog;
|
---|
10 |
|
---|
11 | public class SingleValueVarUI extends DefaultOKCancelDialog {
|
---|
12 |
|
---|
13 | private static final long serialVersionUID = -2316094573538048269L;
|
---|
14 | private JTextField textField;
|
---|
15 |
|
---|
16 | public SingleValueVarUI(Frame frame) {
|
---|
17 | super(frame, "Number of sessions");
|
---|
18 | }
|
---|
19 |
|
---|
20 | @Override
|
---|
21 | public Panel getPanel() {
|
---|
22 | textField = new JTextField();
|
---|
23 | Panel panel = new Panel();
|
---|
24 | panel.setLayout(new BoxLayout(panel,BoxLayout.Y_AXIS));
|
---|
25 | panel.add(textField);
|
---|
26 | return panel;
|
---|
27 |
|
---|
28 | }
|
---|
29 |
|
---|
30 | @Override
|
---|
31 | public Object ok() {
|
---|
32 | return new TotalSessionNumberValue(Integer.valueOf(textField.getText()));
|
---|
33 | }
|
---|
34 |
|
---|
35 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.