Changeset 1102 for trunk/src/org/expeditee/io/flowlayout/XItem.java
- Timestamp:
- 05/10/18 16:04:51 (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/expeditee/io/flowlayout/XItem.java
r919 r1102 19 19 package org.expeditee.io.flowlayout; 20 20 21 import java.awt.Point;22 import java.awt.Rectangle;23 21 22 import org.expeditee.core.Point; 23 import org.expeditee.core.bounds.AxisAlignedBoxBounds; 24 24 import org.expeditee.items.Item; 25 25 26 26 public abstract class XItem 27 27 { 28 protected Rectanglebounding_rect;28 protected AxisAlignedBoxBounds bounding_rect; 29 29 30 30 protected XItem() … … 33 33 } 34 34 35 protected XItem( Rectangleimprint_bounding_rect)35 protected XItem(AxisAlignedBoxBounds imprint_bounding_rect) 36 36 { 37 37 this.bounding_rect = imprint_bounding_rect; … … 40 40 public int getX() 41 41 { 42 return bounding_rect. x;42 return bounding_rect.getMinX(); 43 43 } 44 44 … … 46 46 { 47 47 // name alias for getX() 48 return bounding_rect. x;48 return bounding_rect.getMinX(); 49 49 } 50 50 51 51 public int getY() 52 52 { 53 return bounding_rect. y;53 return bounding_rect.getMinY(); 54 54 } 55 55 … … 57 57 { 58 58 // name alias for getY() 59 return bounding_rect. y;59 return bounding_rect.getMinY(); 60 60 } 61 61 62 62 public int getBoundingYBot() 63 63 { 64 return bounding_rect. y + bounding_rect.height -1;64 return bounding_rect.getMaxY(); 65 65 } 66 66 67 67 public int getBoundingXRight() 68 68 { 69 return bounding_rect. x + bounding_rect.width -1;69 return bounding_rect.getMaxX(); 70 70 } 71 71 72 72 public int getBoundingWidth() 73 73 { 74 return bounding_rect. width;74 return bounding_rect.getWidth(); 75 75 } 76 76 77 77 public int getBoundingHeight() 78 78 { 79 return bounding_rect. height;79 return bounding_rect.getHeight(); 80 80 } 81 81 82 public RectanglegetBoundingRect()82 public AxisAlignedBoxBounds getBoundingRect() 83 83 { 84 84 return bounding_rect; 85 85 } 86 86 87 public Rectangle setBoundingRect(Rectanglerect)87 public AxisAlignedBoxBounds setBoundingRect(AxisAlignedBoxBounds rect) 88 88 { 89 89 return bounding_rect = rect;
Note:
See TracChangeset
for help on using the changeset viewer.