summaryrefslogtreecommitdiff
path: root/src/cuchaz/enigma/gui/SelectionHighlightPainter.java
diff options
context:
space:
mode:
authorGravatar jeff2015-01-13 23:25:04 -0500
committerGravatar jeff2015-01-13 23:25:04 -0500
commit959cb5fd4f9586ec3bd265b452fe25fe1db82e3f (patch)
treebdd8a2c52c2fe053ba3460614bde8542e5378dbe /src/cuchaz/enigma/gui/SelectionHighlightPainter.java
parentgot rid of gradle in favor of ivy+ssjb (diff)
downloadenigma-fork-959cb5fd4f9586ec3bd265b452fe25fe1db82e3f.tar.gz
enigma-fork-959cb5fd4f9586ec3bd265b452fe25fe1db82e3f.tar.xz
enigma-fork-959cb5fd4f9586ec3bd265b452fe25fe1db82e3f.zip
source format change
don't hate me too much if you were planning a big merge. =P
Diffstat (limited to 'src/cuchaz/enigma/gui/SelectionHighlightPainter.java')
-rw-r--r--src/cuchaz/enigma/gui/SelectionHighlightPainter.java15
1 files changed, 7 insertions, 8 deletions
diff --git a/src/cuchaz/enigma/gui/SelectionHighlightPainter.java b/src/cuchaz/enigma/gui/SelectionHighlightPainter.java
index 35f9451..5e189d2 100644
--- a/src/cuchaz/enigma/gui/SelectionHighlightPainter.java
+++ b/src/cuchaz/enigma/gui/SelectionHighlightPainter.java
@@ -20,16 +20,15 @@ import java.awt.Shape;
20import javax.swing.text.Highlighter; 20import javax.swing.text.Highlighter;
21import javax.swing.text.JTextComponent; 21import javax.swing.text.JTextComponent;
22 22
23public class SelectionHighlightPainter implements Highlighter.HighlightPainter 23public class SelectionHighlightPainter implements Highlighter.HighlightPainter {
24{ 24
25 @Override 25 @Override
26 public void paint( Graphics g, int start, int end, Shape shape, JTextComponent text ) 26 public void paint(Graphics g, int start, int end, Shape shape, JTextComponent text) {
27 {
28 // draw a thick border 27 // draw a thick border
29 Graphics2D g2d = (Graphics2D)g; 28 Graphics2D g2d = (Graphics2D)g;
30 Rectangle bounds = BoxHighlightPainter.getBounds( text, start, end ); 29 Rectangle bounds = BoxHighlightPainter.getBounds(text, start, end);
31 g2d.setColor( Color.black ); 30 g2d.setColor(Color.black);
32 g2d.setStroke( new BasicStroke( 2.0f ) ); 31 g2d.setStroke(new BasicStroke(2.0f));
33 g2d.drawRoundRect( bounds.x, bounds.y, bounds.width, bounds.height, 4, 4 ); 32 g2d.drawRoundRect(bounds.x, bounds.y, bounds.width, bounds.height, 4, 4);
34 } 33 }
35} 34}