Changeset 1513 for trunk/src/org/expeditee/items/Item.java
- Timestamp:
- 02/19/20 15:29:48 (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/expeditee/items/Item.java
r1511 r1513 3658 3658 } 3659 3659 } 3660 3661 public void setAnchorCenterX(Integer anchor) { 3662 this._anchoring.setCenterXAnchor(anchor); 3663 if (anchor != null) { 3664 anchorConstraints(); 3665 int alignedToLeft = DisplayController.getFramePaintArea().getCentreX() + anchor; 3666 int alignedToCenter = alignedToLeft - (getBoundsWidth() / 2); 3667 setX(alignedToCenter); 3668 } 3669 3670 if (isSurrogate()) { 3671 surrogatePropertyInheritance.put(DefaultFrameWriter.ANCHOR_CENTERX_STR, false); 3672 Item primary = getPrimary(); 3673 if (subjectToInheritanceCheckOnSave(DefaultFrameWriter.ANCHOR_CENTERX_STR)) { 3674 EncryptionDetail inheritanceCheckOnSave = new EncryptionDetail(EncryptionDetail.Type.InheritanceCheckOnSave); 3675 primary.primaryPropertyEncryption.put(DefaultFrameWriter.ANCHOR_CENTERX_STR, inheritanceCheckOnSave); 3676 } 3677 } 3678 } 3660 3679 3661 3680 public void setAnchorRight(Integer anchor) { … … 3694 3713 } 3695 3714 } 3715 3716 public void setAnchorCenterY(Integer anchor) { 3717 this._anchoring.setCenterYAnchor(anchor); 3718 if (anchor != null) { 3719 anchorConstraints(); 3720 int alignedToTop = DisplayController.getFramePaintArea().getCentreY() + anchor; 3721 int alignedToCenter = alignedToTop - (getBoundsHeight() / 2); 3722 setY(alignedToCenter); 3723 } 3724 3725 if (isSurrogate()) { 3726 surrogatePropertyInheritance.put(DefaultFrameWriter.ANCHOR_CENTERY_STR, false); 3727 Item primary = getPrimary(); 3728 if (subjectToInheritanceCheckOnSave(DefaultFrameWriter.ANCHOR_CENTERY_STR)) { 3729 EncryptionDetail inheritanceCheckOnSave = new EncryptionDetail(EncryptionDetail.Type.InheritanceCheckOnSave); 3730 primary.primaryPropertyEncryption.put(DefaultFrameWriter.ANCHOR_CENTERY_STR, inheritanceCheckOnSave); 3731 } 3732 } 3733 } 3696 3734 3697 3735 … … 3712 3750 } 3713 3751 } 3714 3752 3715 3753 public boolean isAnchored() 3716 3754 { … … 3755 3793 } else { 3756 3794 return _anchoring.getBottomAnchor(); 3795 } 3796 } 3797 3798 public Integer getAnchorCenterX() { 3799 if (isSurrogate() && surrogatePropertyInheritance.get(DefaultFrameWriter.ANCHOR_CENTERX_STR)) { 3800 return this.getPrimary().getAnchorCenterX(); 3801 } else { 3802 return _anchoring.getCenterXAnchor(); 3803 } 3804 } 3805 3806 public Integer getAnchorCenterY() { 3807 if (isSurrogate() && surrogatePropertyInheritance.get(DefaultFrameWriter.ANCHOR_CENTERY_STR)) { 3808 return this.getPrimary().getAnchorCenterY(); 3809 } else { 3810 return _anchoring.getCenterYAnchor(); 3757 3811 } 3758 3812 }
Note:
See TracChangeset
for help on using the changeset viewer.