Reorder the zoom buttons. Added zoom reset icon and button. Fixed
spacer in SimulationPlotDialog so close button is always properly located.
This commit is contained in:
parent
e6fe93c2ac
commit
6a073af40b
BIN
core/resources/pix/icons/zoom-reset.png
Normal file
BIN
core/resources/pix/icons/zoom-reset.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 793 B |
@ -69,22 +69,8 @@ public class SimulationPlotDialog extends JDialog {
|
||||
});
|
||||
panel.add(check, "split, left");
|
||||
|
||||
//// Zoom out button
|
||||
JButton button = new JButton(Icons.ZOOM_OUT);
|
||||
button.addActionListener(new ActionListener() {
|
||||
@Override
|
||||
public void actionPerformed(ActionEvent e) {
|
||||
if ( (e.getModifiers() & InputEvent.ALT_MASK) == InputEvent.ALT_MASK ) {
|
||||
chartPanel.actionPerformed( new ActionEvent( chartPanel, ActionEvent.ACTION_FIRST, ChartPanel.ZOOM_OUT_DOMAIN_COMMAND));
|
||||
} else {
|
||||
chartPanel.actionPerformed( new ActionEvent( chartPanel, ActionEvent.ACTION_FIRST, ChartPanel.ZOOM_OUT_BOTH_COMMAND));
|
||||
}
|
||||
}
|
||||
});
|
||||
panel.add(button, "gapleft rel");
|
||||
|
||||
//// Zoom in button
|
||||
button = new JButton(Icons.ZOOM_IN);
|
||||
JButton button = new JButton(Icons.ZOOM_IN);
|
||||
button.addActionListener(new ActionListener() {
|
||||
@Override
|
||||
public void actionPerformed(ActionEvent e) {
|
||||
@ -98,6 +84,31 @@ public class SimulationPlotDialog extends JDialog {
|
||||
});
|
||||
panel.add(button, "gapleft rel");
|
||||
|
||||
//// Reset Zoom button.
|
||||
button = new JButton(Icons.ZOOM_RESET);
|
||||
button.addActionListener(new ActionListener() {
|
||||
@Override
|
||||
public void actionPerformed(ActionEvent e) {
|
||||
chartPanel.actionPerformed( new ActionEvent( chartPanel, ActionEvent.ACTION_FIRST, ChartPanel.ZOOM_RESET_BOTH_COMMAND));
|
||||
}
|
||||
});
|
||||
panel.add(button, "gapleft rel");
|
||||
|
||||
|
||||
//// Zoom out button
|
||||
button = new JButton(Icons.ZOOM_OUT);
|
||||
button.addActionListener(new ActionListener() {
|
||||
@Override
|
||||
public void actionPerformed(ActionEvent e) {
|
||||
if ( (e.getModifiers() & InputEvent.ALT_MASK) == InputEvent.ALT_MASK ) {
|
||||
chartPanel.actionPerformed( new ActionEvent( chartPanel, ActionEvent.ACTION_FIRST, ChartPanel.ZOOM_OUT_DOMAIN_COMMAND));
|
||||
} else {
|
||||
chartPanel.actionPerformed( new ActionEvent( chartPanel, ActionEvent.ACTION_FIRST, ChartPanel.ZOOM_OUT_BOTH_COMMAND));
|
||||
}
|
||||
}
|
||||
});
|
||||
panel.add(button, "gapleft rel");
|
||||
|
||||
//// Add series selection box
|
||||
//// FIXME
|
||||
List<String> stages = new ArrayList<String>();
|
||||
@ -118,8 +129,11 @@ public class SimulationPlotDialog extends JDialog {
|
||||
if ( stages.size() > 2 ) {
|
||||
// Only show the combo box if there are at least 3 entries (ie, "All", "Main", and one other one
|
||||
panel.add(stageSelection, "gapleft rel");
|
||||
panel.add(new JPanel(), "growx");
|
||||
}
|
||||
|
||||
//// Spacer for layout to push close button to the right.
|
||||
panel.add(new JPanel(), "growx");
|
||||
|
||||
//// Close button
|
||||
button = new JButton(trans.get("dlg.but.close"));
|
||||
button.addActionListener(new ActionListener() {
|
||||
|
@ -69,6 +69,7 @@ public class Icons {
|
||||
|
||||
public static final Icon ZOOM_IN = loadImageIcon("pix/icons/zoom-in.png", "Zoom in");
|
||||
public static final Icon ZOOM_OUT = loadImageIcon("pix/icons/zoom-out.png", "Zoom out");
|
||||
public static final Icon ZOOM_RESET = loadImageIcon("pix/icons/zoom-reset.png", "Reset Zoom & Pan");
|
||||
|
||||
public static final Icon PREFERENCES = loadImageIcon("pix/icons/preferences.png", "Preferences");
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user