Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » inverting axis in editor
inverting axis in editor [message #220290] Fri, 28 July 2006 08:06 Go to next message
Eclipse User
Originally posted by: osipov.appliedtech.ru

Guys, is there a way for this? I've looked at logic example - the y axis is
headed downwards. Is there a way to head it upwards? I do need it. All in
all I need that ruler to show negative coordinates below and positive up.
I searched everywhere but still found nothing.
Thanks a lot for your help in advance.
Re: inverting axis in editor [message #221105 is a reply to message #220290] Wed, 09 August 2006 14:23 Go to previous messageGo to next message
Eclipse User
Originally posted by: remove-this-pgarbacz.pgs-soft.com.remove.this

Hi,

"Peter Osipov" <osipov@appliedtech.ru> wrote in message
news:eacgia$25d$1@utils.eclipse.org...
> Guys, is there a way for this? I've looked at logic example - the y axis
> is
> headed downwards. Is there a way to head it upwards? I do need it. All in
> all I need that ruler to show negative coordinates below and positive up.
> I searched everywhere but still found nothing.
> Thanks a lot for your help in advance.

I also need this feature but it appeared that it is feasible only with
overriding the original rulers. But they are not really overridable so you
should rewrite the RulerComposite. I wanted one more thing too: why are the
rulers shown only at the NORTH and WEST positions? And one more question:
can I override the RulerFigure so I can draw a ruler looking rather as an
axis not the ruler?

Regards,
Pawel
Re: inverting axis in editor [message #221136 is a reply to message #221105] Thu, 10 August 2006 04:46 Go to previous messageGo to next message
Eclipse User
Originally posted by: osipov.appliedtech.ru

Hi everybody!
Why does nobody answer? I mean I found a similar topic but there was no
answer as well.
Did anybody taboo this topic or what?
> Hi,
>
> "Peter Osipov" <osipov@appliedtech.ru> wrote in message
> news:eacgia$25d$1@utils.eclipse.org...
> > Guys, is there a way for this? I've looked at logic example - the y axis
> > is
> > headed downwards. Is there a way to head it upwards? I do need it. All
in
> > all I need that ruler to show negative coordinates below and positive
up.
> > I searched everywhere but still found nothing.
> > Thanks a lot for your help in advance.
>
> I also need this feature but it appeared that it is feasible only with
> overriding the original rulers. But they are not really overridable so you
> should rewrite the RulerComposite. I wanted one more thing too: why are
the
> rulers shown only at the NORTH and WEST positions? And one more question:
> can I override the RulerFigure so I can draw a ruler looking rather as an
> axis not the ruler?
>
> Regards,
> Pawel
>
>
Re: inverting axis in editor [message #221144 is a reply to message #221105] Thu, 10 August 2006 04:48 Go to previous messageGo to next message
Eclipse User
Originally posted by: osipov.appliedtech.ru

I mean, Pratik, you do answer a lot and RulerComposite was written by you.
Why do not you break this taboo and answer us something?
> Hi,
>
> "Peter Osipov" <osipov@appliedtech.ru> wrote in message
> news:eacgia$25d$1@utils.eclipse.org...
> > Guys, is there a way for this? I've looked at logic example - the y axis
> > is
> > headed downwards. Is there a way to head it upwards? I do need it. All
in
> > all I need that ruler to show negative coordinates below and positive
up.
> > I searched everywhere but still found nothing.
> > Thanks a lot for your help in advance.
>
> I also need this feature but it appeared that it is feasible only with
> overriding the original rulers. But they are not really overridable so you
> should rewrite the RulerComposite. I wanted one more thing too: why are
the
> rulers shown only at the NORTH and WEST positions? And one more question:
> can I override the RulerFigure so I can draw a ruler looking rather as an
> axis not the ruler?
>
> Regards,
> Pawel
>
>
Re: inverting axis in editor [message #221207 is a reply to message #221144] Thu, 10 August 2006 17:39 Go to previous messageGo to next message
Eclipse User
Originally posted by: none.us.ibm.com

Inverted y-axis was not a requirement when the ruler was implemented. It
would require updating viewport, scrollbar, rangemodel, etc. to make it work
properly.

Pratik and myself are no longer paid to work on the GEF project. The amount
of *personal* time we can contribute is obviously going to be limited.

"Peter Osipov" <osipov@appliedtech.ru> wrote in message
news:ebedro$ldr$1@utils.eclipse.org...
>I mean, Pratik, you do answer a lot and RulerComposite was written by you.
> Why do not you break this taboo and answer us something?
Re: inverting axis in editor [message #221256 is a reply to message #221207] Fri, 11 August 2006 03:15 Go to previous messageGo to next message
Eclipse User
Originally posted by: osipov.appliedtech.ru

> Inverted y-axis was not a requirement when the ruler was implemented. It
> would require updating viewport, scrollbar, rangemodel, etc. to make it
work
> properly.
>
> Pratik and myself are no longer paid to work on the GEF project. The
amount
> of *personal* time we can contribute is obviously going to be limited.

Hi, Randy!
Oh, right! what a big disappointment! Randy, what I am saying is that all I
need is just invert numbers on the ruler. Is that difficult to implement?
Re: inverting axis in editor [message #221294 is a reply to message #221256] Fri, 11 August 2006 12:58 Go to previous messageGo to next message
Eclipse User
Originally posted by: none.us.ibm.com

What does setUnit(-1) do?

"Peter Osipov" <osipov@appliedtech.ru> wrote in message
news:ebgso2$a0t$1@utils.eclipse.org...
>
>> Inverted y-axis was not a requirement when the ruler was implemented. It
>> would require updating viewport, scrollbar, rangemodel, etc. to make it
> work
>> properly.
>>
>> Pratik and myself are no longer paid to work on the GEF project. The
> amount
>> of *personal* time we can contribute is obviously going to be limited.
>
> Hi, Randy!
> Oh, right! what a big disappointment! Randy, what I am saying is that all
> I
> need is just invert numbers on the ruler. Is that difficult to implement?
>
>
Re: inverting axis in editor [message #221310 is a reply to message #221294] Fri, 11 August 2006 13:20 Go to previous messageGo to next message
Eclipse User
Originally posted by: remove-this-pgarbacz.pgs-soft.com.remove.this

Actually it does nothing. The setUnit() method expects one of the constants
defined in RulerProvider. UNIT_CENTIMETERS, UNIT_INCHES, UNIT_PIXELS are
defined by this class, and this could be extended in your implementation.
But it does not make the ruler invertable. DPU measure is calculated using
only those constants and zoomManager object.

Regards,
Pawel

"Randy Hudson" <none@us.ibm.com> wrote in message
news:ebhuu2$il9$1@utils.eclipse.org...
> What does setUnit(-1) do?
>
> "Peter Osipov" <osipov@appliedtech.ru> wrote in message
> news:ebgso2$a0t$1@utils.eclipse.org...
>>
>>> Inverted y-axis was not a requirement when the ruler was implemented. It
>>> would require updating viewport, scrollbar, rangemodel, etc. to make it
>> work
>>> properly.
>>>
>>> Pratik and myself are no longer paid to work on the GEF project. The
>> amount
>>> of *personal* time we can contribute is obviously going to be limited.
>>
>> Hi, Randy!
>> Oh, right! what a big disappointment! Randy, what I am saying is that all
>> I
>> need is just invert numbers on the ruler. Is that difficult to implement?
>>
>>
>
>
Re: inverting axis in editor [message #221427 is a reply to message #221310] Mon, 14 August 2006 03:22 Go to previous messageGo to next message
Eclipse User
Originally posted by: osipov.appliedtech.ru

Thanks, Pawel and Randy!
So, at the end of the day, do I have a possibility of inverting the ruler?
At least, can I make it by just making a copy of those classes like
RulerComposite and "overloading" all the private methods? I know this is
wrong but, as I said, I do need inverting that axis.
Thanks, guys for your help.

>
> Regards,
> Pawel
>
> "Randy Hudson" <none@us.ibm.com> wrote in message
> news:ebhuu2$il9$1@utils.eclipse.org...
> > What does setUnit(-1) do?
> >
> > "Peter Osipov" <osipov@appliedtech.ru> wrote in message
> > news:ebgso2$a0t$1@utils.eclipse.org...
> >>
> >>> Inverted y-axis was not a requirement when the ruler was implemented.
It
> >>> would require updating viewport, scrollbar, rangemodel, etc. to make
it
> >> work
> >>> properly.
> >>>
> >>> Pratik and myself are no longer paid to work on the GEF project. The
> >> amount
> >>> of *personal* time we can contribute is obviously going to be limited.
> >>
> >> Hi, Randy!
> >> Oh, right! what a big disappointment! Randy, what I am saying is that
all
> >> I
> >> need is just invert numbers on the ruler. Is that difficult to
implement?
> >>
> >>
> >
> >
>
>
Re: inverting axis in editor [message #221597 is a reply to message #221427] Wed, 16 August 2006 12:06 Go to previous messageGo to next message
Eclipse User
Originally posted by: exquisitus.eclipse.org

Hi Peter,

I needed this feature too, and I have extended RulerFigure to achieve
this. The key is to overwrite the paint() method. There is a section
with a for loop almost at the end of this method and all you have to do
is inserting this line right at the beginning of the branch:
num = "" + (-Integer.parseInt(num));

Furthermore there is some work to get the extended RulerFigure being
used, like extending RulerEditPart#createFigure,
RulerEditPartFactory#createRulerEditPart. I have also adapted the method
RulerComposite#createRulerComposite to set the extended Factory.

Sure this way is not very fine, but it works for me... If you have found
a better way, please post it!

Regards, Andreas

Peter Osipov schrieb:
> Thanks, Pawel and Randy!
> So, at the end of the day, do I have a possibility of inverting the ruler?
> At least, can I make it by just making a copy of those classes like
> RulerComposite and "overloading" all the private methods? I know this is
> wrong but, as I said, I do need inverting that axis.
> Thanks, guys for your help.
>
>> Regards,
>> Pawel
>>
>> "Randy Hudson" <none@us.ibm.com> wrote in message
>> news:ebhuu2$il9$1@utils.eclipse.org...
>>> What does setUnit(-1) do?
>>>
>>> "Peter Osipov" <osipov@appliedtech.ru> wrote in message
>>> news:ebgso2$a0t$1@utils.eclipse.org...
>>>>> Inverted y-axis was not a requirement when the ruler was implemented.
> It
>>>>> would require updating viewport, scrollbar, rangemodel, etc. to make
> it
>>>> work
>>>>> properly.
>>>>>
>>>>> Pratik and myself are no longer paid to work on the GEF project. The
>>>> amount
>>>>> of *personal* time we can contribute is obviously going to be limited.
>>>> Hi, Randy!
>>>> Oh, right! what a big disappointment! Randy, what I am saying is that
> all
>>>> I
>>>> need is just invert numbers on the ruler. Is that difficult to
> implement?
>>>>
>>>
>>
>
>
Re: inverting axis in editor [message #221686 is a reply to message #221597] Thu, 17 August 2006 03:58 Go to previous messageGo to next message
Eclipse User
Originally posted by: osipov.appliedtech.ru

Thanks, Andreas!
You are a godsend!
Let me try it. Let us hope that guys working on GEF will give us opportunity
to do it in a better manner.

"Andreas Werner" <exquisitus@eclipse.org> ???????/???????? ? ????????
?????????: news:ebv1oh$l0j$1@utils.eclipse.org...
> Hi Peter,
>
> I needed this feature too, and I have extended RulerFigure to achieve
> this. The key is to overwrite the paint() method. There is a section
> with a for loop almost at the end of this method and all you have to do
> is inserting this line right at the beginning of the branch:
> num = "" + (-Integer.parseInt(num));
>
> Furthermore there is some work to get the extended RulerFigure being
> used, like extending RulerEditPart#createFigure,
> RulerEditPartFactory#createRulerEditPart. I have also adapted the method
> RulerComposite#createRulerComposite to set the extended Factory.
>
> Sure this way is not very fine, but it works for me... If you have found
> a better way, please post it!
>
> Regards, Andreas
>
> Peter Osipov schrieb:
> > Thanks, Pawel and Randy!
> > So, at the end of the day, do I have a possibility of inverting the
ruler?
> > At least, can I make it by just making a copy of those classes like
> > RulerComposite and "overloading" all the private methods? I know this is
> > wrong but, as I said, I do need inverting that axis.
> > Thanks, guys for your help.
> >
> >> Regards,
> >> Pawel
> >>
> >> "Randy Hudson" <none@us.ibm.com> wrote in message
> >> news:ebhuu2$il9$1@utils.eclipse.org...
> >>> What does setUnit(-1) do?
> >>>
> >>> "Peter Osipov" <osipov@appliedtech.ru> wrote in message
> >>> news:ebgso2$a0t$1@utils.eclipse.org...
> >>>>> Inverted y-axis was not a requirement when the ruler was
implemented.
> > It
> >>>>> would require updating viewport, scrollbar, rangemodel, etc. to make
> > it
> >>>> work
> >>>>> properly.
> >>>>>
> >>>>> Pratik and myself are no longer paid to work on the GEF project. The
> >>>> amount
> >>>>> of *personal* time we can contribute is obviously going to be
limited.
> >>>> Hi, Randy!
> >>>> Oh, right! what a big disappointment! Randy, what I am saying is that
> > all
> >>>> I
> >>>> need is just invert numbers on the ruler. Is that difficult to
> > implement?
> >>>>
> >>>
> >>
> >
> >
Re: inverting axis in editor [message #223053 is a reply to message #221686] Mon, 18 September 2006 16:16 Go to previous messageGo to next message
Eclipse User
Originally posted by: something.eclipse.org

Thanks Peter, somehow I missed this thread. Please post your results
when you have a chance to try this out. This is an absolute requirement
for me as well and I really want to be able to use GEF.

adam

Peter Osipov wrote:
> Thanks, Andreas!
> You are a godsend!
> Let me try it. Let us hope that guys working on GEF will give us opportunity
> to do it in a better manner.
>
> "Andreas Werner" <exquisitus@eclipse.org> ???????/???????? ? ????????
> ?????????: news:ebv1oh$l0j$1@utils.eclipse.org...
>> Hi Peter,
>>
>> I needed this feature too, and I have extended RulerFigure to achieve
>> this. The key is to overwrite the paint() method. There is a section
>> with a for loop almost at the end of this method and all you have to do
>> is inserting this line right at the beginning of the branch:
>> num = "" + (-Integer.parseInt(num));
>>
>> Furthermore there is some work to get the extended RulerFigure being
>> used, like extending RulerEditPart#createFigure,
>> RulerEditPartFactory#createRulerEditPart. I have also adapted the method
>> RulerComposite#createRulerComposite to set the extended Factory.
>>
>> Sure this way is not very fine, but it works for me... If you have found
>> a better way, please post it!
>>
>> Regards, Andreas
>>
>> Peter Osipov schrieb:
>>> Thanks, Pawel and Randy!
>>> So, at the end of the day, do I have a possibility of inverting the
> ruler?
>>> At least, can I make it by just making a copy of those classes like
>>> RulerComposite and "overloading" all the private methods? I know this is
>>> wrong but, as I said, I do need inverting that axis.
>>> Thanks, guys for your help.
>>>
>>>> Regards,
>>>> Pawel
>>>>
>>>> "Randy Hudson" <none@us.ibm.com> wrote in message
>>>> news:ebhuu2$il9$1@utils.eclipse.org...
>>>>> What does setUnit(-1) do?
>>>>>
>>>>> "Peter Osipov" <osipov@appliedtech.ru> wrote in message
>>>>> news:ebgso2$a0t$1@utils.eclipse.org...
>>>>>>> Inverted y-axis was not a requirement when the ruler was
> implemented.
>>> It
>>>>>>> would require updating viewport, scrollbar, rangemodel, etc. to make
>>> it
>>>>>> work
>>>>>>> properly.
>>>>>>>
>>>>>>> Pratik and myself are no longer paid to work on the GEF project. The
>>>>>> amount
>>>>>>> of *personal* time we can contribute is obviously going to be
> limited.
>>>>>> Hi, Randy!
>>>>>> Oh, right! what a big disappointment! Randy, what I am saying is that
>>> all
>>>>>> I
>>>>>> need is just invert numbers on the ruler. Is that difficult to
>>> implement?
>>>
>
>
Re: inverting axis in editor [message #223105 is a reply to message #223053] Wed, 20 September 2006 06:53 Go to previous message
Eclipse User
Originally posted by: osipov.appliedtech.ru

AdamC, hi!
You see,I did it the way Andreas explained. All in all, you have to paint
your ownRulerFigure, this you should do what he said while explaning.
In RulerFigure you have to change the 287-th line:
String num = "" + (div / divsPerMajorMark) * unitsPerMajorMark;
//$NON-NLS-1$

to this

String num = "" -(div / divsPerMajorMark) * unitsPerMajorMark; //$NON-NLS-1$

----- Original Message -----
From: "AdamC" <something@eclipse.org>
Newsgroups: eclipse.tools.gef
Sent: Monday, September 18, 2006 10:16 PM
Subject: Re: inverting axis in editor


> Thanks Peter, somehow I missed this thread. Please post your results
> when you have a chance to try this out. This is an absolute requirement
> for me as well and I really want to be able to use GEF.
>
> adam
>
> Peter Osipov wrote:
> > Thanks, Andreas!
> > You are a godsend!
> > Let me try it. Let us hope that guys working on GEF will give us
opportunity
> > to do it in a better manner.
> >
> > "Andreas Werner" <exquisitus@eclipse.org> ???????/???????? ? ????????
> > ?????????: news:ebv1oh$l0j$1@utils.eclipse.org...
> >> Hi Peter,
> >>
> >> I needed this feature too, and I have extended RulerFigure to achieve
> >> this. The key is to overwrite the paint() method. There is a section
> >> with a for loop almost at the end of this method and all you have to do
> >> is inserting this line right at the beginning of the branch:
> >> num = "" + (-Integer.parseInt(num));
> >>
> >> Furthermore there is some work to get the extended RulerFigure being
> >> used, like extending RulerEditPart#createFigure,
> >> RulerEditPartFactory#createRulerEditPart. I have also adapted the
method
> >> RulerComposite#createRulerComposite to set the extended Factory.
> >>
> >> Sure this way is not very fine, but it works for me... If you have
found
> >> a better way, please post it!
> >>
> >> Regards, Andreas
> >>
> >> Peter Osipov schrieb:
> >>> Thanks, Pawel and Randy!
> >>> So, at the end of the day, do I have a possibility of inverting the
> > ruler?
> >>> At least, can I make it by just making a copy of those classes like
> >>> RulerComposite and "overloading" all the private methods? I know this
is
> >>> wrong but, as I said, I do need inverting that axis.
> >>> Thanks, guys for your help.
> >>>
> >>>> Regards,
> >>>> Pawel
> >>>>
> >>>> "Randy Hudson" <none@us.ibm.com> wrote in message
> >>>> news:ebhuu2$il9$1@utils.eclipse.org...
> >>>>> What does setUnit(-1) do?
> >>>>>
> >>>>> "Peter Osipov" <osipov@appliedtech.ru> wrote in message
> >>>>> news:ebgso2$a0t$1@utils.eclipse.org...
> >>>>>>> Inverted y-axis was not a requirement when the ruler was
> > implemented.
> >>> It
> >>>>>>> would require updating viewport, scrollbar, rangemodel, etc. to
make
> >>> it
> >>>>>> work
> >>>>>>> properly.
> >>>>>>>
> >>>>>>> Pratik and myself are no longer paid to work on the GEF project.
The
> >>>>>> amount
> >>>>>>> of *personal* time we can contribute is obviously going to be
> > limited.
> >>>>>> Hi, Randy!
> >>>>>> Oh, right! what a big disappointment! Randy, what I am saying is
that
> >>> all
> >>>>>> I
> >>>>>> need is just invert numbers on the ruler. Is that difficult to
> >>> implement?
> >>>
> >
> >
Previous Topic:GEF application, not plug-in!
Next Topic:IFigure tooltip
Goto Forum:
  


Current Time: Sun Oct 26 08:43:50 GMT 2014

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

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