Home » Eclipse Projects » GEF » Resizing editor's FigureCanvas
Resizing editor's FigureCanvas [message #242617] |
Tue, 29 April 2008 17:28  |
Eclipse User |
|
|
|
Hello,
I'm building a graphical form editor and I need to resize the editing
region depending on the size of the paper. I've tried resizing the
FigureCanvas, the Viewport, the RulerComposite, and each layer that makes
up the ScalableRootEditPart. But none of it makes any difference--the
editor still takes up the entire editor area.
Any ideas as to how to fix this?
Thanks,
Zack
|
|
| |
Re: Resizing editor's FigureCanvas [message #242654 is a reply to message #242638] |
Wed, 30 April 2008 11:14   |
Eclipse User |
|
|
|
Hi,
I don't want the editor to fill in the entire editor area. I want to control
the editor's size and leave the rest of the editor area in darkness. I
thought I might succeed by resizing one of the basic figures, but that
hasn't worked.
Has anyone else ever done this? All recommendations are welcome.
Thanks,
Zack
"Qinxian" <fyaoxy@gmail.com> wrote in message
news:fv8jle$bl9$2@build.eclipse.org...
> Hi,
> Not very clear for your problem.
> Your Editor is what Editor?
> If GEFGraphicalEditor it should be fill in entire editor area.
> If you want partial effect, override it or rewrite a Editor to layout it.
>
> Cheers,
> Qinxian
> ZHugh ??:
> > Hello,
> >
> > I'm building a graphical form editor and I need to resize the editing
> > region depending on the size of the paper. I've tried resizing the
> > FigureCanvas, the Viewport, the RulerComposite, and each layer that
> > makes up the ScalableRootEditPart. But none of it makes any
> > difference--the editor still takes up the entire editor area.
> >
> > Any ideas as to how to fix this?
> >
> > Thanks,
> >
> > Zack
> >
|
|
|
Re: Resizing editor's FigureCanvas [message #242659 is a reply to message #242654] |
Wed, 30 April 2008 22:28  |
Eclipse User |
|
|
|
Hi,
In most cases, the Editor contain a "GEFViewer" which create a Composite
FigureCanvas, which done all gef works.
But the editor must be entire edtor area, eclipse workbench control it.
But we can control the editor internal, which is our work.
As to your want efect, must change your GEFEditor behavor,
You look, Draw2d lws always maxized if its root composite of the editor.
But if the wanted gef Editor create controls like this:
Composite editorClient;
editorClient.setLayout(xxLayout);
FigureCanvas fc=GEFViewer.create(editorClient);
fc.setlayoutdata();
//maybe other controls or empty;
At this point, FC will some like fixed:) so you code will works.
Cheers,
Qinxian
Matt 写道:
> Hi,
>
> I don't want the editor to fill in the entire editor area. I want to control
> the editor's size and leave the rest of the editor area in darkness. I
> thought I might succeed by resizing one of the basic figures, but that
> hasn't worked.
>
> Has anyone else ever done this? All recommendations are welcome.
>
> Thanks,
>
> Zack
>
>
> "Qinxian" <fyaoxy@gmail.com> wrote in message
> news:fv8jle$bl9$2@build.eclipse.org...
>> Hi,
>> Not very clear for your problem.
>> Your Editor is what Editor?
>> If GEFGraphicalEditor it should be fill in entire editor area.
>> If you want partial effect, override it or rewrite a Editor to layout it.
>>
>> Cheers,
>> Qinxian
>> ZHugh ??:
>>> Hello,
>>>
>>> I'm building a graphical form editor and I need to resize the editing
>>> region depending on the size of the paper. I've tried resizing the
>>> FigureCanvas, the Viewport, the RulerComposite, and each layer that
>>> makes up the ScalableRootEditPart. But none of it makes any
>>> difference--the editor still takes up the entire editor area.
>>>
>>> Any ideas as to how to fix this?
>>>
>>> Thanks,
>>>
>>> Zack
>>>
>
>
|
|
|
Goto Forum:
Current Time: Fri Jul 18 04:28:08 EDT 2025
Powered by FUDForum. Page generated in 0.08159 seconds
|