1 | /* |
---|
2 | * SimplyHTML, a word processor based on Java, HTML and CSS |
---|
3 | * Copyright (C) 2002 Ulrich Hilger |
---|
4 | * |
---|
5 | * This program is free software; you can redistribute it and/or |
---|
6 | * modify it under the terms of the GNU General Public License |
---|
7 | * as published by the Free Software Foundation; either version 2 |
---|
8 | * of the License, or (at your option) any later version. |
---|
9 | * |
---|
10 | * This program is distributed in the hope that it will be useful, |
---|
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
---|
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
---|
13 | * GNU General Public License for more details. |
---|
14 | * |
---|
15 | * You should have received a copy of the GNU General Public License |
---|
16 | * along with this program; if not, write to the Free Software |
---|
17 | * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
---|
18 | */ |
---|
19 | |
---|
20 | package nu.fw.jeti.plugins.xhtml.fontchooser; |
---|
21 | |
---|
22 | import java.awt.BorderLayout; |
---|
23 | import java.awt.Container; |
---|
24 | import java.awt.Frame; |
---|
25 | |
---|
26 | import javax.swing.text.AttributeSet; |
---|
27 | |
---|
28 | /** |
---|
29 | * Dialog to show and manipulate font attributes. |
---|
30 | * |
---|
31 | * @author Ulrich Hilger |
---|
32 | * @author Light Development |
---|
33 | * @author <a href="http://www.lightdev.com">http://www.lightdev.com</a> |
---|
34 | * @author <a href="mailto:info@lightdev.com">info@lightdev.com</a> |
---|
35 | * @author published under the terms and conditions of the |
---|
36 | * GNU General Public License, |
---|
37 | * for details see file gpl.txt in the distribution |
---|
38 | * package of this software |
---|
39 | * |
---|
40 | * @version stage 9, release 4, January 12, 2003 |
---|
41 | */ |
---|
42 | |
---|
43 | public class FontDialog extends DialogShell { |
---|
44 | |
---|
45 | /** the font panel to use in this dialog */ |
---|
46 | private FontPanel fontPanel; |
---|
47 | |
---|
48 | /** |
---|
49 | * constructor |
---|
50 | * |
---|
51 | * @param parent the main frame having the ResourceBundle |
---|
52 | * @param title the title for this dialog |
---|
53 | * @param a the set of attributes to show and manipulate |
---|
54 | */ |
---|
55 | public FontDialog(Frame parent, String title, AttributeSet a) { |
---|
56 | super(parent, title); |
---|
57 | |
---|
58 | // construct font panel |
---|
59 | fontPanel = new FontPanel(a); |
---|
60 | |
---|
61 | // add font panel to content pane of DialogShell |
---|
62 | Container contentPane = super.getContentPane(); |
---|
63 | contentPane.add(fontPanel, BorderLayout.CENTER); |
---|
64 | |
---|
65 | // cause optimal placement of all elements |
---|
66 | pack(); |
---|
67 | } |
---|
68 | |
---|
69 | /** |
---|
70 | * get the set of attributes set in this dialog |
---|
71 | * |
---|
72 | * @return the attributes set in this dialog |
---|
73 | */ |
---|
74 | public AttributeSet getAttributes() { |
---|
75 | return fontPanel.getAttributes(); |
---|
76 | } |
---|
77 | } |
---|
78 | /* |
---|
79 | * Overrides for emacs |
---|
80 | * Local variables: |
---|
81 | * tab-width: 4 |
---|
82 | * End: |
---|
83 | */ |
---|