Skip to content

Commit

Permalink
topcat: don't disable JLabels in upload xmatch window
Browse files Browse the repository at this point in the history
Cosmetic change.  Disabling the JLabels is pointless and silly,
I appear to do it in other components, but don't follow that usage here.
  • Loading branch information
mbtaylor authored and mmpcn committed Nov 27, 2014
1 parent 2ce4a22 commit 70bc748
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 23 deletions.
Expand Up @@ -38,7 +38,6 @@
*/
public class CdsTableSelector extends JPanel {

private final JLabel selectorLabel_;
private final JComboBox nameSelector_;
private final VizierMetaDownloader metaDownloader_;
private final MocDownloader mocDownloader_;
Expand Down Expand Up @@ -92,11 +91,10 @@ public void itemStateChanged( ItemEvent evt ) {
updateTableName();
}
} );
selectorLabel_ = new JLabel( "VizieR Table ID/Alias: " );

/* Selector line. */
JComponent selectorLine = Box.createHorizontalBox();
selectorLine.add( selectorLabel_ );
selectorLine.add( new JLabel( "VizieR Table ID/Alias: " ) );
selectorLine.add( nameSelector_ );
selectorLine.add( Box.createHorizontalStrut( 5 ) );
selectorLine.add( aliasDownloader_.createMonitorComponent() );
Expand Down Expand Up @@ -169,7 +167,6 @@ public MocCoverage getCoverage() {
public void setEnabled( boolean isEnabled ) {
super.setEnabled( isEnabled );
nameSelector_.setEnabled( isEnabled );
selectorLabel_.setEnabled( isEnabled );
}

/**
Expand Down
25 changes: 6 additions & 19 deletions topcat/src/main/uk/ac/starlink/topcat/join/UploadMatchPanel.java
Expand Up @@ -133,11 +133,9 @@ public void itemStateChanged( ItemEvent evt ) {
setInputTable( (TopcatModel) tableSelector.getSelectedItem() );
}
} );
JLabel tableLabel = new JLabel( "Input Table: " );
cList.add( tableLabel );
cList.add( tableSelector );
Box tableLine = Box.createHorizontalBox();
tableLine.add( tableLabel );
tableLine.add( new JLabel( "Input Table: " ) );
tableLine.add( new ShrinkWrapper( tableSelector ) );
tableLine.add( Box.createHorizontalGlue() );
localBox.add( tableLine );
Expand All @@ -147,23 +145,19 @@ public void itemStateChanged( ItemEvent evt ) {
raSelector_ = new ColumnSelector( Tables.RA_INFO, true );
Box raLine = Box.createHorizontalBox();
raLine.add( raSelector_ );
JLabel raSysLabel = new JLabel( " (J2000)" );
raLine.add( raSysLabel );
raLine.add( new JLabel( " (J2000)" ) );
raLine.add( Box.createHorizontalGlue() );
localBox.add( raLine );
localBox.add( Box.createVerticalStrut( 5 ) );
cList.add( raSelector_ );
cList.add( raSysLabel );
decSelector_ = new ColumnSelector( Tables.DEC_INFO, true );
Box decLine = Box.createHorizontalBox();
decLine.add( decSelector_ );
JLabel decSysLabel = new JLabel( " (J2000)" );
decLine.add( decSysLabel );
decLine.add( new JLabel( " (J2000)" ) );
decLine.add( Box.createHorizontalGlue() );
localBox.add( decLine );
localBox.add( Box.createVerticalStrut( 5 ) );
cList.add( decSelector_ );
cList.add( decSysLabel );
TopcatUtils.alignComponents( new JComponent[] {
raSelector_.getLabel(),
decSelector_.getLabel(),
Expand Down Expand Up @@ -191,17 +185,14 @@ public void itemStateChanged( ItemEvent evt ) {
paramBox.add( srLine );
paramBox.add( Box.createVerticalStrut( 5 ) );
cList.add( srField_.getEntryField() );
cList.add( srField_.getLabel() );
cList.add( srField_.getConverterSelector() );

/* Find mode selector. */
Box modeLine = Box.createHorizontalBox();
modeSelector_ = new JComboBox( UploadFindMode.getInstances() );
JLabel modeLabel = new JLabel( "Find mode: " );
modeLine.add( modeLabel );
modeLine.add( new JLabel( "Find mode: " ) );
modeLine.add( new ShrinkWrapper( modeSelector_ ) );
modeLine.add( Box.createHorizontalGlue() );
cList.add( modeLabel );
cList.add( modeSelector_ );
paramBox.add( modeLine );
paramBox.add( Box.createVerticalStrut( 5 ) );
Expand All @@ -210,11 +201,9 @@ public void itemStateChanged( ItemEvent evt ) {
Box fixLine = Box.createHorizontalBox();
fixSelector_ = new JoinFixSelector();
fixSelector_.getSuffixField().setText( "_x" );
JLabel fixLabel = new JLabel( "Rename columns: " );
fixLine.add( fixLabel );
fixLine.add( new JLabel( "Rename columns: " ) );
fixLine.add( fixSelector_ );
fixLine.add( Box.createHorizontalGlue() );
cList.add( fixLabel );
cList.add( fixSelector_ );
paramBox.add( fixLine );
paramBox.add( Box.createVerticalStrut( 5 ) );
Expand All @@ -227,13 +216,11 @@ public void itemStateChanged( ItemEvent evt ) {
}
blockSelector_.setSelectedItem( Integer.toString( DEFAULT_BLOCKSIZE ) );
blockSelector_.setEditable( true );
JLabel blockLabel = new JLabel( "Block size: " );
blockLine.add( blockLabel );
blockLine.add( new JLabel( "Block size: " ) );
blockLine.add( new ShrinkWrapper( blockSelector_ ) );
blockLine.add( Box.createHorizontalStrut( 5 ) );
blockLine.add( new ComboBoxBumper( blockSelector_ ) );
blockLine.add( Box.createHorizontalGlue() );
cList.add( blockLabel );
cList.add( blockSelector_ );
paramBox.add( blockLine );

Expand Down

0 comments on commit 70bc748

Please sign in to comment.