| 1 | // Copyright 2004-2007 Jean-Francois Poilpret |
| 2 | // |
| 3 | // Licensed under the Apache License, Version 2.0 (the "License"); |
| 4 | // you may not use this file except in compliance with the License. |
| 5 | // You may obtain a copy of the License at |
| 6 | // |
| 7 | // http://www.apache.org/licenses/LICENSE-2.0 |
| 8 | // |
| 9 | // Unless required by applicable law or agreed to in writing, software |
| 10 | // distributed under the License is distributed on an "AS IS" BASIS, |
| 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 12 | // See the License for the specific language governing permissions and |
| 13 | // limitations under the License. |
| 14 | |
| 15 | package net.sourceforge.hiveboard.drawing; |
| 16 | |
| 17 | import java.awt.BasicStroke; |
| 18 | import java.awt.Color; |
| 19 | |
| 20 | /** |
| 21 | * Simple POJO to encapsulate preferences related to the Highlighter tool of |
| 22 | * HiveBoard, ie color and stroke. |
| 23 | * |
| 24 | * @author Jean-Francois Poilpret |
| 25 | */ |
| 26 | public class HiliterPrefs |
| 27 | { |
| 28 | static public final String HILITER_PREFS_NAME = "hiliterPrefs"; |
| 29 | |
| 30 | public void setColor(Color color) |
| 31 | { |
| 32 | _color = color; |
| 33 | } |
| 34 | public Color getColor() |
| 35 | { |
| 36 | return _color; |
| 37 | } |
| 38 | |
| 39 | public void setStroke(BasicStroke stroke) |
| 40 | { |
| 41 | _stroke = stroke; |
| 42 | } |
| 43 | public BasicStroke getStroke() |
| 44 | { |
| 45 | return _stroke; |
| 46 | } |
| 47 | |
| 48 | static private final float HILITE_THICKNESS = 8.0f; |
| 49 | private Color _color = Color.RED; |
| 50 | private BasicStroke _stroke = new BasicStroke( HILITE_THICKNESS, |
| 51 | BasicStroke.CAP_ROUND, |
| 52 | BasicStroke.JOIN_ROUND); |
| 53 | } |