[29] | 1 | /* |
---|
| 2 | * This program is free software; you can redistribute it and/or modify |
---|
| 3 | * it under the terms of the GNU General Public License as published by |
---|
| 4 | * the Free Software Foundation; either version 2 of the License, or |
---|
| 5 | * (at your option) any later version. |
---|
| 6 | * |
---|
| 7 | * This program is distributed in the hope that it will be useful, |
---|
| 8 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
---|
| 9 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
---|
| 10 | * GNU General Public License for more details. |
---|
| 11 | * |
---|
| 12 | * You should have received a copy of the GNU General Public License |
---|
| 13 | * along with this program; if not, write to the Free Software |
---|
| 14 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. |
---|
| 15 | */ |
---|
| 16 | |
---|
| 17 | /* |
---|
| 18 | * PrintableComponent.java |
---|
| 19 | * Copyright (C) 2005 University of Waikato, Hamilton, New Zealand |
---|
| 20 | * |
---|
| 21 | */ |
---|
| 22 | |
---|
| 23 | package weka.gui.visualize; |
---|
| 24 | |
---|
| 25 | import java.util.Hashtable; |
---|
| 26 | |
---|
| 27 | /** |
---|
| 28 | * This interface is for all JComponent classes that provide the ability to |
---|
| 29 | * print itself to a file. |
---|
| 30 | * |
---|
| 31 | * @see PrintableComponent |
---|
| 32 | * @see PrintablePanel |
---|
| 33 | * @author FracPete (fracpete at waikato dot ac dot nz) |
---|
| 34 | * @version $Revision: 1.2 $ |
---|
| 35 | */ |
---|
| 36 | public interface PrintableHandler { |
---|
| 37 | /** |
---|
| 38 | * returns a Hashtable with the current available JComponentWriters in the |
---|
| 39 | * save dialog. the key of the Hashtable is the description of the writer. |
---|
| 40 | * |
---|
| 41 | * @return all currently available JComponentWriters |
---|
| 42 | * @see JComponentWriter#getDescription() |
---|
| 43 | */ |
---|
| 44 | public Hashtable getWriters(); |
---|
| 45 | |
---|
| 46 | /** |
---|
| 47 | * returns the JComponentWriter associated with the given name, is |
---|
| 48 | * <code>null</code> if not found |
---|
| 49 | * |
---|
| 50 | * @return the writer associated with the given name |
---|
| 51 | * @see JComponentWriter#getDescription() |
---|
| 52 | */ |
---|
| 53 | public JComponentWriter getWriter(String name); |
---|
| 54 | |
---|
| 55 | /** |
---|
| 56 | * sets the title for the save dialog |
---|
| 57 | */ |
---|
| 58 | public void setSaveDialogTitle(String title); |
---|
| 59 | |
---|
| 60 | /** |
---|
| 61 | * returns the title for the save dialog |
---|
| 62 | */ |
---|
| 63 | public String getSaveDialogTitle(); |
---|
| 64 | |
---|
| 65 | /** |
---|
| 66 | * sets the scale factor |
---|
| 67 | * @param x the scale factor for the x-axis |
---|
| 68 | * @param y the scale factor for the y-axis |
---|
| 69 | */ |
---|
| 70 | public void setScale(double x, double y); |
---|
| 71 | |
---|
| 72 | /** |
---|
| 73 | * returns the scale factor for the x-axis |
---|
| 74 | */ |
---|
| 75 | public double getXScale(); |
---|
| 76 | |
---|
| 77 | /** |
---|
| 78 | * returns the scale factor for the y-axis |
---|
| 79 | */ |
---|
| 80 | public double getYScale(); |
---|
| 81 | |
---|
| 82 | /** |
---|
| 83 | * displays a save dialog for saving the component to a file. |
---|
| 84 | */ |
---|
| 85 | public void saveComponent(); |
---|
| 86 | } |
---|