Skip to content

Commit

Permalink
changed a couple method names to be more descriptive
Browse files Browse the repository at this point in the history
  • Loading branch information
capnmidnight committed Nov 25, 2012
1 parent 4875646 commit 15dda8f
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions src/com/wedusc/ui/EasyEditorPane.java
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
*/ */
package com.wedusc.ui; package com.wedusc.ui;


import java.awt.event.KeyEvent;
import javax.swing.text.html.HTMLDocument; import javax.swing.text.html.HTMLDocument;


/** /**
Expand All @@ -13,23 +12,23 @@
*/ */
public class EasyEditorPane extends javax.swing.JEditorPane { public class EasyEditorPane extends javax.swing.JEditorPane {


public boolean embolden() { public boolean toggleBoldAtSelection() {
return simpleEdit("b", ""); return simpleEdit("b", "");
} }


public boolean italicize() { public boolean toggleItalicAtSelection() {
return simpleEdit("i", ""); return simpleEdit("i", "");
} }


public boolean underline() { public boolean toggleUnderlineAtSelection() {
return simpleEdit("u", ""); return simpleEdit("u", "");
} }


public boolean centerText() { public boolean toggleCenterAtSelection() {
return simpleEdit("center", ""); return simpleEdit("center", "");
} }


public boolean setFontAttributes(String color, String face, int size) { public boolean toggleFontAttributesAtSelection(String color, String face, int size) {
return simpleEdit("font", String.format(" color=\"%s\" face=\"%s\" size=\"%d\"", color, face, size)); return simpleEdit("font", String.format(" color=\"%s\" face=\"%s\" size=\"%d\"", color, face, size));
} }


Expand Down

0 comments on commit 15dda8f

Please sign in to comment.