|
UTJML | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectedu.utep.cs.utjml.canica.jmleditor.JMLEditorMDI
public class JMLEditorMDI
This is the controller class of the JML Editor. Its main responsiblities are to provide the services to other interface classes(StatusBarable, FileAccessable, BasicEditorable, and SearchInsertAndHighlightable classes), and implement the main services of the JMLEditorable class..
| Field Summary |
|---|
| Fields inherited from interface edu.utep.cs.utjml.canica.jmleditor.JMLEditorable |
|---|
ERROR_MESSAGES, NO_MESSAGE |
| Constructor Summary | |
|---|---|
JMLEditorMDI(Mainable canica)
Creates a new instance. |
|
| Method Summary | |
|---|---|
void |
closeFile()
Closes the active editing file in the JML editor. |
void |
closeFile(File file)
Closes the file given, it first check if it is open in the JMl editor. |
File |
getActiveEditingFile()
It returns the active editing file (the current file being edited in the JML editor) |
BasicEditorable |
getBasicEditorable()
It returns the interface that will handle the basic editing (copy, paste, undo, redo, select all, delete, delete line, etc) in the JML editor. |
int |
getEditorSize()
It returns the size (number of files opened) of the JML Editor. |
JPanel |
getEditorView()
It returns the JML Editor view (see JMLEditorMDIView class) as a JPanel object. |
FileAccessable |
getFileAccessable()
It returns the interface that will handle the access to files (open, new, save, save all, close , close all, save as, etc) in the JML editor. |
JTextPane |
getJMLTextPane()
Returns the actual textPane of the JMLEditor. |
int |
getLine()
Returns the actual Caret Line position of the active editing file. |
void |
getRedo()
Redo the editing action. |
SearchInsertAndHighlightable |
getSearchInsertAndHighlightable()
It returns the interface that will handle the search, insert and highlight functionalities in the JML editor. |
StatusBarable |
getStatusBarable()
It returns the interface that will handle the status bar in the JML Editor. |
void |
getUndo()
Undo the last editing action. |
void |
highlightLine(int line)
It highlights the line of the active editing file It must be an active editing file. |
void |
highlightLine(int line,
int col)
It highlights the line of the active editing file It must be an active editing file. |
int |
insertAFile(File newFile)
This method inserts a valid File into the View |
boolean |
isModified()
Verifies if the active editing file has being modified. |
void |
refreshActiveEditingFile(int indexOfActiveFile)
Based on the index given, refresh the status bar, and sets the active editing file's index. |
void |
saveAllFiles()
It saves all files opened in the JML editor. |
void |
saveFile()
It saves the contents of the view to the model of the active editing file. |
void |
saveFileAs(File newFile)
It saves the contents of the actual JMLtextPane to a new file |
boolean |
setActiveEditingfile(File file)
Sets to the JML editor this file active. |
boolean |
setActiveEditingfile(String fileName)
Sets to the JML editor the first file containing this file name. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public JMLEditorMDI(Mainable canica)
canical - The main class| Method Detail |
|---|
public int insertAFile(File newFile)
newFile - File
public void saveFile()
public void saveAllFiles()
public void saveFileAs(File newFile)
newFile - Filepublic void closeFile()
public void closeFile(File file)
public void highlightLine(int line)
line - Line number
public void highlightLine(int line,
int col)
line - Line numbercol - Column numberpublic JTextPane getJMLTextPane()
public int getLine()
public void getUndo()
public void getRedo()
public JPanel getEditorView()
JMLEditorable
getEditorView in interface JMLEditorablepublic int getEditorSize()
JMLEditorable
getEditorSize in interface JMLEditorablepublic boolean setActiveEditingfile(File file)
JMLEditorable
setActiveEditingfile in interface JMLEditorablefile - The file to be active.public boolean setActiveEditingfile(String fileName)
JMLEditorable
setActiveEditingfile in interface JMLEditorablepublic File getActiveEditingFile()
JMLEditorable
getActiveEditingFile in interface JMLEditorablepublic boolean isModified()
JMLEditorable
isModified in interface JMLEditorablepublic StatusBarable getStatusBarable()
JMLEditorable
getStatusBarable in interface JMLEditorablepublic FileAccessable getFileAccessable()
JMLEditorable
getFileAccessable in interface JMLEditorablepublic BasicEditorable getBasicEditorable()
JMLEditorable
getBasicEditorable in interface JMLEditorablepublic SearchInsertAndHighlightable getSearchInsertAndHighlightable()
JMLEditorable
getSearchInsertAndHighlightable in interface JMLEditorablepublic void refreshActiveEditingFile(int indexOfActiveFile)
indexOfActiveFile - Index of active editing file.
|
UTJML | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||