List of usage examples for javax.swing.text.html HTMLEditorKit.ItalicAction HTMLEditorKit.ItalicAction
HTMLEditorKit.ItalicAction
From source file:net.java.sip.communicator.impl.gui.main.chat.ChatWritePanel.java
/** * Enables the italic style/*from w ww .j a v a 2s.c o m*/ * @param b TRUE enable - FALSE disable */ public void setItalicStyleEnable(boolean b) { StyledEditorKit editorKit = (StyledEditorKit) editorPane.getEditorKit(); MutableAttributeSet attr = editorKit.getInputAttributes(); if (b && !StyleConstants.isItalic(attr)) { setStyleConstant(new HTMLEditorKit.ItalicAction(), StyleConstants.Italic); } }