Ignore:
Timestamp:
02/19/20 15:29:48 (4 years ago)
Author:
bnemhaus
Message:

You now have the ability to anchor Items to the center of the frame. AnchorCenterX: 0 will anchor a item directly to the vertical center of the frame. AnchorCenterY: 0 to the horizontal center of the frame. Negative numbers go left/up from the center, positive numbers right/down.

More work to come to deal with connected items such as rectangles made up on connected dots.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/expeditee/gui/Frame.java

    r1511 r1513  
    10041004                for (Item i : getSortedItems()) {
    10051005                        Integer anchorLeft   = i.getAnchorLeft();
     1006                        Integer anchorCenterX = i.getAnchorCenterX();
    10061007                        Integer anchorRight  = i.getAnchorRight();
    10071008                        Integer anchorTop    = i.getAnchorTop();
     1009                        Integer anchorCenterY = i.getAnchorCenterY();
    10081010                        Integer anchorBottom = i.getAnchorBottom();
    10091011       
     
    10161018                        }
    10171019                       
     1020                        if (anchorCenterX != null) {
     1021                                i.setAnchorCenterX(anchorCenterX);
     1022                                if (i.hasVector()) {
     1023                                        bReparse = true;
     1024                                }
     1025                        }
     1026                       
    10181027                        if (anchorRight != null) {
    10191028                                i.setAnchorRight(anchorRight);
     
    10251034                        if (anchorTop != null) {
    10261035                                i.setAnchorTop(anchorTop);
     1036                                if (i.hasVector()) {
     1037                                        bReparse = true;
     1038                                }
     1039                        }
     1040                       
     1041                        if (anchorCenterY != null) {
     1042                                i.setAnchorCenterY(anchorCenterY);
    10271043                                if (i.hasVector()) {
    10281044                                        bReparse = true;
Note: See TracChangeset for help on using the changeset viewer.