Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Graphiti » How to Manually Update Graphiti RulerFigure(How to Manually Update Graphiti RulerFigure)
How to Manually Update Graphiti RulerFigure [message #1736723] Fri, 01 July 2016 10:21 Go to next message
Ken Mersado is currently offline Ken MersadoFriend
Messages: 19
Registered: October 2014
Junior Member
Hi Guys,

Is there a way to update manually/pragmatically the RulerFigure of the diagram when there is changes in the underlying EObject?

I have created a EMF based application and used Graphiti for my graphical editor. I have implemented custom units for the rulers in my graphical editor. I need to update the ruler based on the new units specified on the underlying EObject.

Is there a way to trigger the updates on RulerFigure?

Many Thanks,
Ken
Re: How to Manually Update Graphiti RulerFigure [message #1737130 is a reply to message #1736723] Wed, 06 July 2016 02:14 Go to previous message
Ken Mersado is currently offline Ken MersadoFriend
Messages: 19
Registered: October 2014
Junior Member
Hi All,

I have a work around in my problem. In the extended RulerComposite and use it in my GraphicalEditor. Inside the RulerComposite create a public method that contains the following:

public void updateRulers() {
	setRuler((RulerProvider) diagramViewer.getProperty(RulerProvider.PROPERTY_HORIZONTAL_RULER), PositionConstants.NORTH);
	setRuler((RulerProvider) diagramViewer.getProperty(RulerProvider.PROPERTY_VERTICAL_RULER), PositionConstants.WEST);
}


With this, we can call and trigger the updates on ruler whenever we want it.
If there is another way, please do tell in this thread.

Thanks,
Ken
Previous Topic:Graphiti tutorial : class diagram & process flow editors source code available ?
Next Topic:Bug when Adding anchors to ConnectionDecorators
Goto Forum:
  


Current Time: Thu Sep 12 19:11:07 GMT 2024

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

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

Back to the top