public class PageBreakExtension extends TextAreaExtension implements EBComponent
| Constructor and Description |
|---|
PageBreakExtension(JEditTextArea textArea) |
| Modifier and Type | Method and Description |
|---|---|
java.awt.Color |
getPageBreakColor() |
void |
handleMessage(EBMessage msg)
Handles a message sent on the EditBus.
|
boolean |
isPageBreakEnabled() |
void |
paintValidLine(java.awt.Graphics2D gfx,
int screenLine,
int physicalLine,
int start,
int end,
int y)
Called by the text area when the extension is to paint a
screen line which has an associated physical line number in
the buffer.
|
void |
setPageBreakColor(java.awt.Color pageBreakColor) |
void |
setPageBreakEnabled(boolean pageBreak) |
getToolTipText, paintInvalidLine, paintScreenLineRangepublic PageBreakExtension(JEditTextArea textArea)
public void handleMessage(EBMessage msg)
EBComponentEBMessage class. Typically
this is done with one or more if blocks that test
whether the message is an instance of a derived message class in
which the component has an interest. For example:
if(msg instanceof BufferUpdate) {
// a buffer's state has changed!
}
else if(msg instanceof ViewUpdate) {
// a view's state has changed!
}
// ... and so onhandleMessage in interface EBComponentmsg - The messagepublic java.awt.Color getPageBreakColor()
public void setPageBreakColor(java.awt.Color pageBreakColor)
public boolean isPageBreakEnabled()
public void setPageBreakEnabled(boolean pageBreak)
public void paintValidLine(java.awt.Graphics2D gfx,
int screenLine,
int physicalLine,
int start,
int end,
int y)
TextAreaExtensionpaintValidLine in class TextAreaExtensiongfx - The graphics contextscreenLine - The screen line numberphysicalLine - The physical line numberstart - The offset where the screen line begins, from
the start of the bufferend - The offset where the screen line ends, from the
start of the buffery - The y co-ordinate of the top of the line's
bounding box