public class JaxoPreview
extends java.lang.Object
implements java.lang.Cloneable
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
USER_DIR
The user's home directory.
|
Constructor and Description |
---|
JaxoPreview(java.awt.Component parentc)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
browseURL(java.net.URL u)
Show a window displaying the given URL, allowing the user to browse.
|
void |
browseURLInternally(java.net.URL u)
Show a window displaying the URL (typically HTML),
allowing the user to browse.
|
boolean |
canShowPostscript()
Is it possible to show postscript files?
|
JaxoPreview |
copy()
Returns a copy (clone) of this preview.
|
java.awt.Component |
getParentComponent()
Parent component to use for window owners.
|
java.lang.String |
getTitle()
Title to be used for internally opened Windows.
|
void |
setParentComponent(java.awt.Component value)
Sets the parent component.
|
void |
setTitle(java.lang.String value)
Sets the title of this dialog.
|
void |
showComponent(java.awt.Component c)
Show a window displaying the component.
|
void |
showComponent(java.awt.Component c,
javax.swing.JFrame frame)
Display a component in a given frame.
|
void |
showMessageForPostscriptViewer()
Show a message that the user cannot view postscript files.
|
void |
showPostscript(java.io.File f)
Show the postscript file 'f', or a message that it cannot be shown.
|
void |
showText(java.lang.String text,
java.lang.String fileName)
Show a window displaying the text file.
|
void |
showText(java.lang.String text,
java.lang.String fileName,
javax.swing.JFrame frame)
Show a window displaying the text file.
|
void |
showTextInternally(java.lang.String text)
Show a window displaying the text file.
|
void |
showTextInternally(java.lang.String text,
javax.swing.JFrame frame)
Display a text file in a given frame.
|
void |
showURLInternally(java.net.URL u)
Show a window displaying the URL (typically HTML), not
allowing the user to browse.
|
public JaxoPreview(java.awt.Component parentc)
parentc
- Component whose Window to use a parent for dialogs.public final java.awt.Component getParentComponent()
public void setParentComponent(java.awt.Component value)
value
- The parent component.public JaxoPreview copy()
public final java.lang.String getTitle()
public void setTitle(java.lang.String value)
value
- The title.public void showComponent(java.awt.Component c)
c
- The component to show.public void showComponent(java.awt.Component c, javax.swing.JFrame frame)
c
- The component to show.frame
- The frame to show the Component in.public void showText(java.lang.String text, java.lang.String fileName) throws java.io.IOException
text
- the text to show.fileName
- The name of the temporary file that is created when
the external editor is used. It is created in the user home dir.java.io.IOException
- when there is a problem writing the temporary file
when the external editor is used.public void showText(java.lang.String text, java.lang.String fileName, javax.swing.JFrame frame) throws java.io.IOException
text
- the text to show.fileName
- The name of the temporary file that is created when
the external editor is used. It is created in the user home dir.frame
- the frame to show the component in.java.io.IOException
- when there is a problem writing the temporary file
when the external editor is used.public void showTextInternally(java.lang.String text)
text
- The text.public void showTextInternally(java.lang.String text, javax.swing.JFrame frame)
text
- The text.frame
- the frame to show the component in.public void browseURL(java.net.URL u)
u
- The URL to display.public void showURLInternally(java.net.URL u)
u
- The URL to display.public void browseURLInternally(java.net.URL u)
u
- The URL to display.public boolean canShowPostscript()
public void showMessageForPostscriptViewer()
canShowPostscript()
public void showPostscript(java.io.File f)
f
- The ps file to show.canShowPostscript()
,
showMessageForPostscriptViewer()
Licensed under GPL. For more information, see http://jaxodraw.sourceforge.net/license.html or the LICENSE file in the jaxodraw distribution.