cz.zcu.fav.kiv.editor.controller
Class MenuController

java.lang.Object
  extended by cz.zcu.fav.kiv.editor.controller.MenuController

public class MenuController
extends java.lang.Object

The MenuController class contains method that are called for every item from the application GUI.

Version:
1.0, 05/2007
Author:
Marta Vaclavikova

Constructor Summary
MenuController()
           
 
Method Summary
static void exitItem()
          Stores editor options in the application cofiguration file.
static void newFileDefaultItem(ConfigData configData, OpenFile openFile)
          Creates a new stylesheet file and sets values to the GUI editor element according to the default template.
static void newFileEmptyItem(ConfigData configData, OpenFile openFile)
          Creates a new empty stylesheet file, sets default values to the GUI editor element.
static void newFileStylesheetItem(ConfigData configData, OpenFile openFile, java.lang.String templateFile)
          Creates a new stylesheet file and sets values to the GUI editor element according to the user template.
static void openFileItem(ConfigData configData, java.lang.String file, OpenFile openFile)
          Opens specified XSL stylesheet file.
static void runBatchFile(OpenFile openFile)
          Launches a selected batch file.
static void saveAsFileItem(ConfigData configData, java.lang.String saveFile, OpenFile openFile)
          Saves actually opened XSL stylesheet in the file with specified name.
static void saveFileItem(ConfigData configData, OpenFile openFile)
          Saves changes of the actually opened XSL stylesheet file.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MenuController

public MenuController()
Method Detail

newFileEmptyItem

public static void newFileEmptyItem(ConfigData configData,
                                    OpenFile openFile)
Creates a new empty stylesheet file, sets default values to the GUI editor element.

Parameters:
configData - the data containing editor data structure.
openFile - the structure containing information about actually opened file.

newFileDefaultItem

public static void newFileDefaultItem(ConfigData configData,
                                      OpenFile openFile)
Creates a new stylesheet file and sets values to the GUI editor element according to the default template.

Parameters:
configData - the data containing editor data structure.
openFile - the structure containing information about actually opened file.

newFileStylesheetItem

public static void newFileStylesheetItem(ConfigData configData,
                                         OpenFile openFile,
                                         java.lang.String templateFile)
Creates a new stylesheet file and sets values to the GUI editor element according to the user template.

Parameters:
configData - the data containing editor data structure.
openFile - the structure containing information about actually opened file.
templateFile - the file containing user template.

openFileItem

public static void openFileItem(ConfigData configData,
                                java.lang.String file,
                                OpenFile openFile)
Opens specified XSL stylesheet file.

Parameters:
configData - the data containing editor data structure.
file - the XSL stylesheet file for opening.
openFile - the structure containing information about actually opened file.

saveAsFileItem

public static void saveAsFileItem(ConfigData configData,
                                  java.lang.String saveFile,
                                  OpenFile openFile)
Saves actually opened XSL stylesheet in the file with specified name.

Parameters:
configData - the data containing editor data structure.
saveFile - the name of the file where the XSL stylesheet will be saved.
openFile - the structure containing information about actually opened file.

saveFileItem

public static void saveFileItem(ConfigData configData,
                                OpenFile openFile)
Saves changes of the actually opened XSL stylesheet file.

Parameters:
configData - the data containing editor data structure.
openFile - the structure containing information about actually opened file.

exitItem

public static void exitItem()
Stores editor options in the application cofiguration file.


runBatchFile

public static void runBatchFile(OpenFile openFile)
Launches a selected batch file.

Parameters:
openFile - the structure containing information about actually opened file.