Skip to main content



      Home
Home » Eclipse Projects » GEF » Zooming in the MultiPage Editor II
Zooming in the MultiPage Editor II [message #72288] Mon, 24 March 2003 09:47 Go to next message
Eclipse UserFriend
Originally posted by: yuri.il.ibm.com

I am trying to overcome the problem of null ZoomManager.

In the MultiPageEditorActionBarContributor.contributeToToolBar(..) method I
tried to get a zoom manager from (working!) ZoomComboContributionItem.

ZoomComboContributionItem zoomCombo = new
ZoomComboContributionItem(getPage());

ZoomManager zoomManager = zoomCombo.getZoomManager();

And this zoomManager was null!

What's wrong? How can I get the not null ZoomManager to construct
ZoomIn/OutActions?

Thanks,

Yuri
Re: Zooming in the MultiPage Editor II [message #72343 is a reply to message #72288] Mon, 24 March 2003 10:41 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: none.us.ibm.com

you need to implement getAdapter(Class c), where c == ZoomManager.class.
Then return your zoom manager.


"Yuri Levin" <yuri@il.ibm.com> wrote in message
news:b5n5nk$m06$1@rogue.oti.com...
> I am trying to overcome the problem of null ZoomManager.
>
> In the MultiPageEditorActionBarContributor.contributeToToolBar(..) method
I
> tried to get a zoom manager from (working!) ZoomComboContributionItem.
>
> ZoomComboContributionItem zoomCombo = new
> ZoomComboContributionItem(getPage());
>
> ZoomManager zoomManager = zoomCombo.getZoomManager();
>
> And this zoomManager was null!
>
> What's wrong? How can I get the not null ZoomManager to construct
> ZoomIn/OutActions?
>
> Thanks,
>
> Yuri
>
>
>
Re: Zooming in the MultiPage Editor II [message #72499 is a reply to message #72288] Tue, 25 March 2003 05:46 Go to previous message
Eclipse UserFriend
Originally posted by: yuri.il.ibm.com

Randy!

I've implemented getAdapter() method:

public Object getAdapter(Class type){

...

if (type == ZoomManager.class) {

if (getGraphicalViewer() != null) {

return
((ScalableFreeformRootEditPart)getGraphicalViewer().getRootE ditPart()).getZo
omManager();

}

else {

// It happens in my case!!

return null;

}

}

return super.getAdapter(type);

}



This method exists in my GraphEditor, which is 1st page of the
MultiPageEditor.

It looks, that when the MultiPageEditor's tool bar starts, this page does
not exist yet.

Should I implement getAdapter() method for this MultiPageEditor also?

If yes, please, send me an example code for such method.

Thanks,

Yuri
Previous Topic:How to create an rotatable label figure?
Next Topic:[Repost] Problem with draw2d and swing. <imp>
Goto Forum:
  


Current Time: Thu Jul 03 14:57:08 EDT 2025

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

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

Back to the top