| java.lang.Object java.io.File edu.rice.cs.drjava.project.DocFile
Constructor Summary | |
public | DocFile(File f) Creates a docfile that has the same path as the given file, with default values for everything else. | public | DocFile(String pathname) Creates a docfile from the given pathname with default values for everything else. | public | DocFile(String parent, String child) Creates a docfile from the given parent and child with default values for everything else. | public | DocFile(String pathname, Pair<Integer, Integer> selection, Pair<Integer, Integer> scroll, boolean active, String srcRoot) | public | DocFile(File f, Pair<Integer, Integer> selection, Pair<Integer, Integer> scroll, boolean active, String srcRoot) | public | DocFile(String parent, String child, Pair<Integer, Integer> selection, Pair<Integer, Integer> scroll, boolean active, String srcRoot) |
DocFile | public DocFile(File f)(Code) | | Creates a docfile that has the same path as the given file, with default values for everything else.
|
DocFile | public DocFile(String pathname)(Code) | | Creates a docfile from the given pathname with default values for everything else.
|
DocFile | public DocFile(String parent, String child)(Code) | | Creates a docfile from the given parent and child with default values for everything else.
|
getPackage | public String getPackage()(Code) | | the package of the document stored in this file |
getSavedModDate | public long getSavedModDate()(Code) | | The modification date of this file at the time the project file was generated. |
getScroll | public Pair<Integer, Integer> getScroll()(Code) | | the selection with the first element being the vertical scroll and the second being the horizontal scroll. |
getSelection | public Pair<Integer, Integer> getSelection()(Code) | | the selection with the start and ending locations paired together. The cursor location is at the secondlocation in the pair while the selection is defined between the two. |
isActive | public boolean isActive()(Code) | | true if this file is supposed to be the active document when opened. |
setActive | public void setActive(boolean active)(Code) | | Parameters: active - Whether this file should be the active document when opened. |
setPackage | public void setPackage(String pkg)(Code) | | Parameters: pkg - The name of the package defined in the document text. |
setSavedModDate | public void setSavedModDate(long mod)(Code) | | Sets lastModified for this file to the time the including project file was saved. The lastModified
date any documents saved after the project file was written will not match the date recorded in the project file.
Parameters: mod - the last known modification date when the project was saved. |
setScroll | public void setScroll(Pair<Integer, Integer> scroll)(Code) | | Parameters: scroll - the pair to set the selection to |
setScroll | public void setScroll(int vert, int horiz)(Code) | | Parameters: vert - the vertical scroll of the scroll pane Parameters: horiz - the horizonal scroll of the scroll pane |
setSelection | public void setSelection(Pair<Integer, Integer> sel)(Code) | | Parameters: sel - the pair to set the selection to |
setSelection | public void setSelection(int start, int end)(Code) | | Parameters: start - the start of the selection Parameters: end - the end of the selection (and the cursor position) |
|
|