Changeset 72 for trunk/src/org/expeditee/items/Dot.java
- Timestamp:
- 05/23/08 09:02:59 (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/expeditee/items/Dot.java
r70 r72 9 9 import java.util.List; 10 10 11 import org.expeditee.gui.DisplayIO; 11 12 import org.expeditee.gui.Frame; 13 import org.expeditee.gui.FrameKeyboardActions; 12 14 13 15 /** … … 90 92 for (Line line : getLines()) 91 93 line.setColor(c); 92 }93 94 public void paintFill(Graphics2D g) {95 if (getFillColor() != null && getEnclosingDots() != null) {96 g.setColor(getFillColor());97 g.fillPolygon(getEnclosedShape());98 }99 94 } 100 95 … … 186 181 187 182 @Override 188 public Dotcopy() {183 public Item copy() { 189 184 Dot copy = new Dot(getX(), getY(), getID()); 190 185 … … 207 202 @Override 208 203 public void setAnnotation(boolean val) { 209 } 210 211 @Override 212 public boolean isAnnotation() { 213 return false; 204 DisplayIO.setCursorPosition(this.getPosition()); 205 //Make all the dots this dot is connected to be annotations 206 for(Item i: getAllConnected()) 207 if (i.isLineEnd()) 208 i._connectedToAnnotation = val; 209 210 FrameKeyboardActions.replaceDot(this, '@'); 214 211 } 215 212 … … 218 215 // if the item being merged with is another Dot 219 216 if (merger instanceof Dot) { 220 Dot dot = (Dot) merger;217 Item dot = (Item) merger; 221 218 merger.setPosition(this.getPosition()); 222 219 // prevent concurrency issues if removing lines … … 231 228 } else { 232 229 // check for duplicated lines as a result of merging 233 Dot check = (Dot) line.getOppositeEnd(dot);230 Item check = (Item) line.getOppositeEnd(dot); 234 231 boolean dup = false; 235 232
Note:
See TracChangeset
for help on using the changeset viewer.