Login | Register
My pages Projects Community openCollabNet

Discussions > users > Re: [gef-users] Specific GEF use

Discussion topic

Back to topic list

Re: [gef-users] Specific GEF use


Author bobtarling
Full name Bob Tarling
Date 2005-12-05 06:04:16 PST
Message I did some work for the sequence diagrams in http:\\argouml.tigris.org
to prevent ClassifierRoles from being dragged in a vertical direction,
horizontal movement only is allowed.

The trick was to override the rather unusually named superTranslate method -

     * This method is overridden in order to ignore change of y co-ordinate
     * during drag.
     * @see org.tigris.gef.prese​ntation.FigNode#supe​rTranslate(int, int)
    public void superTranslate(int dx, int dy) {
        setBounds(getX() + dx, getY(), getWidth(), getHeight());

I also forced that the user couldn't resize the fig in such a way to
change its y position.

For this I introduced the class SelectionClassifierRole which returns
doing nothing if the user attempts to drag one of the uppermost

Fig ClassifierRole.makeSelection is overridden to return an instance
of that Selection class.

Your solution may differ slightly depending on how you want to
implement the line graph. Let me know if I can help any further



On 05/12/05, Paulo Paulin <phpaulin at yahoo dot com dot br> wrote:
> Dear GEF Users,
> I'm new to GEF, so sorry if my question sounds a
> little dumb!! :0D
> But, I think that someone might have the same needs
> I have ...
> Basically my Java application needs is an editable
> line chart and an editable Gantt chart! I'm looking to
> some other codes (like to GanttProject at
> ganttproject.sourceforge.net) to acomplish my needs of
> a Gantt chart on my software (but I still haven't come
> to a decision on that). But for an editable line
> chart, I consider that the GEF code (with some
> changes) could help me a lot.
> For this line chart I will need to restrain the
> movement of my Figs, making them "stay on track"! If a
> choose to use GEF to the Gantt chart I will have the
> same basic need (besides a lot of other needs!! :0) ).
> What I want to know is if someone have done
> something like that? Is GEF a good choice to do that
> or should I look to other sources??
> How should this be done in the GEF context?? Should
> I start by changing the LayerManager or the
> ModeManager (or both) ??
> Thanks A Lot in Advance,
> Paulo
> ____________________​____________________​_______________
> Yahoo! doce lar. Fa├ža do Yahoo! sua homepage.
> http://br.yahoo.com/​homepageset.html
> --------------------​--------------------​--------------------​---------
> To unsubscribe, e-mail: users-unsubscribe@ge​f.tigris.org
> For additional commands, e-mail: users-help at gef dot tigris dot org

« Previous message in topic | 2 of 2 | Next message in topic »


Show all messages in topic

Specific GEF use phpaulin Paulo 2005-12-05 03:40:59 PST
     Re: [gef-users] Specific GEF use bobtarling Bob Tarling 2005-12-05 06:04:16 PST
Messages per page: