Java 8 SimpleAttributeSet - top ranked examples from Open Source projects

These code examples were ranked by Codota’s semantic indexing as the best open source examples for Java 8 SimpleAttributeSet class.

This code example shows how to use the following methods:
This code example shows how to use the following methods:addAttribute
		this.action = action;
	} 
	@Override 
	public void insertTo(final JTextPane pane) throws Exception {
		Document doc = pane.getDocument();
		SimpleAttributeSet attrs = new SimpleAttributeSet();
		StyleConstants.setUnderline(attrs, true);
		StyleConstants.setForeground(attrs, Color.BLUE);// unvisited color
		// StyleConstants.setFontSize(null, 13); 
		attrs.addAttribute(HTML.Attribute.HREF, link);
		if(action != null){ 
			attrs.addAttribute("action", action);
			attrs.addAttribute("self", this);
		} 
		doc.insertString(doc.getLength(), link, attrs);
	} 
	 
	public String getLink() {
		return link;
	} 
5
CodeRank
Connect your IDE to all the code out there  Get Codota for Java
This code example shows how to use the following methods:addAttribute
This code example shows how to use the following methods:
		if (fontSize < 4) fontSize = FONT_SIZE;
		doc = getStyledDocument();
		regexStrings = new HashSet<String>();
			 
		//Put the initial text into the text pane. 
        plainText = new SimpleAttributeSet();
        StyleConstants.setFontFamily(plainText, fontFamily);
        StyleConstants.setFontSize(plainText, fontSize);
		 
		// make the regexFormatter 
		regexFormatter = new OMERegexFormatter(plainText);
		installListeners(); 
	} 
	 
	/** Creates a default instance. */ 
	public RegexTextPane() 
	{ 
		initialize(getFont().getFamily(), getFont().getSize());
	} 
	 
5
CodeRank
Connect your IDE to all the code out there  Get Codota for Java
This code example shows how to use the following methods:
		} else { 
			// Plain text geo, use dummy JTextArea 
 
			// set font and line spacing (guessing at this value) 
			dummyText.setFont(app.getPlainFont());
			MutableAttributeSet set = new SimpleAttributeSet();
			StyleConstants.setLineSpacing(set, 1);
			// StyleConstants.setSpaceBelow(set, (float) 0.5); 
			dummyText.setParagraphAttributes(set, true);
 
			dummyText.setText(previewGeo.getTextString());
			d = dummyText.getPreferredSize();
 
			// add some padding 
			d.height += padding;
			d.width += padding;
		} 
 
		// update this panel 
		ev.setPreferredSize(d);
4
CodeRank
Connect your IDE to all the code out there  Get Codota for Java
This code example shows how to use the following methods:
    public void setMaxSize(int maxSize) {
        this.maxSize = maxSize;
    } 
 
    public ColoredTextPane() { 
        style = new SimpleAttributeSet();
        this.setContentType("text/rtf");
        this.setEditorKit(new RTFEditorKit());
        doc = this.getDocument();
    } 
 
    /** 
     * Append text at the end of document, choosing foreground and background 
     * colors, and bold attribute. 
     * 
     * @param text Text to append 
     * @param color Foreground color 
     * @param bgColor Background color 
     * @param isBold Is the text bold ? 
     */ 
3
CodeRank
Connect your IDE to all the code out there  Get Codota for Java
This code example shows how to use the following methods:
This code example shows how to use the following methods:
		if (value.length() > 0) {
			to.addAttribute(HTML.Attribute.STYLE, value);
		} 
	} 
 
	final private MutableAttributeSet convAttr = new SimpleAttributeSet();
 
	/** 
	 * Create a new XHTMLWriter that will write the entire HTMLDocument. 
	 *  
	 * @param writer 
	 *            Writer to write to 
	 * @param doc 
	 *            Source document 
	 */ 
	public FixedHTMLWriter(final Writer writer, final HTMLDocument doc) {
		this(writer, doc, 0, doc.getLength());
	} 
 
	/** 
4
CodeRank
Connect your IDE to all the code out there  Get Codota for Java
This code example shows how to use the following methods:
		if (value.length() > 0) {
			to.addAttribute(HTML.Attribute.STYLE, value);
		} 
	} 
 
	final private MutableAttributeSet convAttr = new SimpleAttributeSet();
 
	/** 
	 * Create a new XHTMLWriter that will write the entire HTMLDocument. 
	 *  
	 * @param writer 
	 *            Writer to write to 
	 * @param doc 
	 *            Source document 
	 */ 
	public FixedHTMLWriter(final Writer writer, final HTMLDocument doc) {
		this(writer, doc, 0, doc.getLength());
	} 
 
	/** 
4
CodeRank
Connect your IDE to all the code out there  Get Codota for Java
This code example shows how to use the following methods:
See Code Examples for Java 8 SimpleAttributeSet Methods: