10
10
11
11
import java .awt .BorderLayout ;
12
12
import java .awt .Dimension ;
13
+ import java .awt .GridBagConstraints ;
14
+ import java .awt .GridBagLayout ;
13
15
import java .awt .Point ;
14
16
import java .awt .Rectangle ;
15
17
import java .awt .event .ActionEvent ;
@@ -114,7 +116,7 @@ public class SSAQueryBrowser
114
116
115
117
/** Initial window size and location */
116
118
private static final Rectangle defaultWindowLocation =
117
- new Rectangle ( 0 , 0 , 500 , 550 );
119
+ new Rectangle ( 0 , 0 , 600 , 650 );
118
120
119
121
/** The object holding the list of servers that we should use for SSA
120
122
* queries. */
@@ -370,8 +372,7 @@ private void initFrame()
370
372
{
371
373
setTitle ( Utilities .getTitle ( "Query VO for Spectra" ) );
372
374
setDefaultCloseOperation ( JFrame .HIDE_ON_CLOSE );
373
- setSize ( new Dimension ( 600 , 500 ) );
374
- Utilities .setFrameLocation ( this , defaultWindowLocation , prefs ,
375
+ Utilities .setFrameLocation ( this , defaultWindowLocation , prefs ,
375
376
"SSAQueryBrowser" );
376
377
setVisible ( true );
377
378
}
@@ -408,14 +409,14 @@ private void initQueryComponents()
408
409
// RA and Dec fields. We're free-formatting on these (decimal degrees
409
410
// not required).
410
411
JLabel raLabel = new JLabel ( "RA:" );
411
- raField = new JTextField ( 15 );
412
+ raField = new JTextField ( 30 );
412
413
layouter .add ( raLabel , false );
413
414
layouter .add ( raField , true );
414
415
raField .setToolTipText ( "Enter the RA of field centre, " +
415
416
"decimal degrees or hh:mm:ss.ss" );
416
417
417
418
JLabel decLabel = new JLabel ( "Dec:" );
418
- decField = new JTextField ( 15 );
419
+ decField = new JTextField ( 30 );
419
420
layouter .add ( decLabel , false );
420
421
layouter .add ( decField , true );
421
422
decField .setToolTipText ( "Enter the Dec of field centre, " +
@@ -434,9 +435,24 @@ private void initQueryComponents()
434
435
JLabel bandLabel = new JLabel ( "Band:" );
435
436
lowerBandField = new JTextField ( 15 );
436
437
upperBandField = new JTextField ( 15 );
438
+
439
+ JPanel bandPanel = new JPanel ( new GridBagLayout () );
440
+ GridBagConstraints gbc = new GridBagConstraints ();
441
+
442
+ gbc .weightx = 1.0 ;
443
+ gbc .fill = GridBagConstraints .HORIZONTAL ;
444
+ bandPanel .add ( lowerBandField , gbc );
445
+
446
+ gbc .weightx = 0.0 ;
447
+ gbc .fill = GridBagConstraints .NONE ;
448
+ bandPanel .add ( new JLabel ( "/" ), gbc );
449
+
450
+ gbc .weightx = 1.0 ;
451
+ gbc .fill = GridBagConstraints .HORIZONTAL ;
452
+ bandPanel .add ( upperBandField , gbc );
453
+
437
454
layouter .add ( bandLabel , false );
438
- layouter .add ( lowerBandField , false );
439
- layouter .add ( upperBandField , false );
455
+ layouter .add ( bandPanel , true );
440
456
lowerBandField .setToolTipText ( "Lower limit, or single include " +
441
457
"value, for spectral band, in meters" );
442
458
upperBandField .setToolTipText
@@ -446,10 +462,23 @@ private void initQueryComponents()
446
462
JLabel timeLabel = new JLabel ( "Time:" );
447
463
lowerTimeField = new JTextField ( 15 );
448
464
upperTimeField = new JTextField ( 15 );
465
+
466
+ JPanel timePanel = new JPanel ( new GridBagLayout () );
467
+
468
+ gbc .weightx = 1.0 ;
469
+ gbc .fill = GridBagConstraints .HORIZONTAL ;
470
+ timePanel .add ( lowerTimeField , gbc );
471
+
472
+ gbc .weightx = 0.0 ;
473
+ gbc .fill = GridBagConstraints .NONE ;
474
+ timePanel .add ( new JLabel ( "/" ), gbc );
475
+
476
+ gbc .weightx = 1.0 ;
477
+ gbc .fill = GridBagConstraints .HORIZONTAL ;
478
+ timePanel .add ( upperTimeField , gbc );
479
+
449
480
layouter .add ( timeLabel , false );
450
- layouter .add ( lowerTimeField , false );
451
- layouter .add ( upperTimeField , true );
452
- //layouter.eatLine();
481
+ layouter .add ( timePanel , true );
453
482
lowerTimeField .setToolTipText ( "Lower limit, or single include " +
454
483
"value for time coverage, " +
455
484
"ISO 8601 format " +
@@ -458,9 +487,6 @@ private void initQueryComponents()
458
487
"in ISO 8601 format " +
459
488
"(e.g 2008-10-15T20:48Z)" );
460
489
461
- // At Petr Skoda's request. FLUXCALIB and WAVECALIB.
462
-
463
-
464
490
// Do the search.
465
491
goButton = new JButton ( "Go" );
466
492
goButton .addActionListener ( this );
0 commit comments