Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » "int" value out of range for Point
"int" value out of range for Point [message #227353] Mon, 04 December 2006 06:19 Go to next message
Eclipse UserFriend
Originally posted by: rajakididi.hotmail.com

Hi

I am using GEF to draw so chart sort of display. The chart is expected to
accept the values which are quite long and on those values a "Figure" is
expected to be drawn. For example, at the "x" position equals to
'971997000' I want to draw a RectangleFigure. I am doing this by calling
the method:
"figure.setLocation(new Point(x,y));"

The Point constructor doesn't accept a value other than int. And the int
value is going out of range in my case and the figure object is not
getting displayed.

Can anyone please tell me a solution for this ? What should I do to get
the objects withing the limit ?

Thanks!
Krayon
Re: "int" value out of range for Point [message #227655 is a reply to message #227353] Fri, 08 December 2006 22:16 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: none.unknown.com

There is PrecisionPoint, but if x is exceeding Integer.MAX_VALUE, that won't
help. BTW, 971997000 is less than that, so integer overflow might not be
the problem.

"Krayon" <rajakididi@hotmail.com> wrote in message
news:7a9a533c30c28cf779ed092c9709674d$1@www.eclipse.org...
> Hi
>
> I am using GEF to draw so chart sort of display. The chart is expected to
> accept the values which are quite long and on those values a "Figure" is
> expected to be drawn. For example, at the "x" position equals to
> '971997000' I want to draw a RectangleFigure. I am doing this by calling
> the method:
> "figure.setLocation(new Point(x,y));"
>
> The Point constructor doesn't accept a value other than int. And the int
> value is going out of range in my case and the figure object is not
> getting displayed.
> Can anyone please tell me a solution for this ? What should I do to get
> the objects withing the limit ?
>
> Thanks!
> Krayon
>
>
Re: "int" value out of range for Point [message #227755 is a reply to message #227655] Mon, 11 December 2006 07:30 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: rajakididi.hotmail.com

Hi Pratik,

Yes I agree that the value is pretty small as compared to the MAXIMUM
limit. Then the problem I am facing is weird. For the figure to be drawn,
I am assigning a location value equal to the one I mentioned earlier but
the figure is not displayed on the graph I am drawing. I have the Outline
View displaying the objects on the graph in the list and it is
synchronized with the graph drawn. In this case, when I select an object [
drawn at the above location ] in the Outline View it is not highlighted.
There is no area assigned to the object in the graph.

I think there is something wrong which I am doing to display all my
objects. Can you please help me out to solve this problem ?? It is really
blocking my work.

Thanks!
Krayon
Re: "int" value out of range for Point [message #227911 is a reply to message #227755] Tue, 12 December 2006 19:23 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: none.unknown.com

I'm not saying there is no overflow. That number could be multiplied by
something somewhere causing an overflow. I'd say see if you can reproduce
the problem in our logic example, and open a bug if it does. However, I
don't think we can really fix the problem for you. Our editors were never
meant to be that big.

You could have a translation factor between the model values and actual
pixel values. Say, 10M in the model equals 10K on the screen or something.
That has its own set of problems in terms of precision, of course.

"Krayon" <rajakididi@hotmail.com> wrote in message
news:d5a58d770c5553a271f47984ab5cf0bc$1@www.eclipse.org...
> Hi Pratik,
>
> Yes I agree that the value is pretty small as compared to the MAXIMUM
> limit. Then the problem I am facing is weird. For the figure to be drawn,
> I am assigning a location value equal to the one I mentioned earlier but
> the figure is not displayed on the graph I am drawing. I have the Outline
> View displaying the objects on the graph in the list and it is
> synchronized with the graph drawn. In this case, when I select an object
> [ drawn at the above location ] in the Outline View it is not highlighted.
> There is no area assigned to the object in the graph.
> I think there is something wrong which I am doing to display all my
> objects. Can you please help me out to solve this problem ?? It is really
> blocking my work.
> Thanks!
> Krayon
>
Re: "int" value out of range for Point [message #227933 is a reply to message #227911] Wed, 13 December 2006 06:17 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: rajakididi.hotmail.com

Hi Pratik,

I tried to perform some similiar action with the "Shapes" example in GEF.
Here is what I did:

I created a '.shapes' file and drew a Rectangle from the drawing palette.
Then from the Properties View, I set the following properties for the
Rectangle:
Height: 40
Width: 50
X: 1000000000
Y: 100

After setting these properties I started reducing the 'Width' of the
rectangle. When I went further below the value "33" the rectangle seems
to be disappear. It is not even getting highlighted when selected from
the Outline View. Is there something that I am doing wrong?

[ I have just replicated the steps that were posted in one of the earlier
query on this newsgroup. ]

If such a large value is not supported and there is a need for such a
large value, what should be an ideal way to do this? Scaling the graph
will lead to certain other problems. Please provide some suggesstion.

Thanks,
Krayon

Pratik Shah wrote:

> I'm not saying there is no overflow. That number could be multiplied by
> something somewhere causing an overflow. I'd say see if you can reproduce
> the problem in our logic example, and open a bug if it does. However, I
> don't think we can really fix the problem for you. Our editors were never
> meant to be that big.

> You could have a translation factor between the model values and actual
> pixel values. Say, 10M in the model equals 10K on the screen or something.
> That has its own set of problems in terms of precision, of course.

> "Krayon" <rajakididi@hotmail.com> wrote in message
> news:d5a58d770c5553a271f47984ab5cf0bc$1@www.eclipse.org...
>> Hi Pratik,
>>
>> Yes I agree that the value is pretty small as compared to the MAXIMUM
>> limit. Then the problem I am facing is weird. For the figure to be drawn,
>> I am assigning a location value equal to the one I mentioned earlier but
>> the figure is not displayed on the graph I am drawing. I have the Outline
>> View displaying the objects on the graph in the list and it is
>> synchronized with the graph drawn. In this case, when I select an object
>> [ drawn at the above location ] in the Outline View it is not highlighted.
>> There is no area assigned to the object in the graph.
>> I think there is something wrong which I am doing to display all my
>> objects. Can you please help me out to solve this problem ?? It is really
>> blocking my work.
>> Thanks!
>> Krayon
>>
Re: "int" value out of range for Point [message #228077 is a reply to message #227933] Thu, 14 December 2006 22:33 Go to previous message
Eclipse UserFriend
Originally posted by: none.ibm.com

Figures are rendered to an SWT GC and Canvas. There are limitations implied
by this, so it would be pointless for figures to have a bounds that can't be
painted.

You'll have to store your large data in some model and show the user a
scaled down version of it that fits within the limitations of a Canvas.
Previous Topic:Tools as Actions?
Next Topic:[Announce] GEF 3.3 Project Plans
Goto Forum:
  


Current Time: Sat Apr 20 01:08:05 GMT 2024

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

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

Back to the top