javax.swing.text.StyledDocument.getLogicalStyle()方法的使用及代码示例

x33g5p2x  于2022-01-29 转载在 其他  
字(2.0k)|赞(0)|评价(0)|浏览(110)

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

StyledDocument.getLogicalStyle介绍

暂无

代码示例

代码示例来源:origin: net.sf.jt400/jt400

/**
Returns the logical style for a given offset within the document.

@param offset   The offset within the document.
@return         The logical style at the specified offset.
**/
  public synchronized Style getLogicalStyle (int offset)
  {
    return document_.getLogicalStyle (offset);
  }

代码示例来源:origin: tmyroadctfig/swingx

/**
 * {@inheritDoc}
 */
@Override
public Style getLogicalStyle(int p) {
  return ((StyledDocument) delegate).getLogicalStyle(p);
}

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

/**
 * {@inheritDoc}
 */
public Style getLogicalStyle(int p) {
  return ((StyledDocument) delegate).getLogicalStyle(p);
}

代码示例来源:origin: org.swinglabs.swingx/swingx-all

/**
 * {@inheritDoc}
 */
@Override
public Style getLogicalStyle(int p) {
  return ((StyledDocument) delegate).getLogicalStyle(p);
}

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

public Style getLogicalStyle(int p) {
  return ((StyledDocument) original).getLogicalStyle(p);
}

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

public Style getLogicalStyle(int p) {
  return ((StyledDocument)original).getLogicalStyle (p);
}

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

public Style getLogicalStyle(int p) {
  return ((StyledDocument)original).getLogicalStyle (p);
}

代码示例来源:origin: stackoverflow.com

StyledDocument doc = (StyledDocument) jTextpane.getDocument();
Style logicalStyle = doc.getLogicalStyle(jTextpane.getSelectionStart());
Element element = doc.getCharacterElement(start);
AttributeSet as = element.getAttributes();
Checking the Text,which is Bold and Italic

boolean isBold = StyleConstants.isBold(as) ? false : true;
boolean isItalic = StyleConstants.isItalic(as);
System.out.println("selected value is isItalic?"+isItalic);
System.out.println("selected value is isBold?"+isBold);

相关文章