本文整理了Java中javax.swing.text.WrappedPlainView.drawSelectedText()
方法的一些代码示例,展示了WrappedPlainView.drawSelectedText()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。WrappedPlainView.drawSelectedText()
方法的具体详情如下:
包路径:javax.swing.text.WrappedPlainView
类名称:WrappedPlainView
方法名:drawSelectedText
暂无
代码示例来源:origin: org.gosu-lang.gosu/gosu-editor
/**
* Renders the given range in the model as normal unselected text. This is
* implemented to paint colors based upon the token-to-color translations.
* To reduce the number of calls to the Graphics object, text is batched up
* until a color change is detected or the entire requested range has been
* reached.
*
* @param g The graphics context
* @param x The starting X coordinate
* @param y The starting Y coordinate
* @param p0 The beginning position in the model
* @param p1 The ending position in the model
*
* @return The location of the end of the range
*
* @throws javax.swing.text.BadLocationException if the range is invalid
*/
@Override
protected int drawSelectedText( Graphics g, int x, int y, int p0, int p1 ) throws BadLocationException
{
//return drawUnselectedText( g, x, y, p0, p1 );
return super.drawSelectedText( g, x, y, p0, p1 );
}
代码示例来源:origin: org.gosu-lang.gosu/gosu-lab
/**
* Renders the given range in the model as normal unselected text. This is
* implemented to paint colors based upon the token-to-color translations.
* To reduce the number of calls to the Graphics object, text is batched up
* until a color change is detected or the entire requested range has been
* reached.
*
* @param g The graphics context
* @param x The starting X coordinate
* @param y The starting Y coordinate
* @param p0 The beginning position in the model
* @param p1 The ending position in the model
*
* @return The location of the end of the range
*
* @throws javax.swing.text.BadLocationException if the range is invalid
*/
@Override
protected int drawSelectedText( Graphics g, int x, int y, int p0, int p1 ) throws BadLocationException
{
//return drawUnselectedText( g, x, y, p0, p1 );
return super.drawSelectedText( g, x, y, p0, p1 );
}
内容来源于网络,如有侵权,请联系作者删除!