Re: Menubar unusable?

denis cardon <[email protected]>
Newsgroups gmane.comp.java.luxor-xul.user
Message-ID <[email protected]>
Hi Ross,

I hadn't understood your problem with the Menubar... I
did integrate them about two weeks ago in my
application : I just pasted and copied then modified
some code from Ramses suite to get it working. Indeed
it seems to work like magic (no glue code appearant).
Since then I didn't had time to dig into the code to
better understand the underlying machinery.

About the luxor tabbed pane, I also havent' been able
to integrate it correctly in my application either. So
I just used plain JTabbedPane. In fact, I have not
been able to completly remove swing code from my
application, but rather try to reach a 90% luxor based
GUI, using plain swing for my far-to-specific
requirements.

Cheers,

Denis

--- Ross Wetmore <[email protected]> wrote:
> 
> Found the undocumented trick for menubars!
> 
> If you stare at the *Def and XulManager code
> long enough, then it becomes apparent that ...
> 
> Unlike the Ramses example in which the
> menubar is more a cosmetic showpiece, if
> you want menubars to actually trigger
> actions in your application, then you
> need to create the menubar *after* you
> have created your content and populated
> the XulManager with the necessary
> XActions - menubars are "thin" widgets
> that do pure lookup with no real creation
> abilities.
> 
> demo/menu/AppFrame.java:
>        // get toolbar
>        JToolBar toolBar = xul.createToolBar(
> Chrome.ToolBar.MAIN );
>        getContentPane().add( toolBar,
> BorderLayout.NORTH );
> 
>        // get menubar
>        JMenuBar menuBar = xul.createMenuBar(
> Chrome.MenuBar.MAIN );
>        setJMenuBar( menuBar );
> 
> +     // Move this above the previous two if you
> actually want to
> +     // have them attach to any XulActions this
> might define.
>        // get main content box
>        JComponent content =
> xul.createJComponentFromBox( Chrome.Box.CONTENT );
> 
> The fact that menubars are standalone
> XUL elements that cannot be placed inside
> other boxes should also be documented as
> this appears to be a Luxor-specific
> restriction.
> 
> Now if I can only find the hook to trigger
> tabbox tab actions :-)
> 
> Cheers,
> RossW
> =====
> 
> Ross Wetmore wrote:
> > I've been poking around the menubar and tabbox
> > problem and am finding menubars to be rather
> > useless or certainly obscure in operational
> > mechanics of hooking them up to anything let
> > alone tabbox panel operations.
> > 
> > First, one gets Xul errors everytime one puts
> > a menubar inside any other box, or vice versa.
> > They really appear to be operational only as
> > standalone elements. This is reinforced by the
> > fact the any examples seem to create them with
> > explicit code like this outside of any other
> > component, i.e. in the static Main  ...
> >   JMenuBar menuBar = xul.createMenuBar("mBar");
> > 
> > The examples do not appear to show anything but
> > the menu facade, or pure Xul effects, i.e. I have
> > not seen a menubar example that actually invokes
> > an Action or is updated by an Input.
> > 
> > If you then create your component by subclassing
> > XulForm or whatever, there seems to be no linkage
> > between the XulInputs and XulActions of the two.
> > 
> > This may boild down to the unanswered question
> > about what are the defined Luxor scoping rules.
> > 
> > But it looks like the LinkControls code in the
> > Xul*Helpers really doesn't allow cross actions
> > i.e. any action to be shared between two top
> > level box-like objects.
> > 
> > What am I missing?
> > 
> > Cheers,
> > RossW
> > =====
> > 
> >
>
-------------------------------------------------------
> > This sf.net email is sponsored by:ThinkGeek
> > Welcome to geek heaven.
> > http://thinkgeek.com/sf
> > _______________________________________________
> > luxor-xul-user mailing list
> > [email protected]
> >
>
https://lists.sourceforge.net/lists/listinfo/luxor-xul-user
> > 
> 
> 
> 
>
-------------------------------------------------------
> This sf.net email is sponsored by:ThinkGeek
> Welcome to geek heaven.
> http://thinkgeek.com/sf
> _______________________________________________
> luxor-xul-user mailing list
> [email protected]
>
https://lists.sourceforge.net/lists/listinfo/luxor-xul-user


__________________________________________________
Do you Yahoo!?
Yahoo! Shopping - Send Flowers for Valentine's Day
http://shopping.yahoo.com


-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.