01: /*
02: * Copyright (C) 2004 Giuseppe MANNA
03: *
04: * This file is part of FreeReportBuilder
05: *
06: * FreeReportBuilder is free software; you can redistribute it and/or
07: * modify it under the terms of the GNU General Public License
08: * as published by the Free Software Foundation; either version 2
09: * of the License, or (at your option) any later version.
10: *
11: * This program is distributed in the hope that it will be useful,
12: * but WITHOUT ANY WARRANTY; without even the implied warranty of
13: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14: * GNU General Public License for more details.
15: *
16: * You should have received a copy of the GNU General Public License
17: * along with this program; if not, write to the Free Software
18: * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
19: *
20: */
21:
22: package it.frb.action;
23:
24: import it.frb.*;
25: import java.awt.Font;
26: import java.io.*;
27: import javax.swing.*;
28:
29: public class Action_Control_F1 extends ActionDataPanel {
30: public Action_Control_F1(String action) {
31: super (action);
32: }
33:
34: public void actionPerformed(java.awt.event.ActionEvent actionEvent) {
35: OptionsDialog optDialog = new OptionsDialog();
36: optDialog.setModal(true);
37: DataEngine.centerWindow(optDialog, SwingUtilities
38: .getWindowAncestor(dataPanel));
39: optDialog.show();
40:
41: if (optDialog.nClosedOption == optDialog.ACCEPTED) {
42: try {
43: if (ConfigurationProperties.properties()
44: .getLookAndFeel("Metal").equalsIgnoreCase(
45: "Windows")) {
46: javax.swing.UIManager
47: .setLookAndFeel("com.sun.java.swing.plaf.windows.WindowsLookAndFeel");
48:
49: } else if (ConfigurationProperties.properties()
50: .getLookAndFeel("Metal").equalsIgnoreCase(
51: "CDE/Motif")) {
52: javax.swing.UIManager
53: .setLookAndFeel("com.sun.java.swing.plaf.motif.MotifLookAndFeel");
54:
55: } else if (ConfigurationProperties.properties()
56: .getLookAndFeel("Metal").equalsIgnoreCase(
57: "Metal")) {
58: javax.swing.UIManager
59: .setLookAndFeel("javax.swing.plaf.metal.MetalLookAndFeel");
60:
61: } else if (ConfigurationProperties.properties()
62: .getLookAndFeel("Metal").equalsIgnoreCase(
63: "Kunststoff")) {
64: javax.swing.UIManager
65: .setLookAndFeel("com.incors.plaf.kunststoff.KunststoffLookAndFeel");
66: }
67:
68: javax.swing.SwingUtilities
69: .updateComponentTreeUI(javax.swing.SwingUtilities
70: .getRoot(this .dataPanel));
71:
72: } catch (ClassNotFoundException classNotExc) {
73: } catch (IllegalAccessException illegExc) {
74: } catch (InstantiationException instExc) {
75: } catch (javax.swing.UnsupportedLookAndFeelException unsuppExc) {
76: }
77: }
78: optDialog.dispose();
79: }
80: }
|