Change the ok button text to "Plot" or "Export" based on selected tab.
This commit is contained in:
parent
0bba32fb59
commit
3538a3ac9a
@ -387,6 +387,7 @@ simedtdlg.IntensityDesc.Veryhigh = Very high
|
||||
simedtdlg.IntensityDesc.Extreme = Extreme
|
||||
|
||||
SimulationEditDialog.btn.plot = Plot
|
||||
SimulationEditDialog.btn.export = Export
|
||||
SimulationEditDialog.btn.edit = Edit
|
||||
SimulationEditDialog.btn.simulateAndPlot = Simulate & Plot
|
||||
|
||||
@ -452,7 +453,6 @@ SimulationModifierTree.OptimizationParameters = Optimization Parameters
|
||||
! SimulationExportPanel
|
||||
SimExpPan.desc = Comma Separated Files (*.csv)
|
||||
SimExpPan.border.Vartoexport = Variables to export
|
||||
SimExpPan.border.Stage = Stage to export
|
||||
SimExpPan.but.Selectall = Select all
|
||||
SimExpPan.but.Selectnone = Select none
|
||||
SimExpPan.border.Fieldsep = Field separator
|
||||
|
@ -14,6 +14,8 @@ import javax.swing.JPanel;
|
||||
import javax.swing.JTabbedPane;
|
||||
import javax.swing.JTextField;
|
||||
import javax.swing.SwingUtilities;
|
||||
import javax.swing.event.ChangeEvent;
|
||||
import javax.swing.event.ChangeListener;
|
||||
import javax.swing.event.DocumentEvent;
|
||||
import javax.swing.event.DocumentListener;
|
||||
|
||||
@ -264,7 +266,25 @@ public class SimulationEditDialog extends JDialog {
|
||||
|
||||
plotExportPanel.add(button, "spanx, split 3, align left");
|
||||
|
||||
JButton ok = new JButton(trans.get("SimulationEditDialog.btn.plot"));
|
||||
final JButton ok = new JButton(trans.get("SimulationEditDialog.btn.plot"));
|
||||
|
||||
tabbedPane.addChangeListener(new ChangeListener() {
|
||||
|
||||
@Override
|
||||
public void stateChanged(ChangeEvent e) {
|
||||
int selectedIndex = tabbedPane.getSelectedIndex();
|
||||
switch (selectedIndex) {
|
||||
case 0:
|
||||
ok.setText(trans.get("SimulationEditDialog.btn.plot"));
|
||||
break;
|
||||
case 1:
|
||||
ok.setText(trans.get("SimulationEditDialog.btn.export"));
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
ok.addActionListener(new ActionListener() {
|
||||
@Override
|
||||
public void actionPerformed(ActionEvent e) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user