Print implementiert
This commit is contained in:
@@ -0,0 +1,57 @@
|
||||
/*
|
||||
* Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license
|
||||
* Click nbfs://nbhost/SystemFileSystem/Templates/Classes/Class.java to edit this template
|
||||
*/
|
||||
|
||||
package mvcgrafik.controller.commands;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.FileNotFoundException;
|
||||
import java.io.IOException;
|
||||
import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
import javax.swing.JFileChooser;
|
||||
import mvcgrafik.model.GrafikModel;
|
||||
import mvcgrafik.view.GrafikFrame;
|
||||
import mvcgrafik.view.GrafikView;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author ahren
|
||||
*/
|
||||
public class PrintCommand implements CommandInterface
|
||||
{
|
||||
private GrafikView view;
|
||||
private GrafikModel model;
|
||||
|
||||
public PrintCommand(GrafikView view, GrafikModel model){
|
||||
this.view = view;
|
||||
this.model = model;
|
||||
}
|
||||
|
||||
/**
|
||||
* Aufrufen des File Choosers in zuletzt verwendeten Ordner, versuchen die
|
||||
* Tabellendatei zu speichern
|
||||
*/
|
||||
@Override
|
||||
public void execute() {
|
||||
this.view.doPrint();
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void undo() {
|
||||
throw new UnsupportedOperationException("Not undoable."); // Generated from nbfs://nbhost/SystemFileSystem/Templates/Classes/Code/GeneratedMethodBody
|
||||
}
|
||||
|
||||
@Override
|
||||
public void redo() {
|
||||
throw new UnsupportedOperationException("Not redoable."); // Generated from nbfs://nbhost/SystemFileSystem/Templates/Classes/Code/GeneratedMethodBody
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isUndoable() {
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user