| java.lang.Object org.netbeans.modules.visualweb.gravy.model.project.SourceFile org.netbeans.modules.visualweb.gravy.model.project.JavaFile
Method Summary | |
public boolean | contains(String text) Checks if java file contains text specified as parameter text.
Parameters: text - Text to compare to. | public void | delete() Remove java file. | public void | delete(int offset, int length) Deletes given number of characters from specified possition. | public void | delete(int length) Deletes given number of characters from current caret possition. | public void | delete(int lineNumber, int column1, int column2) Deletes characters between column1 and column2 on the specified line. | public void | deleteLine(int line) Delete specified line. | public int | getCaretPosition() Get position of caret. | public ProjectEntry[] | getChildren() | public String | getName() | public ProjectEntry | getParent() | public String | getText() Gets text from the currently opened java file. | public String | getText(int lineNumber) Gets text from specified line.
Parameters: lineNumber - Number of line. | public TreePath | getTreePath() | public void | insert(String text) Insert text to current position. | public void | insert(String text, int lineNumber, int column) Inserts text to position specified by line number and column. | public void | pushKey(int keyCode, int modifiers) Pushs key. | public void | pushKey(int keyCode) Pushs key. | public void | reformatCode() Reformat code in Java editor accordingly to specified rules. | public void | replace(String oldText, String newText) Replaces first occurence of oldText by newText. | public void | replace(String oldText, String newText, int index) Replaced index-th occurence of oldText by newText. | public void | save() Save java file. | public void | saveAs(String name) Save java file as java file with specified name. |
JavaFile | JavaFile(TreePath path, String name, ProjectEntry parent)(Code) | | Creates a new instance of web page.
Parameters: path - Path to web page in project. Parameters: name - Name of web page. |
contains | public boolean contains(String text)(Code) | | Checks if java file contains text specified as parameter text.
Parameters: text - Text to compare to. true if text was found, false otherwise. |
delete | public void delete()(Code) | | Remove java file.
|
delete | public void delete(int offset, int length)(Code) | | Deletes given number of characters from specified possition.
Parameters: offset - Position inside document. Parameters: length - Number of characters to be deleted. |
delete | public void delete(int length)(Code) | | Deletes given number of characters from current caret possition.
Parameters: length - Number of characters to be deleted. |
delete | public void delete(int lineNumber, int column1, int column2)(Code) | | Deletes characters between column1 and column2 on the specified line.
Parameters: lineNumber - Number of line. Parameters: column1 - Column position where to start deleting. Parameters: column2 - Column position where to stop deleting. |
deleteLine | public void deleteLine(int line)(Code) | | Delete specified line.
Parameters: line - Number of line. |
getCaretPosition | public int getCaretPosition()(Code) | | Get position of caret.
int Position of caret. |
getChildren | public ProjectEntry[] getChildren()(Code) | | Child project entries of the java file. |
getText | public String getText()(Code) | | Gets text from the currently opened java file.
String representing whole content of the java file.(including new line characters) |
getText | public String getText(int lineNumber)(Code) | | Gets text from specified line.
Parameters: lineNumber - Number of line. String representing content of the line. |
getTreePath | public TreePath getTreePath()(Code) | | TreePath of the java file. |
insert | public void insert(String text)(Code) | | Insert text to current position.
Parameters: text - String to be inserted. |
insert | public void insert(String text, int lineNumber, int column)(Code) | | Inserts text to position specified by line number and column.
Parameters: text - String to be inserted. Parameters: lineNumber - Number of line. Parameters: column - Column position. |
pushKey | public void pushKey(int keyCode, int modifiers)(Code) | | Pushs key.
Parameters: keyCode - Key code (KeyEvent.VK_* value) Parameters: modifiers - Modifiers (combination of InputEvent.*_MASK fields) |
pushKey | public void pushKey(int keyCode)(Code) | | Pushs key.
Parameters: keyCode - Key code (KeyEvent.VK_* value) |
reformatCode | public void reformatCode()(Code) | | Reformat code in Java editor accordingly to specified rules.
|
replace | public void replace(String oldText, String newText)(Code) | | Replaces first occurence of oldText by newText.
Parameters: oldText - Text to be replaced. Parameters: newText - Text to write instead. |
replace | public void replace(String oldText, String newText, int index)(Code) | | Replaced index-th occurence of oldText by newText.
Parameters: oldText - Text to be replaced Parameters: newText - Text to write instead Parameters: index - Tndex of oldText occurence. |
save | public void save()(Code) | | Save java file.
|
saveAs | public void saveAs(String name)(Code) | | Save java file as java file with specified name.
|
|
|