Normand Briere
2018-07-07 09ddd38fd4a8a7100c834a5e976f4796fae53541
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
package timeflow.app.actions;
 
import timeflow.model.*;
import timeflow.app.TimeflowApp;
import timeflow.app.ui.*;
 
import java.awt.event.*;
import javax.swing.*;
 
 
public class EditSourceAction extends TimeflowAction {
 
   public EditSourceAction(TimeflowApp app)
   {
       super(app, "Edit Source/Credit Line...", null, "Edit credit line for this database");
   }
   
   @Override
   public void actionPerformed(ActionEvent e) {
       TFModel model=getModel();
       String source = (String)JOptionPane.showInputDialog(
                app,
                null,
                "Edit Source/Credit Line",
                JOptionPane.PLAIN_MESSAGE,
                null,
                null,
                model.getDB().getSource());
 
       if (source!=null) {
       model.getDB().setSource(source);
       model.noteNewSource(this);
       return;
       }
   }
 
}