public final class MainController extends Object implements ActionListener
Constructor and Description |
---|
MainController() |
Modifier and Type | Method and Description |
---|---|
void |
actionPerformed(ActionEvent e) |
void |
addFiles(String targetBase) |
void |
addFileTreePane(JTree fileTree) |
String |
askTheUser(String title,
String question,
String defaultAnswer)
Ask the user a question.
|
void |
closeArchiveFile() |
void |
display() |
void |
extractArchive(File destination,
File archive) |
static boolean |
getConfirmExit()
Checks whether user needs to confirm an exit.
|
static String |
getDefaultPath()
Gets the default path for opening/saving documents.
|
static int |
getLogLevel()
Gets the log level.
|
static boolean |
getLogStackTrace()
Should we log stack trace.
|
List<de.unirostock.sems.cbarchive.meta.MetaDataObject> |
getMetaData(de.unirostock.sems.cbarchive.ArchiveEntry entry)
Gets the meta data of a single archive entry.
|
static boolean |
getPopUpLog()
Checks whether we should popup the log win.
|
void |
goodBye()
quit the tool.
|
void |
move(CombineArchiveContentNode caen,
CombineArchiveFolderNode destObj)
Move an entry to a folder.
|
void |
move(CombineArchiveContentNode caen,
CombineArchiveNode destObj)
Move an entry to the toplevel of an archive.
|
void |
moveArchiveEntry(File archive,
de.unirostock.sems.cbarchive.ArchiveEntry entry,
String newPath) |
void |
reformatEntry(de.unirostock.sems.cbarchive.ArchiveEntry entry) |
void |
reloadTree() |
void |
renameEntry(CombineArchiveContentNode entry) |
static void |
setComfirmExit(boolean confirm) |
static void |
setDefaultPath(String path)
Sets the default path for opening/saving documents.
|
static void |
setLogLevel(String level)
Sets the log level.
|
static void |
setLogStackTrace(boolean logStack)
Should we log the stack trace?
|
static void |
setPopUpLog(boolean confirm) |
boolean |
showConfirmation(String title,
String msg)
Show a confirmation dialog.
|
void |
showError(String title,
String err) |
void |
updateDetailsView(Collection<CombineArchiveEntryNode> selectedArchiveEntries) |
public void display()
public void addFileTreePane(JTree fileTree)
fileTree
- public List<de.unirostock.sems.cbarchive.meta.MetaDataObject> getMetaData(de.unirostock.sems.cbarchive.ArchiveEntry entry)
entry
- the entry in the archivepublic void actionPerformed(ActionEvent e)
actionPerformed
in interface ActionListener
public void addFiles(String targetBase)
targetBase
- public void reloadTree()
public void closeArchiveFile()
public void extractArchive(File destination, File archive)
destination
- archive
- public void moveArchiveEntry(File archive, de.unirostock.sems.cbarchive.ArchiveEntry entry, String newPath)
archive
- entry
- newPath
- public void updateDetailsView(Collection<CombineArchiveEntryNode> selectedArchiveEntries)
selectedArchiveEntries
- public static String getDefaultPath()
public static void setDefaultPath(String path)
path
- the new default pathpublic static boolean getPopUpLog()
public static void setPopUpLog(boolean confirm)
confirm
- public static boolean getConfirmExit()
public static void setComfirmExit(boolean confirm)
confirm
- public static void setLogStackTrace(boolean logStack)
logStack
- the new log stack tracepublic static boolean getLogStackTrace()
public static void setLogLevel(String level)
level
- the new log levelpublic static int getLogLevel()
public boolean showConfirmation(String title, String msg)
title
- the titlemsg
- the msgpublic String askTheUser(String title, String question, String defaultAnswer)
title
- the titlequestion
- the questiondefaultAnswer
- the default answerpublic void goodBye()
public void reformatEntry(de.unirostock.sems.cbarchive.ArchiveEntry entry)
entry
- public void renameEntry(CombineArchiveContentNode entry)
entry
- public void move(CombineArchiveContentNode caen, CombineArchiveFolderNode destObj) throws IOException
caen
- the content nodedestObj
- the destination folderIOException
public void move(CombineArchiveContentNode caen, CombineArchiveNode destObj) throws IOException
caen
- the content nodedestObj
- the destinationIOException
Copyright © 2014. All rights reserved.