Files
javaGUItoolkit/src/guiTree/Components/Decorations/Placers/MiddleRightPlacer.java
Macocian Adrian Radu 01bd4ce2e6 changed lock
changed placer to abstract class
2020-06-10 21:41:05 +03:00

17 lines
420 B
Java

package guiTree.Components.Decorations.Placers;
import guiTree.Helper.Point2;
public class MiddleRightPlacer extends Placer {
@Override
public Point2<Integer> getPosition() {
if(parentSize == null) {
return new Point2<>(margin.c, margin.a);
}
int x = parentSize.x - size.x - margin.d;
int y = (parentSize.y - size.y) / 2;
return new Point2<>(x, y);
}
}