站内搜索: 请输入搜索关键词
当前页面: 在线文档首页 > NetBeans API Javadoc (Current Development Version)

DrawContext (Editor Library) - NetBeans API Javadoc (Current Development Version)

org.netbeans.modules.editor.lib/1 1.14.0 3

org.netbeans.editor
Interface DrawContext


public interface DrawContext

This interface provides methods for getting and setting various drawing attributes. During painting draw layer receives draw context and it is expected to either leave draw parameters as they are or change them.


Method Summary
 Color getBackColor()
          Get current background color
 char[] getBuffer()
          Get the buffer with the characters being drawn.
 int getBufferStartOffset()
          Get the position in the document where the buffer starts.
 EditorUI getEditorUI()
          Get draw info for the component that is currently drawn.
 int getEndOffset()
          Get end position of the drawing.
 Font getFont()
          Get current font
 Color getForeColor()
          Get current foreground color
 int getFragmentLength()
          Get the length of the fragment of the token being drawn
 int getFragmentOffset()
          Get the starting position in the document of the fragment of the token being drawn.
 int getStartOffset()
          Get start position of the drawing.
 Color getStrikeThroughColor()
          Get current strike-through color
 TokenContextPath getTokenContextPath()
          Get the token-context-path for the token
 TokenID getTokenID()
          Get token type number according to the appropriate syntax scanner
 int getTokenLength()
          Get length of the token text
 int getTokenOffset()
          Get starting position in the document of the token being drawn
 Color getUnderlineColor()
          Get current underline color
 Color getWaveUnderlineColor()
          Get current wave underline color
 boolean isBOL()
          Is current drawing position at the begining of the line? This flag is undefined for the line-number drawing.
 boolean isEOL()
          Is current drawing position at the end of the line This flag is undefined for the line-number drawing.
 void setBackColor(Color backColor)
          Set current background color
 void setFont(Font font)
          Set current font
 void setForeColor(Color foreColor)
          Set current foreground color
 void setStrikeThroughColor(Color strikeThroughColor)
          Set current underline color
 void setUnderlineColor(Color underlineColor)
          Set current underline color
 void setWaveUnderlineColor(Color waveUnderlineColor)
          Set current wave underline color
 

Method Detail

getForeColor

Color getForeColor()
Get current foreground color


setForeColor

void setForeColor(Color foreColor)
Set current foreground color


getBackColor

Color getBackColor()
Get current background color


setBackColor

void setBackColor(Color backColor)
Set current background color


getUnderlineColor

Color getUnderlineColor()
Get current underline color


setUnderlineColor

void setUnderlineColor(Color underlineColor)
Set current underline color


getWaveUnderlineColor

Color getWaveUnderlineColor()
Get current wave underline color


setWaveUnderlineColor

void setWaveUnderlineColor(Color waveUnderlineColor)
Set current wave underline color


getStrikeThroughColor

Color getStrikeThroughColor()
Get current strike-through color


setStrikeThroughColor

void setStrikeThroughColor(Color strikeThroughColor)
Set current underline color


getFont

Font getFont()
Get current font


setFont

void setFont(Font font)
Set current font


getStartOffset

int getStartOffset()
Get start position of the drawing. This value stays unchanged during the line-number drawing.


getEndOffset

int getEndOffset()
Get end position of the drawing. This value stays unchanged during the line-number drawing.


isBOL

boolean isBOL()
Is current drawing position at the begining of the line? This flag is undefined for the line-number drawing.


isEOL

boolean isEOL()
Is current drawing position at the end of the line This flag is undefined for the line-number drawing.


getEditorUI

EditorUI getEditorUI()
Get draw info for the component that is currently drawn.


getTokenID

TokenID getTokenID()
Get token type number according to the appropriate syntax scanner


getTokenContextPath

TokenContextPath getTokenContextPath()
Get the token-context-path for the token


getTokenOffset

int getTokenOffset()
Get starting position in the document of the token being drawn


getTokenLength

int getTokenLength()
Get length of the token text


getFragmentOffset

int getFragmentOffset()
Get the starting position in the document of the fragment of the token being drawn.


getFragmentLength

int getFragmentLength()
Get the length of the fragment of the token being drawn


getBuffer

char[] getBuffer()
Get the buffer with the characters being drawn. No changes can be done to characters in the buffer.


getBufferStartOffset

int getBufferStartOffset()
Get the position in the document where the buffer starts. The area between getDrawStartOffset() and getDrawEndOffset will contain valid characters. However the first token can start even under getDrawStartOffset(). In this case the valid area starts at getTokenOffset() of the first token.


org.netbeans.modules.editor.lib/1 1.14.0 3

Built on May 28 2007.  |  Portions Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.