|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.problets.domain.line.AbstractLine
org.problets.domain.line.CodeLine
org.problets.domain.view.code.synthesis.SynthesisCodeLine
public class SynthesisCodeLine
Holds one line of code containing synthesis annotations
Field Summary |
---|
Fields inherited from class org.problets.domain.line.AbstractLine |
---|
UNASSIGNED_LINE |
Constructor Summary | |
---|---|
SynthesisCodeLine(java.lang.String inLineCode,
java.lang.String inLineTemplate,
int inLineNumber,
DomainModel source)
|
Method Summary | |
---|---|
void |
draw(java.awt.Graphics g,
int xStart,
int xIndent,
int yCoord)
Draws a line of code that involves synthesis code annotations |
java.util.Vector |
getAllCodeSegmentAttempts()
Returns CodeSegmentAttempt versions of all code segments in this line to be used to assemble the actual answer in SynthesisCodeModel |
SynthesisCodeSegment |
getCodeSegment(int xCoord)
If the xCoord is within the x extent of a SynthesisCodeSegmentView object, returns its corresponding model. |
boolean |
hasAttempted()
Returns true if the student has attempted all the code segments on this line |
static void |
main(java.lang.String[] args)
|
void |
print()
Implemnts a base class method Prints all the fields of the class |
Methods inherited from class org.problets.domain.line.CodeLine |
---|
addPrefix, addtoLineObjects, addtoLineObjects, clone, decrementIndentation, getIndentation, getLineCode, getLineObjects, getLineTemplate, getSource, incrementIndentation, initializeIndentation, isOutputStatement, setCode, setIndentation, toString |
Methods inherited from class org.problets.domain.line.AbstractLine |
---|
getLineNumber, setLineNumber |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public SynthesisCodeLine(java.lang.String inLineCode, java.lang.String inLineTemplate, int inLineNumber, DomainModel source)
Method Detail |
---|
public void draw(java.awt.Graphics g, int xStart, int xIndent, int yCoord)
draw
in class CodeLine
xStart
- Starting x coordinate for the linexIndent
- Amount by which code should be indented for each level of indentation
Method draws the contents of this codeLine object
Although this should ideally be in the view class,
we are leaving it here since there is little need for a separate view class.public SynthesisCodeSegment getCodeSegment(int xCoord)
public boolean hasAttempted()
public java.util.Vector getAllCodeSegmentAttempts()
public void print()
print
in class CodeLine
public static void main(java.lang.String[] args)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |