javax.swing.text.WrappedPlainView类的使用及代码示例

x33g5p2x  于2022-02-03 转载在 其他  
字(4.2k)|赞(0)|评价(0)|浏览(97)

本文整理了Java中javax.swing.text.WrappedPlainView类的一些代码示例,展示了WrappedPlainView类的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。WrappedPlainView类的具体详情如下:
包路径:javax.swing.text.WrappedPlainView
类名称:WrappedPlainView

WrappedPlainView介绍

暂无

代码示例

代码示例来源:origin: bobbylight/RSyntaxTextArea

/**
 * Creates the view for an element.  Returns a WrappedPlainView or
 * PlainView.
 *
 * @param elem The element.
 * @return The view.
 */
@Override
public View create(Element elem) {
  if (textArea.getLineWrap()) {
    return new WrappedPlainView(elem, textArea.getWrapStyleWord());
  }
  else {
    return new PlainView(elem);
  }
}

代码示例来源:origin: org.gosu-lang.gosu/gosu-editor

/**
 * Renders using the given rendering surface and area on that surface.
 * This is implemented to invalidate the lexical scanner after rendering
 * so that the next request to drawUnselectedText will set a new range
 * for the scanner.
 *
 * @param g The rendering surface to use
 * @param a The allocated region to render into
 */
@Override
public void paint( Graphics g, Shape a )
{
 super.paint( g, a );
 _lexer = null;
}

代码示例来源: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 );
}

代码示例来源:origin: net.sf.squirrel-sql.thirdparty-non-maven/openide

/** Plain view for the element
*/
public View create(Element elem) {
  return new WrappedPlainView(elem);
}

代码示例来源:origin: org.gosu-lang.gosu/gosu-lab

/**
 * Renders using the given rendering surface and area on that surface.
 * This is implemented to invalidate the lexical scanner after rendering
 * so that the next request to drawUnselectedText will set a new range
 * for the scanner.
 *
 * @param g The rendering surface to use
 * @param a The allocated region to render into
 */
@Override
public void paint( Graphics g, Shape a )
{
 super.paint( g, a );
 _lexer = null;
}

代码示例来源:origin: org.netbeans.api/org-openide-text

/** Plain view for the element
*/
public View create(Element elem) {
  return new WrappedPlainView(elem);
}

代码示例来源:origin: net.sf.squirrel-sql.thirdpary-non-maven/openide

/** Plain view for the element
*/
public View create(Element elem) {
  return new WrappedPlainView(elem);
}

代码示例来源:origin: org.nuiton.thirdparty/rsyntaxtextarea

/**
 * Creates the view for an element.  Returns a WrappedPlainView or
 * PlainView.
 *
 * @param elem The element.
 * @return The view.
 */
public View create(Element elem) {
  if (textArea.getLineWrap())
    return new WrappedPlainView(elem, textArea.getWrapStyleWord());
  else
    return new PlainView(elem);
}

代码示例来源:origin: org.codehaus.jtstand/jtstand-editor

/**
 * Creates the view for an element.  Returns a WrappedPlainView or
 * PlainView.
 *
 * @param elem The element.
 * @return The view.
 */
public View create(Element elem) {
  if (textArea.getLineWrap())
    return new WrappedPlainView(elem, textArea.getWrapStyleWord());
  else
    return new PlainView(elem);
}

代码示例来源:origin: com.fifesoft/rsyntaxtextarea

/**
 * Creates the view for an element.  Returns a WrappedPlainView or
 * PlainView.
 *
 * @param elem The element.
 * @return The view.
 */
@Override
public View create(Element elem) {
  if (textArea.getLineWrap()) {
    return new WrappedPlainView(elem, textArea.getWrapStyleWord());
  }
  else {
    return new PlainView(elem);
  }
}

相关文章