|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.sf.jaxodraw.io.JaxoPreview
public class JaxoPreview
Responsible for viewing, like the results of an export. In general, one has to create temporary files that are opened with a default application and deleted after the program terminates. For postscript preview, it is mandatory to specify a default application in the preferences, the LaTeX preview may be done with Java's internal JEditorPane.
| Field Summary | |
|---|---|
static String |
TMP_DIR
A directory for temporary files used for the preview. |
static String |
USER_DIR
Deprecated. previews should use TMP_DIR for temporary files. |
| Constructor Summary | |
|---|---|
JaxoPreview(Component parentc)
Constructor. |
|
| Method Summary | |
|---|---|
void |
browseURL(URL u)
Show a window displaying the given URL, allowing the user to browse. |
void |
browseURLInternally(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. |
Component |
getParentComponent()
Parent component to use for window owners. |
String |
getTitle()
Title to be used for internally opened Windows. |
void |
setParentComponent(Component value)
Sets the parent component. |
void |
setTitle(String value)
Sets the title of this dialog. |
void |
showComponent(Component c)
Show a window displaying the component. |
void |
showComponent(Component c,
JFrame frame)
Display a component in a given frame. |
void |
showMessageForPostscriptViewer()
Show a message that the user cannot view postscript files. |
void |
showPostscript(File f)
Show the postscript file 'f', or a message that it cannot be shown. |
void |
showText(String text,
String fileName)
Show a window displaying the text file. |
void |
showText(String text,
String fileName,
JFrame frame)
Show a window displaying the text file. |
void |
showTextInternally(String text)
Show a window displaying the text file. |
void |
showTextInternally(String text,
JFrame frame)
Display a text file in a given frame. |
void |
showURLInternally(URL u)
Show a window displaying the URL (typically HTML), not allowing the user to browse. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String USER_DIR
TMP_DIR for temporary files.
public static final String TMP_DIR
| Constructor Detail |
|---|
public JaxoPreview(Component parentc)
parentc - Component whose Window to use a parent for dialogs.| Method Detail |
|---|
public final Component getParentComponent()
public void setParentComponent(Component value)
value - The parent component.public JaxoPreview copy()
public final String getTitle()
public void setTitle(String value)
value - The title.public void showComponent(Component c)
c - The component to show.
public void showComponent(Component c,
JFrame frame)
c - The component to show.frame - The frame to show the Component in.
public void showText(String text,
String fileName)
throws 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.
IOException - when there is a problem writing the temporary file
when the external editor is used.
public void showText(String text,
String fileName,
JFrame frame)
throws 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.
IOException - when there is a problem writing the temporary file
when the external editor is used.public void showTextInternally(String text)
text - The text.
public void showTextInternally(String text,
JFrame frame)
text - The text.frame - the frame to show the component in.public void browseURL(URL u)
u - The URL to display.public void showURLInternally(URL u)
u - The URL to display.public void browseURLInternally(URL u)
u - The URL to display.public boolean canShowPostscript()
public void showMessageForPostscriptViewer()
canShowPostscript()public void showPostscript(File f)
f - The ps file to show.canShowPostscript(),
showMessageForPostscriptViewer()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||