Blame view

src/mior/controler/TopoAction.java 641 Bytes
1b1e928cc   glaville   initial import of...
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
  package mior.controler;
  
  import java.awt.event.ActionEvent;
  
  import javax.swing.SwingWorker;
  
  import mior.model.IMiorModel;
  
  public class TopoAction extends AbstractMiorAction<IMiorModel> {
  	
  	private static final long serialVersionUID = 1L;
  
  	public TopoAction(IMiorModel model) {
  		super(model, "Topo");
  	}
  	
  	@Override
  	public void actionPerformed(ActionEvent e) {
  		setEnabled(false);
  		new SwingWorker<Void, Void>() {
  			
  			@Override
  			protected Void doInBackground() throws Exception {
  				getData().doTopology();
  				return null;
  			}
  			
  			@Override
  			protected void done() {
  				setEnabled(true);
  			};
  			
  		}.execute();
  	}
  
  }