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/io/flowlayout/XItem.java

    r919 r1102  
    1919package org.expeditee.io.flowlayout;
    2020
    21 import java.awt.Point;
    22 import java.awt.Rectangle;
    2321
     22import org.expeditee.core.Point;
     23import org.expeditee.core.bounds.AxisAlignedBoxBounds;
    2424import org.expeditee.items.Item;
    2525
    2626public abstract class XItem
    2727{
    28         protected Rectangle bounding_rect;
     28        protected AxisAlignedBoxBounds bounding_rect;
    2929               
    3030        protected XItem()
     
    3333        }
    3434       
    35         protected XItem(Rectangle imprint_bounding_rect)
     35        protected XItem(AxisAlignedBoxBounds imprint_bounding_rect)
    3636        {
    3737                this.bounding_rect = imprint_bounding_rect;
     
    4040        public int getX()
    4141        {
    42                 return bounding_rect.x;
     42                return bounding_rect.getMinX();
    4343        }
    4444       
     
    4646        {
    4747                // name alias for getX()
    48                 return bounding_rect.x;
     48                return bounding_rect.getMinX();
    4949        }
    5050       
    5151        public int getY()
    5252        {
    53                 return bounding_rect.y;
     53                return bounding_rect.getMinY();
    5454        }
    5555       
     
    5757        {
    5858                // name alias for getY()
    59                 return bounding_rect.y;
     59                return bounding_rect.getMinY();
    6060        }
    6161       
    6262        public int getBoundingYBot()
    6363        {
    64                 return bounding_rect.y + bounding_rect.height -1;
     64                return bounding_rect.getMaxY();
    6565        }
    6666       
    6767        public int getBoundingXRight()
    6868        {
    69                 return bounding_rect.x + bounding_rect.width -1;
     69                return bounding_rect.getMaxX();
    7070        }
    7171       
    7272        public int getBoundingWidth()
    7373        {
    74                 return bounding_rect.width;
     74                return bounding_rect.getWidth();
    7575        }
    7676       
    7777        public int getBoundingHeight()
    7878        {
    79                 return bounding_rect.height;
     79                return bounding_rect.getHeight();
    8080        }
    8181       
    82         public Rectangle getBoundingRect()
     82        public AxisAlignedBoxBounds getBoundingRect()
    8383        {
    8484                return bounding_rect;
    8585        }
    8686       
    87         public Rectangle setBoundingRect(Rectangle rect)
     87        public AxisAlignedBoxBounds setBoundingRect(AxisAlignedBoxBounds rect)
    8888        {
    8989                return bounding_rect = rect;
Note: See TracChangeset for help on using the changeset viewer.