use of org.eclipse.scout.rt.shared.data.basic.AffineTransformSpec in project scout.rt by eclipse.
the class AbstractImageField method doPan.
@Override
public void doPan(double dx, double dy) {
AffineTransformSpec t = getImageTransform();
t.dx = dx;
t.dy = dy;
setImageTransform(t);
}
use of org.eclipse.scout.rt.shared.data.basic.AffineTransformSpec in project scout.rt by eclipse.
the class AbstractImageField method initConfig.
@Override
protected void initConfig() {
m_uiFacade = BEANS.get(ModelContextProxy.class).newProxy(new P_UIFacade(), ModelContext.copyCurrent());
super.initConfig();
setImageTransform(new AffineTransformSpec());
setAutoFit(getConfiguredAutoFit());
setImageId(getConfiguredImageId());
setPanDelta(getConfiguredPanDelta());
setRotateDelta(getConfiguredRotateDelta());
setZoomDelta(getConfiguredZoomDelta());
setDragType(getConfiguredDragType());
setDropType(getConfiguredDropType());
setDropMaximumSize(getConfiguredDropMaximumSize());
setScrollBarEnabled(getConfiguredScrollBarEnabled());
// menus
List<Class<? extends IMenu>> declaredMenus = getDeclaredMenus();
List<IMenu> contributedMenus = m_contributionHolder.getContributionsByClass(IMenu.class);
OrderedCollection<IMenu> menus = new OrderedCollection<IMenu>();
for (Class<? extends IMenu> menuClazz : declaredMenus) {
menus.addOrdered(ConfigurationUtility.newInnerInstance(this, menuClazz));
}
menus.addAllOrdered(contributedMenus);
injectMenusInternal(menus);
new MoveActionNodesHandler<IMenu>(menus).moveModelObjects();
m_contextMenu = new FormFieldContextMenu<IImageField>(this, menus.getOrderedList());
m_contextMenu.setContainerInternal(this);
}
use of org.eclipse.scout.rt.shared.data.basic.AffineTransformSpec in project scout.rt by eclipse.
the class AbstractImageField method doRelativeZoom.
@Override
public void doRelativeZoom(double fx, double fy) {
AffineTransformSpec t = getImageTransform();
t.sx = t.sx * fx;
t.sy = t.sy * fy;
setImageTransform(t);
}
use of org.eclipse.scout.rt.shared.data.basic.AffineTransformSpec in project scout.rt by eclipse.
the class AbstractImageField method doRelativeRotate.
@Override
public void doRelativeRotate(double angleInDegrees) {
AffineTransformSpec t = getImageTransform();
t.angle = t.angle + Math.toRadians(angleInDegrees);
setImageTransform(t);
}
use of org.eclipse.scout.rt.shared.data.basic.AffineTransformSpec in project scout.rt by eclipse.
the class AbstractImageField method doRelativePan.
@Override
public void doRelativePan(double dx, double dy) {
AffineTransformSpec t = getImageTransform();
t.dx = t.dx + dx;
t.dy = t.dy + dy;
setImageTransform(t);
}
Aggregations