Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Graphiti » How to avoid flickering of zoom slider in graphiti
How to avoid flickering of zoom slider in graphiti [message #1159039] Mon, 28 October 2013 08:57 Go to next message
Mithu Deb is currently offline Mithu DebFriend
Messages: 9
Registered: September 2013
Junior Member
Hi,

I am using a zoomslider in graphiti using the following code piece:

import org.eclipse.gef.GraphicalViewer;
import org.eclipse.gef.editparts.ZoomManager;
import org.eclipse.gef.ui.parts.ScrollingGraphicalViewer;
import org.eclipse.graphiti.features.IFeatureProvider;
import org.eclipse.graphiti.ui.internal.util.gef.ScalableRootEditPartAnimated;
import com.sap.ui.controls.swt.basic.sliders.ButtonSlider;
import com.sap.ui.controls.swt.basic.sliders.Slider;
import com.sap.ui.controls.swt.basic.sliders.SliderAdapter;
import com.sap.ui.controls.swt.basic.sliders.ZoomSlider;

zoomSlider = new ZoomSlider(bottomToolbar, SWT.LEFT_TO_RIGHT);
zoomSlider.addSliderListener(new SliderAdapter() {
public void sliderMoving(Object source, int value) {
GraphicalViewer graphicalViewer = (GraphicalViewer) iSelectionProvider;
ScrollingGraphicalViewer viewer = (ScrollingGraphicalViewer) graphicalViewer;
ScalableRootEditPartAnimated editPart = (ScalableRootEditPartAnimated) viewer.getRootEditPart();
ZoomManager zoomManager = editPart.getZoomManager();
zoomManager.setZoom((((double) zoomSlider.getZoomDiscreteValues()[value]) / 100));
}
});

But the graphiti view flickers a lot while i move the zoom slider very fast and it does not provide the correct zoom value at times, if the zoom slider reading is 1% the actual zoom level of the view is more than 150%.
Is there any way to control this or any other zoomSlider is there which is supported by graphiti and it works smmothly?

Kind Regards,
Mithu Deb
Re: How to avoid flickering of zoom slider in graphiti [message #1160607 is a reply to message #1159039] Tue, 29 October 2013 08:28 Go to previous message
Felix Velasco is currently offline Felix VelascoFriend
Messages: 43
Registered: July 2009
Member
That looks a lot like bug 414437, that is solved in master.

Which version of graphiti are you using?
Previous Topic:Problems view not refreshed after undo / redo
Next Topic:how to create complete class diagram editor
Goto Forum:
  


Current Time: Fri Aug 14 01:45:37 GMT 2020

Powered by FUDForum. Page generated in 0.02206 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top