processing.app
Class SketchCode

java.lang.Object
  extended by processing.app.SketchCode

public class SketchCode
extends java.lang.Object

Represents a single tab of a sketch.


Constructor Summary
SketchCode(java.io.File file, java.lang.String extension)
           
 
Method Summary
 void addPreprocOffset(int extra)
           
 javax.swing.text.Document getDocument()
           
 java.lang.String getExtension()
           
 java.io.File getFile()
           
 java.lang.String getFileName()
           
 int getLineCount()
           
 int getPreprocOffset()
           
 java.lang.String getPrettyName()
           
 java.lang.String getProgram()
           
 int getScrollPosition()
           
 int getSelectionStart()
           
 int getSelectionStop()
           
 javax.swing.undo.UndoManager getUndo()
           
 boolean isExtension(java.lang.String what)
           
 boolean isModified()
           
 void load()
          Load this piece of code from a file.
 void save()
          Save this piece of code, regardless of whether the modified flag is set or not.
 void saveAs(java.io.File newFile)
          Save this file to another location, used by Sketch.saveAs()
 void setDocument(javax.swing.text.Document d)
           
 void setModified(boolean modified)
           
 void setPreprocOffset(int preprocOffset)
           
 void setProgram(java.lang.String replacement)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SketchCode

public SketchCode(java.io.File file,
                  java.lang.String extension)
Method Detail

getFile

public java.io.File getFile()

getFileName

public java.lang.String getFileName()

getPrettyName

public java.lang.String getPrettyName()

getExtension

public java.lang.String getExtension()

isExtension

public boolean isExtension(java.lang.String what)

getProgram

public java.lang.String getProgram()

setProgram

public void setProgram(java.lang.String replacement)

getLineCount

public int getLineCount()

setModified

public void setModified(boolean modified)

isModified

public boolean isModified()

setPreprocOffset

public void setPreprocOffset(int preprocOffset)

getPreprocOffset

public int getPreprocOffset()

addPreprocOffset

public void addPreprocOffset(int extra)

getDocument

public javax.swing.text.Document getDocument()

setDocument

public void setDocument(javax.swing.text.Document d)

getUndo

public javax.swing.undo.UndoManager getUndo()

getSelectionStart

public int getSelectionStart()

getSelectionStop

public int getSelectionStop()

getScrollPosition

public int getScrollPosition()

load

public void load()
          throws java.io.IOException
Load this piece of code from a file.

Throws:
java.io.IOException

save

public void save()
          throws java.io.IOException
Save this piece of code, regardless of whether the modified flag is set or not.

Throws:
java.io.IOException

saveAs

public void saveAs(java.io.File newFile)
            throws java.io.IOException
Save this file to another location, used by Sketch.saveAs()

Throws:
java.io.IOException