Statement Coverage | Branch Coverage | Loop Coverage | Strict Condition Coverage | |||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
public String showSaveAsDialog(String fileId) | 4 / 4 | 100 % |
|
1 / 2 | 50 % |
|
0 / 0 | --- | 0 / 1 | 0 % |
|
AppView.java | ||
---|---|---|
157 | public String showSaveAsDialog(String fileId) { | |
158 | JFileChooser chooser = new JFileChooser(); | |
159 | chooser.setDialogType(JFileChooser.SAVE_DIALOG); | |
160 | chooser.setDialogTitle("Save As…"); | |
161 | chooser.setFileSelectionMode(JFileChooser.FILES_ONLY); | |
162 | ||
163 | if (chooser.showSaveDialog(getWindowFromId(fileId)) == JFileChooser.APPROVE_OPTION) { | |
164 | return chooser.getSelectedFile().getAbsolutePath(); | |
165 | } | |
166 | ||
167 | return null; | |
168 | } |