How to create a sidebar panel in OpenOffice? - java

I want to create an OpenOffice.org plug-in that adds a sidebar.
I have successfully installed OpenOffice.org, OpenOffice.org SDK and NetBeans OpenOffice plug-in.
I am familiar with Java, AWT and Swing, so no need to explain these concepts to me.
Now, I want to create a sidebar Panel(or JPanel) in OpenOffice.org Writer application.
How can I do this? It would be in the left and fill all available height(while using a fixed width).
Any idea on how to implement this? I have no OpenOffice.org plug-in past experience.
Thank you in advance.

This is currently not possible through the OpenOffice.org API. You can create menus, toolbars and dialogs. You cannot create dockable windows or panels via UNO. See: GUI Chapter in the Dev Guide.
Exposing this capability through the API is under active development and I suggest you join the api-dev#openoffice.org mailing list to stay on top of things.
The specific feature you asked for was already discussed there and it was suggested that it would be made available with a future update to OpenOffice 3.0. See post in the list archive.

I don't know if there's an easy answer for this. OO.o provides their dev guide here. It appears once you create an UNO component to their spec you can use:
Arbitrary objects written in Java or
C++ [and then] can be called from the user
interface, display their own GUI, and
work with the entire application.
That sounds like what you want to do. Hope this helps!

It's possible since version 4.0.
See https://wiki.openoffice.org/wiki/Sidebar

Related

Netbeans Platform: Hide Tabs for just one TopComponent

netbeans platform has proved to be most useful for large applications. But what about small applications?
I'm building a small Price-List making software which only has one TopComponent which contains a JTable and a few buttons.
This component I've set to have closing/sliding etc disabled as this is mandatory to be there. I also DO NOT want to have ANY more top components.
Is there a way to remove the tabs? It seems pointles to show just one tab with the name of the TopComponent.
I hope you get what I mean!
Thanks in advance.
Molten Ice,
Geertjan Wielenga's blog is an invaluable source of information for the NetBeans Platform. He's written a post especially for this task:
http://blogs.oracle.com/geertjan/entry/farewell_to_space_consuming_weird
I've used this technique before and it works fine.
If you have any other questions related to the NetBeans Platform I would suggest that you try the Plaform Users section of the NetBeans forums.

Implementing a simple UI editor in Java

I'm thinking about writing a simple UI designer in Java. I'm just playing with ideas at the moment to see if it is feasible.
It would be good to have something like this as all of our UIs are generated from XML. Just wondering if anyone has tried anything like this before. I know there will be a lot of effort in doing something like this.
Does anyone know of any 3rd party products that already do something like this?
If not then at a simple level, it will have drag and drop support for any component that can be positioned on a panel. Then extra bits will be added. Are there any good samples on the net for this?
Cheers
Dated back to 2005, this has an overview of Java UI Builders:
http://www.fullspan.com/articles/java-gui-builders.html
Here is a page on how to use the Eclipse Visual Editor:
http://www.ibm.com/developerworks/opensource/library/os-ecvisual/
Here is a good page on the different approaches to build UIs in Java:
http://leepoint.net/notes-java/GUI/misc/80gui-generator.html
Which GUI technology are you using? Swing? NetBeans has a very good drag-and-drop Swing GUI editor. For Eclipse there are several plugins.
If you want to see other projects in which a Swing GUI is generated from XML config files, there are different libraries that do this.
Eclipse 4.0 Developer Preview was just released with an xml based toolkit called XWT. It can be styled with CSS and has a GUI builder. This is a developer preview and there will be some changes over the next year as it progresses to release 4.1, but it is useable right now and the community support is really good.

Creating a "netbeans property" style dialog box

I've been trying to create a GUI using netbeans, that includes a dialog similar to Netbean's own "property dialog" that appears when designing. ie. a dialog that contains a table that can be expanded by tree nodes. Something like the dialog on this page, http://platform.netbeans.org/tutorials/nbm-property-editors.html
As far as I can understand, the page I linked to describes a custom editor I can set up for use within netbeans while designing - I'm just looking for a way to doing something similar for my actual application I'm writing. Is there an easy way to do this?
I came across this and have tried it but it doesn't quite work in the same way as the standard Netbeans dialog. weblogs.java.net/blog/timboudreau/archive/2008/06/egads_an_actual.html
Any tips greatly appreciated.
This will sound flip... but I am being serious.
The easiest way to do this is to write your app using the NetBeans RCP platform.
You may want to look at the Swing Application Framework, too.
There are a couple SAF samples integrated into NetBeans... You can read about them here: http://netbeans.org/kb/docs/java/gui-saf.html
I could not find a property editor dialog sample, though.
I found a couple other pointers, using this query: http://www.google.com/search?q=how+to+write+a+property+editor+dialog+in+swing
You could take a look into the l2fprod components
(source: l2fprod.com)

GUI frameworks for Java

I was wondering if anyone has any suggestions of frameworks to give an old desktop application a much needed facelift.
The application has had a long life without anyone giving any attention to its exterior resulting in a monster with an 80s look.
I've just downloaded and tried MyDoggy framework for making windows floatable and dockable. So I'm looking similar for quick and easy fixes that will bring a dead looking application back to life.
I think you don't want to rewrite your app, right? Because it seems as all the other guys think so, suggesting SWT and JavaFX.
To pimp your existing Swing App, take a look at jgoodies.com, the substance look and feel or the swinglabs
Just changing the look and feel and some components might already help to give your application a second youth. Consider for example Violet which is IMO a nice looking application. It uses a custom theme based on the PgsLookAndFeel and some components from L2FProd.com.
You could give Oracle's ADF a try.
If you want to go with the latest and greatest, you could try JavaFX. Bu tof course using good old swing or the more OS agnostic SWT does the trick as well.
There's ofcourse the Eclipse Rich Client Platform or the Netbeans Rich Client Platform.

What Java GUI framework is good for a first GUI project?

The title description basically says it all. I'd like to use something that requires a relatively short learning curve since it is my first project and I'd like to spend at least some of it actually writing the code, not just learning how to do it, but also something that has good documentation in a way that some new bleeding edge framework probably wouldn't. Any ideas?
If what you want to do, is actually create a working program with a GUI, and you just want to do that I would recommend looking at the Swing GUI editor in NetBeans, as it is very easy to work with and powerful too.
There is an old demonstration floating around showing how to implement a preference panel like the one in Netscape Navigator (the predecessor to Firefox), but I cannot find it right now.
The Java tutorial trail is here: http://java.sun.com/docs/books/tutorial/uiswing/learn/index.html
EDIT: It appears the preference panel demo has been taken offline. You may want to see this demo for NetBeans 6.0 instead: http://www.javalobby.org/eps/matisse-updates/
It's not clear if you mean a desktop or Web GUI.
For a desktop GUI, just use Java's Swing framework. Creating a GUI With JFC/Swing is a starting point for that. Sure it's old but then again so is Swing. You could also try The Java Swing tutorial.
For a Web GUI, start with servlets/JSPs. Try Servlets and JavaServer Pages (JSP) 1.0: A Tutorial.
Swing + MiGLayout ^^
I know you did say you wanted a simple and easy to learn GUI toolkit. #cletus has nailed that answer :)
But if need to look for alternatives and evaluate them before you decide how to write a GUI, check out this list of alternatives to Swing and AWT.
Swing + GroupLayout
I've been posting on these a couple of times.

Categories

Resources