package smart_gs.swingui.toolbar.action;

import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.io.File;
import java.util.List;

import javax.swing.JFileChooser;
import javax.swing.JOptionPane;

import smart_gs.logical.LineSegmentForEdit;
import smart_gs.logical.Preference;
import smart_gs.logical.Spread;
import smart_gs.smleditor.swingui.LineSegEditor;
import smart_gs.swingui.AbstractGSWindow;
import smart_gs.swingui.WorkspaceWindow;
import smart_gs.util.DSCFileMaker;
import sml_editor.logical.LineDirection;

public class SaveLineSegmentsInXMLFormatAction implements ActionListener {
        private LineSegEditor editor;
        private boolean forced = true;

	
	public SaveLineSegmentsInXMLFormatAction(LineSegEditor parent,boolean forced){
		this.editor = parent;
		this.forced = forced;
	}
	
	public void actionPerformed(ActionEvent e) {
		this.editor.saveInXML(this.forced);
		WorkspaceWindow.getInstance().updateAndPaintSpreadTree();
	}
}

