// The ETOPO resolution selector
JPanel resPanel = PaletteHelper.createPaletteJPanel("Lat/Lon Spacing");
String[] resStrings = { "2 Minute", "5 Minute", "10 Minute",
"15 Minute" }; // ep-g
JComboBox resList = new JComboBox(resStrings);
resList.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
JComboBox jcb = (JComboBox) e.getSource();
int newRes = jcb.getSelectedIndex();
int curRes = minuteSpacing / 5; // ep-g
if (curRes != newRes)
spacingReset = true;
switch (newRes) {
case 0:
minuteSpacing = 2;
break; // ep-g
case 1:
minuteSpacing = 5;
break; // ep-g
case 2:
minuteSpacing = 10;
break; // ep-g
case 3:
minuteSpacing = 15;
break; // ep-g
}
}
});
resList.setSelectedIndex(minuteSpacing / 5); // ep-g
resPanel.add(resList);
// The ETOPO view selector
JPanel viewPanel = PaletteHelper.createPaletteJPanel("View Type");
String[] viewStrings = { "Grayscale Shading", "Color Shading" };
JComboBox viewList = new JComboBox(viewStrings);
viewList.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
JComboBox jcb = (JComboBox) e.getSource();
int newView = jcb.getSelectedIndex();
if (newView != viewType)
slopeReset = true;
switch (newView) {
case 0:
viewType = SLOPESHADING;