diff options
Diffstat (limited to 'src/main/java/cuchaz/enigma/gui/SelectionHighlightPainter.java')
| -rw-r--r-- | src/main/java/cuchaz/enigma/gui/SelectionHighlightPainter.java | 29 |
1 files changed, 0 insertions, 29 deletions
diff --git a/src/main/java/cuchaz/enigma/gui/SelectionHighlightPainter.java b/src/main/java/cuchaz/enigma/gui/SelectionHighlightPainter.java deleted file mode 100644 index fcad07c..0000000 --- a/src/main/java/cuchaz/enigma/gui/SelectionHighlightPainter.java +++ /dev/null | |||
| @@ -1,29 +0,0 @@ | |||
| 1 | /******************************************************************************* | ||
| 2 | * Copyright (c) 2015 Jeff Martin. | ||
| 3 | * All rights reserved. This program and the accompanying materials | ||
| 4 | * are made available under the terms of the GNU Lesser General Public | ||
| 5 | * License v3.0 which accompanies this distribution, and is available at | ||
| 6 | * http://www.gnu.org/licenses/lgpl.html | ||
| 7 | * <p> | ||
| 8 | * Contributors: | ||
| 9 | * Jeff Martin - initial API and implementation | ||
| 10 | ******************************************************************************/ | ||
| 11 | package cuchaz.enigma.gui; | ||
| 12 | |||
| 13 | import java.awt.*; | ||
| 14 | |||
| 15 | import javax.swing.text.Highlighter; | ||
| 16 | import javax.swing.text.JTextComponent; | ||
| 17 | |||
| 18 | public class SelectionHighlightPainter implements Highlighter.HighlightPainter { | ||
| 19 | |||
| 20 | @Override | ||
| 21 | public void paint(Graphics g, int start, int end, Shape shape, JTextComponent text) { | ||
| 22 | // draw a thick border | ||
| 23 | Graphics2D g2d = (Graphics2D) g; | ||
| 24 | Rectangle bounds = BoxHighlightPainter.getBounds(text, start, end); | ||
| 25 | g2d.setColor(Color.black); | ||
| 26 | g2d.setStroke(new BasicStroke(2.0f)); | ||
| 27 | g2d.drawRoundRect(bounds.x, bounds.y, bounds.width, bounds.height, 4, 4); | ||
| 28 | } | ||
| 29 | } | ||