|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectweka.gui.visualize.PrintableComponent
public class PrintableComponent
This class extends the component which is handed over in the constructor by a print dialog. The Print dialog is accessible via Alt+Shift+LeftMouseClick.
The individual JComponentWriter-descendants can be accessed by the
getWriter(String)
method, if the parameters need to be changed.
getWriters()
,
getWriter(String)
Constructor Summary | |
---|---|
PrintableComponent(javax.swing.JComponent component)
initializes the panel. |
Method Summary | |
---|---|
javax.swing.JComponent |
getComponent()
returns the GUI component this print dialog is part of. |
java.lang.String |
getSaveDialogTitle()
returns the title for the save dialog. |
static java.lang.String |
getToolTipText(PrintableComponent component)
Returns a tooltip only if the user wants it. |
JComponentWriter |
getWriter(java.lang.String name)
returns the JComponentWriter associated with the given name, is null if not found. |
java.util.Hashtable |
getWriters()
returns a Hashtable with the current available JComponentWriters in the save dialog. |
double |
getXScale()
returns the scale factor for the x-axis. |
double |
getYScale()
returns the scale factor for the y-axis. |
void |
saveComponent()
displays a save dialog for saving the panel to a file. |
void |
setSaveDialogTitle(java.lang.String title)
sets the title for the save dialog. |
void |
setScale(double x,
double y)
sets the scale factor. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public PrintableComponent(javax.swing.JComponent component)
component
- the component to enhance with printing functionalityMethod Detail |
---|
public javax.swing.JComponent getComponent()
public static java.lang.String getToolTipText(PrintableComponent component)
component
- the PrintableComponent to ask for
public java.util.Hashtable getWriters()
getWriters
in interface PrintableHandler
JComponentWriter.getDescription()
public JComponentWriter getWriter(java.lang.String name)
null
if not found.
getWriter
in interface PrintableHandler
name
- the name of the writer
JComponentWriter.getDescription()
public void setSaveDialogTitle(java.lang.String title)
setSaveDialogTitle
in interface PrintableHandler
title
- the title of the save dialogpublic java.lang.String getSaveDialogTitle()
getSaveDialogTitle
in interface PrintableHandler
public void setScale(double x, double y)
setScale
in interface PrintableHandler
x
- the scale factor for the x-axisy
- the scale factor for the y-axispublic double getXScale()
getXScale
in interface PrintableHandler
public double getYScale()
getYScale
in interface PrintableHandler
public void saveComponent()
getSelectedFile
method returns null
instead of the filename.
saveComponent
in interface PrintableHandler
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |