X-Git-Url: https://git.argeo.org/?a=blobdiff_plain;f=org.argeo.cms.ui%2Fsrc%2Forg%2Fargeo%2Fcms%2Fui%2Futil%2FSimpleUxContext.java;fp=org.argeo.cms.ui%2Fsrc%2Forg%2Fargeo%2Fcms%2Fui%2Futil%2FSimpleUxContext.java;h=0000000000000000000000000000000000000000;hb=b7683883512d924a039a43c2e1102290aa49f64d;hp=f85a1ab538c9a9b76784f5dd99d1a806036bb818;hpb=03f646fd0d7e7ce393694c836c779bc67a4eef55;p=lgpl%2Fargeo-commons.git diff --git a/org.argeo.cms.ui/src/org/argeo/cms/ui/util/SimpleUxContext.java b/org.argeo.cms.ui/src/org/argeo/cms/ui/util/SimpleUxContext.java deleted file mode 100644 index f85a1ab53..000000000 --- a/org.argeo.cms.ui/src/org/argeo/cms/ui/util/SimpleUxContext.java +++ /dev/null @@ -1,50 +0,0 @@ -package org.argeo.cms.ui.util; - -import org.argeo.cms.ui.UxContext; -import org.eclipse.swt.graphics.Point; -import org.eclipse.swt.graphics.Rectangle; -import org.eclipse.swt.widgets.Display; - -public class SimpleUxContext implements UxContext { - private Point size; - private Point small = new Point(400, 400); - - public SimpleUxContext() { - this(Display.getCurrent().getBounds()); - } - - public SimpleUxContext(Rectangle rect) { - this.size = new Point(rect.width, rect.height); - } - - public SimpleUxContext(Point size) { - this.size = size; - } - - @Override - public boolean isPortrait() { - return size.x >= size.y; - } - - @Override - public boolean isLandscape() { - return size.x < size.y; - } - - @Override - public boolean isSquare() { - return size.x == size.y; - } - - @Override - public boolean isSmall() { - return size.x <= small.x || size.y <= small.y; - } - - @Override - public boolean isMasterData() { - // TODO make it configurable - return true; - } - -}