private Style strikeOutStyle;
private Style fontSizeStyle;
private void prepareStyles() {
StyledDocument doc = textPane.getStyledDocument();
Map<String, Color> keyWordColorMap = owlEditorKit.getWorkspace().getKeyWordColorMap();
for (String keyWord : keyWordColorMap.keySet()) {
Style s = doc.addStyle(keyWord, null);
Color color = keyWordColorMap.get(keyWord);
StyleConstants.setForeground(s, color);
StyleConstants.setBold(s, true);
}
plainStyle = doc.addStyle("PLAIN_STYLE", null);
// StyleConstants.setForeground(plainStyle, Color.BLACK);
StyleConstants.setItalic(plainStyle, false);
StyleConstants.setSpaceAbove(plainStyle, 0);
// StyleConstants.setFontFamily(plainStyle, textPane.getFont().getFamily());
boldStyle = doc.addStyle("BOLD_STYLE", null);
StyleConstants.setBold(boldStyle, true);
nonBoldStyle = doc.addStyle("NON_BOLD_STYLE", null);
StyleConstants.setBold(nonBoldStyle, false);
selectionForeground = doc.addStyle("SEL_FG_STYPE", null);
StyleConstants.setForeground(selectionForeground, SELECTION_FOREGROUND);
foreground = doc.addStyle("FG_STYLE", null);
StyleConstants.setForeground(foreground, FOREGROUND);
linkStyle = doc.addStyle("LINK_STYLE", null);
StyleConstants.setForeground(linkStyle, Color.BLUE);
StyleConstants.setUnderline(linkStyle, true);
inconsistentClassStyle = doc.addStyle("INCONSISTENT_CLASS_STYLE", null);
StyleConstants.setForeground(inconsistentClassStyle, Color.RED);
focusedEntityStyle = doc.addStyle("FOCUSED_ENTITY_STYLE", null);
StyleConstants.setForeground(focusedEntityStyle, Color.BLACK);
StyleConstants.setBackground(focusedEntityStyle, new Color(220, 220, 250));
newAddedEntityStyle = doc.addStyle("NEWADDED_ENEITY_STYLE", null);
StyleConstants.setForeground(newAddedEntityStyle, Color.GRAY);
confirmedEntityStyle = doc.addStyle("CONFIRMED_ENTITY_STYLE", null);
StyleConstants.setForeground(confirmedEntityStyle, Color.BLACK);
StyleConstants.setBold(confirmedEntityStyle, true);
revisedEntityStyle = doc.addStyle("REVISED_ENEITY_STYLE", null);
StyleConstants.setForeground(revisedEntityStyle, Color.BLUE);
StyleConstants.setStrikeThrough(revisedEntityStyle, true);
StyleConstants.setBold(revisedEntityStyle, false);
// linespacingStyle = doc.addStyle("LINE_SPACING_STYLE", null);
// StyleConstants.setLineSpacing(linespacingStyle, 0.0f);
annotationURIStyle = doc.addStyle("ANNOTATION_URI_STYLE", null);
StyleConstants.setForeground(annotationURIStyle, Color.BLUE);
StyleConstants.setItalic(annotationURIStyle, true);
ontologyURIStyle = doc.addStyle("ONTOLOGY_URI_STYLE", null);
StyleConstants.setForeground(ontologyURIStyle, Color.GRAY);
commentedOutStyle = doc.addStyle("COMMENTED_OUT_STYLE", null);
StyleConstants.setForeground(commentedOutStyle, Color.GRAY);
StyleConstants.setItalic(commentedOutStyle, true);
strikeOutStyle = doc.addStyle("STRIKE_OUT", null);
StyleConstants.setStrikeThrough(strikeOutStyle, true);
StyleConstants.setBold(strikeOutStyle, false);
fontSizeStyle = doc.addStyle("FONT_SIZE", null);
StyleConstants.setFontSize(fontSizeStyle, 40);
}