|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.sun.electric.tool.user.menus.FileMenu
public class FileMenu
Class to handle the commands in the "File" pulldown menu.
Nested Class Summary | |
---|---|
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
|
Field Summary | |
---|---|
static EMenu |
openRecentLibs
|
Constructor Summary | |
---|---|
FileMenu()
|
Method Summary | |
---|---|
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 |
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)
This method implements the command to import a library (Readable Dump or JELIB format). |
static void |
importToCurrentCellCommand(FileType type)
This method implements the command to import a file to a library It is interactive, and pops up a dialog box. |
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)
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()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final EMenu openRecentLibs
Constructor Detail |
---|
public FileMenu()
Method Detail |
---|
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 importToCurrentCellCommand(FileType type)
public static void importLibraryCommand(FileType type)
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 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)
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.
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
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |