|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectmars.venus.Editor
public class Editor
Manage the file being edited. Currently only manages one file at a time, but can be expanded.
Field Summary | |
---|---|
static int |
MAX_BLINK_RATE
|
static int |
MAX_TAB_SIZE
|
static int |
MIN_BLINK_RATE
|
static int |
MIN_TAB_SIZE
|
Constructor Summary | |
---|---|
Editor(VenusUI ui)
Create editor. |
Method Summary | |
---|---|
boolean |
close()
Perform "close" operation on current tab's file. |
boolean |
closeAll()
Close all currently open files. |
boolean |
editsSavedOrAbandoned()
Called by several of the Action objects when there is potential loss of editing changes. |
String |
getCurrentOpenDirectory()
Get name of current directory for Open operation. |
String |
getCurrentSaveDirectory()
Get name of current directory for Save or Save As operation. |
String |
getNextDefaultFilename()
Generates a default file name |
void |
newFile()
Perform "new" operation to create an empty tab. |
boolean |
open()
Open file in a new tab. |
boolean |
save()
Perform "save" operation on current tab's file. |
boolean |
saveAll()
Perform save operation on all open files (tabs). |
boolean |
saveAs()
Perform "save as" operation on current tab's file. |
void |
setEditTabbedPane(EditTabbedPane editTabbedPane)
Set associated EditTabbedPane. |
void |
setTitle(String path,
String name,
int status)
Places name of file currently being edited into its edit tab and the application's title bar. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int MIN_TAB_SIZE
public static final int MAX_TAB_SIZE
public static final int MIN_BLINK_RATE
public static final int MAX_BLINK_RATE
Constructor Detail |
---|
public Editor(VenusUI ui)
ui
- the GUI that owns this editorMethod Detail |
---|
public void setEditTabbedPane(EditTabbedPane editTabbedPane)
editTabbedPane
- an existing editTabbedPane objectpublic String getCurrentOpenDirectory()
public String getCurrentSaveDirectory()
public String getNextDefaultFilename()
public void setTitle(String path, String name, int status)
path
- Full pathname for filename
- Name of file (last component of path)status
- Edit status of file. See FileStatus static constants.public void newFile()
public boolean close()
public boolean closeAll()
public boolean save()
public boolean saveAs()
public boolean saveAll()
public boolean open()
public boolean editsSavedOrAbandoned()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |