Action[] getActions +1 save(OutputStream) +1 but I like some internal (protected?) means whereby the implementer has to do no explicit coding atall to get preview/print/save functionality: hence the getSaveAction Action which brings up a JFileChooser: but as the API also allows itself to be used for direct printing without previewing, I can't assume that the preview panel is up so I need to ask for a JFileChooser parent component to enable it to be sensible & modal.
More? -----Original Message----- From: Nicola Ken Barozzi [mailto:[EMAIL PROTECTED]] Sent: Thursday, February 21, 2002 3:11 PM To: [EMAIL PROTECTED] Subject: Re: AWT Window From: "Alistair Hopkins" <[EMAIL PROTECTED]> > So how about this as the public interface: > > package org.apache.fop.apps; > > public class AwtManager > { > public AwtManager(InputSource fo) > > public AwtManager(InputSource xsl. InputSource xml) > > //these are separated so the work of showing the preview can go on a > background thread > public Component getPreviewPanel() > public Component showPreview() > > //possible also to set the saved file type in the save method > public void save(Component fileChooserParent) -0 > public void save(File f) +-0 > public Action getSaveAction() save(OutputStream out) > public void print() > public Action getPrintAction() > > public void zoom(String zoomFactor) > public JCombo getZoomCombo() > > public void goToPage(int n) > ...etc... > > //a short hand for lazy people > public JToolBar getToolbar() > } Action[] getActions() -- Nicola Ken Barozzi [EMAIL PROTECTED] - verba volant, scripta manent - (discussions get forgotten, just code remains) --------------------------------------------------------------------- --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]