0001: /*
0002: * Copyright (C) 2005 - 2008 JasperSoft Corporation. All rights reserved.
0003: * http://www.jaspersoft.com.
0004: *
0005: * Unless you have purchased a commercial license agreement from JasperSoft,
0006: * the following license terms apply:
0007: *
0008: * This program is free software; you can redistribute it and/or modify
0009: * it under the terms of the GNU General Public License version 2 as published by
0010: * the Free Software Foundation.
0011: *
0012: * This program is distributed WITHOUT ANY WARRANTY; and without the
0013: * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
0014: * See the GNU General Public License for more details.
0015: *
0016: * You should have received a copy of the GNU General Public License
0017: * along with this program; if not, see http://www.gnu.org/licenses/gpl.txt
0018: * or write to:
0019: *
0020: * Free Software Foundation, Inc.,
0021: * 59 Temple Place - Suite 330,
0022: * Boston, MA USA 02111-1307
0023: *
0024: *
0025: *
0026: *
0027: * JRFontDialog.java
0028: *
0029: * Created on 9 maggio 2003, 17.25
0030: *
0031: */
0032:
0033: package it.businesslogic.ireport.gui;
0034:
0035: import it.businesslogic.ireport.IReportFont;
0036: import it.businesslogic.ireport.util.*;
0037: import it.businesslogic.ireport.*;
0038: import it.businesslogic.ireport.gui.sheet.Tag;
0039:
0040: import java.util.*;
0041:
0042: /**
0043: *
0044: * @author Administrator
0045: */
0046: public class JRFontDialog extends javax.swing.JDialog {
0047: /** Creates new form JRParameterDialog */
0048: private IReportFont iReportFont = new IReportFont();
0049: private boolean init = false;
0050: private boolean reportFontMode = true;
0051:
0052: public JRFontDialog(java.awt.Frame parent, boolean modal) {
0053:
0054: super (parent, modal);
0055: initComponents();
0056: this .setSize(420, 344);
0057: applyI18n();
0058: Misc.centerFrame(this );
0059:
0060: jNumberComboBoxSize.addEntry("3", 3);
0061: jNumberComboBoxSize.addEntry("5", 5);
0062: jNumberComboBoxSize.addEntry("8", 8);
0063: jNumberComboBoxSize.addEntry("10", 10);
0064: jNumberComboBoxSize.addEntry("12", 12);
0065: jNumberComboBoxSize.addEntry("14", 14);
0066: jNumberComboBoxSize.addEntry("18", 18);
0067: jNumberComboBoxSize.addEntry("24", 24);
0068: jNumberComboBoxSize.addEntry("36", 36);
0069: jNumberComboBoxSize.addEntry("48", 48);
0070:
0071: jNumberComboBoxSize.setSelectedIndex(3);
0072:
0073: jComboBoxPdfEncoding.addItem(new PdfEncoding("Cp1250",
0074: "CP1250 (Central European)"));
0075: jComboBoxPdfEncoding.addItem(new PdfEncoding("Cp1251",
0076: "CP1251 (Cyrillic)"));
0077: jComboBoxPdfEncoding.addItem(new PdfEncoding("Cp1252",
0078: "CP1252 (Western European ANSI aka WinAnsi)"));
0079: jComboBoxPdfEncoding.addItem(new PdfEncoding("Cp1253",
0080: "CP1253 (Greek)"));
0081: jComboBoxPdfEncoding.addItem(new PdfEncoding("Cp1254",
0082: "CP1254 (Turkish)"));
0083: jComboBoxPdfEncoding.addItem(new PdfEncoding("Cp1255",
0084: "CP1255 (Hebrew)"));
0085: jComboBoxPdfEncoding.addItem(new PdfEncoding("Cp1256",
0086: "CP1256 (Arabic)"));
0087: jComboBoxPdfEncoding.addItem(new PdfEncoding("Cp1257",
0088: "CP1257 (Baltic)"));
0089: jComboBoxPdfEncoding.addItem(new PdfEncoding("Cp1258",
0090: "CP1258 (Vietnamese)"));
0091: jComboBoxPdfEncoding.addItem(new PdfEncoding("UniGB-UCS2-H",
0092: "UniGB-UCS2-H (Chinese Simplified)"));
0093: jComboBoxPdfEncoding.addItem(new PdfEncoding("UniGB-UCS2-V",
0094: "UniGB-UCS2-V (Chinese Simplified)"));
0095: jComboBoxPdfEncoding.addItem(new PdfEncoding("UniCNS-UCS2-H",
0096: "UniCNS-UCS2-H (Chinese traditional)"));
0097: jComboBoxPdfEncoding.addItem(new PdfEncoding("UniCNS-UCS2-V",
0098: "UniCNS-UCS2-V (Chinese traditional)"));
0099: jComboBoxPdfEncoding.addItem(new PdfEncoding("UniJIS-UCS2-H",
0100: "UniJIS-UCS2-H (Japanese)"));
0101: jComboBoxPdfEncoding.addItem(new PdfEncoding("UniJIS-UCS2-V",
0102: "UniJIS-UCS2-V (Japanese)"));
0103: jComboBoxPdfEncoding.addItem(new PdfEncoding(
0104: "UniJIS-UCS2-HW-H", "UniJIS-UCS2-HW-H (Japanese)"));
0105: jComboBoxPdfEncoding.addItem(new PdfEncoding(
0106: "UniJIS-UCS2-HW-V", "UniJIS-UCS2-HW-V (Japanese)"));
0107: jComboBoxPdfEncoding.addItem(new PdfEncoding("UniKS-UCS2-H",
0108: "UniKS-UCS2-H (Korean)"));
0109: jComboBoxPdfEncoding.addItem(new PdfEncoding("UniKS-UCS2-V",
0110: "UniKS-UCS2-V (Korean)"));
0111: jComboBoxPdfEncoding.addItem(new PdfEncoding("Identity-H",
0112: "Identity-H (Unicode with horizontal writing)"));
0113: jComboBoxPdfEncoding.addItem(new PdfEncoding("Identity-V",
0114: "Identity-V (Unicode with vertical writing)"));
0115:
0116: // Load Fonts...
0117: String[] fontFamilies = java.awt.GraphicsEnvironment
0118: .getLocalGraphicsEnvironment()
0119: .getAvailableFontFamilyNames();
0120: for (int i = 0; i < fontFamilies.length; ++i) {
0121: jComboBoxFontName.addItem(fontFamilies[i]);
0122: }
0123:
0124: jComboBoxReportFonts.setVisible(false);
0125:
0126: javax.swing.KeyStroke escape = javax.swing.KeyStroke
0127: .getKeyStroke(java.awt.event.KeyEvent.VK_ESCAPE, 0,
0128: false);
0129: javax.swing.Action escapeAction = new javax.swing.AbstractAction() {
0130: public void actionPerformed(java.awt.event.ActionEvent e) {
0131: jButtonCancelActionPerformed(e);
0132: }
0133: };
0134:
0135: getRootPane().getInputMap(
0136: javax.swing.JComponent.WHEN_IN_FOCUSED_WINDOW).put(
0137: escape, "ESCAPE");
0138: getRootPane().getActionMap().put("ESCAPE", escapeAction);
0139:
0140: //to make the default button ...
0141: this .getRootPane().setDefaultButton(this .jButtonOK);
0142: }
0143:
0144: /** This method is called from within the constructor to
0145: * initialize the form.
0146: * WARNING: Do NOT modify this code. The content of this method is
0147: * always regenerated by the Form Editor.
0148: */
0149: // <editor-fold defaultstate="collapsed" desc=" Generated Code ">//GEN-BEGIN:initComponents
0150: private void initComponents() {
0151: java.awt.GridBagConstraints gridBagConstraints;
0152:
0153: jPanelFont = new javax.swing.JPanel();
0154: jLabel23 = new javax.swing.JLabel();
0155: jTextFieldReportFont = new javax.swing.JTextField();
0156: jLabel24 = new javax.swing.JLabel();
0157: jLabel27 = new javax.swing.JLabel();
0158: jComboBoxFontName = new javax.swing.JComboBox();
0159: jNumberComboBoxSize = new it.businesslogic.ireport.gui.JNumberComboBox();
0160: jLabel25 = new javax.swing.JLabel();
0161: jComboBoxPDFFontName = new javax.swing.JComboBox();
0162: jPanel2 = new javax.swing.JPanel();
0163: jCheckBoxBold = new javax.swing.JCheckBox();
0164: jCheckBoxUnderline = new javax.swing.JCheckBox();
0165: jCheckBoxItalic = new javax.swing.JCheckBox();
0166: jCheckBoxStrokeTrough = new javax.swing.JCheckBox();
0167: jSeparator2 = new javax.swing.JSeparator();
0168: jPanel3 = new javax.swing.JPanel();
0169: jPanel4 = new javax.swing.JPanel();
0170: jCheckBoxPDFEmbedded = new javax.swing.JCheckBox();
0171: jCheckBoxDefaultFont = new javax.swing.JCheckBox();
0172: jPanel5 = new javax.swing.JPanel();
0173: jLabel32 = new javax.swing.JLabel();
0174: jComboBoxPdfEncoding = new javax.swing.JComboBox();
0175: jSeparator3 = new javax.swing.JSeparator();
0176: jPanel6 = new javax.swing.JPanel();
0177: jPanel7 = new javax.swing.JPanel();
0178: jButtonOK = new javax.swing.JButton();
0179: jButtonCancel = new javax.swing.JButton();
0180: jButtonResetAllToDefault = new javax.swing.JButton();
0181: jComboBoxReportFonts = new javax.swing.JComboBox();
0182:
0183: getContentPane().setLayout(new java.awt.GridBagLayout());
0184:
0185: setTitle("Add/modify report font");
0186: setModal(true);
0187: setResizable(false);
0188: addWindowListener(new java.awt.event.WindowAdapter() {
0189: public void windowClosing(java.awt.event.WindowEvent evt) {
0190: closeDialog(evt);
0191: }
0192: });
0193:
0194: jPanelFont.setLayout(new java.awt.GridBagLayout());
0195:
0196: jLabel23.setText("Report font");
0197: gridBagConstraints = new java.awt.GridBagConstraints();
0198: gridBagConstraints.gridx = 0;
0199: gridBagConstraints.gridy = 0;
0200: gridBagConstraints.gridwidth = 2;
0201: gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
0202: gridBagConstraints.weightx = 1.0;
0203: jPanelFont.add(jLabel23, gridBagConstraints);
0204:
0205: gridBagConstraints = new java.awt.GridBagConstraints();
0206: gridBagConstraints.gridx = 0;
0207: gridBagConstraints.gridy = 1;
0208: gridBagConstraints.gridwidth = 2;
0209: gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
0210: gridBagConstraints.weightx = 1.0;
0211: jPanelFont.add(jTextFieldReportFont, gridBagConstraints);
0212:
0213: jLabel24.setText("Font name");
0214: gridBagConstraints = new java.awt.GridBagConstraints();
0215: gridBagConstraints.gridx = 0;
0216: gridBagConstraints.gridy = 2;
0217: gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
0218: gridBagConstraints.weightx = 1.0;
0219: gridBagConstraints.insets = new java.awt.Insets(4, 0, 0, 0);
0220: jPanelFont.add(jLabel24, gridBagConstraints);
0221:
0222: jLabel27.setText("Size");
0223: gridBagConstraints = new java.awt.GridBagConstraints();
0224: gridBagConstraints.gridx = 1;
0225: gridBagConstraints.gridy = 2;
0226: gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
0227: gridBagConstraints.insets = new java.awt.Insets(4, 4, 0, 0);
0228: jPanelFont.add(jLabel27, gridBagConstraints);
0229:
0230: jComboBoxFontName
0231: .addActionListener(new java.awt.event.ActionListener() {
0232: public void actionPerformed(
0233: java.awt.event.ActionEvent evt) {
0234: jComboBoxFontNameActionPerformed(evt);
0235: }
0236: });
0237:
0238: gridBagConstraints = new java.awt.GridBagConstraints();
0239: gridBagConstraints.gridx = 0;
0240: gridBagConstraints.gridy = 3;
0241: gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
0242: jPanelFont.add(jComboBoxFontName, gridBagConstraints);
0243:
0244: jNumberComboBoxSize.setMinimumSize(new java.awt.Dimension(70,
0245: 22));
0246: jNumberComboBoxSize.setPreferredSize(new java.awt.Dimension(70,
0247: 22));
0248: jNumberComboBoxSize
0249: .addActionListener(new java.awt.event.ActionListener() {
0250: public void actionPerformed(
0251: java.awt.event.ActionEvent evt) {
0252: jNumberComboBoxSizeActionPerformed(evt);
0253: }
0254: });
0255:
0256: gridBagConstraints = new java.awt.GridBagConstraints();
0257: gridBagConstraints.gridx = 1;
0258: gridBagConstraints.gridy = 3;
0259: gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
0260: gridBagConstraints.insets = new java.awt.Insets(0, 4, 0, 0);
0261: jPanelFont.add(jNumberComboBoxSize, gridBagConstraints);
0262:
0263: jLabel25.setText("PDF font name");
0264: gridBagConstraints = new java.awt.GridBagConstraints();
0265: gridBagConstraints.gridx = 0;
0266: gridBagConstraints.gridy = 4;
0267: gridBagConstraints.gridwidth = 2;
0268: gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
0269: gridBagConstraints.insets = new java.awt.Insets(4, 0, 0, 0);
0270: jPanelFont.add(jLabel25, gridBagConstraints);
0271:
0272: jComboBoxPDFFontName.setEditable(true);
0273: jComboBoxPDFFontName
0274: .addActionListener(new java.awt.event.ActionListener() {
0275: public void actionPerformed(
0276: java.awt.event.ActionEvent evt) {
0277: jComboBoxPDFFontNameActionPerformed(evt);
0278: }
0279: });
0280:
0281: gridBagConstraints = new java.awt.GridBagConstraints();
0282: gridBagConstraints.gridx = 0;
0283: gridBagConstraints.gridy = 5;
0284: gridBagConstraints.gridwidth = 2;
0285: gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
0286: gridBagConstraints.weightx = 1.0;
0287: jPanelFont.add(jComboBoxPDFFontName, gridBagConstraints);
0288:
0289: jPanel2.setLayout(new java.awt.GridBagLayout());
0290:
0291: jCheckBoxBold.setText("Bold");
0292: jCheckBoxBold
0293: .addActionListener(new java.awt.event.ActionListener() {
0294: public void actionPerformed(
0295: java.awt.event.ActionEvent evt) {
0296: jCheckBoxBoldActionPerformed(evt);
0297: }
0298: });
0299:
0300: gridBagConstraints = new java.awt.GridBagConstraints();
0301: gridBagConstraints.gridy = 0;
0302: gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
0303: gridBagConstraints.weightx = 1.0;
0304: gridBagConstraints.insets = new java.awt.Insets(4, 0, 0, 0);
0305: jPanel2.add(jCheckBoxBold, gridBagConstraints);
0306:
0307: jCheckBoxUnderline.setText("Underline");
0308: jCheckBoxUnderline
0309: .addActionListener(new java.awt.event.ActionListener() {
0310: public void actionPerformed(
0311: java.awt.event.ActionEvent evt) {
0312: jCheckBoxUnderlineActionPerformed(evt);
0313: }
0314: });
0315:
0316: gridBagConstraints = new java.awt.GridBagConstraints();
0317: gridBagConstraints.gridy = 0;
0318: gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
0319: gridBagConstraints.weightx = 1.0;
0320: gridBagConstraints.insets = new java.awt.Insets(4, 0, 0, 0);
0321: jPanel2.add(jCheckBoxUnderline, gridBagConstraints);
0322:
0323: jCheckBoxItalic.setText("Italic");
0324: jCheckBoxItalic
0325: .addActionListener(new java.awt.event.ActionListener() {
0326: public void actionPerformed(
0327: java.awt.event.ActionEvent evt) {
0328: jCheckBoxItalicActionPerformed(evt);
0329: }
0330: });
0331:
0332: gridBagConstraints = new java.awt.GridBagConstraints();
0333: gridBagConstraints.gridy = 1;
0334: gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
0335: gridBagConstraints.weightx = 1.0;
0336: jPanel2.add(jCheckBoxItalic, gridBagConstraints);
0337:
0338: jCheckBoxStrokeTrough.setText("Strike Trough");
0339: jCheckBoxStrokeTrough
0340: .addActionListener(new java.awt.event.ActionListener() {
0341: public void actionPerformed(
0342: java.awt.event.ActionEvent evt) {
0343: jCheckBoxStrokeTroughActionPerformed(evt);
0344: }
0345: });
0346:
0347: gridBagConstraints = new java.awt.GridBagConstraints();
0348: gridBagConstraints.gridy = 1;
0349: gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
0350: gridBagConstraints.weightx = 1.0;
0351: jPanel2.add(jCheckBoxStrokeTrough, gridBagConstraints);
0352:
0353: gridBagConstraints = new java.awt.GridBagConstraints();
0354: gridBagConstraints.gridx = 0;
0355: gridBagConstraints.gridy = 8;
0356: gridBagConstraints.gridwidth = 2;
0357: gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
0358: gridBagConstraints.weightx = 1.0;
0359: jPanelFont.add(jPanel2, gridBagConstraints);
0360:
0361: gridBagConstraints = new java.awt.GridBagConstraints();
0362: gridBagConstraints.gridx = 0;
0363: gridBagConstraints.gridy = 9;
0364: gridBagConstraints.gridwidth = 2;
0365: gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
0366: jPanelFont.add(jSeparator2, gridBagConstraints);
0367:
0368: jPanel3.setLayout(new java.awt.GridBagLayout());
0369:
0370: jPanel4.setLayout(new java.awt.GridBagLayout());
0371:
0372: jCheckBoxPDFEmbedded.setText("PDF Embedded");
0373: jCheckBoxPDFEmbedded
0374: .addActionListener(new java.awt.event.ActionListener() {
0375: public void actionPerformed(
0376: java.awt.event.ActionEvent evt) {
0377: jCheckBoxPDFEmbeddedActionPerformed(evt);
0378: }
0379: });
0380:
0381: gridBagConstraints = new java.awt.GridBagConstraints();
0382: gridBagConstraints.gridx = 0;
0383: gridBagConstraints.gridy = 10;
0384: gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
0385: jPanel4.add(jCheckBoxPDFEmbedded, gridBagConstraints);
0386:
0387: jCheckBoxDefaultFont.setLabel("Default");
0388: jCheckBoxDefaultFont
0389: .addActionListener(new java.awt.event.ActionListener() {
0390: public void actionPerformed(
0391: java.awt.event.ActionEvent evt) {
0392: jCheckBoxDefaultFontActionPerformed(evt);
0393: }
0394: });
0395:
0396: gridBagConstraints = new java.awt.GridBagConstraints();
0397: gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
0398: jPanel4.add(jCheckBoxDefaultFont, gridBagConstraints);
0399:
0400: gridBagConstraints = new java.awt.GridBagConstraints();
0401: gridBagConstraints.gridx = 0;
0402: gridBagConstraints.gridy = 0;
0403: gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
0404: gridBagConstraints.weighty = 1.0;
0405: jPanel3.add(jPanel4, gridBagConstraints);
0406:
0407: jPanel5.setLayout(new java.awt.GridBagLayout());
0408:
0409: jLabel32.setText("PDF Encoding");
0410: gridBagConstraints = new java.awt.GridBagConstraints();
0411: gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
0412: gridBagConstraints.weightx = 1.0;
0413: jPanel5.add(jLabel32, gridBagConstraints);
0414:
0415: jComboBoxPdfEncoding.setEditable(true);
0416: jComboBoxPdfEncoding
0417: .addActionListener(new java.awt.event.ActionListener() {
0418: public void actionPerformed(
0419: java.awt.event.ActionEvent evt) {
0420: jComboBoxPdfEncodingActionPerformed(evt);
0421: }
0422: });
0423:
0424: gridBagConstraints = new java.awt.GridBagConstraints();
0425: gridBagConstraints.gridy = 1;
0426: gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
0427: gridBagConstraints.weightx = 1.0;
0428: jPanel5.add(jComboBoxPdfEncoding, gridBagConstraints);
0429:
0430: gridBagConstraints = new java.awt.GridBagConstraints();
0431: gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
0432: gridBagConstraints.weightx = 1.0;
0433: gridBagConstraints.insets = new java.awt.Insets(0, 8, 0, 0);
0434: jPanel3.add(jPanel5, gridBagConstraints);
0435:
0436: gridBagConstraints = new java.awt.GridBagConstraints();
0437: gridBagConstraints.gridx = 0;
0438: gridBagConstraints.gridy = 10;
0439: gridBagConstraints.gridwidth = 2;
0440: gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
0441: gridBagConstraints.insets = new java.awt.Insets(4, 0, 0, 0);
0442: jPanelFont.add(jPanel3, gridBagConstraints);
0443:
0444: gridBagConstraints = new java.awt.GridBagConstraints();
0445: gridBagConstraints.gridy = 11;
0446: gridBagConstraints.gridwidth = 2;
0447: gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
0448: jPanelFont.add(jSeparator3, gridBagConstraints);
0449:
0450: jPanel6.setLayout(new java.awt.GridBagLayout());
0451:
0452: gridBagConstraints = new java.awt.GridBagConstraints();
0453: gridBagConstraints.gridheight = 2;
0454: gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
0455: gridBagConstraints.weightx = 1.0;
0456: gridBagConstraints.weighty = 1.0;
0457: jPanel6.add(jPanel7, gridBagConstraints);
0458:
0459: jButtonOK.setMnemonic('o');
0460: jButtonOK.setText("OK");
0461: jButtonOK
0462: .addActionListener(new java.awt.event.ActionListener() {
0463: public void actionPerformed(
0464: java.awt.event.ActionEvent evt) {
0465: jButtonOKActionPerformed(evt);
0466: }
0467: });
0468:
0469: gridBagConstraints = new java.awt.GridBagConstraints();
0470: gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
0471: gridBagConstraints.insets = new java.awt.Insets(4, 4, 4, 4);
0472: jPanel6.add(jButtonOK, gridBagConstraints);
0473:
0474: jButtonCancel.setMnemonic('c');
0475: jButtonCancel.setText("Cancel");
0476: jButtonCancel
0477: .addActionListener(new java.awt.event.ActionListener() {
0478: public void actionPerformed(
0479: java.awt.event.ActionEvent evt) {
0480: jButtonCancelActionPerformed(evt);
0481: }
0482: });
0483:
0484: gridBagConstraints = new java.awt.GridBagConstraints();
0485: gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
0486: gridBagConstraints.insets = new java.awt.Insets(4, 0, 4, 0);
0487: jPanel6.add(jButtonCancel, gridBagConstraints);
0488:
0489: jButtonResetAllToDefault.setMnemonic('d');
0490: jButtonResetAllToDefault.setText("Set all to default");
0491: jButtonResetAllToDefault
0492: .addActionListener(new java.awt.event.ActionListener() {
0493: public void actionPerformed(
0494: java.awt.event.ActionEvent evt) {
0495: jButtonOKActionPerformed1(evt);
0496: }
0497: });
0498:
0499: gridBagConstraints = new java.awt.GridBagConstraints();
0500: gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
0501: gridBagConstraints.insets = new java.awt.Insets(4, 4, 4, 4);
0502: jPanel6.add(jButtonResetAllToDefault, gridBagConstraints);
0503:
0504: gridBagConstraints = new java.awt.GridBagConstraints();
0505: gridBagConstraints.gridx = 0;
0506: gridBagConstraints.gridy = 12;
0507: gridBagConstraints.gridwidth = 2;
0508: gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
0509: gridBagConstraints.weightx = 1.0;
0510: gridBagConstraints.weighty = 1.0;
0511: jPanelFont.add(jPanel6, gridBagConstraints);
0512:
0513: jComboBoxReportFonts
0514: .addActionListener(new java.awt.event.ActionListener() {
0515: public void actionPerformed(
0516: java.awt.event.ActionEvent evt) {
0517: jComboBoxReportFontsActionPerformed(evt);
0518: }
0519: });
0520:
0521: gridBagConstraints = new java.awt.GridBagConstraints();
0522: gridBagConstraints.gridx = 0;
0523: gridBagConstraints.gridy = 1;
0524: gridBagConstraints.gridwidth = 2;
0525: gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
0526: gridBagConstraints.weightx = 1.0;
0527: jPanelFont.add(jComboBoxReportFonts, gridBagConstraints);
0528:
0529: gridBagConstraints = new java.awt.GridBagConstraints();
0530: gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
0531: gridBagConstraints.weightx = 1.0;
0532: gridBagConstraints.weighty = 1.0;
0533: gridBagConstraints.insets = new java.awt.Insets(4, 4, 4, 4);
0534: getContentPane().add(jPanelFont, gridBagConstraints);
0535:
0536: pack();
0537: }// </editor-fold>//GEN-END:initComponents
0538:
0539: private void jComboBoxPdfEncodingActionPerformed(
0540: java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jComboBoxPdfEncodingActionPerformed
0541: if (init)
0542: return;
0543: if (this .jComboBoxPdfEncoding.getSelectedItem() instanceof PdfEncoding) {
0544: iReportFont
0545: .setPdfEncoding(((PdfEncoding) this .jComboBoxPdfEncoding
0546: .getSelectedItem()).getEncoding());
0547: }
0548:
0549: // else
0550: // iReportFont.setPdfEncoding( Misc.nvl(this.jComboBoxPdfEncoding.getSelectedItem(),"CP1251"));
0551: }//GEN-LAST:event_jComboBoxPdfEncodingActionPerformed
0552:
0553: private void jCheckBoxPDFEmbeddedActionPerformed(
0554: java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jCheckBoxPDFEmbeddedActionPerformed
0555: if (init)
0556: return;
0557: iReportFont.setPdfEmbedded(jCheckBoxPDFEmbedded.isSelected());
0558: }//GEN-LAST:event_jCheckBoxPDFEmbeddedActionPerformed
0559:
0560: private void jCheckBoxDefaultFontActionPerformed(
0561: java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jCheckBoxDefaultFontActionPerformed
0562: if (init)
0563: return;
0564: iReportFont.setDefaultFont(jCheckBoxDefaultFont.isSelected());
0565: }//GEN-LAST:event_jCheckBoxDefaultFontActionPerformed
0566:
0567: private void jCheckBoxStrokeTroughActionPerformed(
0568: java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jCheckBoxStrokeTroughActionPerformed
0569: if (init)
0570: return;
0571: iReportFont
0572: .setStrikeTrought(jCheckBoxStrokeTrough.isSelected());
0573: }//GEN-LAST:event_jCheckBoxStrokeTroughActionPerformed
0574:
0575: private void jCheckBoxItalicActionPerformed(
0576: java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jCheckBoxItalicActionPerformed
0577: if (init)
0578: return;
0579: iReportFont.setItalic(jCheckBoxItalic.isSelected());
0580: }//GEN-LAST:event_jCheckBoxItalicActionPerformed
0581:
0582: private void jCheckBoxUnderlineActionPerformed(
0583: java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jCheckBoxUnderlineActionPerformed
0584: if (init)
0585: return;
0586: iReportFont.setUnderline(jCheckBoxUnderline.isSelected());
0587: }//GEN-LAST:event_jCheckBoxUnderlineActionPerformed
0588:
0589: private void jCheckBoxBoldActionPerformed(
0590: java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jCheckBoxBoldActionPerformed
0591: if (init)
0592: return;
0593: iReportFont.setBold(jCheckBoxBold.isSelected());
0594: }//GEN-LAST:event_jCheckBoxBoldActionPerformed
0595:
0596: private void jNumberComboBoxSizeActionPerformed(
0597: java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jNumberComboBoxSizeActionPerformed
0598: if (init)
0599: return;
0600: iReportFont.setFontSize((int) jNumberComboBoxSize.getValue());
0601: }//GEN-LAST:event_jNumberComboBoxSizeActionPerformed
0602:
0603: private void jComboBoxFontNameActionPerformed(
0604: java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jComboBoxFontNameActionPerformed
0605: if (init)
0606: return;
0607: getIReportFont().setFontName(
0608: jComboBoxFontName.getSelectedItem() + "");
0609: }//GEN-LAST:event_jComboBoxFontNameActionPerformed
0610:
0611: private void jButtonOKActionPerformed1(
0612: java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButtonOKActionPerformed1
0613:
0614: IReportFont ifont = new IReportFont();
0615: setIReportFont(ifont, jTextFieldReportFont.isVisible());
0616:
0617: }//GEN-LAST:event_jButtonOKActionPerformed1
0618:
0619: private void jComboBoxReportFontsActionPerformed(
0620: java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jComboBoxReportFontsActionPerformed
0621:
0622: if (init)
0623: return;
0624: if (jComboBoxReportFonts.getSelectedItem() != null
0625: && jComboBoxReportFonts.getSelectedItem() instanceof IReportFont) {
0626: // Set all fields to the value of the report font...
0627: IReportFont ifont = (IReportFont) ((IReportFont) jComboBoxReportFonts
0628: .getSelectedItem()).clone();
0629:
0630: setIReportFont(ifont, false);
0631: // Remove all values...
0632: ifont.getBeanProperties().clear();
0633: ifont.setReportFont(jComboBoxReportFonts.getSelectedItem()
0634: + "");
0635: }
0636: }//GEN-LAST:event_jComboBoxReportFontsActionPerformed
0637:
0638: private void jComboBoxPDFFontNameActionPerformed(
0639: java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jComboBoxPDFFontNameActionPerformed
0640:
0641: if (init)
0642: return;
0643: // Set band to all....
0644: if (jComboBoxPDFFontName.getSelectedItem() == null
0645: || (jComboBoxPDFFontName.getSelectedItem() + "")
0646: .equals(""))
0647: return;
0648: // Set the new value for all selected elements...
0649: Object obj = jComboBoxPDFFontName.getSelectedItem();
0650: String fontName = "" + obj;
0651: if (obj instanceof Tag) {
0652: fontName = "" + ((Tag) obj).getValue();
0653: } else {
0654: fontName = "" + obj;
0655: }
0656:
0657: iReportFont.setPropertyValue(IReportFont.PDF_FONT_NAME,
0658: (fontName.length() > 0) ? fontName : null);
0659: }//GEN-LAST:event_jComboBoxPDFFontNameActionPerformed
0660:
0661: private void jButtonCancelActionPerformed(
0662: java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButtonCancelActionPerformed
0663: setVisible(false);
0664: this .setDialogResult(javax.swing.JOptionPane.CANCEL_OPTION);
0665: dispose();
0666: }//GEN-LAST:event_jButtonCancelActionPerformed
0667:
0668: private void jButtonOKActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButtonOKActionPerformed
0669:
0670: if (this .jTextFieldReportFont.getText().trim().length() <= 0
0671: && isReportFontMode()) {
0672: javax.swing.JOptionPane
0673: .showMessageDialog(
0674: this ,
0675: I18n
0676: .getString(
0677: "messages.jRFontDialog.notValidReportFontName",
0678: "Please insert a valid report font name!"),
0679: I18n
0680: .getString(
0681: "messages.jRFontDialog.notValidReportFontNameCaption",
0682: "Invalid report font name!"),
0683: javax.swing.JOptionPane.WARNING_MESSAGE);
0684: return;
0685: }
0686:
0687: //iReportFont = getIReportFont();
0688: if (isReportFontMode()) {
0689: iReportFont.setReportFont(this .jTextFieldReportFont
0690: .getText());
0691: } else if (this .jComboBoxReportFonts.isVisible()
0692: && this .jComboBoxReportFonts.getSelectedItem() != null) {
0693: iReportFont.setReportFont(this .jComboBoxReportFonts
0694: .getSelectedItem()
0695: + "");
0696: }
0697:
0698: //iReportFont.setBold( this.jCheckBoxBold.isSelected());
0699:
0700: //iReportFont.setDefaultFont( jCheckBoxDefaultFont.isSelected());
0701: //iReportFont.setFontName(""+ this.jComboBoxFontName.getSelectedItem());
0702: //iReportFont.setFontSize( (int)jNumberComboBoxSize.getValue());
0703: //iReportFont.setItalic( this.jCheckBoxItalic.isSelected());
0704: //iReportFont.setPDFFontName( this.jComboBoxFontName.getSelectedItem()+"");
0705:
0706: //iReportFont.setPDFFontName(this.jComboBoxPDFFontName.getSelectedItem()+"");
0707: //if (iReportFont.getPDFFontName().equals("External TTF font..."))
0708: //{
0709: // if (this.jComboBoxTTFFont.getSelectedItem() != null &&
0710: // this.jComboBoxTTFFont.getSelectedItem() instanceof IRFont)
0711: // iReportFont.setPDFFontName( ((IRFont) this.jComboBoxTTFFont.getSelectedItem()).getFile().getName() +"");
0712: // }
0713:
0714: //iReportFont.setPdfEmbedded( this.jCheckBoxPDFEmbedded.isSelected());
0715: //if (this.jComboBoxPdfEncoding.getSelectedItem() instanceof PdfEncoding)
0716: // iReportFont.setPdfEncoding( ((PdfEncoding)this.jComboBoxPdfEncoding.getSelectedItem()).getEncoding());
0717: //else
0718: // iReportFont.setPdfEncoding( Misc.nvl(this.jComboBoxPdfEncoding.getSelectedItem(),"CP1251"));
0719:
0720: //iReportFont.setStrikeTrought( this.jCheckBoxStrokeTrough.isSelected());
0721: //iReportFont.setTTFFont( Misc.nvl(this.jComboBoxTTFFont.getSelectedItem(),"") );
0722: //iReportFont.setUnderline( this.jCheckBoxUnderline.isSelected());
0723: /*
0724: tmpParameter = new JRParameter( this.jTextFieldName.getText(), "java.lang.String",
0725: this.jCheckBoxIsForPrompting.isSelected(),
0726: this.jTextAreaDescription.getText());
0727: if (this.jComboBoxType.getSelectedItem().toString().trim().length() != 0)
0728: {
0729: tmpParameter.setClassType( this.jComboBoxType.getSelectedItem().toString().trim() );
0730: }
0731: tmpParameter.setDefaultValueExpression( jRTextExpressionAreaDefaultExpression.getText());
0732: */
0733:
0734: setVisible(false);
0735: this .setDialogResult(javax.swing.JOptionPane.OK_OPTION);
0736: dispose();
0737: }//GEN-LAST:event_jButtonOKActionPerformed
0738:
0739: /** Closes the dialog */
0740: private void closeDialog(java.awt.event.WindowEvent evt) {//GEN-FIRST:event_closeDialog
0741: setVisible(false);
0742: this .setDialogResult(javax.swing.JOptionPane.CLOSED_OPTION);
0743: dispose();
0744: }//GEN-LAST:event_closeDialog
0745:
0746: /** Getter for property dialogResult.
0747: * @return Value of property dialogResult.
0748: *
0749: */
0750: public int getDialogResult() {
0751: return dialogResult;
0752: }
0753:
0754: /** Setter for property dialogResult.
0755: * @param dialogResult New value of property dialogResult.
0756: *
0757: */
0758: public void setDialogResult(int dialogResult) {
0759: this .dialogResult = dialogResult;
0760: }
0761:
0762: /** Getter for property iReportFont.
0763: * @return Value of property iReportFont.
0764: *
0765: */
0766: public it.businesslogic.ireport.IReportFont getIReportFont() {
0767: return iReportFont;
0768: }
0769:
0770: public void setIReportFont(
0771: it.businesslogic.ireport.IReportFont iReportFont) {
0772: setIReportFont(iReportFont, true);
0773: }
0774:
0775: /** Setter for property iReportFont.
0776: * @param iReportFont New value of property iReportFont.
0777: *
0778: */
0779: public void setIReportFont(
0780: it.businesslogic.ireport.IReportFont iReportFont,
0781: boolean reportFontToo) {
0782:
0783: init = true;
0784:
0785: if (iReportFont == null)
0786: iReportFont = new it.businesslogic.ireport.IReportFont();
0787: this .iReportFont = iReportFont;
0788:
0789: if (reportFontToo) {
0790: this .jTextFieldReportFont.setText(new String(iReportFont
0791: .getReportFont()));
0792: if (iReportFont.getReportFont() != null
0793: && iReportFont.getReportFont().length() > 0) {
0794: for (int i = 0; i < jComboBoxReportFonts.getItemCount(); ++i) {
0795: if ((jComboBoxReportFonts.getItemAt(i) + "")
0796: .equals(iReportFont.getReportFont())) {
0797: jComboBoxReportFonts.setSelectedIndex(i);
0798: break;
0799: }
0800: }
0801: }
0802: }
0803:
0804: this .jCheckBoxBold.setSelected(iReportFont.isBold());
0805: this .jCheckBoxItalic.setSelected(iReportFont.isItalic());
0806: this .jCheckBoxStrokeTrough.setSelected(iReportFont
0807: .isStrikeTrought());
0808: this .jCheckBoxPDFEmbedded.setSelected(iReportFont
0809: .isPdfEmbedded());
0810: this .jCheckBoxUnderline.setSelected(iReportFont.isUnderline());
0811: this .jCheckBoxDefaultFont.setSelected(iReportFont
0812: .isDefaultFont());
0813:
0814: setComboBoxText(true, iReportFont.getFontName(),
0815: jComboBoxFontName);
0816:
0817: this .setMixedTagComboBox(true, iReportFont.getPDFFontName(),
0818: jComboBoxPDFFontName);
0819:
0820: this .setElementComboNumber(true, iReportFont.getFontSize(),
0821: jNumberComboBoxSize);
0822: this .setPdfEncodingComboBox(true, iReportFont.getPdfEncoding(),
0823: jComboBoxPdfEncoding);
0824:
0825: init = false;
0826: }
0827:
0828: public void updateFonts(Vector iRFonts) {
0829: Vector fontsVec = new Vector();
0830: fontsVec.addElement(new Tag("Helvetica"));
0831: fontsVec.addElement(new Tag("Helvetica-Bold"));
0832: fontsVec.addElement(new Tag("Helvetica-BoldOblique"));
0833: fontsVec.addElement(new Tag("Helvetica-Oblique"));
0834: fontsVec.addElement(new Tag("Courier"));
0835: fontsVec.addElement(new Tag("Courier-Bold"));
0836: fontsVec.addElement(new Tag("Courier-BoldOblique"));
0837: fontsVec.addElement(new Tag("Courier-Oblique"));
0838: fontsVec.addElement(new Tag("Symbol"));
0839: fontsVec.addElement(new Tag("Times-Roman"));
0840: fontsVec.addElement(new Tag("Times-Bold"));
0841: fontsVec.addElement(new Tag("Times-BoldItalic"));
0842: fontsVec.addElement(new Tag("Times-Italic"));
0843: fontsVec.addElement(new Tag("ZapfDingbats"));
0844: fontsVec.addElement(new Tag("STSong-Light"));
0845: fontsVec.addElement(new Tag("MHei-Medium"));
0846: fontsVec.addElement(new Tag("MSung-Light"));
0847: fontsVec.addElement(new Tag("HeiseiKakuGo-W5"));
0848: fontsVec.addElement(new Tag("HeiseiMin-W3"));
0849: fontsVec.addElement(new Tag("HYGoThic-Medium"));
0850: fontsVec.addElement(new Tag("HYSMyeongJo-Medium"));
0851: Vector iRfonts = MainFrame.getMainInstance().getTtfFonts();
0852: for (int i_f = 0; i_f < iRfonts.size(); ++i_f) {
0853: fontsVec.addElement(new Tag(((IRFont) iRfonts
0854: .elementAt(i_f)).getFile(), iRfonts.elementAt(i_f)
0855: + ""));
0856: }
0857: Misc.updateComboBox(jComboBoxPDFFontName, fontsVec);
0858: }
0859:
0860: // Variables declaration - do not modify//GEN-BEGIN:variables
0861: private javax.swing.JButton jButtonCancel;
0862: private javax.swing.JButton jButtonOK;
0863: private javax.swing.JButton jButtonResetAllToDefault;
0864: private javax.swing.JCheckBox jCheckBoxBold;
0865: private javax.swing.JCheckBox jCheckBoxDefaultFont;
0866: private javax.swing.JCheckBox jCheckBoxItalic;
0867: private javax.swing.JCheckBox jCheckBoxPDFEmbedded;
0868: private javax.swing.JCheckBox jCheckBoxStrokeTrough;
0869: private javax.swing.JCheckBox jCheckBoxUnderline;
0870: private javax.swing.JComboBox jComboBoxFontName;
0871: private javax.swing.JComboBox jComboBoxPDFFontName;
0872: private javax.swing.JComboBox jComboBoxPdfEncoding;
0873: private javax.swing.JComboBox jComboBoxReportFonts;
0874: private javax.swing.JLabel jLabel23;
0875: private javax.swing.JLabel jLabel24;
0876: private javax.swing.JLabel jLabel25;
0877: private javax.swing.JLabel jLabel27;
0878: private javax.swing.JLabel jLabel32;
0879: private it.businesslogic.ireport.gui.JNumberComboBox jNumberComboBoxSize;
0880: private javax.swing.JPanel jPanel2;
0881: private javax.swing.JPanel jPanel3;
0882: private javax.swing.JPanel jPanel4;
0883: private javax.swing.JPanel jPanel5;
0884: private javax.swing.JPanel jPanel6;
0885: private javax.swing.JPanel jPanel7;
0886: private javax.swing.JPanel jPanelFont;
0887: private javax.swing.JSeparator jSeparator2;
0888: private javax.swing.JSeparator jSeparator3;
0889: private javax.swing.JTextField jTextFieldReportFont;
0890: // End of variables declaration//GEN-END:variables
0891:
0892: private int dialogResult;
0893:
0894: protected boolean setComboBoxText(boolean firstTime, String value,
0895: javax.swing.JComboBox comboField) {
0896: if ((!firstTime)
0897: && (!(Misc.nvl(comboField.getSelectedItem(), "")
0898: .equalsIgnoreCase(value)))) {
0899: comboField.setSelectedIndex(0);
0900: return false;
0901: } else {
0902: try {
0903: comboField.setSelectedItem(value);
0904: } catch (Exception ex) {
0905: ex.printStackTrace();
0906: }
0907: }
0908: return true;
0909: }
0910:
0911: protected boolean setMixedTagComboBox(boolean firstTime,
0912: Object value, javax.swing.JComboBox comboField) {
0913: if (firstTime) {
0914: try {
0915: for (int i = 0; i < comboField.getItemCount(); ++i) {
0916: if (comboField.getItemAt(i) instanceof Tag
0917: && ((Tag) comboField.getItemAt(i))
0918: .getValue().equals(value)) {
0919: comboField.setSelectedIndex(i);
0920: return true;
0921: }
0922: }
0923: // No tag found...
0924: comboField.setSelectedItem(value);
0925:
0926: } catch (Exception ex) {
0927: ex.printStackTrace();
0928: }
0929: return true;
0930: } else {
0931: Object selectedValue = comboField.getSelectedItem();
0932: if (selectedValue == null && value == null)
0933: return true;
0934: if (selectedValue == null)
0935: return false;
0936: if (selectedValue instanceof Tag) {
0937: selectedValue = ((Tag) selectedValue).getValue();
0938: }
0939:
0940: if (selectedValue.equals(value))
0941: return true;
0942: }
0943: return false;
0944: }
0945:
0946: protected boolean setPdfEncodingComboBox(boolean firstTime,
0947: String value, javax.swing.JComboBox comboField) {
0948: if ((!firstTime)
0949: && (!(comboField.getSelectedItem() != null && ((comboField
0950: .getSelectedItem() instanceof PdfEncoding && ((PdfEncoding) comboField
0951: .getSelectedItem()).getEncoding()
0952: .equalsIgnoreCase(value)) || (comboField
0953: .getSelectedItem() + "").equals(value))))) {
0954: if (comboField.getItemCount() > 0)
0955: comboField.setSelectedIndex(0);
0956: return false;
0957: } else {
0958: try {
0959: for (int i = 0; i < comboField.getItemCount(); ++i) {
0960: if (comboField.getItemAt(i) instanceof PdfEncoding
0961: && ((PdfEncoding) comboField.getItemAt(i))
0962: .getEncoding().equals(value)) {
0963: comboField.setSelectedIndex(i);
0964: return true;
0965: }
0966: }
0967: comboField.setSelectedItem(value);
0968: } catch (Exception ex) {
0969: ex.printStackTrace();
0970: }
0971: }
0972: return true;
0973: }
0974:
0975: protected boolean setElementComboNumber(boolean firstTime,
0976: double value, JNumberComboBox numberField) {
0977: if ((!firstTime) && (!(numberField.getValue() == value))) {
0978: numberField.setSelectedItem("");
0979: return false;
0980: } else {
0981: try {
0982: numberField.setValue(value);
0983: } catch (Exception ex) {
0984: ex.printStackTrace();
0985: }
0986: }
0987: return true;
0988: }
0989:
0990: public boolean isReportFontMode() {
0991: return reportFontMode;
0992: }
0993:
0994: public void setReportFontMode(boolean reportFontMode) {
0995: setReportFontMode(reportFontMode ? 1 : 0);
0996: }
0997:
0998: public void setReportFontMode(int reportFontMode) {
0999: this .reportFontMode = reportFontMode == 1;
1000:
1001: jComboBoxReportFonts.setVisible(reportFontMode == 0);
1002: jTextFieldReportFont.setVisible(reportFontMode == 1);
1003: jCheckBoxDefaultFont.setEnabled(reportFontMode == 1);
1004:
1005: jLabel23.setVisible(reportFontMode != 3);
1006:
1007: if (jComboBoxReportFonts.getItemCount() == 0) {
1008: // We have to populate the combobox...
1009: if (MainFrame.getMainInstance().getActiveReportFrame() != null) {
1010: Misc.updateComboBox(jComboBoxReportFonts, MainFrame
1011: .getMainInstance().getActiveReportFrame()
1012: .getReport().getFonts(), true);
1013: }
1014: }
1015: }
1016:
1017: public void applyI18n() {
1018: // Start autogenerated code ----------------------
1019: jCheckBoxBold.setText(I18n.getString(
1020: "jRFontDialog.checkBoxBold", "Bold"));
1021: jCheckBoxItalic.setText(I18n.getString(
1022: "jRFontDialog.checkBoxItalic", "Italic"));
1023: jCheckBoxPDFEmbedded.setText(I18n.getString(
1024: "jRFontDialog.checkBoxPDFEmbedded", "PDF Embedded"));
1025: jCheckBoxStrokeTrough.setText(I18n.getString(
1026: "jRFontDialog.checkBoxStrokeTrough", "Strike Trough"));
1027: jCheckBoxUnderline.setText(I18n.getString(
1028: "jRFontDialog.checkBoxUnderline", "Underline"));
1029: // End autogenerated code ----------------------
1030: // Start autogenerated code ----------------------
1031: jButtonCancel.setText(I18n.getString(
1032: "jRFontDialog.buttonCancel", "Cancel"));
1033: jButtonOK
1034: .setText(I18n.getString("jRFontDialog.buttonOK", "OK"));
1035: jButtonResetAllToDefault.setText(I18n.getString(
1036: "jRFontDialog.buttonResetAllToDefault",
1037: "Set all to default"));
1038: jLabel23.setText(I18n.getString("jRFontDialog.label23",
1039: "Report font"));
1040: jLabel24.setText(I18n.getString("jRFontDialog.label24",
1041: "Font name"));
1042: jLabel25.setText(I18n.getString("jRFontDialog.label25",
1043: "PDF font name"));
1044: jLabel27
1045: .setText(I18n.getString("jRFontDialog.label27", "Size"));
1046: jLabel32.setText(I18n.getString("jRFontDialog.label32",
1047: "PDF Encoding"));
1048: // End autogenerated code ----------------------
1049:
1050: this .setTitle(I18n.getString("jRFontDialog.title",
1051: "Add/modify report font"));
1052: jButtonCancel.setMnemonic(I18n.getString(
1053: "jRFontDialog.buttonCancelMnemonic", "c").charAt(0));
1054: jButtonOK.setMnemonic(I18n.getString(
1055: "jRFontDialog.buttonOKMnemonic", "o").charAt(0));
1056: jCheckBoxDefaultFont.setText(I18n.getString(
1057: "jRFontDialog.checkBoxDefaultFont", "Default"));
1058: }
1059: }
|