Advertisement
AVONnadozie

Italic

Dec 10th, 2013
126
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.60 KB | None | 0 0
  1. private void italic() {
  2.         // TODO add your handling code here:
  3.         MutableAttributeSet attrib = new SimpleAttributeSet();
  4.         AttributeSet old = editor.getCharacterAttributes();
  5.         if (old != null) {
  6.             attrib.addAttributes(old.copyAttributes());
  7.             if (StyleConstants.isItalic(attrib)) {
  8.                 StyleConstants.setItalic(attrib, false);
  9.             } else {
  10.                 StyleConstants.setItalic(attrib, true);
  11.             }
  12.             editor.setCharacterAttributes(attrib, true);
  13. //            isReportOpen = true;
  14.         }
  15.  
  16.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement