1 18 19 package de.gulden.framework.amoda.environment.gui.behaviour; 20 21 import de.gulden.framework.amoda.generic.behaviour.GenericCommand; 22 import java.io.*; 23 import java.net.*; 24 import java.util.*; 25 26 32 public class CommandOpenRecentFileListEntry extends GenericCommand { 33 34 38 protected File file; 39 40 protected URL url; 41 42 43 47 public CommandOpenRecentFileListEntry(File file) { 48 this.file=file; 49 } 50 51 public CommandOpenRecentFileListEntry(URL url) { 52 this.url=url; 53 } 54 55 56 60 public void perform() { 61 de.gulden.framework.amoda.model.document.Document doc=null; 62 if (file!=null) { 63 ((de.gulden.framework.amoda.environment.gui.GUIApplication)getApplication()).loadDocument(file); 64 } else if (url!=null) { 65 ((de.gulden.framework.amoda.environment.gui.GUIApplication)getApplication()).loadDocument(url); 66 } 67 } 68 69 } | Popular Tags |