/** * Returns StyledDocument object containing preformatted LEM Class description, followed by the * list of attributes that the Class has. * * @return the StyledDocument of the ClassNode. */ public StyledDocument getStyledDocument() { StyledDocument doc = new StyledDocument(); SimpleAttributeSet s = new SimpleAttributeSet(); StyleConstants.setFontFamily(s, "Times New Roman"); StyleConstants.setFontSize(s, 14); StyleConstants.setBold(s, true); StyleConstants.setForeground(s, Color.blue); StyledElement element = new StyledElement(toString() + "\n", s); doc.addStyle(element); SimpleAttributeSet s1 = new SimpleAttributeSet(); StyleConstants.setFontFamily(s1, "Times New Roman"); StyleConstants.setFontSize(s1, 14); StyleConstants.setBold(s1, false); StyleConstants.setForeground(s1, Color.black); StyledElement element1 = new StyledElement(getDescription(), s1); doc.addStyle(element1); StyledElement element2 = new StyledElement("\n-------------- Attributes ----------------\n", s1); doc.addStyle(element2); doc.append(attributeListing); return doc; }