82
65
private JCheckBox rightUseConstant;
83
66
private JComboBox rightConstantsComboBox;
85
private JLabel colorGuardLabel;
86
private JTextField colorGuardTextBox;
87
private JLabel colorExampleLabel;
88
private JTextField lowerScaleTextbox;
89
private JTextField lowerOffsetTextbox;
90
private JTextField upperScaleTextbox;
91
private JTextField upperOffsetTextbox;
93
public GuardDialogue (JRootPane rootPane, PetriNetObject objectToBeEdited){
68
public GuardDialogue(JRootPane rootPane, PetriNetObject objectToBeEdited) {
94
69
myRootPane = rootPane;
95
70
setLayout(new GridBagLayout());
97
72
initTimeGuardPanel();
99
if(CreateGui.getModel().isUsingColors()){
100
initColorGuardPanel();
101
if(objectToBeEdited instanceof TransportArc){
102
initTransportArcFeaturesPanel();
103
TransportArc arc = (TransportArc)objectToBeEdited;
104
if(arc.getConnectedTo() != null && arc.getSource() instanceof TAPNTransition){
105
objectToBeEdited = arc.getConnectedTo();
109
73
initButtonPanel(objectToBeEdited);
111
75
myRootPane.setDefaultButton(okButton);
113
if(CreateGui.getModel().isUsingColors()){
114
setColoredInitialState((TimedArc)objectToBeEdited);
116
setNoncoloredInitialState((TimedArc)objectToBeEdited);
120
private void setColoredInitialState(TimedArc timedArc) {
121
ColoredInterval timeGuard = null;
123
if(timedArc instanceof ColoredInputArc){
124
timeGuard = ((ColoredInputArc)timedArc).getTimeGuard();
125
}else if(timedArc instanceof ColoredTransportArc){
126
timeGuard = ((ColoredTransportArc)timedArc).getTimeGuard();
127
}else if(timedArc instanceof ColoredInhibitorArc){
128
timeGuard = ((ColoredInhibitorArc)timedArc).getTimeGuard();
131
leftDelimiter.setSelectedItem(timeGuard.getOpenParenthesis());
132
rightDelimiter.setSelectedItem(timeGuard.getCloseParenthesis());
134
IntervalBound lower = timeGuard.getLower();
135
lowerScaleTextbox.setText(lower.getScale().toString());
136
lowerOffsetTextbox.setText(lower.getOffset().toString());
138
inf.setSelected(timeGuard.goesToInfinity());
139
if(timeGuard.goesToInfinity()){
140
upperScaleTextbox.setText("0");
141
upperScaleTextbox.setEnabled(false);
142
upperOffsetTextbox.setText("0");
143
upperOffsetTextbox.setEnabled(false);
144
rightDelimiter.setEnabled(false);
147
IntervalBound upper = timeGuard.getUpper();
148
upperScaleTextbox.setText(upper.getScale().toString());
149
upperOffsetTextbox.setText(upper.getOffset().toString());
153
if(timedArc instanceof ColoredInputArc){
154
guard = ((ColoredInputArc)timedArc).getColorGuardStringWithoutSetNotation();
155
}else if(timedArc instanceof ColoredTransportArc){
156
guard = ((ColoredTransportArc)timedArc).getColorGuardStringWithoutSetNotation();
157
}else if(timedArc instanceof ColoredInhibitorArc){
158
guard = ((ColoredInhibitorArc)timedArc).getColorGuardStringWithoutSetNotation();
161
colorGuardTextBox.setText(guard);
163
if(timedArc instanceof ColoredTransportArc){
164
Preserve preserves = ((ColoredTransportArc)timedArc).getPreservation();
166
if(preserves.equals(Preserve.Age)){
167
preserveAgeRadioBtn.setSelected(true);
168
updateExprTextbox.setEnabled(true);
169
}else if(preserves.equals(Preserve.Value)){
170
preserveValueRadioBtn.setSelected(true);
172
preserveBothRadioBtn.setSelected(true);
175
updateExprTextbox.setText(((ColoredTransportArc)timedArc).getOutputValue().toString());
179
private void initTransportArcFeaturesPanel(){
180
transportArcFeaturesPanel = new JPanel(new GridBagLayout());
181
transportArcFeaturesPanel.setBorder(BorderFactory.createTitledBorder("Transport Arc Features"));
183
ActionListener listener = new ActionListener(){
185
public void actionPerformed(ActionEvent e) {
186
if(preserveAgeRadioBtn.isSelected()){
187
updateExprTextbox.setEnabled(true);
189
updateExprTextbox.setEnabled(false);
194
preserveBothRadioBtn = new JRadioButton("Preserve age and value");
195
preserveBothRadioBtn.addActionListener(listener);
196
GridBagConstraints gridBagConstraints = new GridBagConstraints();
197
gridBagConstraints.gridx = 0;
198
gridBagConstraints.gridy = 0;
199
gridBagConstraints.insets = new Insets(3, 3, 3, 3);
200
transportArcFeaturesPanel.add(preserveBothRadioBtn, gridBagConstraints);
202
preserveAgeRadioBtn = new JRadioButton("Preserve age");
203
preserveAgeRadioBtn.addActionListener(listener);
204
gridBagConstraints = new GridBagConstraints();
205
gridBagConstraints.gridx = 1;
206
gridBagConstraints.gridy = 0;
207
gridBagConstraints.insets = new Insets(3, 3, 3, 3);
208
transportArcFeaturesPanel.add(preserveAgeRadioBtn, gridBagConstraints);
210
preserveValueRadioBtn = new JRadioButton("Preserve value");
211
preserveValueRadioBtn.addActionListener(listener);
212
gridBagConstraints = new GridBagConstraints();
213
gridBagConstraints.gridx = 2;
214
gridBagConstraints.gridy = 0;
215
gridBagConstraints.insets = new Insets(3, 3, 3, 3);
216
transportArcFeaturesPanel.add(preserveValueRadioBtn, gridBagConstraints);
218
ButtonGroup btnGroup = new ButtonGroup();
219
btnGroup.add(preserveBothRadioBtn);
220
btnGroup.add(preserveAgeRadioBtn);
221
btnGroup.add(preserveValueRadioBtn);
223
updateExprLabel = new JLabel("Update value:");
224
gridBagConstraints = new GridBagConstraints();
225
gridBagConstraints.gridx = 0;
226
gridBagConstraints.gridy = 1;
227
gridBagConstraints.anchor = GridBagConstraints.EAST;
228
gridBagConstraints.insets = new Insets(3, 3, 3, 3);
229
transportArcFeaturesPanel.add(updateExprLabel, gridBagConstraints);
231
updateExprTextbox = new JTextField();
232
updateExprTextbox.setEnabled(false);
233
Dimension intervalBoxDims = new Dimension(90,25);
234
updateExprTextbox.setMaximumSize(intervalBoxDims);
235
updateExprTextbox.setMinimumSize(intervalBoxDims);
236
updateExprTextbox.setPreferredSize(intervalBoxDims);
237
gridBagConstraints = new GridBagConstraints();
238
gridBagConstraints.gridx = 1;
239
gridBagConstraints.gridy = 1;
240
gridBagConstraints.insets = new Insets(3, 3, 3, 3);
241
transportArcFeaturesPanel.add(updateExprTextbox, gridBagConstraints);
243
gridBagConstraints = new GridBagConstraints();
244
gridBagConstraints.gridx = 0;
245
gridBagConstraints.gridy = 2;
246
gridBagConstraints.insets = new Insets(0, 5, 5, 5);
247
gridBagConstraints.anchor = GridBagConstraints.WEST;
248
gridBagConstraints.fill = GridBagConstraints.HORIZONTAL;
249
add(transportArcFeaturesPanel, gridBagConstraints);
252
private void initColorGuardPanel() {
253
colorGuardPanel = new JPanel(new GridBagLayout());
254
colorGuardPanel.setBorder(BorderFactory.createTitledBorder("Color Guard"));
256
colorGuardLabel = new JLabel("Color Guard:");
257
GridBagConstraints gridBagConstraints = new GridBagConstraints();
258
gridBagConstraints.gridx = 0;
259
gridBagConstraints.gridy = 0;
260
gridBagConstraints.insets = new Insets(3, 3, 3, 3);
261
colorGuardPanel.add(colorGuardLabel, gridBagConstraints);
263
colorGuardTextBox = new JTextField();
264
gridBagConstraints = new GridBagConstraints();
265
gridBagConstraints.gridx = 1;
266
gridBagConstraints.gridy = 0;
267
gridBagConstraints.anchor=GridBagConstraints.WEST;
268
gridBagConstraints.fill = GridBagConstraints.HORIZONTAL;
269
gridBagConstraints.weightx = 1.0;
270
gridBagConstraints.insets = new Insets(3, 3, 3, 3);
271
colorGuardPanel.add(colorGuardTextBox, gridBagConstraints);
273
colorExampleLabel = new JLabel("Example: 1, 3, 4-6, 8, 12-");
274
gridBagConstraints = new GridBagConstraints();
275
gridBagConstraints.gridx = 1;
276
gridBagConstraints.gridy = 1;
277
gridBagConstraints.insets = new Insets(3, 3, 3, 3);
278
gridBagConstraints.anchor = GridBagConstraints.WEST;
279
colorGuardPanel.add(colorExampleLabel, gridBagConstraints);
281
gridBagConstraints = new GridBagConstraints();
282
gridBagConstraints.gridx = 0;
283
gridBagConstraints.gridy = 1;
284
gridBagConstraints.insets = new Insets(0, 5, 5, 5);
285
gridBagConstraints.anchor = GridBagConstraints.WEST;
286
gridBagConstraints.fill = GridBagConstraints.HORIZONTAL;
287
add(colorGuardPanel, gridBagConstraints);
77
setNoncoloredInitialState((TimedInputArcComponent) objectToBeEdited);
292
81
private void initButtonPanel(final PetriNetObject objectToBeEdited) {
293
buttonPanel = new JPanel(new GridBagLayout());
82
buttonPanel = new JPanel(new GridBagLayout());
295
84
okButton = new JButton("OK");
296
85
cancelButton = new JButton("Cancel");
297
okButton.addActionListener(
298
new ActionListener() {
299
public void actionPerformed(ActionEvent evt) {
300
TimedArc arc = (TimedArc) objectToBeEdited;
301
UndoManager undoManager = CreateGui.getView().getUndoManager();
302
undoManager.newEdit();
304
if(!CreateGui.getModel().isUsingColors()){
305
String guard = composeGuard(arc.getGuard());
306
undoManager.addEdit( arc.setGuard(guard) );
308
ColoredInterval timeGuard = null;
311
timeGuard = composeTimeGuard();
312
}catch(IllegalArgumentException e){
313
JOptionPane.showMessageDialog(CreateGui.getApp(),
314
String.format("There was an error parsing the time interval. The problem concerns \"%1s\".\n Possible causes:\n\t- Use of negative values\n\t- Use of undefined constant",e.getMessage()),
316
JOptionPane.INFORMATION_MESSAGE);
321
UndoableEdit action = null;
322
if(arc instanceof ColoredTransportArc){
323
action = ((ColoredTransportArc)arc).setTimeGuard(timeGuard);
324
}else if(arc instanceof ColoredInhibitorArc){
325
action = ((ColoredInhibitorArc)arc).setTimeGuard(timeGuard);
327
action = ((ColoredInputArc)arc).setTimeGuard(timeGuard);
329
undoManager.addEdit(action);
331
ColorSet colorGuard = null;
332
if(colorGuardTextBox.getText().isEmpty()){
333
colorGuard = new ColorSet();
336
colorGuard = createColorGuard();
337
}catch(IllegalArgumentException e){
338
JOptionPane.showMessageDialog(CreateGui.getApp(),
339
String.format("There was an error in parsing the color invariant. The problem concerns \"%1s\".",e.getMessage()),
341
JOptionPane.INFORMATION_MESSAGE);
348
if(arc instanceof ColoredTransportArc){
349
action = ((ColoredTransportArc)arc).setColorGuard(colorGuard);
350
}else if(arc instanceof ColoredInhibitorArc){
351
action = ((ColoredInhibitorArc)arc).setColorGuard(colorGuard);
353
action = ((ColoredInputArc)arc).setColorGuard(colorGuard);
356
undoManager.addEdit(action);
358
if(arc instanceof ColoredTransportArc){
359
ColoredTransportArc tarc = (ColoredTransportArc)arc;
361
Preserve preserve = getPreservation();
362
UndoableEdit preserveEdit = tarc.setPreservation(preserve);
363
undoManager.addEdit(preserveEdit);
365
ColoredTransportArc connectedTo = (ColoredTransportArc)tarc.getConnectedTo();
366
UndoableEdit preserveEditConnectedTo = connectedTo.setPreservation(preserve);
367
undoManager.addEdit(preserveEditConnectedTo);
369
IntOrConstant outputValue = null;
371
outputValue = new IntOrConstant(updateExprTextbox.getText());
372
}catch(IllegalArgumentException e){
373
JOptionPane.showMessageDialog(CreateGui.getApp(),
374
"The update value is invalid.\n\nPossible causes:\n\t- Use of negative values\n\t- Use of undefined constant\n\t- Use of non-constant expression.",
376
JOptionPane.INFORMATION_MESSAGE);
380
UndoableEdit outputEdit = tarc.setOutputValue(outputValue);
381
undoManager.addEdit(outputEdit);
383
connectedTo = (ColoredTransportArc)tarc.getConnectedTo();
384
UndoableEdit outputEditConnectedTo = connectedTo.setOutputValue(outputValue);
385
undoManager.addEdit(outputEditConnectedTo);
388
CreateGui.getModel().buildConstraints();
394
private ColoredInterval composeTimeGuard() {
395
String openParenthesis = (String)leftDelimiter.getSelectedItem();
396
String closeParenthesis = (String)rightDelimiter.getSelectedItem();
398
IntOrConstant lowerScale = new IntOrConstant(lowerScaleTextbox.getText());
399
IntOrConstant lowerOffset = new IntOrConstant(lowerOffsetTextbox.getText());
400
IntervalBound a = new IntervalBound(lowerScale, lowerOffset);
401
boolean goesToInf = inf.isSelected();
403
IntervalBound b = null;
405
b = new IntervalBound(true);
407
IntOrConstant upperScale = new IntOrConstant(upperScaleTextbox.getText());
408
IntOrConstant upperOffset = new IntOrConstant(upperOffsetTextbox.getText());
410
b = new IntervalBound(upperScale, upperOffset);
413
return new ColoredInterval(openParenthesis, a, b, closeParenthesis);
417
private Preserve getPreservation() {
418
if(preserveAgeRadioBtn.isSelected()){
420
}else if(preserveValueRadioBtn.isSelected()){
421
return Preserve.Value;
423
return Preserve.AgeAndValue;
428
private ColorSet createColorGuard() {
429
ColorSet colorSet = new ColorSet();
430
String[] ranges = colorGuardTextBox.getText().split(",");
431
for(String range : ranges){
433
IntOrConstantRange ir = IntOrConstantRange.parse(range.trim());
435
}catch(IllegalArgumentException e){
436
throw new IllegalArgumentException(range, e);
443
private String composeGuard(String oldGuard) {
444
boolean useConstantLeft = leftUseConstant.isSelected();
445
boolean useConstantRight = rightUseConstant.isSelected();
447
String leftDelim = leftDelimiter.getSelectedItem().toString();
448
String rightDelim = rightDelimiter.getSelectedItem().toString();
449
String leftInterval = null;
450
String rightInterval = null;
453
leftInterval = leftConstantsComboBox.getSelectedItem().toString();
455
leftInterval = firstIntervalNumber.getValue().toString();
458
rightInterval = rightConstantsComboBox.getSelectedItem().toString();
459
else if ( inf.isSelected())
460
rightInterval = "inf";
462
rightInterval = secondIntervalNumber.getValue().toString();
464
if (TimedArc.validateTimeInterval(leftDelim, leftInterval, rightInterval, rightDelim)){
465
//XXX send error messsage
466
return leftDelim + leftInterval + "," + rightInterval + rightDelim;
473
cancelButton.addActionListener(
474
new ActionListener() {
475
public void actionPerformed(ActionEvent evt) {
481
GridBagConstraints gridBagConstraints = new GridBagConstraints();
86
okButton.addActionListener(new ActionListener() {
87
public void actionPerformed(ActionEvent evt) {
88
TimedInputArcComponent arc = (TimedInputArcComponent) objectToBeEdited;
89
UndoManager undoManager = CreateGui.getView().getUndoManager();
90
undoManager.newEdit();
92
dk.aau.cs.model.tapn.TimeInterval guard = composeGuard(arc.getGuard());
93
undoManager.addEdit(arc.setGuard(guard));
94
CreateGui.getCurrentTab().network().buildConstraints();
99
private dk.aau.cs.model.tapn.TimeInterval composeGuard(
100
dk.aau.cs.model.tapn.TimeInterval oldGuard) {
101
boolean useConstantLeft = leftUseConstant.isSelected();
102
boolean useConstantRight = rightUseConstant.isSelected();
104
String leftDelim = leftDelimiter.getSelectedItem().toString();
105
String rightDelim = rightDelimiter.getSelectedItem().toString();
106
Bound leftInterval = null;
107
Bound rightInterval = null;
109
if (useConstantLeft) {
110
String constantName = leftConstantsComboBox
111
.getSelectedItem().toString();
112
leftInterval = new ConstantBound(CreateGui.getCurrentTab()
113
.network().getConstant(constantName));
115
leftInterval = new IntBound((Integer) firstIntervalNumber
118
if (useConstantRight) {
119
String constantName = rightConstantsComboBox
120
.getSelectedItem().toString();
121
rightInterval = new ConstantBound(CreateGui.getCurrentTab()
122
.network().getConstant(constantName));
123
} else if (inf.isSelected())
124
rightInterval = Bound.Infinity;
126
rightInterval = new IntBound((Integer) secondIntervalNumber
129
if (rightInterval instanceof InfBound
130
|| leftInterval.value() <= rightInterval.value()) {
131
return new dk.aau.cs.model.tapn.TimeInterval(
132
(leftDelim == "[" ? true : false), leftInterval,
133
rightInterval, (rightDelim == "]" ? true : false));
139
cancelButton.addActionListener(new ActionListener() {
140
public void actionPerformed(ActionEvent evt) {
145
GridBagConstraints gridBagConstraints = new GridBagConstraints();
482
146
gridBagConstraints.gridx = 0;
483
147
gridBagConstraints.gridy = 0;
484
148
gridBagConstraints.anchor = GridBagConstraints.EAST;
485
buttonPanel.add(okButton,gridBagConstraints);
149
buttonPanel.add(okButton, gridBagConstraints);
487
151
gridBagConstraints = new GridBagConstraints();
488
152
gridBagConstraints.gridwidth = 2;
489
153
gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
490
154
gridBagConstraints.insets = new Insets(0, 0, 0, 0);
491
buttonPanel.add(cancelButton,gridBagConstraints);
155
buttonPanel.add(cancelButton, gridBagConstraints);
493
157
gridBagConstraints = new GridBagConstraints();
494
158
gridBagConstraints.gridx = 0;
535
197
guardEditPanel.add(rightDelimiter, gridBagConstraints);
537
199
inf = new JCheckBox("inf", true);
538
inf.addActionListener(
539
new ActionListener(){
540
public void actionPerformed(ActionEvent evt){
541
if(!CreateGui.getModel().isUsingColors()){
542
if (inf.isSelected() ){
543
secondIntervalNumber.setEnabled(false);
544
rightDelimiter.setEnabled(false);
546
secondIntervalNumber.setEnabled(true);
547
rightDelimiter.setEnabled(true);
549
setDelimiterModels();
551
if(inf.isSelected()){
552
upperOffsetTextbox.setEnabled(false);
553
upperScaleTextbox.setEnabled(false);
554
rightDelimiter.setEnabled(false);
555
rightDelimiter.setSelectedItem(")");
557
upperOffsetTextbox.setEnabled(true);
558
upperScaleTextbox.setEnabled(true);
559
rightDelimiter.setEnabled(true);
560
rightDelimiter.setSelectedItem("]");
200
inf.addActionListener(new ActionListener() {
201
public void actionPerformed(ActionEvent evt) {
202
if (inf.isSelected()) {
203
secondIntervalNumber.setEnabled(false);
204
rightDelimiter.setEnabled(false);
206
secondIntervalNumber.setEnabled(true);
207
rightDelimiter.setEnabled(true);
209
setDelimiterModels();
566
212
gridBagConstraints.gridx = 6;
567
213
gridBagConstraints.gridy = 1;
568
214
guardEditPanel.add(inf, gridBagConstraints);
570
if(CreateGui.getModel().isUsingColors()){
571
initColoredTimeIntervalControls();
573
initNonColoredTimeIntervalControls();
216
initNonColoredTimeIntervalControls();
576
218
gridBagConstraints = new GridBagConstraints();
577
219
gridBagConstraints.gridx = 0;
578
220
gridBagConstraints.gridy = 0;
579
gridBagConstraints.insets = new Insets(5,5,0,5);
221
gridBagConstraints.insets = new Insets(5, 5, 0, 5);
580
222
gridBagConstraints.anchor = GridBagConstraints.WEST;
581
223
gridBagConstraints.fill = GridBagConstraints.HORIZONTAL;
582
224
add(guardEditPanel, gridBagConstraints);
585
private void initColoredTimeIntervalControls() {
586
JPanel lowerPanel = new JPanel(new GridBagLayout());
587
Dimension txtBoxDims = new Dimension(90,25);
589
lowerScaleTextbox = new JTextField();
590
lowerScaleTextbox.setMinimumSize(txtBoxDims);
591
lowerScaleTextbox.setMaximumSize(txtBoxDims);
592
lowerScaleTextbox.setPreferredSize(txtBoxDims);
593
GridBagConstraints gbc = new GridBagConstraints();
594
gbc.insets = new Insets(3,3,3,3);
597
gbc.anchor = GridBagConstraints.CENTER;
598
lowerPanel.add(lowerScaleTextbox, gbc);
600
String mathExprString = "* val +";
601
JLabel label = new JLabel(mathExprString);
602
gbc = new GridBagConstraints();
603
gbc.insets = new Insets(0,0,0,0);
606
gbc.anchor = GridBagConstraints.CENTER;
607
lowerPanel.add(label, gbc);
609
lowerOffsetTextbox = new JTextField();
610
lowerOffsetTextbox.setMinimumSize(txtBoxDims);
611
lowerOffsetTextbox.setMaximumSize(txtBoxDims);
612
lowerOffsetTextbox.setPreferredSize(txtBoxDims);
613
gbc = new GridBagConstraints();
614
gbc.insets = new Insets(3,3,3,3);
617
gbc.anchor = GridBagConstraints.CENTER;
618
lowerPanel.add(lowerOffsetTextbox, gbc);
620
gbc = new GridBagConstraints();
621
gbc.insets = new Insets(0,0,0,0);
624
guardEditPanel.add(new JLabel(" , "), gbc);
626
JPanel upperPanel = new JPanel(new GridBagLayout());
628
upperScaleTextbox = new JTextField();
629
upperScaleTextbox.setMinimumSize(txtBoxDims);
630
upperScaleTextbox.setMaximumSize(txtBoxDims);
631
upperScaleTextbox.setPreferredSize(txtBoxDims);
632
gbc = new GridBagConstraints();
633
gbc.insets = new Insets(3,3,3,3);
636
gbc.anchor = GridBagConstraints.CENTER;
637
upperPanel.add(upperScaleTextbox, gbc);
639
label = new JLabel(mathExprString);
640
gbc = new GridBagConstraints();
641
gbc.insets = new Insets(3,3,3,3);
644
gbc.anchor = GridBagConstraints.CENTER;
645
upperPanel.add(label, gbc);
647
upperOffsetTextbox = new JTextField();
648
upperOffsetTextbox.setMinimumSize(txtBoxDims);
649
upperOffsetTextbox.setMaximumSize(txtBoxDims);
650
upperOffsetTextbox.setPreferredSize(txtBoxDims);
651
gbc = new GridBagConstraints();
652
gbc.insets = new Insets(3,3,3,3);
655
gbc.anchor = GridBagConstraints.CENTER;
656
upperPanel.add(upperOffsetTextbox, gbc);
658
gbc = new GridBagConstraints();
659
gbc.insets = new Insets(3,3,3,3);
662
gbc.anchor = GridBagConstraints.CENTER;
663
gbc.insets = new Insets(3,3,3,3);
664
guardEditPanel.add(upperPanel, gbc);
666
gbc = new GridBagConstraints();
667
gbc.insets = new Insets(3,3,3,3);
670
gbc.anchor = GridBagConstraints.CENTER;
671
gbc.insets = new Insets(3,3,3,3);
672
guardEditPanel.add(lowerPanel, gbc);
675
227
private void initNonColoredTimeIntervalControls() {
676
Dimension intervalBoxDims = new Dimension(120,25);
229
Dimension intervalBoxDims = new Dimension(90, 25);
677
231
firstIntervalNumber = new JSpinner();
678
232
firstIntervalNumber.setMaximumSize(intervalBoxDims);
679
233
firstIntervalNumber.setMinimumSize(intervalBoxDims);