Changeset 115 for trunk/src/org/expeditee/items/Dot.java
- Timestamp:
- 07/02/08 12:38:54 (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/expeditee/items/Dot.java
r108 r115 30 30 31 31 private boolean _filled = true; 32 33 protected boolean _filledHighlight = false; 34 32 35 33 public Dot(int id) { 36 34 super(); … … 89 87 public void paint(Graphics2D g) { 90 88 if (isHighlighted() /* && !Frame.FreeItems.contains(this) */) { 91 Color backgroundColor = g.getBackground();92 89 Color highlightColor = getHighlightColor(); 93 if (highlightColor.equals(backgroundColor)){94 highlightColor = ALTERNATE_HIGHLIGHT;95 }96 90 g.setColor(highlightColor); 97 91 g.setStroke(HIGHLIGHT_STROKE); … … 100 94 // this is drawn even if its part of a rectangle 101 95 Rectangle rect = getPolygon().getBounds(); 102 if (_mode == SelectedMode.Enclosed ||96 if (_mode == HighlightMode.Enclosed || 103 97 // Make sure single dots are highlighted filled 104 98 this.getConnected().size() <= 1) 105 99 g.fillRect(rect.x, rect.y, rect.width, rect.height); 106 else if (_mode == SelectedMode.Connected)100 else if (_mode == HighlightMode.Connected) 107 101 g.drawRect(rect.x, rect.y, rect.width, rect.height); 108 else if (_mode == SelectedMode.Normal) {102 else if (_mode == HighlightMode.Normal) { 109 103 g.fillOval(rect.x, rect.y, rect.width, rect.height); 110 104 } … … 153 147 * Updates the points of the polygon surrounding this Dot 154 148 */ 155 p rotectedvoid updatePolygon() {149 public void updatePolygon() { 156 150 int thick = Math.round(getThickness()); 157 151 // Sets a minimum size for the dot … … 182 176 183 177 @Override 184 public int set SelectionColor() {185 super.set SelectionColor();178 public int setHighlightColor() { 179 super.setHighlightColor(); 186 180 187 181 return Item.DEFAULT_CURSOR; … … 268 262 return "P " + getID(); 269 263 } 270 271 @Override 272 public void setFilledHighlight(boolean value) { 273 _filledHighlight = value; 274 } 275 264 276 265 @Override 277 266 public void delete() { … … 304 293 if (line.getID() < 0 && !current.getItems().contains(line)) { 305 294 line.setID(current.getNextItemID()); 306 line.set SelectionColor();295 line.setHighlightColor(); 307 296 // Mike: Why was this line here? 308 297 //anchor(line);
Note:
See TracChangeset
for help on using the changeset viewer.