Search in sources :

Example 1 with AffineTransformSpec

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);
}
Also used : AffineTransformSpec(org.eclipse.scout.rt.shared.data.basic.AffineTransformSpec)

Example 2 with AffineTransformSpec

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);
}
Also used : IMenu(org.eclipse.scout.rt.client.ui.action.menu.IMenu) OrderedCollection(org.eclipse.scout.rt.platform.util.collection.OrderedCollection) AffineTransformSpec(org.eclipse.scout.rt.shared.data.basic.AffineTransformSpec)

Example 3 with AffineTransformSpec

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);
}
Also used : AffineTransformSpec(org.eclipse.scout.rt.shared.data.basic.AffineTransformSpec)

Example 4 with AffineTransformSpec

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);
}
Also used : AffineTransformSpec(org.eclipse.scout.rt.shared.data.basic.AffineTransformSpec)

Example 5 with AffineTransformSpec

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);
}
Also used : AffineTransformSpec(org.eclipse.scout.rt.shared.data.basic.AffineTransformSpec)

Aggregations

AffineTransformSpec (org.eclipse.scout.rt.shared.data.basic.AffineTransformSpec)7 IMenu (org.eclipse.scout.rt.client.ui.action.menu.IMenu)1 OrderedCollection (org.eclipse.scout.rt.platform.util.collection.OrderedCollection)1