public class FileMenu
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
FileMenu.ClearCellDate
Class to clear the date information on a Cell.
|
static class |
FileMenu.CreateCellWindow
Class to display a new window.
|
static class |
FileMenu.ImportLibrary
Class to import a library in a new thread.
|
static class |
FileMenu.QuitJob
Class to quit Electric in a Job.
|
static class |
FileMenu.ReadLibrary
Class to read a library in a new thread.
|
static class |
FileMenu.SaveAllLibrariesInFormatJob |
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
openJobName |
static EMenu |
openRecentLibs |
Constructor and Description |
---|
FileMenu() |
Modifier and Type | Method and Description |
---|---|
static void |
closeLibraryCommand(Library lib) |
static void |
exportCommand(FileType type,
boolean isNetlist)
This method implements the export cell command for different export types.
|
static void |
exportPrefsCommand()
Method to export the preferences to an XML file.
|
static void |
forceQuit()
Unsafe way to force Electric to quit.
|
static boolean |
forceSave(boolean confirm)
Force saving of libraries.
|
static FileType |
getLibraryFormat(java.lang.String fileName,
FileType defaultType)
Get the type from the fileName, or if no valid Library type found, return defaultType.
|
static void |
importLibraryCommand(FileType type,
boolean wholeDirectory,
boolean canMerge,
boolean techSpecific)
This method implements the command to import a library.
|
static void |
importPrefsCommand()
Method to import the preferences from an XML file.
|
static void |
newLibraryCommand() |
static void |
openLibraryCommand()
This method implements the command to read a library.
|
static void |
openLibraryCommand(java.net.URL file)
This method implements the command to read a library.
|
static void |
pageSetupCommand() |
static java.util.Collection<com.sun.electric.tool.user.menus.FileMenu.RenameAndSaveLibraryTask> |
preventLoss(Library desiredLib,
int action,
GenMath.MutableBoolean wantToMerge)
Method to check if one or more libraries are saved.
|
static void |
printCommand()
This method implements the command to print the current window.
|
static boolean |
quitCommand()
This method implements the command to quit Electric.
|
static void |
saveAllLibrariesCommand()
This method implements the command to save all libraries.
|
static void |
saveAllLibrariesCommand(FileType type,
boolean compatibleWith6,
boolean forceToType) |
static void |
saveAllLibrariesInFormatCommand() |
static void |
saveAsLibraryCommand(Library lib)
This method implements the command to save a library to a different file.
|
static boolean |
saveLibraryCommand(Library lib)
This method implements the command to save a library.
|
static boolean |
saveLibraryCommand(Library lib,
FileType type,
boolean compatibleWith6,
boolean forceToType,
boolean saveAs)
This method implements the command to save a library.
|
static com.sun.electric.tool.user.menus.FileMenu.RenameAndSaveLibraryTask |
saveLibraryRequest(Library lib,
FileType type,
boolean compatibleWith6,
boolean forceToType,
boolean saveAs)
This method ask user anout details to save a library.
|
static int |
showFileMenuOptionDialog(java.awt.Component parentComponent,
java.lang.Object message,
java.lang.String title,
int optionType,
int messageType,
javax.swing.Icon icon,
java.lang.Object[] options,
java.lang.Object initialValue,
java.lang.String toolTipMessage)
Based on JOptionPane but allows ToolTip text
|
static void |
updateRecentlyOpenedLibrariesList() |
public static final EMenu openRecentLibs
public static final java.lang.String openJobName
public static void newLibraryCommand()
public static void openLibraryCommand()
public static void openLibraryCommand(java.net.URL file)
file
- URL of a librarypublic static FileType getLibraryFormat(java.lang.String fileName, FileType defaultType)
public static void updateRecentlyOpenedLibrariesList()
public static void importLibraryCommand(FileType type, boolean wholeDirectory, boolean canMerge, boolean techSpecific)
wholeDirectory
- true to import a directory instead of a file.canMerge
- true to allow merging into an existing library.public static void closeLibraryCommand(Library lib)
public static boolean saveLibraryCommand(Library lib)
lib
- the Library to save.public static boolean saveLibraryCommand(Library lib, FileType type, boolean compatibleWith6, boolean forceToType, boolean saveAs)
lib
- the Library to save.type
- the format of the library (OpenFile.Type.ELIB, OpenFile.Type.READABLEDUMP, or OpenFile.Type.JELIB).compatibleWith6
- true to write a library that is compatible with version 6 Electric.forceToType
- saveAs
- true if this is a "save as" and should always prompt for a file name.public static com.sun.electric.tool.user.menus.FileMenu.RenameAndSaveLibraryTask saveLibraryRequest(Library lib, FileType type, boolean compatibleWith6, boolean forceToType, boolean saveAs)
lib
- the Library to save.type
- the format of the library (OpenFile.Type.ELIB, OpenFile.Type.READABLEDUMP, or OpenFile.Type.JELIB).compatibleWith6
- true to write a library that is compatible with version 6 Electric.forceToType
- saveAs
- true if this is a "save as" and should always prompt for a file name.public static void saveAsLibraryCommand(Library lib)
public static void saveAllLibrariesCommand()
public static void saveAllLibrariesCommand(FileType type, boolean compatibleWith6, boolean forceToType)
public static void saveAllLibrariesInFormatCommand()
public static void importPrefsCommand()
public static void exportPrefsCommand()
public static void exportCommand(FileType type, boolean isNetlist)
public static void pageSetupCommand()
public static void printCommand()
public static boolean quitCommand()
public static java.util.Collection<com.sun.electric.tool.user.menus.FileMenu.RenameAndSaveLibraryTask> preventLoss(Library desiredLib, int action, GenMath.MutableBoolean wantToMerge)
desiredLib
- the library to check for being saved.
If desiredLib is null, all libraries are checked.action
- the type of action that will occur:
0: quit;
1: close a library;
2: replace a library.wantToMerge
- if null, do not allow merging. If valid, allow merging and set to True if merging was requested.public static int showFileMenuOptionDialog(java.awt.Component parentComponent, java.lang.Object message, java.lang.String title, int optionType, int messageType, javax.swing.Icon icon, java.lang.Object[] options, java.lang.Object initialValue, java.lang.String toolTipMessage) throws java.awt.HeadlessException
parentComponent
- message
- title
- optionType
- messageType
- icon
- options
- initialValue
- java.awt.HeadlessException
public static void forceQuit()
public static boolean forceSave(boolean confirm)
confirm
- true to pop up confirmation dialog, false to just try to save