"int" value out of range for Point [message #227353] |
Mon, 04 December 2006 01:19  |
Eclipse User |
|
|
|
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 #227933 is a reply to message #227911] |
Wed, 13 December 2006 01:17   |
Eclipse User |
|
|
|
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 17:33  |
Eclipse User |
|
|
|
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.
|
|
|
Powered by
FUDForum. Page generated in 0.03201 seconds