added serializable to Figure
This commit is contained in:
parent
859ae12747
commit
853599a21b
@ -65,7 +65,7 @@ public class BtnController implements ActionListener
|
|||||||
try
|
try
|
||||||
{
|
{
|
||||||
//model.datenSpeichern(selectedFile);
|
//model.datenSpeichern(selectedFile);
|
||||||
model.speichereDatei("TEST");
|
model.speichereDatei(selectedFile.getAbsolutePath());
|
||||||
}
|
}
|
||||||
catch (UnsupportedEncodingException ex)
|
catch (UnsupportedEncodingException ex)
|
||||||
{
|
{
|
||||||
@ -92,7 +92,7 @@ public class BtnController implements ActionListener
|
|||||||
try
|
try
|
||||||
{
|
{
|
||||||
//model.datenLesen(selectedFile);
|
//model.datenLesen(selectedFile);
|
||||||
model.ladeDatei("TEST");
|
model.ladeDatei(selectedFile.getAbsolutePath());
|
||||||
}
|
}
|
||||||
catch (UnsupportedEncodingException ex)
|
catch (UnsupportedEncodingException ex)
|
||||||
{
|
{
|
||||||
|
@ -51,7 +51,6 @@ public class GrafikController implements MouseMotionListener, MouseListener
|
|||||||
}
|
}
|
||||||
Point p = evt.getPoint();
|
Point p = evt.getPoint();
|
||||||
if(p_old != null){
|
if(p_old != null){
|
||||||
// view.drawLine(p, p_old);
|
|
||||||
view.drawLine(p, p_old);
|
view.drawLine(p, p_old);
|
||||||
}
|
}
|
||||||
p_old = p;
|
p_old = p;
|
||||||
|
@ -7,6 +7,7 @@
|
|||||||
package mvcgrafik.model;
|
package mvcgrafik.model;
|
||||||
|
|
||||||
import java.awt.Point;
|
import java.awt.Point;
|
||||||
|
import java.io.Serializable;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
@ -15,7 +16,7 @@ import java.util.List;
|
|||||||
*
|
*
|
||||||
* @author chris, hd
|
* @author chris, hd
|
||||||
*/
|
*/
|
||||||
public class Figure
|
public class Figure implements Serializable
|
||||||
{
|
{
|
||||||
private ArrayList<Point> punkte;
|
private ArrayList<Point> punkte;
|
||||||
|
|
||||||
|
@ -59,7 +59,6 @@ public class GrafikModel
|
|||||||
FileInputStream fis = new FileInputStream(dateiname);
|
FileInputStream fis = new FileInputStream(dateiname);
|
||||||
BufferedInputStream buffin = new BufferedInputStream(fis);
|
BufferedInputStream buffin = new BufferedInputStream(fis);
|
||||||
ObjectInputStream ois = new ObjectInputStream(buffin);
|
ObjectInputStream ois = new ObjectInputStream(buffin);
|
||||||
Object obj = ois.readObject();
|
|
||||||
// if (obj instanceof ArrayList)
|
// if (obj instanceof ArrayList)
|
||||||
// {
|
// {
|
||||||
// punkte = (ArrayList<Point>) obj;
|
// punkte = (ArrayList<Point>) obj;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user