Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[gef-dev] Re: Rulers update

Sorry, one bugfix - guide line was not moved when the ruler was moved
----- Original Message -----
Sent: Wednesday, April 14, 2004 11:18 AM
Subject: Rulers update

Hi all!
Our application now has following looks:
<image>
 
Following changes were made:
1. SnapToGuides - now it uses method getEditorGuidePositions - this allows for the rulers that are offset relative to the editor origin (i.e., in our case - the top ruler is centered in editor), so the ruler provider provides conversation between ruler coordinates and the editor coordinates. Default implementation implies that these coordinates are same.
2. DragGuidePolicy, RulerDragTracker, GuideEditPart,  now works with the IRulerEditPart interface - this allows to provide your own from the ground implementation of the ruler edit parts (vertical compound rulers, etc.)
3. RulerEditPart was splited into the public IRulerEditPart interface and GEF-private default implementation (RulerEditPartImpl)
4. RulerFigure was changed in following ways:
    1. IOrientableFigure interface - as layouts, itc. want to know the ruler orientation and implementing the interface perfectly enables developer to provide his own figures that look totally different (compound vertical ruler in our project.
    2. AbstractRulerFigure - it's base class that allows drawing marks, etc. - makes it easy to create custom ruler figures (in our project all rulers are custom, i.e. they don't have border on their own)
    3. RulerFigureImpl - default ruler figure same in functionality as original RulerFigure
5. RulerComposite now allows to provide another EditPartFactory - so the new rulers are plugged here.
 
Another rework was done to change to the Unit class - it was needed as our project has need for the custom units that were incompatible with the old GEF units.
Changes in other classes were only connected to the class hierarchies refactorings. In the logic sample diff file you can see the amount of the changes that were needed to perform to change to new rulers.
 
Sorry, if the formatting/comments is not fully correct - I've checked the eclipse.org but was unable to see the strict enough recomendations. I do hope that these changes will be merged to the GEF CVS - because I need to release my code to our project.
I will provide support/enhancments/bugfixes to this ruler implementation (I mean, all GEF Bugzilla requests that will be ruler-related).
 
Best regards,
Eugene

Attachment: GuideEditPart.java
Description: Binary data


Back to the top