From 74edc74c2c7b3236f00bf92499bb884837673b7d Mon Sep 17 00:00:00 2001 From: lclc98 Date: Sat, 2 Jul 2016 20:13:13 +1000 Subject: Reformatting code --- src/main/java/cuchaz/enigma/gui/BoxHighlightPainter.java | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'src/main/java/cuchaz/enigma/gui/BoxHighlightPainter.java') diff --git a/src/main/java/cuchaz/enigma/gui/BoxHighlightPainter.java b/src/main/java/cuchaz/enigma/gui/BoxHighlightPainter.java index efe6b50..b66d13d 100644 --- a/src/main/java/cuchaz/enigma/gui/BoxHighlightPainter.java +++ b/src/main/java/cuchaz/enigma/gui/BoxHighlightPainter.java @@ -21,12 +21,12 @@ import javax.swing.text.JTextComponent; public abstract class BoxHighlightPainter implements Highlighter.HighlightPainter { - private Color m_fillColor; - private Color m_borderColor; + private Color fillColor; + private Color borderColor; protected BoxHighlightPainter(Color fillColor, Color borderColor) { - m_fillColor = fillColor; - m_borderColor = borderColor; + this.fillColor = fillColor; + this.borderColor = borderColor; } @Override @@ -34,17 +34,17 @@ public abstract class BoxHighlightPainter implements Highlighter.HighlightPainte Rectangle bounds = getBounds(text, start, end); // fill the area - if (m_fillColor != null) { - g.setColor(m_fillColor); + if (this.fillColor != null) { + g.setColor(this.fillColor); g.fillRoundRect(bounds.x, bounds.y, bounds.width, bounds.height, 4, 4); } // draw a box around the area - g.setColor(m_borderColor); + g.setColor(this.borderColor); g.drawRoundRect(bounds.x, bounds.y, bounds.width, bounds.height, 4, 4); } - protected static Rectangle getBounds(JTextComponent text, int start, int end) { + public static Rectangle getBounds(JTextComponent text, int start, int end) { try { // determine the bounds of the text Rectangle bounds = text.modelToView(start).union(text.modelToView(end)); -- cgit v1.2.3