001: /*
002: * Copyright (C) 2005 - 2008 JasperSoft Corporation. All rights reserved.
003: * http://www.jaspersoft.com.
004: *
005: * Unless you have purchased a commercial license agreement from JasperSoft,
006: * the following license terms apply:
007: *
008: * This program is free software; you can redistribute it and/or modify
009: * it under the terms of the GNU General Public License version 2 as published by
010: * the Free Software Foundation.
011: *
012: * This program is distributed WITHOUT ANY WARRANTY; and without the
013: * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
014: * See the GNU General Public License for more details.
015: *
016: * You should have received a copy of the GNU General Public License
017: * along with this program; if not, see http://www.gnu.org/licenses/gpl.txt
018: * or write to:
019: *
020: * Free Software Foundation, Inc.,
021: * 59 Temple Place - Suite 330,
022: * Boston, MA USA 02111-1307
023: *
024: *
025: *
026: *
027: * CrosstabCellDialog.java
028: *
029: * Created on 9 maggio 2003, 17.25
030: *
031: */
032:
033: package it.businesslogic.ireport.crosstab.gui;
034:
035: import it.businesslogic.ireport.Style;
036: import it.businesslogic.ireport.crosstab.CrosstabCell;
037: import it.businesslogic.ireport.gui.MainFrame;
038: import it.businesslogic.ireport.gui.box.BoxPanel;
039: import it.businesslogic.ireport.gui.sheet.HexColorChooserPanel;
040: import it.businesslogic.ireport.util.Misc;
041: import java.awt.Color;
042: import java.util.Vector;
043: import it.businesslogic.ireport.util.I18n;
044:
045: /**
046: * @author Administrator
047: */
048: public class CrosstabCellDialog extends javax.swing.JDialog {
049: private CrosstabCell tmpCell = null;
050: private BoxPanel boxPanel = null;
051: private java.awt.Color bgcolor = null;
052:
053: /**
054: * Creates a new CrosstabGroupDialog object.
055: *
056: * @param subDataset DOCUMENT ME!
057: * @param parent DOCUMENT ME!
058: * @param modal DOCUMENT ME!
059: */
060: public CrosstabCellDialog(java.awt.Frame parent, boolean modal) {
061: super (parent, modal);
062: initAll();
063: }
064:
065: public CrosstabCellDialog(java.awt.Dialog parent, boolean modal) {
066: super (parent, modal);
067: initAll();
068: }
069:
070: public void initAll() {
071: initComponents();
072:
073: boxPanel = new BoxPanel();
074: boxPanel.addActionListener(new java.awt.event.ActionListener() {
075: public void actionPerformed(java.awt.event.ActionEvent evt) {
076: boxActionPerformed(evt);
077: }
078: });
079:
080: java.awt.GridBagConstraints gridBagConstraints = new java.awt.GridBagConstraints();
081: gridBagConstraints.gridx = 4;
082: gridBagConstraints.gridy = 2;
083: gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
084: gridBagConstraints.insets = new java.awt.Insets(2, 4, 2, 4);
085: gridBagConstraints.weightx = 1.0;
086: gridBagConstraints.weighty = 1.0;
087: gridBagConstraints.fill = gridBagConstraints.BOTH;
088: jPanelBorder.add(boxPanel, gridBagConstraints);
089:
090: //this.setSize(400, 400);
091: pack();
092: Misc.centerFrame(this );
093:
094: java.awt.Font font = jLabel1.getFont();
095: jLabel1.setFont(new java.awt.Font(font.getFontName(), 1, 14));
096:
097: javax.swing.KeyStroke escape = javax.swing.KeyStroke
098: .getKeyStroke(java.awt.event.KeyEvent.VK_ESCAPE, 0,
099: false);
100: javax.swing.Action escapeAction = new javax.swing.AbstractAction() {
101: public void actionPerformed(java.awt.event.ActionEvent e) {
102: jButtonCancelActionPerformed(e);
103: }
104: };
105:
106: getRootPane().getInputMap(
107: javax.swing.JComponent.WHEN_IN_FOCUSED_WINDOW).put(
108: escape, "ESCAPE");
109: getRootPane().getActionMap().put("ESCAPE", escapeAction);
110:
111: applyI18n();
112: //to make the default button ...
113: this .getRootPane().setDefaultButton(this .jButtonOK);
114:
115: }
116:
117: public void boxActionPerformed(java.awt.event.ActionEvent evt) {
118:
119: }
120:
121: /**
122: * This method is called from within the constructor to initialize the
123: * form. WARNING: Do NOT modify this code. The content of this method is
124: * always regenerated by the Form Editor.
125: */
126:
127: // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
128: private void initComponents() {
129: java.awt.GridBagConstraints gridBagConstraints;
130:
131: jLabelWidth = new javax.swing.JLabel();
132: jNumberFieldWidth = new it.businesslogic.ireport.gui.JNumberField();
133: jLabelHeight = new javax.swing.JLabel();
134: jNumberFieldHeight = new it.businesslogic.ireport.gui.JNumberField();
135: jPanelBorder = new javax.swing.JPanel();
136: jPanel2 = new javax.swing.JPanel();
137: jLabelWidth1 = new javax.swing.JLabel();
138: jButtonBackground = new javax.swing.JButton();
139: jButton1 = new javax.swing.JButton();
140: jPanel1 = new javax.swing.JPanel();
141: jPanel4 = new javax.swing.JPanel();
142: jButtonOK = new javax.swing.JButton();
143: jButtonCancel = new javax.swing.JButton();
144: jLabel1 = new javax.swing.JLabel();
145: jSeparator1 = new javax.swing.JSeparator();
146: jCheckBoxTransparent = new javax.swing.JCheckBox();
147: jLabelStyle = new javax.swing.JLabel();
148: jComboBoxstyles = new javax.swing.JComboBox();
149:
150: setTitle("Modify cell");
151: setModal(true);
152: addWindowListener(new java.awt.event.WindowAdapter() {
153: public void windowClosing(java.awt.event.WindowEvent evt) {
154: closeDialog(evt);
155: }
156: });
157: getContentPane().setLayout(new java.awt.GridBagLayout());
158:
159: jLabelWidth
160: .setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);
161: jLabelWidth.setText("Column width");
162: gridBagConstraints = new java.awt.GridBagConstraints();
163: gridBagConstraints.gridx = 0;
164: gridBagConstraints.gridy = 10;
165: gridBagConstraints.gridwidth = 2;
166: gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
167: gridBagConstraints.insets = new java.awt.Insets(3, 5, 3, 3);
168: getContentPane().add(jLabelWidth, gridBagConstraints);
169:
170: jNumberFieldWidth.setColumns(4);
171: jNumberFieldWidth
172: .setHorizontalAlignment(javax.swing.JTextField.RIGHT);
173: try {
174: jNumberFieldWidth.setDecimals(0);
175: } catch (java.beans.PropertyVetoException e1) {
176: e1.printStackTrace();
177: }
178: jNumberFieldWidth
179: .setMinimumSize(new java.awt.Dimension(40, 21));
180: jNumberFieldWidth.setPreferredSize(new java.awt.Dimension(38,
181: 21));
182: gridBagConstraints = new java.awt.GridBagConstraints();
183: gridBagConstraints.gridx = 2;
184: gridBagConstraints.gridy = 10;
185: gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
186: gridBagConstraints.insets = new java.awt.Insets(3, 3, 3, 3);
187: getContentPane().add(jNumberFieldWidth, gridBagConstraints);
188:
189: jLabelHeight
190: .setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);
191: jLabelHeight.setText("Row height");
192: gridBagConstraints = new java.awt.GridBagConstraints();
193: gridBagConstraints.gridx = 0;
194: gridBagConstraints.gridy = 15;
195: gridBagConstraints.gridwidth = 2;
196: gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
197: gridBagConstraints.insets = new java.awt.Insets(3, 5, 3, 3);
198: getContentPane().add(jLabelHeight, gridBagConstraints);
199:
200: jNumberFieldHeight.setColumns(4);
201: jNumberFieldHeight
202: .setHorizontalAlignment(javax.swing.JTextField.RIGHT);
203: try {
204: jNumberFieldHeight.setDecimals(0);
205: } catch (java.beans.PropertyVetoException e1) {
206: e1.printStackTrace();
207: }
208: jNumberFieldHeight
209: .setMinimumSize(new java.awt.Dimension(40, 21));
210: jNumberFieldHeight.setPreferredSize(new java.awt.Dimension(38,
211: 21));
212: gridBagConstraints = new java.awt.GridBagConstraints();
213: gridBagConstraints.gridx = 2;
214: gridBagConstraints.gridy = 15;
215: gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
216: gridBagConstraints.insets = new java.awt.Insets(3, 3, 6, 3);
217: getContentPane().add(jNumberFieldHeight, gridBagConstraints);
218:
219: jPanelBorder.setLayout(new java.awt.GridBagLayout());
220: gridBagConstraints = new java.awt.GridBagConstraints();
221: gridBagConstraints.gridx = 0;
222: gridBagConstraints.gridy = 20;
223: gridBagConstraints.gridwidth = 4;
224: gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
225: gridBagConstraints.weightx = 1.0;
226: gridBagConstraints.weighty = 1.0;
227: getContentPane().add(jPanelBorder, gridBagConstraints);
228:
229: jPanel2.setLayout(new java.awt.GridBagLayout());
230:
231: jLabelWidth1.setText("Cell background color");
232: gridBagConstraints = new java.awt.GridBagConstraints();
233: gridBagConstraints.gridx = 0;
234: gridBagConstraints.gridy = 0;
235: gridBagConstraints.insets = new java.awt.Insets(3, 14, 3, 3);
236: jPanel2.add(jLabelWidth1, gridBagConstraints);
237:
238: jButtonBackground.setBackground(new java.awt.Color(0, 0, 0));
239: jButtonBackground
240: .setMaximumSize(new java.awt.Dimension(45, 20));
241: jButtonBackground
242: .setMinimumSize(new java.awt.Dimension(45, 20));
243: jButtonBackground.setPreferredSize(new java.awt.Dimension(45,
244: 20));
245: jButtonBackground
246: .addActionListener(new java.awt.event.ActionListener() {
247: public void actionPerformed(
248: java.awt.event.ActionEvent evt) {
249: jButtonBackgroundActionPerformed(evt);
250: }
251: });
252: gridBagConstraints = new java.awt.GridBagConstraints();
253: gridBagConstraints.gridx = 1;
254: gridBagConstraints.gridy = 0;
255: gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
256: jPanel2.add(jButtonBackground, gridBagConstraints);
257:
258: jButton1.setText("Reset color");
259: jButton1.addActionListener(new java.awt.event.ActionListener() {
260: public void actionPerformed(java.awt.event.ActionEvent evt) {
261: jButton1ActionPerformed(evt);
262: }
263: });
264: gridBagConstraints = new java.awt.GridBagConstraints();
265: gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
266: gridBagConstraints.weightx = 1.0;
267: gridBagConstraints.insets = new java.awt.Insets(0, 4, 0, 0);
268: jPanel2.add(jButton1, gridBagConstraints);
269:
270: gridBagConstraints = new java.awt.GridBagConstraints();
271: gridBagConstraints.gridx = 3;
272: gridBagConstraints.gridy = 15;
273: gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
274: gridBagConstraints.weightx = 1.0;
275: getContentPane().add(jPanel2, gridBagConstraints);
276:
277: jPanel1.setMinimumSize(new java.awt.Dimension(126, 40));
278: jPanel1.setPreferredSize(new java.awt.Dimension(126, 40));
279: jPanel1.setLayout(new java.awt.GridBagLayout());
280: gridBagConstraints = new java.awt.GridBagConstraints();
281: gridBagConstraints.gridx = 0;
282: gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
283: gridBagConstraints.weightx = 1.0;
284: gridBagConstraints.weighty = 1.0;
285: jPanel1.add(jPanel4, gridBagConstraints);
286:
287: jButtonOK.setMnemonic('o');
288: jButtonOK.setText("OK");
289: jButtonOK
290: .addActionListener(new java.awt.event.ActionListener() {
291: public void actionPerformed(
292: java.awt.event.ActionEvent evt) {
293: jButtonOKActionPerformed(evt);
294: }
295: });
296: gridBagConstraints = new java.awt.GridBagConstraints();
297: gridBagConstraints.gridx = 1;
298: gridBagConstraints.anchor = java.awt.GridBagConstraints.SOUTHEAST;
299: jPanel1.add(jButtonOK, gridBagConstraints);
300:
301: jButtonCancel.setMnemonic('c');
302: jButtonCancel.setText("Cancel");
303: jButtonCancel
304: .addActionListener(new java.awt.event.ActionListener() {
305: public void actionPerformed(
306: java.awt.event.ActionEvent evt) {
307: jButtonCancelActionPerformed(evt);
308: }
309: });
310: gridBagConstraints = new java.awt.GridBagConstraints();
311: gridBagConstraints.gridx = 2;
312: gridBagConstraints.anchor = java.awt.GridBagConstraints.SOUTHEAST;
313: gridBagConstraints.insets = new java.awt.Insets(0, 3, 0, 3);
314: jPanel1.add(jButtonCancel, gridBagConstraints);
315:
316: gridBagConstraints = new java.awt.GridBagConstraints();
317: gridBagConstraints.gridx = 0;
318: gridBagConstraints.gridy = 99;
319: gridBagConstraints.gridwidth = 4;
320: gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
321: gridBagConstraints.anchor = java.awt.GridBagConstraints.SOUTHEAST;
322: gridBagConstraints.weightx = 1.0;
323: gridBagConstraints.insets = new java.awt.Insets(3, 3, 3, 3);
324: getContentPane().add(jPanel1, gridBagConstraints);
325:
326: jLabel1.setText("Cell name");
327: jLabel1.setMaximumSize(new java.awt.Dimension(34, 23));
328: jLabel1.setMinimumSize(new java.awt.Dimension(34, 23));
329: jLabel1.setPreferredSize(new java.awt.Dimension(34, 23));
330: gridBagConstraints = new java.awt.GridBagConstraints();
331: gridBagConstraints.gridx = 0;
332: gridBagConstraints.gridy = 1;
333: gridBagConstraints.gridwidth = 4;
334: gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
335: gridBagConstraints.insets = new java.awt.Insets(4, 4, 4, 4);
336: getContentPane().add(jLabel1, gridBagConstraints);
337:
338: jSeparator1.setMinimumSize(new java.awt.Dimension(0, 2));
339: gridBagConstraints = new java.awt.GridBagConstraints();
340: gridBagConstraints.gridx = 0;
341: gridBagConstraints.gridy = 3;
342: gridBagConstraints.gridwidth = 4;
343: gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
344: gridBagConstraints.insets = new java.awt.Insets(0, 0, 4, 0);
345: getContentPane().add(jSeparator1, gridBagConstraints);
346:
347: jCheckBoxTransparent.setText("Transparent");
348: jCheckBoxTransparent.setBorder(javax.swing.BorderFactory
349: .createEmptyBorder(0, 0, 0, 0));
350: jCheckBoxTransparent.setMargin(new java.awt.Insets(0, 0, 0, 0));
351: gridBagConstraints = new java.awt.GridBagConstraints();
352: gridBagConstraints.gridy = 10;
353: gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
354: gridBagConstraints.anchor = java.awt.GridBagConstraints.EAST;
355: gridBagConstraints.weightx = 1.0;
356: gridBagConstraints.insets = new java.awt.Insets(0, 14, 0, 0);
357: getContentPane().add(jCheckBoxTransparent, gridBagConstraints);
358:
359: jLabelStyle
360: .setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);
361: jLabelStyle.setText("Cell style");
362: gridBagConstraints = new java.awt.GridBagConstraints();
363: gridBagConstraints.gridx = 0;
364: gridBagConstraints.gridy = 40;
365: gridBagConstraints.gridwidth = 2;
366: gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
367: gridBagConstraints.insets = new java.awt.Insets(3, 5, 3, 3);
368: getContentPane().add(jLabelStyle, gridBagConstraints);
369:
370: jComboBoxstyles
371: .setModel(new javax.swing.DefaultComboBoxModel(
372: new String[] { "Item 1", "Item 2", "Item 3",
373: "Item 4" }));
374: jComboBoxstyles
375: .setPreferredSize(new java.awt.Dimension(200, 22));
376: gridBagConstraints = new java.awt.GridBagConstraints();
377: gridBagConstraints.gridx = 2;
378: gridBagConstraints.gridy = 40;
379: gridBagConstraints.gridwidth = 4;
380: gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
381: gridBagConstraints.weightx = 1.0;
382: getContentPane().add(jComboBoxstyles, gridBagConstraints);
383:
384: pack();
385: java.awt.Dimension screenSize = java.awt.Toolkit
386: .getDefaultToolkit().getScreenSize();
387: java.awt.Dimension dialogSize = getSize();
388: setLocation((screenSize.width - dialogSize.width) / 2,
389: (screenSize.height - dialogSize.height) / 2);
390: }// </editor-fold>//GEN-END:initComponents
391:
392: private void jButtonBackgroundActionPerformed(
393: java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButtonBackgroundActionPerformed
394:
395: bgcolor = HexColorChooserPanel.showDialog(this ,
396: "Select background color...", this .jButtonBackground
397: .getBackground());
398:
399: if (bgcolor != null) {
400: this .jButtonBackground.setBackground(bgcolor);
401: } else {
402: bgcolor = this .jButtonBackground.getBackground();
403: }
404:
405: }//GEN-LAST:event_jButtonBackgroundActionPerformed
406:
407: private void jButtonCancelActionPerformed(
408: java.awt.event.ActionEvent evt)//GEN-FIRST:event_jButtonCancelActionPerformed
409: {
410: setVisible(false);
411: this .setDialogResult(javax.swing.JOptionPane.CANCEL_OPTION);
412: dispose();
413: }//GEN-LAST:event_jButtonCancelActionPerformed
414:
415: private void jButtonOKActionPerformed(java.awt.event.ActionEvent evt)//GEN-FIRST:event_jButtonOKActionPerformed
416: {
417:
418: tmpCell = new CrosstabCell();
419: tmpCell.setBox(boxPanel.getBox());
420: tmpCell.setWidth((int) this .jNumberFieldWidth.getValue());
421: tmpCell.setHeight((int) this .jNumberFieldHeight.getValue());
422: tmpCell.setBackcolor(bgcolor);
423: tmpCell
424: .setMode((jCheckBoxTransparent.isSelected()) ? "Transparent"
425: : "Opaque");
426: if (jComboBoxstyles.getSelectedIndex() > 0) {
427: tmpCell.setStyle((Style) jComboBoxstyles.getSelectedItem());
428: }
429:
430: setVisible(false);
431: this .setDialogResult(javax.swing.JOptionPane.OK_OPTION);
432: dispose();
433: }//GEN-LAST:event_jButtonOKActionPerformed
434:
435: /**
436: * Closes the dialog
437: * @param evt DOCUMENT ME!
438: */
439: private void closeDialog(java.awt.event.WindowEvent evt)//GEN-FIRST:event_closeDialog
440: {
441: setVisible(false);
442: this .setDialogResult(javax.swing.JOptionPane.CLOSED_OPTION);
443: dispose();
444: }//GEN-LAST:event_closeDialog
445:
446: private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton1ActionPerformed
447:
448: bgcolor = null;
449: this .jButtonBackground.setBackground(null);
450:
451: }//GEN-LAST:event_jButton1ActionPerformed
452:
453: /**
454: * Getter for property dialogResult.
455: *
456: * @return Value of property dialogResult.
457: */
458: public int getDialogResult() {
459:
460: return dialogResult;
461: }
462:
463: /**
464: * Setter for property dialogResult.
465: *
466: * @param dialogResult New value of property dialogResult.
467: */
468: public void setDialogResult(int dialogResult) {
469: this .dialogResult = dialogResult;
470: }
471:
472: // Variables declaration - do not modify//GEN-BEGIN:variables
473: private javax.swing.JButton jButton1;
474: private javax.swing.JButton jButtonBackground;
475: private javax.swing.JButton jButtonCancel;
476: private javax.swing.JButton jButtonOK;
477: private javax.swing.JCheckBox jCheckBoxTransparent;
478: private javax.swing.JComboBox jComboBoxstyles;
479: private javax.swing.JLabel jLabel1;
480: private javax.swing.JLabel jLabelHeight;
481: private javax.swing.JLabel jLabelStyle;
482: private javax.swing.JLabel jLabelWidth;
483: private javax.swing.JLabel jLabelWidth1;
484: private it.businesslogic.ireport.gui.JNumberField jNumberFieldHeight;
485: private it.businesslogic.ireport.gui.JNumberField jNumberFieldWidth;
486: private javax.swing.JPanel jPanel1;
487: private javax.swing.JPanel jPanel2;
488: private javax.swing.JPanel jPanel4;
489: private javax.swing.JPanel jPanelBorder;
490: private javax.swing.JSeparator jSeparator1;
491: // End of variables declaration//GEN-END:variables
492: private int dialogResult;
493:
494: public CrosstabCell getTmpCell() {
495: return tmpCell;
496: }
497:
498: public void setTmpCell(CrosstabCell selectedCell) {
499:
500: this .jComboBoxstyles.removeAllItems();
501:
502: this .jComboBoxstyles.addItem("");
503: Vector styles = MainFrame.getMainInstance()
504: .getActiveReportFrame().getReport().getStyles();
505: for (int i = 0; i < styles.size(); ++i) {
506: jComboBoxstyles.addItem(styles.elementAt(i));
507: }
508:
509: this .setBgcolor(selectedCell.getBackcolor());
510: if (bgcolor != null)
511: this .jButtonBackground.setBackground(bgcolor);
512: else
513: this .jButtonBackground.setBackground(Color.WHITE);
514:
515: this .jLabel1.setText(selectedCell.getName());
516:
517: this .boxPanel.setBox(selectedCell.getBox().cloneMe());
518:
519: this .jCheckBoxTransparent.setSelected(selectedCell.getMode()
520: .equals("Transparent"));
521:
522: // If this cell spans on more than once row, we don't want modify the height
523: if (selectedCell.getTopIndex() < selectedCell.getBottomIndex() - 1) {
524: this .jNumberFieldHeight.setEditable(false);
525: }
526:
527: // If this cell spans on more than once column, we don't want modify the width
528: if (selectedCell.getLeftIndex() < selectedCell.getRightIndex() - 1) {
529: this .jNumberFieldWidth.setEditable(false);
530: }
531:
532: try {
533: this .jNumberFieldWidth.setValue(selectedCell.getWidth());
534: this .jNumberFieldHeight.setValue(selectedCell.getHeight());
535: } catch (Exception ex) {
536:
537: }
538:
539: if (selectedCell.getStyle() != null) {
540: jComboBoxstyles.setSelectedItem(selectedCell.getStyle());
541: } else
542: jComboBoxstyles.setSelectedIndex(0);
543:
544: }
545:
546: public BoxPanel getBoxPanel() {
547: return boxPanel;
548: }
549:
550: public void setBoxPanel(BoxPanel boxPanel) {
551: this .boxPanel = boxPanel;
552: }
553:
554: public java.awt.Color getBgcolor() {
555: return bgcolor;
556: }
557:
558: public void setBgcolor(java.awt.Color bgcolor) {
559: this .bgcolor = bgcolor;
560: }
561:
562: public void applyI18n() {
563: // Start autogenerated code ----------------------
564: jCheckBoxTransparent.setText(I18n
565: .getString("crosstabCellDialog.checkBoxTransparent",
566: "Transparent"));
567: // End autogenerated code ----------------------
568: // Start autogenerated code ----------------------
569: jButtonCancel.setText(I18n.getString(
570: "crosstabCellDialog.buttonCancel", "Cancel"));
571: jButtonOK.setText(I18n.getString("crosstabCellDialog.buttonOK",
572: "OK"));
573: jLabel1.setText(I18n.getString("crosstabCellDialog.label1",
574: "Cell name"));
575: jLabelHeight.setText(I18n.getString(
576: "crosstabCellDialog.labelHeight", "Row height"));
577: jLabelStyle.setText(I18n.getString(
578: "crosstabCellDialog.labelStyle", "Cell style"));
579: jLabelWidth.setText(I18n.getString(
580: "crosstabCellDialog.labelWidth", "Column width"));
581: jLabelWidth1.setText(I18n.getString(
582: "crosstabCellDialog.labelWidth1",
583: "Cell background color"));
584: // End autogenerated code ----------------------
585:
586: this .setTitle(I18n.getString("crosstabCellDialog.title",
587: "Modify cell"));
588: jButtonCancel.setMnemonic(I18n.getString(
589: "crosstabCellDialog.buttonCancelMnemonic", "c").charAt(
590: 0));
591: jButtonOK.setMnemonic(I18n.getString(
592: "crosstabCellDialog.buttonOKMnemonic", "o").charAt(0));
593: }
594: }
|