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

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

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

StyledDocument.getForeground介绍

暂无

代码示例

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

  1. /**
  2. Returns the foreground color based on a set of attributes.
  3. @param attributes The attributes.
  4. @return The foreground color.
  5. **/
  6. public synchronized Color getForeground (AttributeSet attributes)
  7. {
  8. return document_.getForeground (attributes);
  9. }

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

  1. /**
  2. * {@inheritDoc}
  3. */
  4. @Override
  5. public Color getForeground(AttributeSet attr) {
  6. return ((StyledDocument) delegate).getForeground(attr);
  7. }

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

  1. public java.awt.Color getForeground(AttributeSet attr) {
  2. return ((StyledDocument) original).getForeground(attr);
  3. }

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

  1. /**
  2. * {@inheritDoc}
  3. */
  4. public Color getForeground(AttributeSet attr) {
  5. return ((StyledDocument) delegate).getForeground(attr);
  6. }

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

  1. public java.awt.Color getForeground(AttributeSet attr) {
  2. return ((StyledDocument)original).getForeground (attr);
  3. }

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

  1. /**
  2. * {@inheritDoc}
  3. */
  4. @Override
  5. public Color getForeground(AttributeSet attr) {
  6. return ((StyledDocument) delegate).getForeground(attr);
  7. }

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

  1. public java.awt.Color getForeground(AttributeSet attr) {
  2. return ((StyledDocument)original).getForeground (attr);
  3. }

代码示例来源:origin: org.fudaa.framework.ctulu/ctulu-ui

  1. /** Method returns the border's color, or null if this is not a link
  2. */
  3. Color getBorderColor()
  4. {
  5. StyledDocument doc = (StyledDocument)getDocument();
  6. return doc.getForeground(getAttributes());
  7. }

代码示例来源:origin: RPTools/maptool

  1. @Override
  2. public Color getForeground() {
  3. View parent;
  4. if (fg == null && (parent = getParent()) != null) {
  5. Document doc = getDocument();
  6. AttributeSet attr = parent.getAttributes();
  7. if (attr != null && (doc instanceof StyledDocument)) {
  8. fg = ((StyledDocument) doc).getForeground(attr);
  9. }
  10. }
  11. return fg;
  12. }
  13. }

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

  1. do {
  2. Element element = doc.getCharacterElement(startIndex);
  3. color = doc.getForeground(element.getAttributes());
  4. startIndex++;
  5. } while (!color.equals(Color.RED));
  6. do {
  7. Element element = doc.getCharacterElement(endIndex);
  8. color = doc.getForeground(element.getAttributes());
  9. endIndex++;
  10. } while (color.equals(Color.RED));

代码示例来源:origin: org.fudaa.framework.ctulu/ctulu-bu

  1. g.setColor(_doc.getForeground(attributes));
  2. g.setFont (BuLib.deriveFont(_doc.getFont(attributes),-2));
  3. g.drawString(t,x,y);

代码示例来源:origin: RPTools/maptool

  1. topInset = bottomInset = (short) (getIntAttr(HTML.Attribute.VSPACE, 0) + borderSize);
  2. borderColor = ((StyledDocument) getDocument()).getForeground(getAttributes());

相关文章