Ignore:
Timestamp:
05/10/18 16:04:51 (6 years ago)
Author:
davidb
Message:

Reworking of the code-base to separate logic from graphics. This version of Expeditee now supports a JFX graphics as an alternative to SWING

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/expeditee/agents/SwitchyardTree.java

    r919 r1102  
    1919package org.expeditee.agents;
    2020
    21 import java.awt.Color;
    22 import java.awt.geom.Point2D;
    23 
     21import org.expeditee.core.Colour;
     22import org.expeditee.core.Point;
    2423import org.expeditee.gui.Frame;
    2524import org.expeditee.gui.FrameIO;
     
    4443                                        Frame childFrame = FrameIO.LoadFrame(link);
    4544                                        if (childFrame != null) {
    46                                                 Point2D.Float lastItemEnd = textItem.getParagraphEndPosition();
     45                                                Point lastItemEnd = textItem.getParagraphEndPosition();
    4746                                                for (Text childItem : childFrame.getBodyTextItems(false)) {
    4847                                                        // look for red items (remember get color may be null
    49                                                         if (Color.RED.equals(childItem.getPaintColor())) {
     48                                                        if (Colour.RED.equals(childItem.getPaintColor())) {
    5049                                                                // make a copy and add to parent frame
    5150                                                                Text itemCopy = childItem.copy();
    5251                                                                // add to the right of parent item
    53                                                                 lastItemEnd.setLocation(lastItemEnd.x + 20, lastItemEnd.y);
     52                                                                lastItemEnd.set(lastItemEnd.x + 20, lastItemEnd.y);
    5453                                                                itemCopy.setPosition(lastItemEnd.x, lastItemEnd.y);
    5554                                                                lastItemEnd = itemCopy
Note: See TracChangeset for help on using the changeset viewer.