Example usage for javax.swing.text StyledDocument getForeground

List of usage examples for javax.swing.text StyledDocument getForeground

Introduction

In this page you can find the example usage for javax.swing.text StyledDocument getForeground.

Prototype

public Color getForeground(AttributeSet attr);

Source Link

Document

Takes a set of attributes and turn it into a foreground color specification.

Usage

From source file:com.hexidec.ekit.component.RelativeImageView.java

/** Method returns the border's color, or null if this is not a link
*///w  w w  . j a  va2 s .  c o  m
Color getBorderColor() {
    StyledDocument doc = (StyledDocument) getDocument();
    return doc.getForeground(getAttributes());
}

From source file:org.pmedv.core.components.RelativeImageView.java

/**
 * Method returns the border's color, or null if this is not a link
 * /*from  w  w  w  .ja  v a 2s. co  m*/
 * @return the border color.
 */
public Color getBorderColor() {

    StyledDocument doc = (StyledDocument) getDocument();
    return doc.getForeground(getAttributes());
}