diff options
Diffstat (limited to 'src/cuchaz/enigma/gui/SelectionHighlightPainter.java')
| -rw-r--r-- | src/cuchaz/enigma/gui/SelectionHighlightPainter.java | 15 |
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; | |||
| 20 | import javax.swing.text.Highlighter; | 20 | import javax.swing.text.Highlighter; |
| 21 | import javax.swing.text.JTextComponent; | 21 | import javax.swing.text.JTextComponent; |
| 22 | 22 | ||
| 23 | public class SelectionHighlightPainter implements Highlighter.HighlightPainter | 23 | public 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 | } |