Home » Eclipse Projects » GEF » How to show rectangle with label
How to show rectangle with label [message #186136] |
Fri, 01 July 2005 23:13 |
Eclipse User |
|
|
|
Originally posted by: a.b.c
Hi,
I want to visualize Rectangles with Labels below it. I tried with this:
IFigure f = new Figure();
f.setLayoutManager(new BorderLayout());
f.add(new Rectangle(...), BorderLayout.CENTER);
f.add(new Label(....), BorderLayout.BOTTOM);
This sort of works, but labels are clipped. How can I get them not to be
clipped? Actually, I would prefer to see the selection rectangle only
around the rectangle, not including the label. Is that possible?
Thanks,
Federica
|
|
| |
Re: How to show rectangle with label [message #186936 is a reply to message #186215] |
Thu, 07 July 2005 18:21 |
Eclipse User |
|
|
|
Originally posted by: user.domain.invalid
Hi,
thanks for taking the time to answer my question. Can you give me some
more details on how to access Eclipse's CVS repository? I've searched on
their website but coudn't find much, and a search with Google seemed to
suggest that the access is restricted to Eclipse developers only....
Thanks,
Federica
Ed Willink wrote:
> Hi
>
> org.eclipse.gef.examples.ediagram.figures.PackageFigure
> (in the EDiagram example accessible via CVS only) does this.
>
> Regards
>
> Ed Willink
>
> Federica wrote:
>
>> Hi,
>> I want to visualize Rectangles with Labels below it. I tried with this:
>>
>> IFigure f = new Figure();
>> f.setLayoutManager(new BorderLayout());
>> f.add(new Rectangle(...), BorderLayout.CENTER);
>> f.add(new Label(....), BorderLayout.BOTTOM);
>>
>> This sort of works, but labels are clipped. How can I get them not to
>> be clipped? Actually, I would prefer to see the selection rectangle
>> only around the rectangle, not including the label. Is that possible?
>>
>> Thanks,
>> Federica
|
|
|
Re: How to show rectangle with label [message #186944 is a reply to message #186936] |
Thu, 07 July 2005 18:55 |
Eclipse User |
|
|
|
Originally posted by: none.unknown.com
http://www.eclipse.org/gef/developer/faq.html?cvsroot=Tools_ Project#install_cvs
<user@domain.invalid> wrote in message
news:42CD72B2.9030402@domain.invalid...
> Hi,
> thanks for taking the time to answer my question. Can you give me some
> more details on how to access Eclipse's CVS repository? I've searched on
> their website but coudn't find much, and a search with Google seemed to
> suggest that the access is restricted to Eclipse developers only....
>
> Thanks,
>
> Federica
>
> Ed Willink wrote:
> > Hi
> >
> > org.eclipse.gef.examples.ediagram.figures.PackageFigure
> > (in the EDiagram example accessible via CVS only) does this.
> >
> > Regards
> >
> > Ed Willink
> >
> > Federica wrote:
> >
> >> Hi,
> >> I want to visualize Rectangles with Labels below it. I tried with this:
> >>
> >> IFigure f = new Figure();
> >> f.setLayoutManager(new BorderLayout());
> >> f.add(new Rectangle(...), BorderLayout.CENTER);
> >> f.add(new Label(....), BorderLayout.BOTTOM);
> >>
> >> This sort of works, but labels are clipped. How can I get them not to
> >> be clipped? Actually, I would prefer to see the selection rectangle
> >> only around the rectangle, not including the label. Is that possible?
> >>
> >> Thanks,
> >> Federica
|
|
|
Re: How to show rectangle with label [message #187891 is a reply to message #186944] |
Sat, 16 July 2005 00:26 |
Eclipse User |
|
|
|
Originally posted by: user.domain.invalid
Ok, got it. the trick is in the HandleBounds interface. Only one problem
remains on my side: labels are clipped to the size of the rectangle
(with "..."). I see the example is not affected by that, but I can't
figure out where the trick is....???
Thanks,
Federica
Pratik Shah wrote:
> http://www.eclipse.org/gef/developer/faq.html?cvsroot=Tools_ Project#install_cvs
>
> <user@domain.invalid> wrote in message
> news:42CD72B2.9030402@domain.invalid...
>
>>Hi,
>>thanks for taking the time to answer my question. Can you give me some
>>more details on how to access Eclipse's CVS repository? I've searched on
>>their website but coudn't find much, and a search with Google seemed to
>>suggest that the access is restricted to Eclipse developers only....
>>
>> Thanks,
>>
>> Federica
>>
>>Ed Willink wrote:
>>
>>>Hi
>>>
>>>org.eclipse.gef.examples.ediagram.figures.PackageFigure
>>>(in the EDiagram example accessible via CVS only) does this.
>>>
>>> Regards
>>>
>>> Ed Willink
>>>
>>>Federica wrote:
>>>
>>>
>>>>Hi,
>>>>I want to visualize Rectangles with Labels below it. I tried with this:
>>>>
>>>>IFigure f = new Figure();
>>>>f.setLayoutManager(new BorderLayout());
>>>>f.add(new Rectangle(...), BorderLayout.CENTER);
>>>>f.add(new Label(....), BorderLayout.BOTTOM);
>>>>
>>>>This sort of works, but labels are clipped. How can I get them not to
>>>>be clipped? Actually, I would prefer to see the selection rectangle
>>>>only around the rectangle, not including the label. Is that possible?
>>>>
>>>> Thanks,
>>>> Federica
>
>
>
|
|
|
Re: How to show rectangle with label [message #188029 is a reply to message #186944] |
Mon, 18 July 2005 20:37 |
Eclipse User |
|
|
|
Originally posted by: user.domain.invalid
Pratik, I see you're name in some of the files of the example. Can you
answer my last question?
Only one problem remains on my side: labels are clipped to the size of
the rectangle (with "..."). I see the example is not affected by that,
but I can't figure out where the trick is....???
Thanks,
Federica
Pratik Shah wrote:
> http://www.eclipse.org/gef/developer/faq.html?cvsroot=Tools_ Project#install_cvs
>
> <user@domain.invalid> wrote in message
> news:42CD72B2.9030402@domain.invalid...
>
>>Hi,
>>thanks for taking the time to answer my question. Can you give me some
>>more details on how to access Eclipse's CVS repository? I've searched on
>>their website but coudn't find much, and a search with Google seemed to
>>suggest that the access is restricted to Eclipse developers only....
>>
>> Thanks,
>>
>> Federica
>>
>>Ed Willink wrote:
>>
>>>Hi
>>>
>>>org.eclipse.gef.examples.ediagram.figures.PackageFigure
>>>(in the EDiagram example accessible via CVS only) does this.
>>>
>>> Regards
>>>
>>> Ed Willink
>>>
>>>Federica wrote:
>>>
>>>
>>>>Hi,
>>>>I want to visualize Rectangles with Labels below it. I tried with this:
>>>>
>>>>IFigure f = new Figure();
>>>>f.setLayoutManager(new BorderLayout());
>>>>f.add(new Rectangle(...), BorderLayout.CENTER);
>>>>f.add(new Label(....), BorderLayout.BOTTOM);
>>>>
>>>>This sort of works, but labels are clipped. How can I get them not to
>>>>be clipped? Actually, I would prefer to see the selection rectangle
>>>>only around the rectangle, not including the label. Is that possible?
>>>>
>>>> Thanks,
>>>> Federica
>
>
>
|
|
|
Re: How to show rectangle with label [message #188046 is a reply to message #188029] |
Mon, 18 July 2005 21:48 |
Eclipse User |
|
|
|
Originally posted by: user.domain.invalid
Actually, I just noticed that even in your case labels are clipped. The
trick seems to be setting the layout constraints for the figure to a
rectangle wider than the actual box. This way the label is still
clipped, but to a width somewhat bigger than the box.
However, this has the undesirabile side effect of making the selection
area larger than the Box. Is there a way to fix this detail too? this
way the user could choose the maximum length of the label before it's
clipped independently from the selection area...
Thanks,
Federica
user@domain.invalid wrote:
> Pratik, I see you're name in some of the files of the example. Can you
> answer my last question?
>
> Only one problem remains on my side: labels are clipped to the size of
> the rectangle (with "..."). I see the example is not affected by that,
> but I can't figure out where the trick is....???
>
> Thanks,
> Federica
>
>
> Pratik Shah wrote:
>
>> http://www.eclipse.org/gef/developer/faq.html?cvsroot=Tools_ Project#install_cvs
>>
>>
>> <user@domain.invalid> wrote in message
>> news:42CD72B2.9030402@domain.invalid...
>>
>>> Hi,
>>> thanks for taking the time to answer my question. Can you give me some
>>> more details on how to access Eclipse's CVS repository? I've searched on
>>> their website but coudn't find much, and a search with Google seemed to
>>> suggest that the access is restricted to Eclipse developers only....
>>>
>>> Thanks,
>>>
>>> Federica
>>>
>>> Ed Willink wrote:
>>>
>>>> Hi
>>>>
>>>> org.eclipse.gef.examples.ediagram.figures.PackageFigure
>>>> (in the EDiagram example accessible via CVS only) does this.
>>>>
>>>> Regards
>>>>
>>>> Ed Willink
>>>>
>>>> Federica wrote:
>>>>
>>>>
>>>>> Hi,
>>>>> I want to visualize Rectangles with Labels below it. I tried with
>>>>> this:
>>>>>
>>>>> IFigure f = new Figure();
>>>>> f.setLayoutManager(new BorderLayout());
>>>>> f.add(new Rectangle(...), BorderLayout.CENTER);
>>>>> f.add(new Label(....), BorderLayout.BOTTOM);
>>>>>
>>>>> This sort of works, but labels are clipped. How can I get them not to
>>>>> be clipped? Actually, I would prefer to see the selection rectangle
>>>>> only around the rectangle, not including the label. Is that possible?
>>>>>
>>>>> Thanks,
>>>>> Federica
>>
>>
>>
>>
|
|
|
Re: How to show rectangle with label [message #188077 is a reply to message #188046] |
Mon, 18 July 2005 22:38 |
Eclipse User |
|
|
|
Originally posted by: none.unknown.com
<user@domain.invalid> wrote in message
news:42DC23AF.2030200@domain.invalid...
> Actually, I just noticed that even in your case labels are clipped. The
> trick seems to be setting the layout constraints for the figure to a
> rectangle wider than the actual box. This way the label is still
> clipped, but to a width somewhat bigger than the box.
Set the width to -1.
>
> However, this has the undesirabile side effect of making the selection
> area larger than the Box. Is there a way to fix this detail too? this
> way the user could choose the maximum length of the label before it's
> clipped independently from the selection area...
Override containsPoint() in your figure to not include the empty area around
the icon.
>
> Thanks,
> Federica
>
>
> user@domain.invalid wrote:
>
> > Pratik, I see you're name in some of the files of the example. Can you
> > answer my last question?
> >
> > Only one problem remains on my side: labels are clipped to the size of
> > the rectangle (with "..."). I see the example is not affected by that,
> > but I can't figure out where the trick is....???
> >
> > Thanks,
> > Federica
> >
> >
> > Pratik Shah wrote:
> >
> >>
http://www.eclipse.org/gef/developer/faq.html?cvsroot=Tools_ Project#install_cvs
> >>
> >>
> >> <user@domain.invalid> wrote in message
> >> news:42CD72B2.9030402@domain.invalid...
> >>
> >>> Hi,
> >>> thanks for taking the time to answer my question. Can you give me some
> >>> more details on how to access Eclipse's CVS repository? I've searched
on
> >>> their website but coudn't find much, and a search with Google seemed
to
> >>> suggest that the access is restricted to Eclipse developers only....
> >>>
> >>> Thanks,
> >>>
> >>> Federica
> >>>
> >>> Ed Willink wrote:
> >>>
> >>>> Hi
> >>>>
> >>>> org.eclipse.gef.examples.ediagram.figures.PackageFigure
> >>>> (in the EDiagram example accessible via CVS only) does this.
> >>>>
> >>>> Regards
> >>>>
> >>>> Ed Willink
> >>>>
> >>>> Federica wrote:
> >>>>
> >>>>
> >>>>> Hi,
> >>>>> I want to visualize Rectangles with Labels below it. I tried with
> >>>>> this:
> >>>>>
> >>>>> IFigure f = new Figure();
> >>>>> f.setLayoutManager(new BorderLayout());
> >>>>> f.add(new Rectangle(...), BorderLayout.CENTER);
> >>>>> f.add(new Label(....), BorderLayout.BOTTOM);
> >>>>>
> >>>>> This sort of works, but labels are clipped. How can I get them not
to
> >>>>> be clipped? Actually, I would prefer to see the selection rectangle
> >>>>> only around the rectangle, not including the label. Is that
possible?
> >>>>>
> >>>>> Thanks,
> >>>>> Federica
> >>
> >>
> >>
> >>
|
|
|
Re: How to show rectangle with label [message #188101 is a reply to message #188077] |
Tue, 19 July 2005 00:54 |
Eclipse User |
|
|
|
Originally posted by: user.domain.invalid
THANKS!
Federica
Pratik Shah wrote:
> <user@domain.invalid> wrote in message
> news:42DC23AF.2030200@domain.invalid...
>
>>Actually, I just noticed that even in your case labels are clipped. The
>>trick seems to be setting the layout constraints for the figure to a
>>rectangle wider than the actual box. This way the label is still
>>clipped, but to a width somewhat bigger than the box.
>
>
> Set the width to -1.
>
>
>>However, this has the undesirabile side effect of making the selection
>>area larger than the Box. Is there a way to fix this detail too? this
>>way the user could choose the maximum length of the label before it's
>>clipped independently from the selection area...
>
>
> Override containsPoint() in your figure to not include the empty area around
> the icon.
>
>
>> Thanks,
>> Federica
>>
>>
>>user@domain.invalid wrote:
>>
>>
>>>Pratik, I see you're name in some of the files of the example. Can you
>>>answer my last question?
>>>
>>>Only one problem remains on my side: labels are clipped to the size of
>>>the rectangle (with "..."). I see the example is not affected by that,
>>>but I can't figure out where the trick is....???
>>>
>>> Thanks,
>>> Federica
>>>
>>>
>>>Pratik Shah wrote:
>>>
>>>
> http://www.eclipse.org/gef/developer/faq.html?cvsroot=Tools_ Project#install_cvs
>
>>>>
>>>><user@domain.invalid> wrote in message
>>>>news:42CD72B2.9030402@domain.invalid...
>>>>
>>>>
>>>>>Hi,
>>>>>thanks for taking the time to answer my question. Can you give me some
>>>>>more details on how to access Eclipse's CVS repository? I've searched
>
> on
>
>>>>>their website but coudn't find much, and a search with Google seemed
>
> to
>
>>>>>suggest that the access is restricted to Eclipse developers only....
>>>>>
>>>>> Thanks,
>>>>>
>>>>> Federica
>>>>>
>>>>>Ed Willink wrote:
>>>>>
>>>>>
>>>>>>Hi
>>>>>>
>>>>>>org.eclipse.gef.examples.ediagram.figures.PackageFigure
>>>>>>(in the EDiagram example accessible via CVS only) does this.
>>>>>>
>>>>>> Regards
>>>>>>
>>>>>> Ed Willink
>>>>>>
>>>>>>Federica wrote:
>>>>>>
>>>>>>
>>>>>>
>>>>>>>Hi,
>>>>>>>I want to visualize Rectangles with Labels below it. I tried with
>>>>>>>this:
>>>>>>>
>>>>>>>IFigure f = new Figure();
>>>>>>>f.setLayoutManager(new BorderLayout());
>>>>>>>f.add(new Rectangle(...), BorderLayout.CENTER);
>>>>>>>f.add(new Label(....), BorderLayout.BOTTOM);
>>>>>>>
>>>>>>>This sort of works, but labels are clipped. How can I get them not
>
> to
>
>>>>>>>be clipped? Actually, I would prefer to see the selection rectangle
>>>>>>>only around the rectangle, not including the label. Is that
>
> possible?
>
>>>>>>> Thanks,
>>>>>>> Federica
>>>>
>>>>
>>>>
>>>>
>
>
|
|
|
Goto Forum:
Current Time: Thu Dec 26 18:47:40 GMT 2024
Powered by FUDForum. Page generated in 0.04270 seconds
|