I'm creating my personal window (i need to implement a really customized Window with many JComponent)from java source and i need to add the compiereToolbar...
How can i do?!
I think the solution is close to the APanel class but i can't resolve yet...
thank U all
hey mr. reggatta,
compiere brings a construct for such custom windows. These customs are called Forms (like the ones globalqss wrote on one of your other threads). They contains the usual compiere toolbar and menu but with a custom "centerpanel". Take a look at FormFrame. Thats the enclosing JFrame for your form. There's a method openForm (int AD_Form_ID) which load your form.
Thus you have to register your form-class within Compiere. The formclass should extend CPanel. At best take a look at the default-formclasses (the ones globalqss named). There you can get a good idea of the whole thing.
I will try...i will take a look to the FormFrame.java
If I find somethings good, i will share it with U all ;-)
thx U oliver
Oliver! Very Good!
I have seen the FormFrame.java and it was very good for me!
I've created my own form...
Just a question:
I'd like to add also the compiere JToolBar, have you some ideas?
Thanks in advance...regards!
good to hear...but the main issue with putting the Toolbar into a form is, that the default toolbar of every window (not form!) within compiere is relating to window-specific items, like Tabs. Forms dont have tabs unless you program these yourself. So you cant just copy the toolbar into your form.
But you can get the toolbar as itself and adjust the actions which are taken on events (like press on the save-button). Take a look into the class org.compiere.apps.APanel
There you'll find the toolbar :
private JToolBar toolBar = new JToolBar();
and the lines which initialize this one.
You can copy these into your form including the action-methods cmd_* (i.e. private void cmd_help()). These methods you'll need to adjust to your form. The method cmd_save(...) might save your form-items then or so.
so...in the end you can't reuse the window-toolbar but you can reprogram that one for your form for sure. APanel might help to get the identical toolbar again...
Log in to post a comment.
Sign up for the SourceForge newsletter:
You seem to have CSS turned off.
Please don't fill out this field.