Formats Comments & Makes "Save As Image" Translatable
This commit is contained in:
parent
c73a41071a
commit
670455fb2d
@ -1274,7 +1274,7 @@ TCMotorSelPan.btn.close = Close
|
|||||||
! PlotDialog
|
! PlotDialog
|
||||||
PlotDialog.CheckBox.Showdatapoints = Show data points
|
PlotDialog.CheckBox.Showdatapoints = Show data points
|
||||||
PlotDialog.lbl.Chart = left click drag to zoom area. mouse wheel to zoom. ctrl-mouse wheel to zoom x axis only. ctrl-left click drag to pan. right click drag to zoom dynamically.
|
PlotDialog.lbl.Chart = left click drag to zoom area. mouse wheel to zoom. ctrl-mouse wheel to zoom x axis only. ctrl-left click drag to pan. right click drag to zoom dynamically.
|
||||||
|
PlotDialog.btn.saveAsImage = Save As Image
|
||||||
ComponentTree.ttip.massoverride = mass override
|
ComponentTree.ttip.massoverride = mass override
|
||||||
ComponentTree.ttip.cgoverride = cg override
|
ComponentTree.ttip.cgoverride = cg override
|
||||||
! "main" prefix is used for the main application dialog
|
! "main" prefix is used for the main application dialog
|
||||||
|
@ -117,7 +117,7 @@ public class SimulationPlotDialog extends JDialog {
|
|||||||
panel.add(button, "gapleft rel");
|
panel.add(button, "gapleft rel");
|
||||||
|
|
||||||
//// Print chart button
|
//// Print chart button
|
||||||
button = new SelectColorButton("Save As Image");
|
button = new SelectColorButton(trans.get("PlotDialog.btn.saveAsImage"));
|
||||||
button.addActionListener(new ActionListener() {
|
button.addActionListener(new ActionListener() {
|
||||||
@Override
|
@Override
|
||||||
public void actionPerformed(ActionEvent e) {
|
public void actionPerformed(ActionEvent e) {
|
||||||
@ -171,7 +171,7 @@ public class SimulationPlotDialog extends JDialog {
|
|||||||
chooser.setFileFilter(FileHelper.PNG_FILTER);
|
chooser.setFileFilter(FileHelper.PNG_FILTER);
|
||||||
chooser.setCurrentDirectory(((SwingPreferences) Application.getPreferences()).getDefaultDirectory());
|
chooser.setCurrentDirectory(((SwingPreferences) Application.getPreferences()).getDefaultDirectory());
|
||||||
|
|
||||||
/* Ensures No Problems When Choosing File */
|
//// Ensures No Problems When Choosing File
|
||||||
if (chooser.showSaveDialog(this) != JFileChooser.APPROVE_OPTION)
|
if (chooser.showSaveDialog(this) != JFileChooser.APPROVE_OPTION)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
@ -184,7 +184,7 @@ public class SimulationPlotDialog extends JDialog {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Uses JFreeChart Built In PNG Export Method */
|
//// Uses JFreeChart Built In PNG Export Method
|
||||||
try{
|
try{
|
||||||
ChartUtilities.saveChartAsPNG(file, chart, chartPanel.getWidth(), chartPanel.getHeight());
|
ChartUtilities.saveChartAsPNG(file, chart, chartPanel.getWidth(), chartPanel.getHeight());
|
||||||
} catch(Exception e){
|
} catch(Exception e){
|
||||||
|
Loading…
x
Reference in New Issue
Block a user