|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object edu.northwestern.at.wordhoard.model.text.DrawingContext
public class DrawingContext
A text drawing context.
Constructor Summary | |
---|---|
DrawingContext(int rightMargin)
Creates a new drawing context. |
Method Summary | |
---|---|
java.awt.font.FontRenderContext |
getFontRenderContext()
Gets the font render context. |
java.awt.Graphics2D |
getGraphics()
Gets the graphics environment. |
int |
getLineHeight()
Gets the height of the current line. |
java.awt.Color |
getLineNumberColor()
Gets the line number color. |
FontInfo |
getLineNumberFontInfo()
Gets the line number font info. |
int |
getLineNumberInterval()
Gets the line number interval. |
int |
getLineNumberRightMargin()
Gets the line number right margin. |
int |
getMarginaliaLeftMargin()
Gets the marginalia left margin. |
int |
getMarginaliaRightMargin()
Gets the marginalia right margin. |
java.awt.Color |
getMarkerColor()
Gets the marker color. |
FontInfo |
getMarkerFontInfo()
Gets the marker font info. |
int |
getMarkerOffset()
Gets the marker offset. |
java.lang.String |
getMarkerString()
Gets the marker string. |
int |
getRightMargin()
Gets the right margin. |
java.awt.Color |
getSelectedColor()
Gets the selected text background color. |
java.awt.Color |
getSelectedTextColor()
Gets the selected text color. |
int |
getYTop()
Gets the Y coordinate of the top of the current line. |
boolean |
hasLineNumbers()
Returns true if this text has line numbers. |
boolean |
hasMarginalia()
Returns true if this text has marginalia. |
void |
setGraphics(java.awt.Graphics2D g)
Sets the graphics environment. |
void |
setLineHeight(int lineHeight)
Sets the height of the current line. |
void |
setLineNumberInterval(int lineNumberInterval)
Sets the line number interval. |
void |
setLineNumbers(int lineNumberInterval,
FontInfo lineNumberFontInfo,
int lineNumberRightMargin,
java.awt.Color lineNumberColor)
Sets line number information. |
void |
setMarginaliaMargins(int marginaliaLeftMargin,
int marginaliaRightMargin)
Sets marginalia margins. |
void |
setMarkerInformation(int markerOffset,
java.lang.String markerString,
FontInfo markerFontInfo,
java.awt.Color markerColor)
Sets marker information. |
void |
setYTop(int yTop)
Sets the Y coordinate of the top of the current line. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DrawingContext(int rightMargin)
rightMargin
- Right margin. Method Detail |
---|
public void setLineNumbers(int lineNumberInterval, FontInfo lineNumberFontInfo, int lineNumberRightMargin, java.awt.Color lineNumberColor)
lineNumberInterval
- Line number interval.lineNumberFontInfo
- Line number font info. May be null
if no line numbers will be drawn.lineNumberRightMargin
- Line number right margin. Ignored
if line numbers are not drawn.lineNumberColor
- Line number color. May be null
if no line numbers will be drawn. public void setMarginaliaMargins(int marginaliaLeftMargin, int marginaliaRightMargin)
marginaliaLeftMargin
- Marginalia left margin.marginaliaRightMargin
- Marginalia right margin. public void setMarkerInformation(int markerOffset, java.lang.String markerString, FontInfo markerFontInfo, java.awt.Color markerColor)
markerOffset
- Marker offset from left margin.markerString
- Marker string.markerFontInfo
- Marker font info.markerColor
- Marker color. public java.awt.Graphics2D getGraphics()
public void setGraphics(java.awt.Graphics2D g)
g
- The graphics environment. public java.awt.font.FontRenderContext getFontRenderContext()
public int getRightMargin()
public boolean hasLineNumbers()
public int getLineNumberInterval()
public void setLineNumberInterval(int lineNumberInterval)
lineNumberInterval
- The line number interval. public FontInfo getLineNumberFontInfo()
public int getLineNumberRightMargin()
public java.awt.Color getLineNumberColor()
public boolean hasMarginalia()
public int getMarginaliaLeftMargin()
public int getMarginaliaRightMargin()
public int getMarkerOffset()
public java.lang.String getMarkerString()
public FontInfo getMarkerFontInfo()
public java.awt.Color getMarkerColor()
public java.awt.Color getSelectedColor()
public java.awt.Color getSelectedTextColor()
public int getYTop()
public void setYTop(int yTop)
yTop
- Y coordinate of the top of the current line. public int getLineHeight()
public void setLineHeight(int lineHeight)
lineHeight
- Height of the current line.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |