|
|
|
@ -29,23 +29,23 @@ import java.util.function.BiFunction;
|
|
|
|
|
/** @author Jannis Weis */ |
|
|
|
|
public enum Alignment { |
|
|
|
|
NORTH(AlignmentHelper.align(HOR_CENTER_INSIDE, VERT_TOP_INSIDE), |
|
|
|
|
AlignmentHelper.align(HOR_CENTER_OUTSIDE, VERT_TOP_OUTSIDE)), |
|
|
|
|
AlignmentHelper.align(HOR_CENTER_OUTSIDE, VERT_TOP_OUTSIDE)), |
|
|
|
|
SOUTH(AlignmentHelper.align(HOR_CENTER_INSIDE, VERT_BOTTOM_INSIDE), |
|
|
|
|
AlignmentHelper.align(HOR_CENTER_OUTSIDE, VERT_BOTTOM_OUTSIDE)), |
|
|
|
|
AlignmentHelper.align(HOR_CENTER_OUTSIDE, VERT_BOTTOM_OUTSIDE)), |
|
|
|
|
EAST(AlignmentHelper.align(HOR_RIGHT_INSIDE, VERT_CENTER_INSIDE), |
|
|
|
|
AlignmentHelper.align(HOR_RIGHT_OUTSIDE, VERT_CENTER_OUTSIDE)), |
|
|
|
|
AlignmentHelper.align(HOR_RIGHT_OUTSIDE, VERT_CENTER_OUTSIDE)), |
|
|
|
|
WEST(AlignmentHelper.align(HOR_LEFT_INSIDE, VERT_CENTER_INSIDE), |
|
|
|
|
AlignmentHelper.align(HOR_LEFT_OUTSIDE, VERT_CENTER_OUTSIDE)), |
|
|
|
|
AlignmentHelper.align(HOR_LEFT_OUTSIDE, VERT_CENTER_OUTSIDE)), |
|
|
|
|
NORTH_EAST(AlignmentHelper.align(HOR_RIGHT_INSIDE, VERT_TOP_INSIDE), |
|
|
|
|
AlignmentHelper.align(HOR_RIGHT_OUTSIDE, VERT_TOP_OUTSIDE)), |
|
|
|
|
AlignmentHelper.align(HOR_RIGHT_OUTSIDE, VERT_TOP_OUTSIDE)), |
|
|
|
|
NORTH_WEST(AlignmentHelper.align(HOR_LEFT_INSIDE, VERT_TOP_INSIDE), |
|
|
|
|
AlignmentHelper.align(HOR_LEFT_OUTSIDE, VERT_TOP_OUTSIDE)), |
|
|
|
|
AlignmentHelper.align(HOR_LEFT_OUTSIDE, VERT_TOP_OUTSIDE)), |
|
|
|
|
SOUTH_EAST(AlignmentHelper.align(HOR_RIGHT_INSIDE, VERT_BOTTOM_INSIDE), |
|
|
|
|
AlignmentHelper.align(HOR_RIGHT_OUTSIDE, VERT_BOTTOM_OUTSIDE)), |
|
|
|
|
AlignmentHelper.align(HOR_RIGHT_OUTSIDE, VERT_BOTTOM_OUTSIDE)), |
|
|
|
|
SOUTH_WEST(AlignmentHelper.align(HOR_LEFT_INSIDE, VERT_BOTTOM_INSIDE), |
|
|
|
|
AlignmentHelper.align(HOR_LEFT_OUTSIDE, VERT_BOTTOM_OUTSIDE)), |
|
|
|
|
AlignmentHelper.align(HOR_LEFT_OUTSIDE, VERT_BOTTOM_OUTSIDE)), |
|
|
|
|
CENTER(AlignmentHelper.align(HOR_CENTER_INSIDE, VERT_CENTER_INSIDE), |
|
|
|
|
AlignmentHelper.align(HOR_CENTER_OUTSIDE, VERT_CENTER_OUTSIDE)); |
|
|
|
|
AlignmentHelper.align(HOR_CENTER_OUTSIDE, VERT_CENTER_OUTSIDE)); |
|
|
|
|
|
|
|
|
|
private final BiFunction<Dimension, Rectangle, Point> alignInside; |
|
|
|
|
private final BiFunction<Dimension, Rectangle, Point> alignOutside; |
|
|
|
|