Re: [dev] Preview window with OOoBean ?

2006-02-01 Thread Matthias Benkmann
On 1/31/06, Mathias Bauer [EMAIL PROTECTED] wrote:
 Matthias Benkmann wrote:

  On 1/31/06, Mathias Bauer [EMAIL PROTECTED] wrote:

 Previews don't have scrollbars in OOo and a preview in OOo always has a
 fixed part of the document. I thought the Preview mode is the right
 choice because you wrote that you wanted a preview window.
 Obviously that's not the case.

Well, it's a preview with respect to my application, but I still want
to offer the user the ability to see all of the document, so indeed
OOo's notion of Preview mode doesn't seem to be what I want.

 So I think that the only way to go is switching of the UI explicitly.
 First you should load the document in readonly mode and then you need to
  switch off the Layout Manager object of the frame you are loading the
 document into.

 The Layout Manager is a property of the frame that - surprise! ;-) - is
 named LayoutManager (IIRC). You can call lock() and
 setVisible(False) on it. This will remove all toolbar and the menu.

I'll try that, thanks.

Matthias

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [dev] Preview window with OOoBean ?

2006-01-31 Thread Jürgen Schmidt

Mathias Bauer wrote:

Matthias Benkmann wrote:


I'm developing a Java app that let's the user fill out a form. The
Java app uses this data to create a document in Writer.  I would like
to offer the user a preview window that integrates as seemlessly as
possible with the Java app.

I thought I could use the OOoBean for that purpose, however I have the
problem that the bean always contains the complete Writer GUI, with
menu bar, toolbars,...  Even worse, if the user had the Styles and
Formatting window open the last time he used writer, then when I show
the OOoBean, I get a Styles and Formatting window, too.

What should I do to get rid of all of this? All I want is the document
view with no editing GUI elements and no additional windows.  I guess
that I can get rid of the menu and toolbars with the Programmatic
Control of Menu and Toolbar features, but what about windows such as
Styles and Formatting? How do I enumerate and close all of those? And
is closing them really the only way? I'd much prefer to not have them
pop up in the first place, because having a window appear and
disappear confuses the user. Suggestions are very much welcome.


If you loaded your file directly with loadComponentFromURL or so you
could try to add a property Preview with value True. I don't know
the bean API by memory so I don't know if there is something comarable.


You can also disable the menus and toolbars

Juergen



Best regards,
Mathias



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [dev] Preview window with OOoBean ?

2006-01-31 Thread Mathias Bauer
Matthias Benkmann wrote:

 On 1/31/06, Mathias Bauer [EMAIL PROTECTED] wrote:

 If you loaded your file directly with loadComponentFromURL or so you
 could try to add a property Preview with value True. I don't know
 the bean API by memory so I don't know if there is something comarable.
 
 Thanks, that seems to do the trick. But there's one problem. The view
 opened that way does not have any toolbars for scrolling, even if the
 document is not fully visible. Is that a bug? Do I have to do
 something special to get the toolbars to appear?

Previews don't have scrollbars in OOo and a preview in OOo always has a
fixed part of the document. I thought the Preview mode is the right
choice because you wrote that you wanted a preview window.
Obviously that's not the case.

So I think that the only way to go is switching of the UI explicitly.
First you should load the document in readonly mode and then you need to
 switch off the Layout Manager object of the frame you are loading the
document into.

The Layout Manager is a property of the frame that - surprise! ;-) - is
named LayoutManager (IIRC). You can call lock() and
setVisible(False) on it. This will remove all toolbar and the menu.

Best regards,
Mathias

-- 
Mathias Bauer - OpenOffice.org Application Framework Project Lead
Please reply to the list only, [EMAIL PROTECTED] is a spam sink.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



[dev] Preview window with OOoBean ?

2006-01-30 Thread Matthias Benkmann
I'm developing a Java app that let's the user fill out a form. The
Java app uses this data to create a document in Writer.  I would like
to offer the user a preview window that integrates as seemlessly as
possible with the Java app.

I thought I could use the OOoBean for that purpose, however I have the
problem that the bean always contains the complete Writer GUI, with
menu bar, toolbars,...  Even worse, if the user had the Styles and
Formatting window open the last time he used writer, then when I show
the OOoBean, I get a Styles and Formatting window, too.

What should I do to get rid of all of this? All I want is the document
view with no editing GUI elements and no additional windows.  I guess
that I can get rid of the menu and toolbars with the Programmatic
Control of Menu and Toolbar features, but what about windows such as
Styles and Formatting? How do I enumerate and close all of those? And
is closing them really the only way? I'd much prefer to not have them
pop up in the first place, because having a window appear and
disappear confuses the user. Suggestions are very much welcome.

Matthias

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [dev] Preview window with OOoBean ?

2006-01-30 Thread Mathias Bauer
Matthias Benkmann wrote:

 I'm developing a Java app that let's the user fill out a form. The
 Java app uses this data to create a document in Writer.  I would like
 to offer the user a preview window that integrates as seemlessly as
 possible with the Java app.
 
 I thought I could use the OOoBean for that purpose, however I have the
 problem that the bean always contains the complete Writer GUI, with
 menu bar, toolbars,...  Even worse, if the user had the Styles and
 Formatting window open the last time he used writer, then when I show
 the OOoBean, I get a Styles and Formatting window, too.
 
 What should I do to get rid of all of this? All I want is the document
 view with no editing GUI elements and no additional windows.  I guess
 that I can get rid of the menu and toolbars with the Programmatic
 Control of Menu and Toolbar features, but what about windows such as
 Styles and Formatting? How do I enumerate and close all of those? And
 is closing them really the only way? I'd much prefer to not have them
 pop up in the first place, because having a window appear and
 disappear confuses the user. Suggestions are very much welcome.

If you loaded your file directly with loadComponentFromURL or so you
could try to add a property Preview with value True. I don't know
the bean API by memory so I don't know if there is something comarable.

Best regards,
Mathias

-- 
Mathias Bauer - OpenOffice.org Application Framework Project Lead
Please reply to the list only, [EMAIL PROTECTED] is a spam sink.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]