mirror of
https://github.com/macocianradu/javaGUItoolkit.git
synced 2026-03-18 13:40:04 +00:00
17 lines
420 B
Java
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);
|
|
}
|
|
}
|