1 32 33 package it.businesslogic.ireport.gui; 34 35 import it.businesslogic.ireport.HyperLinkableReportElement; 36 import it.businesslogic.ireport.IReportFont; 37 import it.businesslogic.ireport.JRSubreportParameter; 38 import it.businesslogic.ireport.util.*; 39 import it.businesslogic.ireport.gui.event.*; 40 import java.util.*; 41 import java.awt.*; 42 import it.businesslogic.ireport.*; 43 import it.businesslogic.ireport.crosstab.CrosstabCell; 44 import it.businesslogic.ireport.gui.box.*; 45 import it.businesslogic.ireport.gui.sheet.*; 46 import javax.swing.DefaultComboBoxModel ; 47 48 53 public class ElementPropertiesDialog extends javax.swing.JDialog { 54 55 public static final int GRAPHICS_TAB = 1; 56 public static final int RECTANGLE_TAB = 2; 57 public static final int LINE_TAB = 3; 58 public static final int IMAGE_TAB = 4; 59 public static final int FONT_TAB = 5; 60 public static final int STATITEXT_TAB = 6; 61 public static final int TEXTFIELD_TAB = 7; 62 public static final int HYPERLINK_TAB = 8; 63 public static final int SUBREPORT1_TAB = 9; 64 public static final int SUBREPORT2_TAB = 10; 65 public static final int CHART_TAB = 11; 66 public static final int COMMON_TAB = 12; 67 public static final int BARCODE_TAB = 13; 68 69 70 private JReportFrame jrf = null; 71 private javax.swing.JPanel lastSelectedPanel = null; 73 private BoxPanel boxPanel = null; 74 private ReportElementSheetPanel sheetPanel = null; 75 76 77 78 public ElementPropertiesDialog(java.awt.Frame parent, boolean modal) { 79 super(parent, modal); 80 initComponents(); 81 82 84 jTabbedPane.removeAll(); 85 86 87 this.setSize(370, 380); 88 89 90 javax.swing.KeyStroke escape = javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_ESCAPE, 0, false); 91 javax.swing.Action escapeAction = new javax.swing.AbstractAction () { 92 public void actionPerformed(java.awt.event.ActionEvent e) { 93 setVisible(false); 94 } 95 }; 96 97 getRootPane().getInputMap(javax.swing.JComponent.WHEN_IN_FOCUSED_WINDOW).put(escape, "ESCAPE"); 98 getRootPane().getActionMap().put("ESCAPE", escapeAction); 99 100 jComboBoxImageExpressionClass.addItem("java.lang.String"); 102 jComboBoxImageExpressionClass.addItem("java.io.File"); 103 jComboBoxImageExpressionClass.addItem("java.net.URL"); 104 jComboBoxImageExpressionClass.addItem("java.io.InputStream"); 105 jComboBoxImageExpressionClass.addItem("java.awt.Image"); 106 jComboBoxImageExpressionClass.addItem("net.sf.jasperreports.engine.JRRenderable"); 107 108 jNumberComboBoxSize.addEntry("3",3); 109 jNumberComboBoxSize.addEntry("5",5); 110 jNumberComboBoxSize.addEntry("8",8); 111 jNumberComboBoxSize.addEntry("10",10); 112 jNumberComboBoxSize.addEntry("12",12); 113 jNumberComboBoxSize.addEntry("14",14); 114 jNumberComboBoxSize.addEntry("18",18); 115 jNumberComboBoxSize.addEntry("24",24); 116 jNumberComboBoxSize.addEntry("36",36); 117 jNumberComboBoxSize.addEntry("48",48); 118 119 jComboBoxPdfEncoding.addItem(new PdfEncoding("Cp1250","CP1250 (Central European)")); 120 jComboBoxPdfEncoding.addItem(new PdfEncoding("Cp1251","CP1251 (Cyrillic)")); 121 jComboBoxPdfEncoding.addItem(new PdfEncoding("Cp1252","CP1252 (Western European ANSI aka WinAnsi)")); 122 jComboBoxPdfEncoding.addItem(new PdfEncoding("Cp1253","CP1253 (Greek)")); 123 jComboBoxPdfEncoding.addItem(new PdfEncoding("Cp1254","CP1254 (Turkish)")); 124 jComboBoxPdfEncoding.addItem(new PdfEncoding("Cp1255","CP1255 (Hebrew)")); 125 jComboBoxPdfEncoding.addItem(new PdfEncoding("Cp1256","CP1256 (Arabic)")); 126 jComboBoxPdfEncoding.addItem(new PdfEncoding("Cp1257","CP1257 (Baltic)")); 127 jComboBoxPdfEncoding.addItem(new PdfEncoding("Cp1258","CP1258 (Vietnamese)")); 128 jComboBoxPdfEncoding.addItem(new PdfEncoding("UniGB-UCS2-H","UniGB-UCS2-H (Chinese Simplified)")); 129 jComboBoxPdfEncoding.addItem(new PdfEncoding("UniGB-UCS2-V","UniGB-UCS2-V (Chinese Simplified)")); 130 jComboBoxPdfEncoding.addItem(new PdfEncoding("UniCNS-UCS2-H","UniCNS-UCS2-H (Chinese traditional)")); 131 jComboBoxPdfEncoding.addItem(new PdfEncoding("UniCNS-UCS2-V","UniCNS-UCS2-V (Chinese traditional)")); 132 jComboBoxPdfEncoding.addItem(new PdfEncoding("UniJIS-UCS2-H","UniJIS-UCS2-H (Japanese)")); 133 jComboBoxPdfEncoding.addItem(new PdfEncoding("UniJIS-UCS2-V","UniJIS-UCS2-V (Japanese)")); 134 jComboBoxPdfEncoding.addItem(new PdfEncoding("UniJIS-UCS2-HW-H","UniJIS-UCS2-HW-H (Japanese)")); 135 jComboBoxPdfEncoding.addItem(new PdfEncoding("UniJIS-UCS2-HW-V","UniJIS-UCS2-HW-V (Japanese)")); 136 jComboBoxPdfEncoding.addItem(new PdfEncoding("UniKS-UCS2-H","UniKS-UCS2-H (Korean)")); 137 jComboBoxPdfEncoding.addItem(new PdfEncoding("UniKS-UCS2-V","UniKS-UCS2-V (Korean)")); 138 jComboBoxPdfEncoding.addItem(new PdfEncoding("Identity-H","Identity-H (Unicode with horizontal writing)")); 139 jComboBoxPdfEncoding.addItem(new PdfEncoding("Identity-V","Identity-V (Unicode with vertical writing)")); 140 141 jComboBoxPattern.addItem(new PdfEncoding("#,##0.00"," #,##0.00 (example 1,234.56)")); 142 143 jComboBoxTextFieldExpressionClass.addItem("java.lang.Boolean"); 144 jComboBoxTextFieldExpressionClass.addItem("java.lang.Byte"); 145 jComboBoxTextFieldExpressionClass.addItem("java.util.Date"); 146 jComboBoxTextFieldExpressionClass.addItem("java.sql.Timestamp"); 147 jComboBoxTextFieldExpressionClass.addItem("java.sql.Time"); 148 jComboBoxTextFieldExpressionClass.addItem("java.lang.Double"); 149 jComboBoxTextFieldExpressionClass.addItem("java.lang.Float"); 150 jComboBoxTextFieldExpressionClass.addItem("java.lang.Integer"); 151 jComboBoxTextFieldExpressionClass.addItem("java.lang.Long"); 152 jComboBoxTextFieldExpressionClass.addItem("java.lang.Short"); 153 jComboBoxTextFieldExpressionClass.addItem("java.math.BigDecimal"); 154 jComboBoxTextFieldExpressionClass.addItem("java.lang.Number"); 155 jComboBoxTextFieldExpressionClass.addItem("java.lang.String"); 156 157 jComboBoxSubreportExpressionClass.addItem("java.lang.String"); 158 jComboBoxSubreportExpressionClass.addItem("java.io.File"); 159 jComboBoxSubreportExpressionClass.addItem("java.net.URL"); 160 jComboBoxSubreportExpressionClass.addItem("java.io.InputStream"); 161 jComboBoxSubreportExpressionClass.addItem("net.sf.jasperreports.engine.JasperReport"); 162 163 jComboBoxLinkType.addItem("None"); 164 jComboBoxLinkType.addItem("Reference"); 165 jComboBoxLinkType.addItem("LocalAnchor"); 166 jComboBoxLinkType.addItem("LocalPage"); 167 jComboBoxLinkType.addItem("RemoteAnchor"); 168 jComboBoxLinkType.addItem("RemotePage"); 169 170 jComboBoxLinkTarget.addItem("Self"); 172 jComboBoxLinkTarget.addItem("Blank"); 173 174 jComboBoxBarcodeType.addItem(new Tag("1","2of7")); 175 jComboBoxBarcodeType.addItem(new Tag("2","3of9")); 176 jComboBoxBarcodeType.addItem(new Tag("3","Bookland")); 177 jComboBoxBarcodeType.addItem(new Tag("4","Codabar")); 178 jComboBoxBarcodeType.addItem(new Tag("5","Code128")); 179 jComboBoxBarcodeType.addItem(new Tag("6","Code128A")); 180 jComboBoxBarcodeType.addItem(new Tag("7","Code128B")); 181 jComboBoxBarcodeType.addItem(new Tag("8","Code128C")); 182 jComboBoxBarcodeType.addItem(new Tag("9","Code39")); 183 jComboBoxBarcodeType.addItem(new Tag("26","Code39 (Extended)")); 184 jComboBoxBarcodeType.addItem(new Tag("10","EAN128")); 185 jComboBoxBarcodeType.addItem(new Tag("11","EAN13")); 186 jComboBoxBarcodeType.addItem(new Tag("12","GlobalTradeItemNumber")); 187 jComboBoxBarcodeType.addItem(new Tag("13","Int2of5")); 188 jComboBoxBarcodeType.addItem(new Tag("14","Monarch")); 189 jComboBoxBarcodeType.addItem(new Tag("15","NW7")); 190 jComboBoxBarcodeType.addItem(new Tag("16","PDF417")); 191 jComboBoxBarcodeType.addItem(new Tag("17","SCC14ShippingCode")); 192 jComboBoxBarcodeType.addItem(new Tag("18","ShipmentIdentificationNumber")); 193 jComboBoxBarcodeType.addItem(new Tag("19","SSCC18")); 194 jComboBoxBarcodeType.addItem(new Tag("20","Std2of5")); 195 jComboBoxBarcodeType.addItem(new Tag("21","UCC128")); 196 jComboBoxBarcodeType.addItem(new Tag("22","UPCA")); 197 jComboBoxBarcodeType.addItem(new Tag("23","USD3")); 198 jComboBoxBarcodeType.addItem(new Tag("24","USD4")); 199 jComboBoxBarcodeType.addItem(new Tag("25","USPS")); 200 201 jSpinnerBookmarkLevel.setModel( new javax.swing.SpinnerNumberModel (0,0,10000,1)); 202 203 String [] fontFamilies = java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment().getAvailableFontFamilyNames(); 205 for (int i=0; i<fontFamilies.length; ++i) { 206 jComboBoxFontName.addItem(fontFamilies[i]); 207 } 208 209 MainFrame.getMainInstance().addFontsListChangedListener( new FontsListChangedListener() { 210 public void fontsListChanged(FontsListChangedEvent evt) { 211 updateFonts(); 212 } 213 } ); 214 215 this.jRTextExpressionAreaPrintWhenExpression.getDocument().addDocumentListener( new javax.swing.event.DocumentListener () { 216 public void changedUpdate(javax.swing.event.DocumentEvent evt) { 217 jRTextExpressionAreaPrintWhenExpressionTextChanged(); 218 } 219 public void insertUpdate(javax.swing.event.DocumentEvent evt) { 220 jRTextExpressionAreaPrintWhenExpressionTextChanged(); 221 } 222 public void removeUpdate(javax.swing.event.DocumentEvent evt) { 223 jRTextExpressionAreaPrintWhenExpressionTextChanged(); 224 } 225 }); 226 227 228 229 this.jTextAreaText.getDocument().addDocumentListener( new javax.swing.event.DocumentListener () { 230 public void changedUpdate(javax.swing.event.DocumentEvent evt) { 231 jTextAreaTextChanged(); 232 } 233 public void insertUpdate(javax.swing.event.DocumentEvent evt) { 234 jTextAreaTextChanged(); 235 } 236 public void removeUpdate(javax.swing.event.DocumentEvent evt) { 237 jTextAreaTextChanged(); 238 } 239 }); 240 241 this.jRTextExpressionAreaTextFieldExpression.getDocument().addDocumentListener( new javax.swing.event.DocumentListener () { 242 public void changedUpdate(javax.swing.event.DocumentEvent evt) { 243 jRTextExpressionAreaTextFieldExpressionTextChanged(); 244 } 245 public void insertUpdate(javax.swing.event.DocumentEvent evt) { 246 jRTextExpressionAreaTextFieldExpressionTextChanged(); 247 } 248 public void removeUpdate(javax.swing.event.DocumentEvent evt) { 249 jRTextExpressionAreaTextFieldExpressionTextChanged(); 250 } 251 }); 252 253 this.jRTextExpressionAreaImageExpression.getDocument().addDocumentListener( new javax.swing.event.DocumentListener () { 254 public void changedUpdate(javax.swing.event.DocumentEvent evt) { 255 jRTextExpressionAreaImageExpressionTextChanged(); 256 } 257 public void insertUpdate(javax.swing.event.DocumentEvent evt) { 258 jRTextExpressionAreaImageExpressionTextChanged(); 259 } 260 public void removeUpdate(javax.swing.event.DocumentEvent evt) { 261 jRTextExpressionAreaImageExpressionTextChanged(); 262 } 263 }); 264 265 this.jRTextExpressionAreaSubreportExpression.getDocument().addDocumentListener( new javax.swing.event.DocumentListener () { 266 public void changedUpdate(javax.swing.event.DocumentEvent evt) { 267 jRTextExpressionAreaSubreportExpressionTextChanged(); 268 } 269 public void insertUpdate(javax.swing.event.DocumentEvent evt) { 270 jRTextExpressionAreaSubreportExpressionTextChanged(); 271 } 272 public void removeUpdate(javax.swing.event.DocumentEvent evt) { 273 jRTextExpressionAreaSubreportExpressionTextChanged(); 274 } 275 }); 276 277 this.jRTextExpressionAreaTextConnectionExpression.getDocument().addDocumentListener( new javax.swing.event.DocumentListener () { 278 public void changedUpdate(javax.swing.event.DocumentEvent evt) { 279 jRTextExpressionAreaTextConnectionExpressionTextChanged(); 280 } 281 public void insertUpdate(javax.swing.event.DocumentEvent evt) { 282 jRTextExpressionAreaTextConnectionExpressionTextChanged(); 283 } 284 public void removeUpdate(javax.swing.event.DocumentEvent evt) { 285 jRTextExpressionAreaTextConnectionExpressionTextChanged(); 286 } 287 }); 288 289 this.jRTextExpressionAreaCrosstabParametersMapExpression.getDocument().addDocumentListener( new javax.swing.event.DocumentListener () { 290 public void changedUpdate(javax.swing.event.DocumentEvent evt) { 291 jRTextExpressionAreaCrosstabParametersMapExpressionTextChanged(); 292 } 293 public void insertUpdate(javax.swing.event.DocumentEvent evt) { 294 jRTextExpressionAreaCrosstabParametersMapExpressionTextChanged(); 295 } 296 public void removeUpdate(javax.swing.event.DocumentEvent evt) { 297 jRTextExpressionAreaCrosstabParametersMapExpressionTextChanged(); 298 } 299 }); 300 301 this.jRTextExpressionAreaSubreportMapExpression.getDocument().addDocumentListener( new javax.swing.event.DocumentListener () { 302 public void changedUpdate(javax.swing.event.DocumentEvent evt) { 303 jRTextExpressionAreaSubreportMapExpressionTextChanged(); 304 } 305 public void insertUpdate(javax.swing.event.DocumentEvent evt) { 306 jRTextExpressionAreaSubreportMapExpressionTextChanged(); 307 } 308 public void removeUpdate(javax.swing.event.DocumentEvent evt) { 309 jRTextExpressionAreaSubreportMapExpressionTextChanged(); 310 } 311 }); 312 313 314 javax.swing.DefaultListSelectionModel dlsm = (javax.swing.DefaultListSelectionModel )this.jTableSubreportParameters.getSelectionModel(); 315 dlsm.addListSelectionListener(new javax.swing.event.ListSelectionListener () { 316 public void valueChanged(javax.swing.event.ListSelectionEvent e) { 317 jTableSubreportParametersListSelectionValueChanged(e); 318 } 319 }); 320 321 dlsm = (javax.swing.DefaultListSelectionModel )this.jTableSubreportReturnValues.getSelectionModel(); 322 dlsm.addListSelectionListener(new javax.swing.event.ListSelectionListener () { 323 public void valueChanged(javax.swing.event.ListSelectionEvent e) { 324 jTableSubreportReturnValuesListSelectionValueChanged(e); 325 } 326 }); 327 328 dlsm = (javax.swing.DefaultListSelectionModel )this.jTableCrosstabParameters.getSelectionModel(); 329 dlsm.addListSelectionListener(new javax.swing.event.ListSelectionListener () { 330 public void valueChanged(javax.swing.event.ListSelectionEvent e) { 331 jTableCrosstabParametersListSelectionValueChanged(e); 332 } 333 }); 334 335 dlsm = (javax.swing.DefaultListSelectionModel )this.jTableLinkParameters.getSelectionModel(); 336 dlsm.addListSelectionListener(new javax.swing.event.ListSelectionListener () { 337 public void valueChanged(javax.swing.event.ListSelectionEvent e) { 338 jTableLinkParametersListSelectionValueChanged(e); 339 } 340 }); 341 342 343 this.jRTextExpressionAreaAnchorName.getDocument().addDocumentListener( new javax.swing.event.DocumentListener () { 344 public void changedUpdate(javax.swing.event.DocumentEvent evt) { 345 jRTextExpressionAreaAnchorNameTextChanged(); 346 } 347 public void insertUpdate(javax.swing.event.DocumentEvent evt) { 348 jRTextExpressionAreaAnchorNameTextChanged(); 349 } 350 public void removeUpdate(javax.swing.event.DocumentEvent evt) { 351 jRTextExpressionAreaAnchorNameTextChanged(); 352 } 353 }); 354 355 this.jRTextExpressionAreaAnchor.getDocument().addDocumentListener( new javax.swing.event.DocumentListener () { 356 public void changedUpdate(javax.swing.event.DocumentEvent evt) { 357 jRTextExpressionAreaAnchorTextChanged(); 358 } 359 public void insertUpdate(javax.swing.event.DocumentEvent evt) { 360 jRTextExpressionAreaAnchorTextChanged(); 361 } 362 public void removeUpdate(javax.swing.event.DocumentEvent evt) { 363 jRTextExpressionAreaAnchorTextChanged(); 364 } 365 }); 366 367 this.jRTextExpressionAreaPage.getDocument().addDocumentListener( new javax.swing.event.DocumentListener () { 368 public void changedUpdate(javax.swing.event.DocumentEvent evt) { 369 jRTextExpressionAreaPageTextChanged(); 370 } 371 public void insertUpdate(javax.swing.event.DocumentEvent evt) { 372 jRTextExpressionAreaPageTextChanged(); 373 } 374 public void removeUpdate(javax.swing.event.DocumentEvent evt) { 375 jRTextExpressionAreaPageTextChanged(); 376 } 377 }); 378 379 this.jRTextExpressionAreaReference.getDocument().addDocumentListener( new javax.swing.event.DocumentListener () { 380 public void changedUpdate(javax.swing.event.DocumentEvent evt) { 381 jRTextExpressionAreaReferenceTextChanged(); 382 } 383 public void insertUpdate(javax.swing.event.DocumentEvent evt) { 384 jRTextExpressionAreaReferenceTextChanged(); 385 } 386 public void removeUpdate(javax.swing.event.DocumentEvent evt) { 387 jRTextExpressionAreaReferenceTextChanged(); 388 } 389 }); 390 391 392 403 404 this.jTextFieldName.getDocument().addDocumentListener( new javax.swing.event.DocumentListener () { 405 public void changedUpdate(javax.swing.event.DocumentEvent evt) { 406 jTextFieldNameChanged(); 407 } 408 public void insertUpdate(javax.swing.event.DocumentEvent evt) { 409 jTextFieldNameChanged(); 410 } 411 public void removeUpdate(javax.swing.event.DocumentEvent evt) { 412 jTextFieldNameChanged(); 413 } 414 }); 415 416 this.jBarcodeExpressionAreaAppIdentifier.getDocument().addDocumentListener( new javax.swing.event.DocumentListener () { 417 public void changedUpdate(javax.swing.event.DocumentEvent evt) { 418 jTextFieldAppIdentifierChanged(); 419 } 420 public void insertUpdate(javax.swing.event.DocumentEvent evt) { 421 jTextFieldAppIdentifierChanged(); 422 } 423 public void removeUpdate(javax.swing.event.DocumentEvent evt) { 424 jTextFieldAppIdentifierChanged(); 425 } 426 }); 427 428 this.jBarcodeExpressionArea.getDocument().addDocumentListener( new javax.swing.event.DocumentListener () { 429 public void changedUpdate(javax.swing.event.DocumentEvent evt) { 430 BarcodeActionPerformed(null); 431 } 432 public void insertUpdate(javax.swing.event.DocumentEvent evt) { 433 BarcodeActionPerformed(null); 434 } 435 public void removeUpdate(javax.swing.event.DocumentEvent evt) { 436 BarcodeActionPerformed(null); 437 } 438 }); 439 440 boxPanel = new BoxPanel(); 441 boxPanel.addActionListener( new java.awt.event.ActionListener () { 442 public void actionPerformed(java.awt.event.ActionEvent evt) { 443 boxActionPerformed(evt); 444 } 445 }); 446 447 java.awt.GridBagConstraints gridBagConstraints = new java.awt.GridBagConstraints (); 448 gridBagConstraints.gridx = 4; 449 gridBagConstraints.gridy = 2; 450 gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST; 451 gridBagConstraints.insets = new java.awt.Insets (2, 4, 2, 4); 452 gridBagConstraints.weightx = 1.0; 453 gridBagConstraints.weighty = 1.0; 454 gridBagConstraints.fill = gridBagConstraints.BOTH; 455 jPanelBorder.add(boxPanel, gridBagConstraints); 456 457 gridBagConstraints.insets = new java.awt.Insets (0, -1, -1, -1); 458 sheetPanel = new ReportElementSheetPanel(); 459 jPanelSheet.add(sheetPanel, gridBagConstraints); 460 461 javax.swing.JTextField editor = (javax.swing.JTextField ) jComboBoxPattern.getEditor().getEditorComponent(); 462 editor.addFocusListener(new java.awt.event.FocusAdapter (){ 463 public void focusLost(java.awt.event.FocusEvent evt) { 464 jComboBoxPattern.setSelectedItem( 465 ((javax.swing.JTextField ) jComboBoxPattern.getEditor().getEditorComponent()).getText()); 466 } 467 }); 468 469 I18n.addOnLanguageChangedListener( new LanguageChangedListener() { 470 public void languageChanged(LanguageChangedEvent evt) { 471 applyI18n(); 472 } 473 } ); 474 475 applyI18n(); 476 } 477 478 479 public void boxActionPerformed(java.awt.event.ActionEvent evt) { 480 if (jrf == null || getElementSelection().size()==0) return; 481 482 Enumeration e = getElementSelection().elements(); 484 while (e.hasMoreElements()) { 485 ReportElement element = (ReportElement)e.nextElement(); 486 Box box = null; 487 488 box = ((BoxElement)element).getBox(); 489 490 if (box != null && evt.getActionCommand().equals("LeftPadding")) { 491 box.setLeftPadding( boxPanel.getBox().getLeftPadding() ); 492 } else if (box != null && evt.getActionCommand().equals("RightPadding")) { 493 box.setRightPadding( boxPanel.getBox().getRightPadding() ); 494 } else if (box != null && evt.getActionCommand().equals("TopPadding")) { 495 box.setTopPadding( boxPanel.getBox().getTopPadding() ); 496 } else if (box != null && evt.getActionCommand().equals("BottomPadding")) { 497 box.setBottomPadding( boxPanel.getBox().getBottomPadding() ); 498 } else if (box != null && evt.getActionCommand().equals("LeftBorder")) { 499 box.setLeftBorder( boxPanel.getBox().getLeftBorder() ); 500 } else if (box != null && evt.getActionCommand().equals("RightBorder")) { 501 box.setRightBorder( boxPanel.getBox().getRightBorder() ); 502 } else if (box != null && evt.getActionCommand().equals("TopBorder")) { 503 box.setTopBorder( boxPanel.getBox().getTopBorder() ); 504 } else if (box != null && evt.getActionCommand().equals("BottomBorder")) { 505 box.setBottomBorder( boxPanel.getBox().getBottomBorder() ); 506 } else if (box != null && evt.getActionCommand().equals("LeftBorderColor")) { 507 box.setLeftBorderColor( boxPanel.getBox().getLeftBorderColor() ); 508 } else if (box != null && evt.getActionCommand().equals("RightBorderColor")) { 509 box.setRightBorderColor( boxPanel.getBox().getRightBorderColor() ); 510 } else if (box != null && evt.getActionCommand().equals("TopBorderColor")) { 511 box.setTopBorderColor( boxPanel.getBox().getTopBorderColor() ); 512 } else if (box != null && evt.getActionCommand().equals("BottomBorderColor")) { 513 box.setBottomBorderColor( boxPanel.getBox().getBottomBorderColor() ); 514 } 515 } 516 repaintEditor();; 517 jrf.fireReportListenerReportElementsChanged(new ReportElementChangedEvent(jrf , getElementSelection() , ReportElementChangedEvent.CHANGED)); 518 519 } 520 521 public void jTableSubreportParametersListSelectionValueChanged(javax.swing.event.ListSelectionEvent e) { 522 if (this.jTableSubreportParameters.getSelectedRowCount() > 0) { 523 this.jButtonModParameter.setEnabled(true); 524 this.jButtonRemParameter.setEnabled(true); 525 } else { 526 this.jButtonModParameter.setEnabled(false); 527 this.jButtonRemParameter.setEnabled(false); 528 } 529 } 530 531 public void jTableSubreportReturnValuesListSelectionValueChanged(javax.swing.event.ListSelectionEvent e) { 532 if (this.jTableSubreportReturnValues.getSelectedRowCount() > 0) { 533 this.jButtonModReturnValue.setEnabled(true); 534 this.jButtonRemReturnValue.setEnabled(true); 535 } else { 536 this.jButtonModReturnValue.setEnabled(false); 537 this.jButtonRemReturnValue.setEnabled(false); 538 } 539 } 540 541 public void jTableCrosstabParametersListSelectionValueChanged(javax.swing.event.ListSelectionEvent e) { 542 if (this.jTableCrosstabParameters.getSelectedRowCount() > 0) { 543 this.jButtonModCrosstabParameter.setEnabled(true); 544 this.jButtonRemCrosstabParameter.setEnabled(true); 545 } else { 546 this.jButtonModCrosstabParameter.setEnabled(false); 547 this.jButtonRemCrosstabParameter.setEnabled(false); 548 } 549 } 550 551 public void jTableLinkParametersListSelectionValueChanged(javax.swing.event.ListSelectionEvent e) { 552 if (this.jTableLinkParameters.getSelectedRowCount() > 0) { 553 this.jButtonModLinkParameter.setEnabled(true); 554 this.jButtonRemLinkParameter.setEnabled(true); 555 } else { 556 this.jButtonModLinkParameter.setEnabled(false); 557 this.jButtonRemLinkParameter.setEnabled(false); 558 } 559 } 560 561 562 567 private void initComponents() { 569 java.awt.GridBagConstraints gridBagConstraints; 570 571 buttonGroupCharts = new javax.swing.ButtonGroup (); 572 jTabbedPane = new javax.swing.JTabbedPane (); 573 jPanelCommon = new javax.swing.JPanel (); 574 jPanel3 = new javax.swing.JPanel (); 575 jLabel5 = new javax.swing.JLabel (); 576 jNumberFieldLeft = new it.businesslogic.ireport.gui.JNumberField(); 577 jLabel4 = new javax.swing.JLabel (); 578 jLabel7 = new javax.swing.JLabel (); 579 jComboBoxBand = new javax.swing.JComboBox (); 580 jLabel1 = new javax.swing.JLabel (); 581 jNumberFieldWidth = new it.businesslogic.ireport.gui.JNumberField(); 582 jNumberFieldTop = new it.businesslogic.ireport.gui.JNumberField(); 583 jLabel2 = new javax.swing.JLabel (); 584 jLabel6 = new javax.swing.JLabel (); 585 jNumberFieldHeight = new it.businesslogic.ireport.gui.JNumberField(); 586 jButtonBackground = new javax.swing.JButton (); 587 jButtonForeground = new javax.swing.JButton (); 588 jLabel3 = new javax.swing.JLabel (); 589 jPanel4 = new javax.swing.JPanel (); 590 jCheckBoxTransparent = new javax.swing.JCheckBox (); 591 jCheckBoxRemoveLineWhenBlank = new javax.swing.JCheckBox (); 592 jCheckBoxPrintInFirstWholeBand = new javax.swing.JCheckBox (); 593 jCheckBoxPrintWhenDetailOverflows = new javax.swing.JCheckBox (); 594 jCheckBoxPrintRepeatedValues = new javax.swing.JCheckBox (); 595 jPanel5 = new javax.swing.JPanel (); 596 jLabel8 = new javax.swing.JLabel (); 597 jComboBoxPositionType = new javax.swing.JComboBox (); 598 jLabel9 = new javax.swing.JLabel (); 599 jComboBoxGroups = new javax.swing.JComboBox (); 600 jLabel46 = new javax.swing.JLabel (); 601 jTextFieldName = new javax.swing.JTextField (); 602 jPanel6 = new javax.swing.JPanel (); 603 jLabel10 = new javax.swing.JLabel (); 604 jRTextExpressionAreaPrintWhenExpression = new it.businesslogic.ireport.gui.JRTextExpressionArea(); 605 jPanel11 = new javax.swing.JPanel (); 606 jLabel12 = new javax.swing.JLabel (); 607 jComboBoxStretchType = new javax.swing.JComboBox (); 608 jPanel17 = new javax.swing.JPanel (); 609 jLabelStyle = new javax.swing.JLabel (); 610 jComboBoxStyle = new javax.swing.JComboBox (); 611 jPanelGraphicselement = new javax.swing.JPanel (); 612 jComboBoxFill = new javax.swing.JComboBox (); 613 jLabel11 = new javax.swing.JLabel (); 614 jComboBoxPen = new javax.swing.JComboBox (); 615 jLabel13 = new javax.swing.JLabel (); 616 jSeparator7 = new javax.swing.JSeparator (); 617 jPanelRectangle = new javax.swing.JPanel (); 618 jPanel1 = new javax.swing.JPanel (); 619 jLabel14 = new javax.swing.JLabel (); 620 jNumberFieldRadius = new it.businesslogic.ireport.gui.JNumberField(); 621 jPanelLine = new javax.swing.JPanel (); 622 jLabel15 = new javax.swing.JLabel (); 623 jComboBoxLineDirection = new javax.swing.JComboBox (); 624 jPanelImage = new javax.swing.JPanel (); 625 jRTextExpressionAreaImageExpression = new it.businesslogic.ireport.gui.JRTextExpressionArea(); 626 jLabel16 = new javax.swing.JLabel (); 627 jButtonFindImage = new javax.swing.JButton (); 628 jLabel17 = new javax.swing.JLabel (); 629 jComboBoxImageExpressionClass = new javax.swing.JComboBox (); 630 jLabel18 = new javax.swing.JLabel (); 631 jComboBoxScale = new javax.swing.JComboBox (); 632 jCheckBoxImageCache = new javax.swing.JCheckBox (); 633 jLabel19 = new javax.swing.JLabel (); 634 jComboBoxVerticalAlignment = new javax.swing.JComboBox (); 635 jLabel20 = new javax.swing.JLabel (); 636 jComboBoxHorizontalAlignment = new javax.swing.JComboBox (); 637 jLabel21 = new javax.swing.JLabel (); 638 jComboBoxEvaluationTime = new javax.swing.JComboBox (); 639 jLabel22 = new javax.swing.JLabel (); 640 jComboBoxImageGroup = new javax.swing.JComboBox (); 641 jSeparator1 = new javax.swing.JSeparator (); 642 jCheckBoxImageIsLazy = new javax.swing.JCheckBox (); 643 jLabel34 = new javax.swing.JLabel (); 644 jComboBoxImageOnError = new javax.swing.JComboBox (); 645 jPanelText = new javax.swing.JPanel (); 646 jScrollPane1 = new javax.swing.JScrollPane (); 647 jTextAreaText = new javax.swing.JTextArea (); 648 jPanelFont = new javax.swing.JPanel (); 649 jPanel7 = new javax.swing.JPanel (); 650 jLabel23 = new javax.swing.JLabel (); 651 jComboBoxReportFont = new javax.swing.JComboBox (); 652 jLabel24 = new javax.swing.JLabel (); 653 jComboBoxFontName = new javax.swing.JComboBox (); 654 jNumberComboBoxSize = new it.businesslogic.ireport.gui.JNumberComboBox(); 655 jLabel27 = new javax.swing.JLabel (); 656 jLabel25 = new javax.swing.JLabel (); 657 jComboBoxPDFFontName = new javax.swing.JComboBox (); 658 jPanel8 = new javax.swing.JPanel (); 659 jPanel12 = new javax.swing.JPanel (); 660 jCheckBoxBold = new javax.swing.JCheckBox (); 661 jCheckBoxItalic = new javax.swing.JCheckBox (); 662 jCheckBoxUnderline = new javax.swing.JCheckBox (); 663 jCheckBoxStrokeTrough = new javax.swing.JCheckBox (); 664 jCheckBoxStyledText = new javax.swing.JCheckBox (); 665 jCheckBoxPDFEmbedded = new javax.swing.JCheckBox (); 666 jSeparator2 = new javax.swing.JSeparator (); 667 jLabel32 = new javax.swing.JLabel (); 668 jComboBoxPdfEncoding = new javax.swing.JComboBox (); 669 jComboBoxHAlign = new javax.swing.JComboBox (); 670 jComboBoxVAlign = new javax.swing.JComboBox (); 671 jLabel30 = new javax.swing.JLabel (); 672 jLabel31 = new javax.swing.JLabel (); 673 jComboBoxLineSpacing = new javax.swing.JComboBox (); 674 jLabel29 = new javax.swing.JLabel (); 675 jLabel49 = new javax.swing.JLabel (); 676 jComboBoxRotation = new javax.swing.JComboBox (); 677 jSeparator4 = new javax.swing.JSeparator (); 678 jSeparator5 = new javax.swing.JSeparator (); 679 jPanelTextField = new javax.swing.JPanel (); 680 jLabel28 = new javax.swing.JLabel (); 681 jComboBoxTextFieldExpressionClass = new javax.swing.JComboBox (); 682 jLabel37 = new javax.swing.JLabel (); 683 jComboBoxTextFieldEvaluationTime = new javax.swing.JComboBox (); 684 jLabel38 = new javax.swing.JLabel (); 685 jComboBoxTextFieldGroup = new javax.swing.JComboBox (); 686 jCheckBoxStretchWithOverflow = new javax.swing.JCheckBox (); 687 jCheckBoxBlankWhenNull = new javax.swing.JCheckBox (); 688 jLabel39 = new javax.swing.JLabel (); 689 jLabel40 = new javax.swing.JLabel (); 690 jRTextExpressionAreaTextFieldExpression = new it.businesslogic.ireport.gui.JRTextExpressionArea(); 691 jPanel2 = new javax.swing.JPanel (); 692 jComboBoxPattern = new javax.swing.JComboBox (); 693 jButtonCreatePattern = new javax.swing.JButton (); 694 jPanelSubreport1 = new javax.swing.JPanel (); 695 jLabel41 = new javax.swing.JLabel (); 696 jLabel42 = new javax.swing.JLabel (); 697 jRTextExpressionAreaSubreportMapExpression = new it.businesslogic.ireport.gui.JRTextExpressionArea(); 698 jComboBoxSubreportConnectionType = new javax.swing.JComboBox (); 699 jRTextExpressionAreaTextConnectionExpression = new it.businesslogic.ireport.gui.JRTextExpressionArea(); 700 jCheckBoxSubreportCache = new javax.swing.JCheckBox (); 701 jPanelSubreport2 = new javax.swing.JPanel (); 702 jLabel26 = new javax.swing.JLabel (); 703 jRTextExpressionAreaSubreportExpression = new it.businesslogic.ireport.gui.JRTextExpressionArea(); 704 jLabel33 = new javax.swing.JLabel (); 705 jComboBoxSubreportExpressionClass = new javax.swing.JComboBox (); 706 jTabbedPane1 = new javax.swing.JTabbedPane (); 707 jPanel16 = new javax.swing.JPanel (); 708 jScrollPane2 = new javax.swing.JScrollPane (); 709 jTableSubreportParameters = new javax.swing.JTable (); 710 jPanel10 = new javax.swing.JPanel (); 711 jButtonAddParameter = new javax.swing.JButton (); 712 jButtonModParameter = new javax.swing.JButton (); 713 jButtonRemParameter = new javax.swing.JButton (); 714 jButtonCopyParamsFromMaster = new javax.swing.JButton (); 715 jPanel13 = new javax.swing.JPanel (); 716 jPanelSubreportReturnValues = new javax.swing.JPanel (); 717 jScrollPane3 = new javax.swing.JScrollPane (); 718 jTableSubreportReturnValues = new javax.swing.JTable (); 719 jPanel14 = new javax.swing.JPanel (); 720 jButtonAddReturnValue = new javax.swing.JButton (); 721 jButtonModReturnValue = new javax.swing.JButton (); 722 jButtonRemReturnValue = new javax.swing.JButton (); 723 jPanel15 = new javax.swing.JPanel (); 724 jPanelHyperLink = new javax.swing.JPanel (); 725 jRTextExpressionAreaAnchorName = new it.businesslogic.ireport.gui.JRTextExpressionArea(); 726 jLabel35 = new javax.swing.JLabel (); 727 jSeparator3 = new javax.swing.JSeparator (); 728 jComboBoxLinkType = new javax.swing.JComboBox (); 729 jLabel36 = new javax.swing.JLabel (); 730 jLabelTarget = new javax.swing.JLabel (); 731 jComboBoxLinkTarget = new javax.swing.JComboBox (); 732 jLabelTarget1 = new javax.swing.JLabel (); 733 jSpinnerBookmarkLevel = new javax.swing.JSpinner (); 734 jPanel24 = new javax.swing.JPanel (); 735 jTabbedPane2 = new javax.swing.JTabbedPane (); 736 jPanelReference = new javax.swing.JPanel (); 737 jRTextExpressionAreaReference = new it.businesslogic.ireport.gui.JRTextExpressionArea(); 738 jLabelReference = new javax.swing.JLabel (); 739 jPanelAnchor = new javax.swing.JPanel (); 740 jRTextExpressionAreaAnchor = new it.businesslogic.ireport.gui.JRTextExpressionArea(); 741 jLabelAnchor = new javax.swing.JLabel (); 742 jPanelPage = new javax.swing.JPanel (); 743 jLabelPage = new javax.swing.JLabel (); 744 jRTextExpressionAreaPage = new it.businesslogic.ireport.gui.JRTextExpressionArea(); 745 jPanelLinkParams = new javax.swing.JPanel (); 746 jScrollPane5 = new javax.swing.JScrollPane (); 747 jTableLinkParameters = new javax.swing.JTable (); 748 jPanel25 = new javax.swing.JPanel (); 749 jButtonAddLinkParameter = new javax.swing.JButton (); 750 jButtonModLinkParameter = new javax.swing.JButton (); 751 jButtonRemLinkParameter = new javax.swing.JButton (); 752 jPanelBarcode = new javax.swing.JPanel (); 753 jLabel47 = new javax.swing.JLabel (); 754 jComboBoxBarcodeType = new javax.swing.JComboBox (); 755 jBarcodeExpressionArea = new it.businesslogic.ireport.gui.JRTextExpressionArea(); 756 jLabel48 = new javax.swing.JLabel (); 757 jSeparator8 = new javax.swing.JSeparator (); 758 jComboBoxBarcodeGroup = new javax.swing.JComboBox (); 759 jLabel43 = new javax.swing.JLabel (); 760 jComboBoxEvaluationTimeBarcode = new javax.swing.JComboBox (); 761 jLabel50 = new javax.swing.JLabel (); 762 jLabel54 = new javax.swing.JLabel (); 763 jLabel55 = new javax.swing.JLabel (); 764 jComboBoxImageOnError1 = new javax.swing.JComboBox (); 765 jComboBoxScale1 = new javax.swing.JComboBox (); 766 jLabel56 = new javax.swing.JLabel (); 767 jLabel57 = new javax.swing.JLabel (); 768 jComboBoxVerticalAlignment1 = new javax.swing.JComboBox (); 769 jComboBoxHorizontalAlignment1 = new javax.swing.JComboBox (); 770 jSeparator10 = new javax.swing.JSeparator (); 771 jPanel22 = new javax.swing.JPanel (); 772 jLabel58 = new javax.swing.JLabel (); 773 jLabel60 = new javax.swing.JLabel (); 774 jLabel61 = new javax.swing.JLabel (); 775 jNumberFieldBCWidth = new it.businesslogic.ireport.gui.JNumberField(); 776 jNumberFieldBCHeight = new it.businesslogic.ireport.gui.JNumberField(); 777 jBarcodeExpressionAreaAppIdentifier = new it.businesslogic.ireport.gui.JRTextExpressionArea(); 778 jLabel59 = new javax.swing.JLabel (); 779 jPanel23 = new javax.swing.JPanel (); 780 jCheckBoxBarcodeCheckSum = new javax.swing.JCheckBox (); 781 jCheckBoxBarcodeShowText = new javax.swing.JCheckBox (); 782 jPanelChart = new javax.swing.JPanel (); 783 jSeparator6 = new javax.swing.JSeparator (); 784 jSeparator9 = new javax.swing.JSeparator (); 785 jLabel44 = new javax.swing.JLabel (); 786 jComboBoxEvaluationTime1 = new javax.swing.JComboBox (); 787 jLabel45 = new javax.swing.JLabel (); 788 jComboBoxImageGroup1 = new javax.swing.JComboBox (); 789 jPanel9 = new javax.swing.JPanel (); 790 jButton1 = new javax.swing.JButton (); 791 jPanelBorder = new javax.swing.JPanel (); 792 jPanelSheet = new javax.swing.JPanel (); 793 jPanelCrosstab = new javax.swing.JPanel (); 794 jLabel51 = new javax.swing.JLabel (); 795 jRTextExpressionAreaCrosstabParametersMapExpression = new it.businesslogic.ireport.gui.JRTextExpressionArea(); 796 jPanel18 = new javax.swing.JPanel (); 797 jScrollPane4 = new javax.swing.JScrollPane (); 798 jTableCrosstabParameters = new javax.swing.JTable (); 799 jPanel19 = new javax.swing.JPanel (); 800 jButtonAddCrosstabParameter = new javax.swing.JButton (); 801 jButtonModCrosstabParameter = new javax.swing.JButton (); 802 jButtonRemCrosstabParameter = new javax.swing.JButton (); 803 jPanel20 = new javax.swing.JPanel (); 804 jLabel52 = new javax.swing.JLabel (); 805 jCheckBoxRepeatColumnHeaders = new javax.swing.JCheckBox (); 806 jCheckBoxRepeatRowHeaders = new javax.swing.JCheckBox (); 807 jButton2 = new javax.swing.JButton (); 808 jPanel21 = new javax.swing.JPanel (); 809 jNumberFieldColumnBreakOffset = new it.businesslogic.ireport.gui.JNumberField(); 810 jLabel53 = new javax.swing.JLabel (); 811 812 addWindowListener(new java.awt.event.WindowAdapter () { 813 public void windowClosing(java.awt.event.WindowEvent evt) { 814 closeDialog(evt); 815 } 816 }); 817 818 jTabbedPane.setOpaque(true); 819 jTabbedPane.setPreferredSize(new java.awt.Dimension (312, 48)); 820 jTabbedPane.addChangeListener(new javax.swing.event.ChangeListener () { 821 public void stateChanged(javax.swing.event.ChangeEvent evt) { 822 jTabbedPaneStateChanged(evt); 823 } 824 }); 825 826 jPanelCommon.setLayout(new java.awt.GridBagLayout ()); 827 828 jPanel3.setLayout(new java.awt.GridBagLayout ()); 829 830 jPanel3.setMinimumSize(new java.awt.Dimension (300, 74)); 831 jPanel3.setPreferredSize(new java.awt.Dimension (300, 74)); 832 jLabel5.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT); 833 jLabel5.setText("Height "); 834 gridBagConstraints = new java.awt.GridBagConstraints (); 835 gridBagConstraints.gridx = 2; 836 gridBagConstraints.gridy = 2; 837 gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; 838 gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST; 839 gridBagConstraints.insets = new java.awt.Insets (2, 8, 0, 0); 840 jPanel3.add(jLabel5, gridBagConstraints); 841 842 jNumberFieldLeft.setHorizontalAlignment(javax.swing.JTextField.RIGHT); 843 jNumberFieldLeft.setText("0"); 844 try { 845 jNumberFieldLeft.setDecimals(0); 846 } catch (java.beans.PropertyVetoException e1) { 847 e1.printStackTrace(); 848 } 849 try { 850 jNumberFieldLeft.setInteger(true); 851 } catch (java.beans.PropertyVetoException e1) { 852 e1.printStackTrace(); 853 } 854 jNumberFieldLeft.setMinimumSize(new java.awt.Dimension (45, 20)); 855 jNumberFieldLeft.setPreferredSize(new java.awt.Dimension (45, 20)); 856 jNumberFieldLeft.addActionListener(new java.awt.event.ActionListener () { 857 public void actionPerformed(java.awt.event.ActionEvent evt) { 858 jNumberFieldLeftActionPerformed(evt); 859 } 860 }); 861 862 gridBagConstraints = new java.awt.GridBagConstraints (); 863 gridBagConstraints.gridx = 1; 864 gridBagConstraints.gridy = 2; 865 gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST; 866 gridBagConstraints.insets = new java.awt.Insets (0, 5, 2, 0); 867 jPanel3.add(jNumberFieldLeft, gridBagConstraints); 868 869 jLabel4.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT); 870 jLabel4.setText("Width"); 871 gridBagConstraints = new java.awt.GridBagConstraints (); 872 gridBagConstraints.gridx = 2; 873 gridBagConstraints.gridy = 1; 874 gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; 875 gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST; 876 gridBagConstraints.insets = new java.awt.Insets (2, 8, 0, 0); 877 jPanel3.add(jLabel4, gridBagConstraints); 878 879 jLabel7.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT); 880 jLabel7.setText("Background "); 881 gridBagConstraints = new java.awt.GridBagConstraints (); 882 gridBagConstraints.gridx = 4; 883 gridBagConstraints.gridy = 2; 884 gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST; 885 gridBagConstraints.insets = new java.awt.Insets (2, 8, 0, 0); 886 jPanel3.add(jLabel7, gridBagConstraints); 887 888 jComboBoxBand.addActionListener(new java.awt.event.ActionListener () { 889 public void actionPerformed(java.awt.event.ActionEvent evt) { 890 jComboBoxBandActionPerformed(evt); 891 } 892 }); 893 894 gridBagConstraints = new java.awt.GridBagConstraints (); 895 gridBagConstraints.gridx = 1; 896 gridBagConstraints.gridy = 0; 897 gridBagConstraints.gridwidth = 5; 898 gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; 899 gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST; 900 gridBagConstraints.weightx = 1.0; 901 gridBagConstraints.insets = new java.awt.Insets (6, 5, 0, 6); 902 jPanel3.add(jComboBoxBand, gridBagConstraints); 903 904 jLabel1.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT); 905 jLabel1.setText("Band "); 906 gridBagConstraints = new java.awt.GridBagConstraints (); 907 gridBagConstraints.gridx = 0; 908 gridBagConstraints.gridy = 0; 909 gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; 910 gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST; 911 gridBagConstraints.insets = new java.awt.Insets (2, 0, 0, 0); 912 jPanel3.add(jLabel1, gridBagConstraints); 913 914 jNumberFieldWidth.setHorizontalAlignment(javax.swing.JTextField.RIGHT); 915 jNumberFieldWidth.setText("0"); 916 try { 917 jNumberFieldWidth.setDecimals(0); 918 } catch (java.beans.PropertyVetoException e1) { 919 e1.printStackTrace(); 920 } 921 try { 922 jNumberFieldWidth.setInteger(true); 923 } catch (java.beans.PropertyVetoException e1) { 924 e1.printStackTrace(); 925 } 926 jNumberFieldWidth.setMinimumSize(new java.awt.Dimension (45, 20)); 927 jNumberFieldWidth.setPreferredSize(new java.awt.Dimension (45, 20)); 928 jNumberFieldWidth.addActionListener(new java.awt.event.ActionListener () { 929 public void actionPerformed(java.awt.event.ActionEvent evt) { 930 jNumberFieldWidthActionPerformed(evt); 931 } 932 }); 933 934 gridBagConstraints = new java.awt.GridBagConstraints (); 935 gridBagConstraints.gridx = 3; 936 gridBagConstraints.gridy = 1; 937 gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST; 938 gridBagConstraints.insets = new java.awt.Insets (2, 0, 2, 0); 939 jPanel3.add(jNumberFieldWidth, gridBagConstraints); 940 941 jNumberFieldTop.setHorizontalAlignment(javax.swing.JTextField.RIGHT); 942 jNumberFieldTop.setText("0"); 943 try { 944 jNumberFieldTop.setDecimals(0); 945 } catch (java.beans.PropertyVetoException e1) { 946 e1.printStackTrace(); 947 } 948 try { 949 jNumberFieldTop.setInteger(true); 950 } catch (java.beans.PropertyVetoException e1) { 951 e1.printStackTrace(); 952 } 953 jNumberFieldTop.setMinimumSize(new java.awt.Dimension (45, 20)); 954 jNumberFieldTop.setPreferredSize(new java.awt.Dimension (45, 20)); 955 jNumberFieldTop.addActionListener(new java.awt.event.ActionListener () { 956 public void actionPerformed(java.awt.event.ActionEvent evt) { 957 jNumberFieldTopActionPerformed(evt); 958 } 959 }); 960 961 gridBagConstraints = new java.awt.GridBagConstraints (); 962 gridBagConstraints.gridx = 1; 963 gridBagConstraints.gridy = 1; 964 gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST; 965 gridBagConstraints.insets = new java.awt.Insets (2, 5, 2, 0); 966 jPanel3.add(jNumberFieldTop, gridBagConstraints); 967 968 jLabel2.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT); 969 jLabel2.setText("Top "); 970 gridBagConstraints = new java.awt.GridBagConstraints (); 971 gridBagConstraints.gridx = 0; 972 gridBagConstraints.gridy = 1; 973 gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; 974 gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST; 975 gridBagConstraints.insets = new java.awt.Insets (2, 0, 0, 0); 976 jPanel3.add(jLabel2, gridBagConstraints); 977 978 jLabel6.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT); 979 jLabel6.setText("Foreground "); 980 gridBagConstraints = new java.awt.GridBagConstraints (); 981 gridBagConstraints.gridx = 4; 982 gridBagConstraints.gridy = 1; 983 gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST; 984 gridBagConstraints.insets = new java.awt.Insets (2, 8, 0, 0); 985 jPanel3.add(jLabel6, gridBagConstraints); 986 987 jNumberFieldHeight.setHorizontalAlignment(javax.swing.JTextField.RIGHT); 988 jNumberFieldHeight.setText("0"); 989 try { 990 jNumberFieldHeight.setDecimals(0); 991 } catch (java.beans.PropertyVetoException e1) { 992 e1.printStackTrace(); 993 } 994 try { 995 jNumberFieldHeight.setInteger(true); 996 } catch (java.beans.PropertyVetoException e1) { 997 e1.printStackTrace(); 998 } 999 jNumberFieldHeight.setMinimumSize(new java.awt.Dimension (45, 20)); 1000 jNumberFieldHeight.setPreferredSize(new java.awt.Dimension (45, 20)); 1001 jNumberFieldHeight.addActionListener(new java.awt.event.ActionListener () { 1002 public void actionPerformed(java.awt.event.ActionEvent evt) { 1003 jNumberFieldHeightActionPerformed(evt); 1004 } 1005 }); 1006 1007 gridBagConstraints = new java.awt.GridBagConstraints (); 1008 gridBagConstraints.gridx = 3; 1009 gridBagConstraints.gridy = 2; 1010 gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST; 1011 jPanel3.add(jNumberFieldHeight, gridBagConstraints); 1012 1013 jButtonBackground.setBackground(new java.awt.Color (255, 255, 255)); 1014 jButtonBackground.setMaximumSize(new java.awt.Dimension (45, 20)); 1015 jButtonBackground.setMinimumSize(new java.awt.Dimension (45, 20)); 1016 jButtonBackground.setPreferredSize(new java.awt.Dimension (45, 20)); 1017 jButtonBackground.addActionListener(new java.awt.event.ActionListener () { 1018 public void actionPerformed(java.awt.event.ActionEvent evt) { 1019 jButtonBackgroundActionPerformed(evt); 1020 } 1021 }); 1022 1023 gridBagConstraints = new java.awt.GridBagConstraints (); 1024 gridBagConstraints.gridx = 5; 1025 gridBagConstraints.gridy = 2; 1026 gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST; 1027 jPanel3.add(jButtonBackground, gridBagConstraints); 1028 1029 jButtonForeground.setBackground(new java.awt.Color (0, 0, 0)); 1030 jButtonForeground.setMaximumSize(new java.awt.Dimension (45, 20)); 1031 jButtonForeground.setMinimumSize(new java.awt.Dimension (45, 20)); 1032 jButtonForeground.setPreferredSize(new java.awt.Dimension (45, 20)); 1033 jButtonForeground.addActionListener(new java.awt.event.ActionListener () { 1034 public void actionPerformed(java.awt.event.ActionEvent evt) { 1035 jButtonForegroundActionPerformed(evt); 1036 } 1037 }); 1038 1039 gridBagConstraints = new java.awt.GridBagConstraints (); 1040 gridBagConstraints.gridx = 5; 1041 gridBagConstraints.gridy = 1; 1042 gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST; 1043 jPanel3.add(jButtonForeground, gridBagConstraints); 1044 1045 jLabel3.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT); 1046 jLabel3.setText("Left "); 1047 gridBagConstraints = new java.awt.GridBagConstraints (); 1048 gridBagConstraints.gridx = 0; 1049 gridBagConstraints.gridy = 2; 1050 gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; 1051 gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST; 1052 gridBagConstraints.insets = new java.awt.Insets (2, 0, 0, 0); 1053 jPanel3.add(jLabel3, gridBagConstraints); 1054 1055 gridBagConstraints = new java.awt.GridBagConstraints (); 1056 gridBagConstraints.gridx = 0; 1057 gridBagConstraints.gridy = 0; 1058 gridBagConstraints.gridwidth = 2; 1059 gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; 1060 gridBagConstraints.insets = new java.awt.Insets (6, 6, 4, 6); 1061 jPanelCommon.add(jPanel3, gridBagConstraints); 1062 1063 jPanel4.setLayout(new java.awt.GridBagLayout ()); 1064 1065 jPanel4.setMinimumSize(new java.awt.Dimension (170, 120)); 1066 jPanel4.setPreferredSize(new java.awt.Dimension (190, 120)); 1067 jCheckBoxTransparent.setText("Transparent"); 1068 jCheckBoxTransparent.addActionListener(new java.awt.event.ActionListener () { 1069 public void actionPerformed(java.awt.event.ActionEvent evt) { 1070 jCheckBoxTransparentActionPerformed(evt); 1071 } 1072 }); 1073 1074 gridBagConstraints = new java.awt.GridBagConstraints (); 1075 gridBagConstraints.gridx = 0; 1076 gridBagConstraints.gridy = 0; 1077 gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; 1078 gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST; 1079 gridBagConstraints.weightx = 1.0; 1080 gridBagConstraints.insets = new java.awt.Insets (0, 0, 0, 4); 1081 jPanel4.add(jCheckBoxTransparent, gridBagConstraints); 1082 1083 jCheckBoxRemoveLineWhenBlank.setText("Remove line when blank"); 1084 jCheckBoxRemoveLineWhenBlank.addActionListener(new java.awt.event.ActionListener () { 1085 public void actionPerformed(java.awt.event.ActionEvent evt) { 1086 jCheckBoxRemoveLineWhenBlankActionPerformed(evt); 1087 } 1088 }); 1089 1090 gridBagConstraints = new java.awt.GridBagConstraints (); 1091 gridBagConstraints.gridx = 0; 1092 gridBagConstraints.gridy = 1; 1093 gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; 1094 gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST; 1095 gridBagConstraints.weightx = 1.0; 1096 gridBagConstraints.insets = new java.awt.Insets (0, 0, 0, 4); 1097 jPanel4.add(jCheckBoxRemoveLineWhenBlank, gridBagConstraints); 1098 1099 jCheckBoxPrintInFirstWholeBand.setText("Print in first whole band"); 1100 jCheckBoxPrintInFirstWholeBand.addActionListener(new java.awt.event.ActionListener () { 1101 public void actionPerformed(java.awt.event.ActionEvent evt) { 1102 jCheckBoxPrintInFirstWholeBandActionPerformed(evt); 1103 } 1104 }); 1105 1106 gridBagConstraints = new java.awt.GridBagConstraints (); 1107 gridBagConstraints.gridx = 0; 1108 gridBagConstraints.gridy = 2; 1109 gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; 1110 gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST; 1111 gridBagConstraints.weightx = 1.0; 1112 gridBagConstraints.insets = new java.awt.Insets (0, 0, 0, 4); 1113 jPanel4.add(jCheckBoxPrintInFirstWholeBand, gridBagConstraints); 1114 1115 jCheckBoxPrintWhenDetailOverflows.setText("Print when detail overflows"); 1116 jCheckBoxPrintWhenDetailOverflows.addActionListener(new java.awt.event.ActionListener () { 1117 public void actionPerformed(java.awt.event.ActionEvent evt) { 1118 jCheckBoxPrintWhenDetailOverflowsActionPerformed(evt); 1119 } 1120 }); 1121 1122 gridBagConstraints = new java.awt.GridBagConstraints (); 1123 gridBagConstraints.gridx = 0; 1124 gridBagConstraints.gridy = 3; 1125 gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; 1126 gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST; 1127 gridBagConstraints.weightx = 1.0; 1128 gridBagConstraints.insets = new java.awt.Insets (0, 0, 0, 4); 1129 jPanel4.add(jCheckBoxPrintWhenDetailOverflows, gridBagConstraints); 1130 1131 jCheckBoxPrintRepeatedValues.setText("Print repeated values"); 1132 jCheckBoxPrintRepeatedValues.addActionListener(new java.awt.event.ActionListener () { 1133 public void actionPerformed(java.awt.event.ActionEvent evt) { 1134 jCheckBoxPrintRepeatedValuesActionPerformed(evt); 1135 } 1136 }); 1137 1138 gridBagConstraints = new java.awt.GridBagConstraints (); 1139 gridBagConstraints.gridx = 0; 1140 gridBagConstraints.gridy = 4; 1141 gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; 1142 gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST; 1143 gridBagConstraints.weightx = 1.0; 1144 gridBagConstraints.insets = new java.awt.Insets (0, 0, 0, 4); 1145 jPanel4.add(jCheckBoxPrintRepeatedValues, gridBagConstraints); 1146 1147 gridBagConstraints = new java.awt.GridBagConstraints (); 1148 gridBagConstraints.gridx = 0; 1149 gridBagConstraints.gridy = 1; 1150 gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; 1151 gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; 1152 gridBagConstraints.insets = new java.awt.Insets (3, 6, 0, 0); 1153 jPanelCommon.add(jPanel4, gridBagConstraints); 1154 1155 jPanel5.setLayout(new java.awt.GridBagLayout ()); 1156 1157 jPanel5.setMinimumSize(new java.awt.Dimension (150, 120)); 1158 jPanel5.setPreferredSize(new java.awt.Dimension (150, 120)); 1159 jLabel8.setHorizontalAlignment(javax.swing.SwingConstants.LEFT); 1160 jLabel8.setText("Position type"); 1161 gridBagConstraints = new java.awt.GridBagConstraints (); 1162 gridBagConstraints.gridx = 0; 1163 gridBagConstraints.gridy = 0; 1164 gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; 1165 gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; 1166 gridBagConstraints.weightx = 1.0; 1167 jPanel5.add(jLabel8, gridBagConstraints); 1168 1169 jComboBoxPositionType.addActionListener(new java.awt.event.ActionListener () { 1170 public void actionPerformed(java.awt.event.ActionEvent evt) { 1171 jComboBoxPositionTypeActionPerformed(evt); 1172 } 1173 }); 1174 1175 gridBagConstraints = new java.awt.GridBagConstraints (); 1176 gridBagConstraints.gridx = 0; 1177 gridBagConstraints.gridy = 1; 1178 gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; 1179 gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST; 1180 gridBagConstraints.weightx = 1.0; 1181 jPanel5.add(jComboBoxPositionType, gridBagConstraints); 1182 1183 jLabel9.setHorizontalAlignment(javax.swing.SwingConstants.LEFT); 1184 jLabel9.setText("Print when group changes"); 1185 gridBagConstraints = new java.awt.GridBagConstraints (); 1186 gridBagConstraints.gridx = 0; 1187 gridBagConstraints.gridy = 2; 1188 gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; 1189 gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST; 1190 gridBagConstraints.weightx = 1.0; 1191 jPanel5.add(jLabel9, gridBagConstraints); 1192 1193 jComboBoxGroups.addActionListener(new java.awt.event.ActionListener () { 1194 public void actionPerformed(java.awt.event.ActionEvent evt) { 1195 jComboBoxGroupsActionPerformed(evt); 1196 } 1197 }); 1198 1199 gridBagConstraints = new java.awt.GridBagConstraints (); 1200 gridBagConstraints.gridx = 0; 1201 gridBagConstraints.gridy = 3; 1202 gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; 1203 gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST; 1204 gridBagConstraints.weightx = 1.0; 1205 jPanel5.add(jComboBoxGroups, gridBagConstraints); 1206 1207 jLabel46.setText("Key"); 1208 gridBagConstraints = new java.awt.GridBagConstraints (); 1209 gridBagConstraints.gridx = 0; 1210 gridBagConstraints.gridy = 4; 1211 gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; 1212 gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST; 1213 gridBagConstraints.weightx = 1.0; 1214 jPanel5.add(jLabel46, gridBagConstraints); 1215 1216 gridBagConstraints = new java.awt.GridBagConstraints (); 1217 gridBagConstraints.gridx = 0; 1218 gridBagConstraints.gridy = 5; 1219 gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; 1220 gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST; 1221 gridBagConstraints.weightx = 1.0; 1222 jPanel5.add(jTextFieldName, gridBagConstraints); 1223 1224 gridBagConstraints = new java.awt.GridBagConstraints (); 1225 gridBagConstraints.gridx = 1; 1226 gridBagConstraints.gridy = 1; 1227 gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; 1228 gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; 1229 gridBagConstraints.insets = new java.awt.Insets (3, 0, 0, 4); 1230 jPanelCommon.add(jPanel5, gridBagConstraints); 1231 1232 jPanel6.setLayout(new java.awt.GridBagLayout ()); 1233 1234 jPanel6.setMinimumSize(new java.awt.Dimension (300, 40)); 1235 jPanel6.setPreferredSize(new java.awt.Dimension (300, 40)); 1236 jLabel10.setHorizontalAlignment(javax.swing.SwingConstants.LEFT); 1237 jLabel10.setText("Print when expression"); 1238 gridBagConstraints = new java.awt.GridBagConstraints (); 1239 gridBagConstraints.gridx = 0; 1240 gridBagConstraints.gridy = 0; 1241 gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST; 1242 jPanel6.add(jLabel10, gridBagConstraints); 1243 1244 jRTextExpressionAreaPrintWhenExpression.setBorder(javax.swing.BorderFactory.createEtchedBorder()); 1245 jRTextExpressionAreaPrintWhenExpression.setElectricScroll(0); 1246 jRTextExpressionAreaPrintWhenExpression.setMinimumSize(new java.awt.Dimension (10, 10)); 1247 jRTextExpressionAreaPrintWhenExpression.setPreferredSize(new java.awt.Dimension (10, 10)); 1248 jRTextExpressionAreaPrintWhenExpression.addInputMethodListener(new java.awt.event.InputMethodListener () { 1249 public void caretPositionChanged(java.awt.event.InputMethodEvent evt) { 1250 } 1251 public void inputMethodTextChanged(java.awt.event.InputMethodEvent evt) { 1252 jRTextExpressionAreaPrintWhenExpressionInputMethodTextChanged(evt); 1253 } 1254 }); 1255 1256 gridBagConstraints = new java.awt.GridBagConstraints (); 1257 gridBagConstraints.gridx = 0; 1258 gridBagConstraints.gridy = 1; 1259 gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH; 1260 gridBagConstraints.weightx = 1.0; 1261 gridBagConstraints.weighty = 1.0; 1262 jPanel6.add(jRTextExpressionAreaPrintWhenExpression, gridBagConstraints); 1263 1264 gridBagConstraints = new java.awt.GridBagConstraints (); 1265 gridBagConstraints.gridx = 0; 1266 gridBagConstraints.gridy = 3; 1267 gridBagConstraints.gridwidth = 2; 1268 gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH; 1269 gridBagConstraints.weightx = 1.0; 1270 gridBagConstraints.weighty = 1.0; 1271 gridBagConstraints.insets = new java.awt.Insets (3, 6, 6, 6); 1272 jPanelCommon.add(jPanel6, gridBagConstraints); 1273 1274 jPanel11.setLayout(new java.awt.GridBagLayout ()); 1275 1276 jPanel11.setMinimumSize(new java.awt.Dimension (170, 46)); 1277 jPanel11.setPreferredSize(new java.awt.Dimension (170, 46)); 1278 jLabel12.setText("Stretch Type"); 1279 gridBagConstraints = new java.awt.GridBagConstraints (); 1280 gridBagConstraints.gridx = 0; 1281 gridBagConstraints.gridy = 2; 1282 gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; 1283 gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; 1284 gridBagConstraints.weightx = 1.0; 1285 jPanel11.add(jLabel12, gridBagConstraints); 1286 1287 jComboBoxStretchType.setMinimumSize(new java.awt.Dimension (100, 20)); 1288 jComboBoxStretchType.setPreferredSize(new java.awt.Dimension (120, 20)); 1289 jComboBoxStretchType.addActionListener(new java.awt.event.ActionListener () { 1290 public void actionPerformed(java.awt.event.ActionEvent evt) { 1291 jComboBoxStretchTypeActionPerformed(evt); 1292 } 1293 }); 1294 1295 gridBagConstraints = new java.awt.GridBagConstraints (); 1296 gridBagConstraints.gridx = 0; 1297 gridBagConstraints.gridy = 3; 1298 gridBagConstraints.gridwidth = 2; 1299 gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; 1300 gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; 1301 gridBagConstraints.weightx = 1.0; 1302 gridBagConstraints.insets = new java.awt.Insets (1, 0, 0, 0); 1303 jPanel11.add(jComboBoxStretchType, gridBagConstraints); 1304 1305 gridBagConstraints = new java.awt.GridBagConstraints (); 1306 gridBagConstraints.gridx = 0; 1307 gridBagConstraints.gridy = 2; 1308 gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; 1309 jPanelCommon.add(jPanel11, gridBagConstraints); 1310 1311 jPanel17.setLayout(new java.awt.GridBagLayout ()); 1312 1313 jPanel17.setMinimumSize(new java.awt.Dimension (150, 46)); 1314 jPanel17.setPreferredSize(new java.awt.Dimension (150, 46)); 1315 jLabelStyle.setText("Style"); 1316 gridBagConstraints = new java.awt.GridBagConstraints (); 1317 gridBagConstraints.gridx = 0; 1318 gridBagConstraints.gridy = 2; 1319 gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; 1320 gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; 1321 gridBagConstraints.weightx = 1.0; 1322 jPanel17.add(jLabelStyle, gridBagConstraints); 1323 1324 jComboBoxStyle.setMinimumSize(new java.awt.Dimension (100, 20)); 1325 jComboBoxStyle.setPreferredSize(new java.awt.Dimension (120, 20)); 1326 jComboBoxStyle.addActionListener(new java.awt.event.ActionListener () { 1327 public void actionPerformed(java.awt.event.ActionEvent evt) { 1328 jComboBoxStyleActionPerformed(evt); 1329 } 1330 }); 1331 1332 gridBagConstraints = new java.awt.GridBagConstraints (); 1333 gridBagConstraints.gridx = 0; 1334 gridBagConstraints.gridy = 3; 1335 gridBagConstraints.gridwidth = 2; 1336 gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; 1337 gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; 1338 gridBagConstraints.weightx = 1.0; 1339 jPanel17.add(jComboBoxStyle, gridBagConstraints); 1340 1341 gridBagConstraints = new java.awt.GridBagConstraints (); 1342 gridBagConstraints.gridx = 1; 1343 gridBagConstraints.gridy = 2; 1344 gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; 1345 jPanelCommon.add(jPanel17, gridBagConstraints); 1346 1347 jTabbedPane.addTab("Common", jPanelCommon); 1348 1349 jPanelGraphicselement.setLayout(new java.awt.GridBagLayout ()); 1350 1351 jComboBoxFill.setMinimumSize(new java.awt.Dimension (300, 20)); 1352 jComboBoxFill.setPreferredSize(new java.awt.Dimension (300, 20)); 1353 jComboBoxFill.addActionListener(new java.awt.event.ActionListener () { 1354 public void actionPerformed(java.awt.event.ActionEvent evt) { 1355 jComboBoxFillActionPerformed(evt); 1356 } 1357 }); 1358 1359 gridBagConstraints = new java.awt.GridBagConstraints (); 1360 gridBagConstraints.gridx = 0; 1361 gridBagConstraints.gridy = 5; 1362 gridBagConstraints.gridwidth = 2; 1363 gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; 1364 gridBagConstraints.insets = new java.awt.Insets (1, 6, 170, 6); 1365 jPanelGraphicselement.add(jComboBoxFill, gridBagConstraints); 1366 1367 jLabel11.setText("Pen"); 1368 gridBagConstraints = new java.awt.GridBagConstraints (); 1369 gridBagConstraints.gridx = 0; 1370 gridBagConstraints.gridy = 0; 1371 gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; 1372 gridBagConstraints.insets = new java.awt.Insets (12, 8, 0, 0); 1373 jPanelGraphicselement.add(jLabel11, gridBagConstraints); 1374 1375 jComboBoxPen.setMinimumSize(new java.awt.Dimension (300, 20)); 1376 jComboBoxPen.setPreferredSize(new java.awt.Dimension (300, 20)); 1377 jComboBoxPen.addActionListener(new java.awt.event.ActionListener () { 1378 public void actionPerformed(java.awt.event.ActionEvent evt) { 1379 jComboBoxPenActionPerformed(evt); 1380 } 1381 }); 1382 1383 gridBagConstraints = new java.awt.GridBagConstraints (); 1384 gridBagConstraints.gridx = 0; 1385 gridBagConstraints.gridy = 1; 1386 gridBagConstraints.gridwidth = 2; 1387 gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; 1388 gridBagConstraints.insets = new java.awt.Insets (1, 6, 0, 6); 1389 jPanelGraphicselement.add(jComboBoxPen, gridBagConstraints); 1390 1391 jLabel13.setText("Fill"); 1392 gridBagConstraints = new java.awt.GridBagConstraints (); 1393 gridBagConstraints.gridx = 0; 1394 gridBagConstraints.gridy = 4; 1395 gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; 1396 gridBagConstraints.insets = new java.awt.Insets (8, 8, 0, 0); 1397 jPanelGraphicselement.add(jLabel13, gridBagConstraints); 1398 1399 gridBagConstraints = new java.awt.GridBagConstraints (); 1400 gridBagConstraints.gridx = 83; 1401 gridBagConstraints.gridy = 82; 1402 gridBagConstraints.weightx = 1.0; 1403 gridBagConstraints.weighty = 1.0; 1404 jPanelGraphicselement.add(jSeparator7, gridBagConstraints); 1405 1406 jTabbedPane.addTab("Graphics Element", jPanelGraphicselement); 1407 1408 jPanelRectangle.setLayout(new java.awt.GridBagLayout ()); 1409 1410 jPanel1.setLayout(null); 1411 1412 jPanel1.setBorder(javax.swing.BorderFactory.createTitledBorder(javax.swing.BorderFactory.createEtchedBorder(), "Rectangle radius")); 1413 jPanel1.setMinimumSize(new java.awt.Dimension (302, 55)); 1414 jPanel1.setPreferredSize(new java.awt.Dimension (302, 55)); 1415 jLabel14.setText("Radius"); 1416 jPanel1.add(jLabel14); 1417 jLabel14.setBounds(18, 28, 44, 14); 1418 1419 jNumberFieldRadius.setHorizontalAlignment(javax.swing.JTextField.RIGHT); 1420 try { 1421 jNumberFieldRadius.setDecimals(0); 1422 } catch (java.beans.PropertyVetoException e1) { 1423 e1.printStackTrace(); 1424 } 1425 jNumberFieldRadius.addActionListener(new java.awt.event.ActionListener () { 1426 public void actionPerformed(java.awt.event.ActionEvent evt) { 1427 jNumberFieldRadiusActionPerformed(evt); 1428 } 1429 }); 1430 1431 jPanel1.add(jNumberFieldRadius); 1432 jNumberFieldRadius.setBounds(64, 26, 40, 19); 1433 1434 gridBagConstraints = new java.awt.GridBagConstraints (); 1435 gridBagConstraints.gridx = 0; 1436 gridBagConstraints.gridy = 0; 1437 gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; 1438 gridBagConstraints.weightx = 1.0; 1439 gridBagConstraints.weighty = 1.0; 1440 gridBagConstraints.insets = new java.awt.Insets (12, 6, 0, 8); 1441 jPanelRectangle.add(jPanel1, gridBagConstraints); 1442 1443 jTabbedPane.addTab("Rectangle", jPanelRectangle); 1444 1445 jPanelLine.setLayout(new java.awt.GridBagLayout ()); 1446 1447 jLabel15.setText("Line direction"); 1448 gridBagConstraints = new java.awt.GridBagConstraints (); 1449 gridBagConstraints.gridx = 0; 1450 gridBagConstraints.gridy = 0; 1451 gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; 1452 gridBagConstraints.insets = new java.awt.Insets (12, 8, 0, 0); 1453 jPanelLine.add(jLabel15, gridBagConstraints); 1454 1455 jComboBoxLineDirection.setMinimumSize(new java.awt.Dimension (300, 20)); 1456 jComboBoxLineDirection.setPreferredSize(new java.awt.Dimension (300, 20)); 1457 jComboBoxLineDirection.addActionListener(new java.awt.event.ActionListener () { 1458 public void actionPerformed(java.awt.event.ActionEvent evt) { 1459 jComboBoxLineDirectionActionPerformed(evt); 1460 } 1461 }); 1462 1463 gridBagConstraints = new java.awt.GridBagConstraints (); 1464 gridBagConstraints.gridx = 0; 1465 gridBagConstraints.gridy = 1; 1466 gridBagConstraints.gridwidth = 2; 1467 gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; 1468 gridBagConstraints.weightx = 1.0; 1469 gridBagConstraints.weighty = 1.0; 1470 gridBagConstraints.insets = new java.awt.Insets (1, 6, 0, 6); 1471 jPanelLine.add(jComboBoxLineDirection, gridBagConstraints); 1472 1473 jTabbedPane.addTab("Line", jPanelLine); 1474 1475 jPanelImage.setLayout(new java.awt.GridBagLayout ()); 1476 1477 jRTextExpressionAreaImageExpression.setBorder(javax.swing.BorderFactory.createEtchedBorder()); 1478 jRTextExpressionAreaImageExpression.setElectricScroll(0); 1479 jRTextExpressionAreaImageExpression.setMinimumSize(new java.awt.Dimension (300, 47)); 1480 jRTextExpressionAreaImageExpression.setPreferredSize(new java.awt.Dimension (300, 47)); 1481 gridBagConstraints = new java.awt.GridBagConstraints (); 1482 gridBagConstraints.gridx = 0; 1483 gridBagConstraints.gridy = 1; 1484 gridBagConstraints.gridwidth = 2; 1485 gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH; 1486 gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; 1487 gridBagConstraints.weightx = 1.0; 1488 gridBagConstraints.weighty = 1.0; 1489 gridBagConstraints.insets = new java.awt.Insets (1, 6, 0, 6); 1490 jPanelImage.add(jRTextExpressionAreaImageExpression, gridBagConstraints); 1491 1492 jLabel16.setHorizontalAlignment(javax.swing.SwingConstants.LEFT); 1493 jLabel16.setText("Image Expression"); 1494 gridBagConstraints = new java.awt.GridBagConstraints (); 1495 gridBagConstraints.gridx = 0; 1496 gridBagConstraints.gridy = 0; 1497 gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; 1498 gridBagConstraints.insets = new java.awt.Insets (10, 8, 0, 0); 1499 jPanelImage.add(jLabel16, gridBagConstraints); 1500 1501 jButtonFindImage.setText("Find..."); 1502 jButtonFindImage.addActionListener(new java.awt.event.ActionListener () { 1503 public void actionPerformed(java.awt.event.ActionEvent evt) { 1504 jButtonFindImageActionPerformed(evt); 1505 } 1506 }); 1507 1508 gridBagConstraints = new java.awt.GridBagConstraints (); 1509 gridBagConstraints.gridx = 1; 1510 gridBagConstraints.gridy = 2; 1511 gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHEAST; 1512 gridBagConstraints.insets = new java.awt.Insets (1, 0, 0, 6); 1513 jPanelImage.add(jButtonFindImage, gridBagConstraints); 1514 1515 jLabel17.setText("Image Expression Class"); 1516 gridBagConstraints = new java.awt.GridBagConstraints (); 1517 gridBagConstraints.gridx = 0; 1518 gridBagConstraints.gridy = 3; 1519 gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; 1520 gridBagConstraints.insets = new java.awt.Insets (1, 8, 0, 0); 1521 jPanelImage.add(jLabel17, gridBagConstraints); 1522 1523 jComboBoxImageExpressionClass.setMinimumSize(new java.awt.Dimension (300, 20)); 1524 jComboBoxImageExpressionClass.setPreferredSize(new java.awt.Dimension (300, 20)); 1525 jComboBoxImageExpressionClass.addActionListener(new java.awt.event.ActionListener () { 1526 public void actionPerformed(java.awt.event.ActionEvent evt) { 1527 jComboBoxImageExpressionClassActionPerformed(evt); 1528 } 1529 }); 1530 1531 gridBagConstraints = new java.awt.GridBagConstraints (); 1532 gridBagConstraints.gridx = 0; 1533 gridBagConstraints.gridy = 4; 1534 gridBagConstraints.gridwidth = 2; 1535 gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; 1536 gridBagConstraints.insets = new java.awt.Insets (1, 6, 0, 6); 1537 jPanelImage.add(jComboBoxImageExpressionClass, gridBagConstraints); 1538 1539 jLabel18.setText("Scale Image"); 1540 gridBagConstraints = new java.awt.GridBagConstraints (); 1541 gridBagConstraints.gridx = 0; 1542 gridBagConstraints.gridy = 5; 1543 gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; 1544 gridBagConstraints.insets = new java.awt.Insets (1, 8, 0, 0); 1545 jPanelImage.add(jLabel18, gridBagConstraints); 1546 1547 jComboBoxScale.setMinimumSize(new java.awt.Dimension (150, 20)); 1548 jComboBoxScale.setPreferredSize(new java.awt.Dimension (150, 20)); 1549 jComboBoxScale.addActionListener(new java.awt.event.ActionListener () { 1550 public void actionPerformed(java.awt.event.ActionEvent evt) { 1551 jComboBoxScaleActionPerformed(evt); 1552 } 1553 }); 1554 1555 gridBagConstraints = new java.awt.GridBagConstraints (); 1556 gridBagConstraints.gridx = 0; 1557 gridBagConstraints.gridy = 6; 1558 gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; 1559 gridBagConstraints.insets = new java.awt.Insets (1, 6, 0, 0); 1560 jPanelImage.add(jComboBoxScale, gridBagConstraints); 1561 1562 jCheckBoxImageCache.setText("Using cache"); 1563 jCheckBoxImageCache.addActionListener(new java.awt.event.ActionListener () { 1564 public void actionPerformed(java.awt.event.ActionEvent evt) { 1565 jCheckBoxImageCacheActionPerformed(evt); 1566 } 1567 }); 1568 1569 gridBagConstraints = new java.awt.GridBagConstraints (); 1570 gridBagConstraints.gridx = 1; 1571 gridBagConstraints.gridy = 9; 1572 gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST; 1573 gridBagConstraints.insets = new java.awt.Insets (1, 6, 0, 0); 1574 jPanelImage.add(jCheckBoxImageCache, gridBagConstraints); 1575 1576 jLabel19.setText("Vertical alignment"); 1577 gridBagConstraints = new java.awt.GridBagConstraints (); 1578 gridBagConstraints.gridx = 0; 1579 gridBagConstraints.gridy = 7; 1580 gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; 1581 gridBagConstraints.insets = new java.awt.Insets (1, 8, 0, 0); 1582 jPanelImage.add(jLabel19, gridBagConstraints); 1583 1584 jComboBoxVerticalAlignment.setMinimumSize(new java.awt.Dimension (150, 20)); 1585 jComboBoxVerticalAlignment.setPreferredSize(new java.awt.Dimension (150, 20)); 1586 jComboBoxVerticalAlignment.addActionListener(new java.awt.event.ActionListener () { 1587 public void actionPerformed(java.awt.event.ActionEvent evt) { 1588 jComboBoxVerticalAlignmentActionPerformed(evt); 1589 } 1590 }); 1591 1592 gridBagConstraints = new java.awt.GridBagConstraints (); 1593 gridBagConstraints.gridx = 0; 1594 gridBagConstraints.gridy = 8; 1595 gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; 1596 gridBagConstraints.insets = new java.awt.Insets (1, 6, 0, 0); 1597 jPanelImage.add(jComboBoxVerticalAlignment, gridBagConstraints); 1598 1599 jLabel20.setText("Horizontal alignment"); 1600 gridBagConstraints = new java.awt.GridBagConstraints (); 1601 gridBagConstraints.gridx = 1; 1602 gridBagConstraints.gridy = 7; 1603 gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST; 1604 gridBagConstraints.insets = new java.awt.Insets (1, 8, 0, 0); 1605 jPanelImage.add(jLabel20, gridBagConstraints); 1606 1607 jComboBoxHorizontalAlignment.setMinimumSize(new java.awt.Dimension (150, 20)); 1608 jComboBoxHorizontalAlignment.setPreferredSize(new java.awt.Dimension (150, 20)); 1609 jComboBoxHorizontalAlignment.addActionListener(new java.awt.event.ActionListener () { 1610 public void actionPerformed(java.awt.event.ActionEvent evt) { 1611 jComboBoxHorizontalAlignmentActionPerformed(evt); 1612 } 1613 }); 1614 1615 gridBagConstraints = new java.awt.GridBagConstraints (); 1616 gridBagConstraints.gridx = 1; 1617 gridBagConstraints.gridy = 8; 1618 gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST; 1619 gridBagConstraints.insets = new java.awt.Insets (1, 6, 0, 6); 1620 jPanelImage.add(jComboBoxHorizontalAlignment, gridBagConstraints); 1621 1622 jLabel21.setText("Evaluation time"); 1623 gridBagConstraints = new java.awt.GridBagConstraints (); 1624 gridBagConstraints.gridx = 0; 1625 gridBagConstraints.gridy = 11; 1626 gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; 1627 gridBagConstraints.insets = new java.awt.Insets (1, 8, 0, 0); 1628 jPanelImage.add(jLabel21, gridBagConstraints); 1629 1630 jComboBoxEvaluationTime.setMinimumSize(new java.awt.Dimension (150, 20)); 1631 jComboBoxEvaluationTime.setPreferredSize(new java.awt.Dimension (150, 20)); 1632 jComboBoxEvaluationTime.addActionListener(new java.awt.event.ActionListener () { 1633 public void actionPerformed(java.awt.event.ActionEvent evt) { 1634 jComboBoxEvaluationTimeActionPerformed(evt); 1635 } 1636 }); 1637 1638 gridBagConstraints = new java.awt.GridBagConstraints (); 1639 gridBagConstraints.gridx = 0; 1640 gridBagConstraints.gridy = 12; 1641 gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; 1642 gridBagConstraints.insets = new java.awt.Insets (1, 6, 6, 0); 1643 jPanelImage.add(jComboBoxEvaluationTime, gridBagConstraints); 1644 1645 jLabel22.setText("Evaluation group"); 1646 gridBagConstraints = new java.awt.GridBagConstraints (); 1647 gridBagConstraints.gridx = 1; 1648 gridBagConstraints.gridy = 11; 1649 gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST; 1650 gridBagConstraints.insets = new java.awt.Insets (1, 8, 0, 0); 1651 jPanelImage.add(jLabel22, gridBagConstraints); 1652 1653 jComboBoxImageGroup.setMinimumSize(new java.awt.Dimension (150, 20)); 1654 jComboBoxImageGroup.setPreferredSize(new java.awt.Dimension (150, 20)); 1655 jComboBoxImageGroup.addActionListener(new java.awt.event.ActionListener () { 1656 public void actionPerformed(java.awt.event.ActionEvent evt) { 1657 jComboBoxImageGroupActionPerformed(evt); 1658 } 1659 }); 1660 1661 gridBagConstraints = new java.awt.GridBagConstraints (); 1662 gridBagConstraints.gridx = 1; 1663 gridBagConstraints.gridy = 12; 1664 gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; 1665 gridBagConstraints.insets = new java.awt.Insets (1, 6, 6, 6); 1666 jPanelImage.add(jComboBoxImageGroup, gridBagConstraints); 1667 1668 jSeparator1.setMinimumSize(new java.awt.Dimension (300, 2)); 1669 jSeparator1.setPreferredSize(new java.awt.Dimension (300, 2)); 1670 gridBagConstraints = new java.awt.GridBagConstraints (); 1671 gridBagConstraints.gridx = 0; 1672 gridBagConstraints.gridy = 10; 1673 gridBagConstraints.gridwidth = 2; 1674 gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST; 1675 gridBagConstraints.insets = new java.awt.Insets (5, 6, 0, 6); 1676 jPanelImage.add(jSeparator1, gridBagConstraints); 1677 1678 jCheckBoxImageIsLazy.setText("Is Lazy"); 1679 jCheckBoxImageIsLazy.addActionListener(new java.awt.event.ActionListener () { 1680 public void actionPerformed(java.awt.event.ActionEvent evt) { 1681 jCheckBoxImageIsLazyActionPerformed(evt); 1682 } 1683 }); 1684 1685 gridBagConstraints = new java.awt.GridBagConstraints (); 1686 gridBagConstraints.gridx = 0; 1687 gridBagConstraints.gridy = 9; 1688 gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST; 1689 gridBagConstraints.insets = new java.awt.Insets (1, 6, 0, 0); 1690 jPanelImage.add(jCheckBoxImageIsLazy, gridBagConstraints); 1691 1692 jLabel34.setText("On error type"); 1693 gridBagConstraints = new java.awt.GridBagConstraints (); 1694 gridBagConstraints.gridx = 1; 1695 gridBagConstraints.gridy = 5; 1696 gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; 1697 gridBagConstraints.insets = new java.awt.Insets (1, 8, 0, 0); 1698 jPanelImage.add(jLabel34, gridBagConstraints); 1699 1700 jComboBoxImageOnError.setMinimumSize(new java.awt.Dimension (150, 20)); 1701 jComboBoxImageOnError.setPreferredSize(new java.awt.Dimension (150, 20)); 1702 jComboBoxImageOnError.addActionListener(new java.awt.event.ActionListener () { 1703 public void actionPerformed(java.awt.event.ActionEvent evt) { 1704 jComboBoxImageOnErrorActionPerformed(evt); 1705 } 1706 }); 1707 1708 gridBagConstraints = new java.awt.GridBagConstraints (); 1709 gridBagConstraints.gridx = 1; 1710 gridBagConstraints.gridy = 6; 1711 gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; 1712 gridBagConstraints.insets = new java.awt.Insets (1, 6, 0, 0); 1713 jPanelImage.add(jComboBoxImageOnError, gridBagConstraints); 1714 1715 jTabbedPane.addTab("Image", jPanelImage); 1716 1717 jPanelText.setLayout(new java.awt.BorderLayout (15, 15)); 1718 1719 jTextAreaText.addInputMethodListener(new java.awt.event.InputMethodListener () { 1720 public void caretPositionChanged(java.awt.event.InputMethodEvent evt) { 1721 } 1722 public void inputMethodTextChanged(java.awt.event.InputMethodEvent evt) { 1723 jTextAreaTextInputMethodTextChanged(evt); 1724 } 1725 }); 1726 1727 jScrollPane1.setViewportView(jTextAreaText); 1728 1729 jPanelText.add(jScrollPane1, java.awt.BorderLayout.CENTER); 1730 1731 jTabbedPane.addTab("Text", jPanelText); 1732 1733 jPanelFont.setLayout(new java.awt.GridBagLayout ()); 1734 1735 jPanel7.setLayout(new java.awt.GridBagLayout ()); 1736 1737 jPanel7.setMinimumSize(new java.awt.Dimension (300, 100)); 1738 jPanel7.setPreferredSize(new java.awt.Dimension (300, 120)); 1739 jLabel23.setText("Report font"); 1740 gridBagConstraints = new java.awt.GridBagConstraints (); 1741 gridBagConstraints.gridx = 0; 1742 gridBagConstraints.gridy = 0; 1743 gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; 1744 gridBagConstraints.insets = new java.awt.Insets (0, 2, 0, 0); 1745 jPanel7.add(jLabel23, gridBagConstraints); 1746 1747 jComboBoxReportFont.setMinimumSize(new java.awt.Dimension (300, 20)); 1748 jComboBoxReportFont.setPreferredSize(new java.awt.Dimension (300, 20)); 1749 jComboBoxReportFont.addActionListener(new java.awt.event.ActionListener () { 1750 public void actionPerformed(java.awt.event.ActionEvent evt) { 1751 jComboBoxReportFontActionPerformed(evt); 1752 } 1753 }); 1754 1755 gridBagConstraints = new java.awt.GridBagConstraints (); 1756 gridBagConstraints.gridx = 0; 1757 gridBagConstraints.gridy = 1; 1758 gridBagConstraints.gridwidth = 2; 1759 gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; 1760 jPanel7.add(jComboBoxReportFont, gridBagConstraints); 1761 1762 jLabel24.setText("Font name"); 1763 gridBagConstraints = new java.awt.GridBagConstraints (); 1764 gridBagConstraints.gridx = 0; 1765 gridBagConstraints.gridy = 2; 1766 gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; 1767 gridBagConstraints.insets = new java.awt.Insets (0, 2, 0, 0); 1768 jPanel7.add(jLabel24, gridBagConstraints); 1769 1770 jComboBoxFontName.setMinimumSize(new java.awt.Dimension (244, 20)); 1771 jComboBoxFontName.setPreferredSize(new java.awt.Dimension (244, 20)); 1772 jComboBoxFontName.addActionListener(new java.awt.event.ActionListener () { 1773 public void actionPerformed(java.awt.event.ActionEvent evt) { 1774 jComboBoxFontNameActionPerformed(evt); 1775 } 1776 }); 1777 1778 gridBagConstraints = new java.awt.GridBagConstraints (); 1779 gridBagConstraints.gridx = 0; 1780 gridBagConstraints.gridy = 3; 1781 gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; 1782 jPanel7.add(jComboBoxFontName, gridBagConstraints); 1783 1784 jNumberComboBoxSize.setMinimumSize(new java.awt.Dimension (50, 20)); 1785 jNumberComboBoxSize.setPreferredSize(new java.awt.Dimension (50, 20)); 1786 jNumberComboBoxSize.addItemListener(new java.awt.event.ItemListener () { 1787 public void itemStateChanged(java.awt.event.ItemEvent evt) { 1788 jNumberComboBoxSizeItemStateChanged(evt); 1789 } 1790 }); 1791 jNumberComboBoxSize.addActionListener(new java.awt.event.ActionListener () { 1792 public void actionPerformed(java.awt.event.ActionEvent evt) { 1793 jNumberComboBoxSizeActionPerformed(evt); 1794 } 1795 }); 1796 1797 gridBagConstraints = new java.awt.GridBagConstraints (); 1798 gridBagConstraints.gridx = 1; 1799 gridBagConstraints.gridy = 3; 1800 gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; 1801 gridBagConstraints.insets = new java.awt.Insets (0, 6, 0, 0); 1802 jPanel7.add(jNumberComboBoxSize, gridBagConstraints); 1803 1804 jLabel27.setText("Size"); 1805 gridBagConstraints = new java.awt.GridBagConstraints (); 1806 gridBagConstraints.gridx = 1; 1807 gridBagConstraints.gridy = 2; 1808 gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; 1809 gridBagConstraints.insets = new java.awt.Insets (0, 8, 0, 0); 1810 jPanel7.add(jLabel27, gridBagConstraints); 1811 1812 jLabel25.setText("PDF font name"); 1813 gridBagConstraints = new java.awt.GridBagConstraints (); 1814 gridBagConstraints.gridx = 0; 1815 gridBagConstraints.gridy = 4; 1816 gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; 1817 gridBagConstraints.insets = new java.awt.Insets (0, 2, 0, 0); 1818 jPanel7.add(jLabel25, gridBagConstraints); 1819 1820 jComboBoxPDFFontName.setEditable(true); 1821 jComboBoxPDFFontName.setMinimumSize(new java.awt.Dimension (300, 20)); 1822 jComboBoxPDFFontName.setPreferredSize(new java.awt.Dimension (300, 20)); 1823 jComboBoxPDFFontName.addActionListener(new java.awt.event.ActionListener () { 1824 public void actionPerformed(java.awt.event.ActionEvent evt) { 1825 jComboBoxPDFFontNameActionPerformed(evt); 1826 } 1827 }); 1828 1829 gridBagConstraints = new java.awt.GridBagConstraints (); 1830 gridBagConstraints.gridx = 0; 1831 gridBagConstraints.gridy = 5; 1832 gridBagConstraints.gridwidth = 2; 1833 gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; 1834 jPanel7.add(jComboBoxPDFFontName, gridBagConstraints); 1835 1836 gridBagConstraints = new java.awt.GridBagConstraints (); 1837 gridBagConstraints.gridx = 0; 1838 gridBagConstraints.gridy = 0; 1839 gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH; 1840 gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST; 1841 gridBagConstraints.insets = new java.awt.Insets (6, 6, 0, 0); 1842 jPanelFont.add(jPanel7, gridBagConstraints); 1843 1844 jPanel8.setLayout(new java.awt.GridBagLayout ()); 1845 1846 jPanel8.setMinimumSize(new java.awt.Dimension (300, 150)); 1847 jPanel8.setPreferredSize(new java.awt.Dimension (300, 170)); 1848 jPanel12.setLayout(new java.awt.GridBagLayout ()); 1849 1850 jCheckBoxBold.setText("Bold"); 1851 jCheckBoxBold.setMinimumSize(new java.awt.Dimension (100, 20)); 1852 jCheckBoxBold.setPreferredSize(new java.awt.Dimension (100, 20)); 1853 jCheckBoxBold.addActionListener(new java.awt.event.ActionListener () { 1854 public void actionPerformed(java.awt.event.ActionEvent evt) { 1855 jCheckBoxBoldActionPerformed(evt); 1856 } 1857 }); 1858 1859 gridBagConstraints = new java.awt.GridBagConstraints (); 1860 gridBagConstraints.gridx = 0; 1861 gridBagConstraints.gridy = 0; 1862 gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; 1863 jPanel12.add(jCheckBoxBold, gridBagConstraints); 1864 1865 jCheckBoxItalic.setText("Italic"); 1866 jCheckBoxItalic.setMinimumSize(new java.awt.Dimension (100, 20)); 1867 jCheckBoxItalic.setPreferredSize(new java.awt.Dimension (100, 20)); 1868 jCheckBoxItalic.addActionListener(new java.awt.event.ActionListener () { 1869 public void actionPerformed(java.awt.event.ActionEvent evt) { 1870 jCheckBoxItalicActionPerformed(evt); 1871 } 1872 }); 1873 1874 gridBagConstraints = new java.awt.GridBagConstraints (); 1875 gridBagConstraints.gridx = 0; 1876 gridBagConstraints.gridy = 1; 1877 gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; 1878 jPanel12.add(jCheckBoxItalic, gridBagConstraints); 1879 1880 jCheckBoxUnderline.setText("Underline"); 1881 jCheckBoxUnderline.setMinimumSize(new java.awt.Dimension (100, 20)); 1882 jCheckBoxUnderline.setPreferredSize(new java.awt.Dimension (100, 20)); 1883 jCheckBoxUnderline.addActionListener(new java.awt.event.ActionListener () { 1884 public void actionPerformed(java.awt.event.ActionEvent evt) { 1885 jCheckBoxUnderlineActionPerformed(evt); 1886 } 1887 }); 1888 1889 gridBagConstraints = new java.awt.GridBagConstraints (); 1890 gridBagConstraints.gridx = 0; 1891 gridBagConstraints.gridy = 2; 1892 gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; 1893 jPanel12.add(jCheckBoxUnderline, gridBagConstraints); 1894 1895 jCheckBoxStrokeTrough.setText("Strike Trough"); 1896 jCheckBoxStrokeTrough.setMinimumSize(new java.awt.Dimension (100, 20)); 1897 jCheckBoxStrokeTrough.setPreferredSize(new java.awt.Dimension (100, 20)); 1898 jCheckBoxStrokeTrough.addActionListener(new java.awt.event.ActionListener () { 1899 public void actionPerformed(java.awt.event.ActionEvent evt) { 1900 jCheckBoxStrokeTroughActionPerformed(evt); 1901 } 1902 }); 1903 1904 gridBagConstraints = new java.awt.GridBagConstraints (); 1905 gridBagConstraints.gridx = 0; 1906 gridBagConstraints.gridy = 3; 1907 gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; 1908 jPanel12.add(jCheckBoxStrokeTrough, gridBagConstraints); 1909 1910 jCheckBoxStyledText.setText("Is styled text"); 1911 jCheckBoxStyledText.addActionListener(new java.awt.event.ActionListener () { 1912 public void actionPerformed(java.awt.event.ActionEvent evt) { 1913 jCheckBoxStyledTextActionPerformed(evt); 1914 } 1915 }); 1916 1917 gridBagConstraints = new java.awt.GridBagConstraints (); 1918 gridBagConstraints.gridx = 0; 1919 gridBagConstraints.gridy = 5; 1920 gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; 1921 gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHEAST; 1922 jPanel12.add(jCheckBoxStyledText, gridBagConstraints); 1923 1924 gridBagConstraints = new java.awt.GridBagConstraints (); 1925 gridBagConstraints.gridx = 0; 1926 gridBagConstraints.gridy = 0; 1927 gridBagConstraints.gridheight = 6; 1928 gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; 1929 gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHEAST; 1930 jPanel8.add(jPanel12, gridBagConstraints); 1931 1932 jCheckBoxPDFEmbedded.setText("PDF Embedded"); 1933 jCheckBoxPDFEmbedded.setMaximumSize(new java.awt.Dimension (100, 20)); 1934 jCheckBoxPDFEmbedded.setMinimumSize(new java.awt.Dimension (100, 20)); 1935 jCheckBoxPDFEmbedded.setPreferredSize(new java.awt.Dimension (100, 20)); 1936 jCheckBoxPDFEmbedded.addActionListener(new java.awt.event.ActionListener () { 1937 public void actionPerformed(java.awt.event.ActionEvent evt) { 1938 jCheckBoxPDFEmbeddedActionPerformed(evt); 1939 } 1940 }); 1941 1942 gridBagConstraints = new java.awt.GridBagConstraints (); 1943 gridBagConstraints.gridx = 0; 1944 gridBagConstraints.gridy = 7; 1945 gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; 1946 jPanel8.add(jCheckBoxPDFEmbedded, gridBagConstraints); 1947 1948 gridBagConstraints = new java.awt.GridBagConstraints (); 1949 gridBagConstraints.gridx = 0; 1950 gridBagConstraints.gridy = 6; 1951 gridBagConstraints.gridwidth = 3; 1952 gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; 1953 gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; 1954 gridBagConstraints.weightx = 1.0; 1955 gridBagConstraints.insets = new java.awt.Insets (3, 0, 0, 0); 1956 jPanel8.add(jSeparator2, gridBagConstraints); 1957 1958 jLabel32.setText("PDF Encoding"); 1959 gridBagConstraints = new java.awt.GridBagConstraints (); 1960 gridBagConstraints.gridx = 1; 1961 gridBagConstraints.gridy = 7; 1962 gridBagConstraints.gridwidth = 2; 1963 gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST; 1964 gridBagConstraints.insets = new java.awt.Insets (0, 2, 0, 0); 1965 jPanel8.add(jLabel32, gridBagConstraints); 1966 1967 jComboBoxPdfEncoding.setEditable(true); 1968 jComboBoxPdfEncoding.setMinimumSize(new java.awt.Dimension (200, 20)); 1969 jComboBoxPdfEncoding.setPreferredSize(new java.awt.Dimension (200, 20)); 1970 jComboBoxPdfEncoding.addActionListener(new java.awt.event.ActionListener () { 1971 public void actionPerformed(java.awt.event.ActionEvent evt) { 1972 jComboBoxPdfEncodingActionPerformed(evt); 1973 } 1974 }); 1975 1976 gridBagConstraints = new java.awt.GridBagConstraints (); 1977 gridBagConstraints.gridx = 1; 1978 gridBagConstraints.gridy = 8; 1979 gridBagConstraints.gridwidth = 2; 1980 gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; 1981 jPanel8.add(jComboBoxPdfEncoding, gridBagConstraints); 1982 1983 jComboBoxHAlign.setMinimumSize(new java.awt.Dimension (95, 20)); 1984 jComboBoxHAlign.setPreferredSize(new java.awt.Dimension (95, 20)); 1985 jComboBoxHAlign.addActionListener(new java.awt.event.ActionListener () { 1986 public void actionPerformed(java.awt.event.ActionEvent evt) { 1987 jComboBoxHAlignActionPerformed(evt); 1988 } 1989 }); 1990 1991 gridBagConstraints = new java.awt.GridBagConstraints (); 1992 gridBagConstraints.gridx = 1; 1993 gridBagConstraints.gridy = 3; 1994 gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; 1995 jPanel8.add(jComboBoxHAlign, gridBagConstraints); 1996 1997 jComboBoxVAlign.setMinimumSize(new java.awt.Dimension (95, 20)); 1998 jComboBoxVAlign.setPreferredSize(new java.awt.Dimension (95, 20)); 1999 jComboBoxVAlign.addActionListener(new java.awt.event.ActionListener () { 2000 public void actionPerformed(java.awt.event.ActionEvent evt) { 2001 jComboBoxVAlignActionPerformed(evt); 2002 } 2003 }); 2004 2005 gridBagConstraints = new java.awt.GridBagConstraints (); 2006 gridBagConstraints.gridx = 2; 2007 gridBagConstraints.gridy = 3; 2008 gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; 2009 gridBagConstraints.insets = new java.awt.Insets (0, 10, 0, 0); 2010 jPanel8.add(jComboBoxVAlign, gridBagConstraints); 2011 2012 jLabel30.setText("Horizontal align"); 2013 gridBagConstraints = new java.awt.GridBagConstraints (); 2014 gridBagConstraints.gridx = 1; 2015 gridBagConstraints.gridy = 2; 2016 gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST; 2017 gridBagConstraints.insets = new java.awt.Insets (0, 2, 0, 0); 2018 jPanel8.add(jLabel30, gridBagConstraints); 2019 2020 jLabel31.setText("Vertical align"); 2021 gridBagConstraints = new java.awt.GridBagConstraints (); 2022 gridBagConstraints.gridx = 2; 2023 gridBagConstraints.gridy = 2; 2024 gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST; 2025 gridBagConstraints.insets = new java.awt.Insets (0, 12, 0, 0); 2026 jPanel8.add(jLabel31, gridBagConstraints); 2027 2028 jComboBoxLineSpacing.setMinimumSize(new java.awt.Dimension (200, 20)); 2029 jComboBoxLineSpacing.setPreferredSize(new java.awt.Dimension (200, 20)); 2030 jComboBoxLineSpacing.addActionListener(new java.awt.event.ActionListener () { 2031 public void actionPerformed(java.awt.event.ActionEvent evt) { 2032 jComboBoxLineSpacingActionPerformed(evt); 2033 } 2034 }); 2035 2036 gridBagConstraints = new java.awt.GridBagConstraints (); 2037 gridBagConstraints.gridx = 1; 2038 gridBagConstraints.gridy = 1; 2039 gridBagConstraints.gridwidth = 2; 2040 gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; 2041 jPanel8.add(jComboBoxLineSpacing, gridBagConstraints); 2042 2043 jLabel29.setText("Line spacing"); 2044 gridBagConstraints = new java.awt.GridBagConstraints (); 2045 gridBagConstraints.gridx = 1; 2046 gridBagConstraints.gridy = 0; 2047 gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST; 2048 gridBagConstraints.insets = new java.awt.Insets (0, 2, 0, 0); 2049 jPanel8.add(jLabel29, gridBagConstraints); 2050 2051 jLabel49.setText("Rotation"); 2052 gridBagConstraints = new java.awt.GridBagConstraints (); 2053 gridBagConstraints.gridx = 1; 2054 gridBagConstraints.gridy = 4; 2055 gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; 2056 jPanel8.add(jLabel49, gridBagConstraints); 2057 2058 jComboBoxRotation.setMinimumSize(new java.awt.Dimension (200, 20)); 2059 jComboBoxRotation.setPreferredSize(new java.awt.Dimension (200, 20)); 2060 jComboBoxRotation.addActionListener(new java.awt.event.ActionListener () { 2061 public void actionPerformed(java.awt.event.ActionEvent evt) { 2062 jComboBoxRotationActionPerformed(evt); 2063 } 2064 }); 2065 2066 gridBagConstraints = new java.awt.GridBagConstraints (); 2067 gridBagConstraints.gridx = 1; 2068 gridBagConstraints.gridy = 5; 2069 gridBagConstraints.gridwidth = 2; 2070 gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; 2071 jPanel8.add(jComboBoxRotation, gridBagConstraints); 2072 2073 gridBagConstraints = new java.awt.GridBagConstraints (); 2074 gridBagConstraints.gridx = 0; 2075 gridBagConstraints.gridy = 1; 2076 gridBagConstraints.ipady = -13; 2077 gridBagConstraints.insets = new java.awt.Insets (0, 6, 0, 0); 2078 jPanelFont.add(jPanel8, gridBagConstraints); 2079 2080 gridBagConstraints = new java.awt.GridBagConstraints (); 2081 gridBagConstraints.gridx = 99; 2082 gridBagConstraints.gridy = 0; 2083 gridBagConstraints.weightx = 1.0; 2084 jPanelFont.add(jSeparator4, gridBagConstraints); 2085 2086 gridBagConstraints = new java.awt.GridBagConstraints (); 2087 gridBagConstraints.gridx = 0; 2088 gridBagConstraints.gridy = 99; 2089 gridBagConstraints.weighty = 1.0; 2090 jPanelFont.add(jSeparator5, gridBagConstraints); 2091 2092 jTabbedPane.addTab("Font", jPanelFont); 2093 2094 jPanelTextField.setLayout(new java.awt.GridBagLayout ()); 2095 2096 jLabel28.setText("Textfield Expression Class"); 2097 gridBagConstraints = new java.awt.GridBagConstraints (); 2098 gridBagConstraints.gridx = 0; 2099 gridBagConstraints.gridy = 0; 2100 gridBagConstraints.gridwidth = 2; 2101 gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST; 2102 gridBagConstraints.insets = new java.awt.Insets (10, 8, 0, 0); 2103 jPanelTextField.add(jLabel28, gridBagConstraints); 2104 2105 jComboBoxTextFieldExpressionClass.setMinimumSize(new java.awt.Dimension (300, 20)); 2106 jComboBoxTextFieldExpressionClass.setPreferredSize(new java.awt.Dimension (300, 20)); 2107 jComboBoxTextFieldExpressionClass.addActionListener(new java.awt.event.ActionListener () { 2108 public void actionPerformed(java.awt.event.ActionEvent evt) { 2109 jComboBoxTextFieldExpressionClassActionPerformed(evt); 2110 } 2111 }); 2112 2113 gridBagConstraints = new java.awt.GridBagConstraints (); 2114 gridBagConstraints.gridx = 0; 2115 gridBagConstraints.gridy = 1; 2116 gridBagConstraints.gridwidth = 2; 2117 gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST; 2118 gridBagConstraints.insets = new java.awt.Insets (2, 6, 0, 6); 2119 jPanelTextField.add(jComboBoxTextFieldExpressionClass, gridBagConstraints); 2120 2121 jLabel37.setText("Evaluation time"); 2122 gridBagConstraints = new java.awt.GridBagConstraints (); 2123 gridBagConstraints.gridx = 0; 2124 gridBagConstraints.gridy = 2; 2125 gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST; 2126 gridBagConstraints.insets = new java.awt.Insets (6, 8, 0, 0); 2127 jPanelTextField.add(jLabel37, gridBagConstraints); 2128 2129 jComboBoxTextFieldEvaluationTime.setMinimumSize(new java.awt.Dimension (147, 20)); 2130 jComboBoxTextFieldEvaluationTime.setPreferredSize(new java.awt.Dimension (147, 20)); 2131 jComboBoxTextFieldEvaluationTime.addActionListener(new java.awt.event.ActionListener () { 2132 public void actionPerformed(java.awt.event.ActionEvent evt) { 2133 jComboBoxTextFieldEvaluationTimeActionPerformed(evt); 2134 } 2135 }); 2136 2137 gridBagConstraints = new java.awt.GridBagConstraints (); 2138 gridBagConstraints.gridx = 0; 2139 gridBagConstraints.gridy = 3; 2140 gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST; 2141 gridBagConstraints.insets = new java.awt.Insets (2, 6, 0, 0); 2142 jPanelTextField.add(jComboBoxTextFieldEvaluationTime, gridBagConstraints); 2143 2144 jLabel38.setText("Evaluation group"); 2145 gridBagConstraints = new java.awt.GridBagConstraints (); 2146 gridBagConstraints.gridx = 1; 2147 gridBagConstraints.gridy = 2; 2148 gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST; 2149 gridBagConstraints.insets = new java.awt.Insets (6, 6, 0, 0); 2150 jPanelTextField.add(jLabel38, gridBagConstraints); 2151 2152 jComboBoxTextFieldGroup.setMinimumSize(new java.awt.Dimension (147, 20)); 2153 jComboBoxTextFieldGroup.setPreferredSize(new java.awt.Dimension (147, 20)); 2154 jComboBoxTextFieldGroup.addActionListener(new java.awt.event.ActionListener () { 2155 public void actionPerformed(java.awt.event.ActionEvent evt) { 2156 jComboBoxTextFieldGroupActionPerformed(evt); 2157 } 2158 }); 2159 2160 gridBagConstraints = new java.awt.GridBagConstraints (); 2161 gridBagConstraints.gridx = 1; 2162 gridBagConstraints.gridy = 3; 2163 gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST; 2164 gridBagConstraints.insets = new java.awt.Insets (2, 6, 0, 6); 2165 jPanelTextField.add(jComboBoxTextFieldGroup, gridBagConstraints); 2166 2167 jCheckBoxStretchWithOverflow.setText("Stretch with overflow"); 2168 jCheckBoxStretchWithOverflow.addActionListener(new java.awt.event.ActionListener () { 2169 public void actionPerformed(java.awt.event.ActionEvent evt) { 2170 jCheckBoxStretchWithOverflowActionPerformed(evt); 2171 } 2172 }); 2173 2174 gridBagConstraints = new java.awt.GridBagConstraints (); 2175 gridBagConstraints.gridx = 0; 2176 gridBagConstraints.gridy = 4; 2177 gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST; 2178 gridBagConstraints.insets = new java.awt.Insets (6, 6, 0, 0); 2179 jPanelTextField.add(jCheckBoxStretchWithOverflow, gridBagConstraints); 2180 2181 jCheckBoxBlankWhenNull.setText("Blank when null"); 2182 jCheckBoxBlankWhenNull.addActionListener(new java.awt.event.ActionListener () { 2183 public void actionPerformed(java.awt.event.ActionEvent evt) { 2184 jCheckBoxBlankWhenNullActionPerformed(evt); 2185 } 2186 }); 2187 2188 gridBagConstraints = new java.awt.GridBagConstraints (); 2189 gridBagConstraints.gridx = 1; 2190 gridBagConstraints.gridy = 4; 2191 gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST; 2192 gridBagConstraints.insets = new java.awt.Insets (6, 6, 0, 8); 2193 jPanelTextField.add(jCheckBoxBlankWhenNull, gridBagConstraints); 2194 2195 jLabel39.setText("Pattern"); 2196 gridBagConstraints = new java.awt.GridBagConstraints (); 2197 gridBagConstraints.gridx = 0; 2198 gridBagConstraints.gridy = 5; 2199 gridBagConstraints.gridwidth = 2; 2200 gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST; 2201 gridBagConstraints.insets = new java.awt.Insets (4, 8, 0, 0); 2202 jPanelTextField.add(jLabel39, gridBagConstraints); 2203 2204 jLabel40.setHorizontalAlignment(javax.swing.SwingConstants.LEFT); 2205 jLabel40.setText("Textfield expression"); 2206 gridBagConstraints = new java.awt.GridBagConstraints (); 2207 gridBagConstraints.gridx = 0; 2208 gridBagConstraints.gridy = 7; 2209 gridBagConstraints.gridwidth = 2; 2210 gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST; 2211 gridBagConstraints.insets = new java.awt.Insets (8, 8, 0, 142); 2212 jPanelTextField.add(jLabel40, gridBagConstraints); 2213 2214 jRTextExpressionAreaTextFieldExpression.setBorder(javax.swing.BorderFactory.createEtchedBorder()); 2215 jRTextExpressionAreaTextFieldExpression.setAutoscrolls(true); 2216 jRTextExpressionAreaTextFieldExpression.setElectricScroll(0); 2217 jRTextExpressionAreaTextFieldExpression.setMinimumSize(new java.awt.Dimension (0, 0)); 2218 jRTextExpressionAreaTextFieldExpression.setPreferredSize(new java.awt.Dimension (0, 0)); 2219 gridBagConstraints = new java.awt.GridBagConstraints (); 2220 gridBagConstraints.gridx = 0; 2221 gridBagConstraints.gridy = 8; 2222 gridBagConstraints.gridwidth = 2; 2223 gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH; 2224 gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST; 2225 gridBagConstraints.weightx = 1.0; 2226 gridBagConstraints.weighty = 1.0; 2227 gridBagConstraints.insets = new java.awt.Insets (1, 6, 6, 6); 2228 jPanelTextField.add(jRTextExpressionAreaTextFieldExpression, gridBagConstraints); 2229 2230 jPanel2.setLayout(new java.awt.GridBagLayout ()); 2231 2232 jPanel2.setPreferredSize(new java.awt.Dimension (300, 23)); 2233 jPanel2.setMinimumSize(new java.awt.Dimension (100, 43)); 2234 jComboBoxPattern.setEditable(true); 2235 jComboBoxPattern.setMinimumSize(new java.awt.Dimension (150, 20)); 2236 jComboBoxPattern.setPreferredSize(new java.awt.Dimension (300, 20)); 2237 jComboBoxPattern.addActionListener(new java.awt.event.ActionListener () { 2238 public void actionPerformed(java.awt.event.ActionEvent evt) { 2239 jComboBoxPatternActionPerformed(evt); 2240 } 2241 }); 2242 jComboBoxPattern.addFocusListener(new java.awt.event.FocusAdapter () { 2243 public void focusLost(java.awt.event.FocusEvent evt) { 2244 jComboBoxPatternFocusLost(evt); 2245 } 2246 }); 2247 jComboBoxPattern.addInputMethodListener(new java.awt.event.InputMethodListener () { 2248 public void caretPositionChanged(java.awt.event.InputMethodEvent evt) { 2249 } 2250 public void inputMethodTextChanged(java.awt.event.InputMethodEvent evt) { 2251 jComboBoxPatternInputMethodTextChanged(evt); 2252 } 2253 }); 2254 2255 gridBagConstraints = new java.awt.GridBagConstraints (); 2256 gridBagConstraints.gridx = 0; 2257 gridBagConstraints.gridy = 0; 2258 gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; 2259 gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST; 2260 gridBagConstraints.weightx = 1.0; 2261 gridBagConstraints.insets = new java.awt.Insets (0, 6, 0, 6); 2262 jPanel2.add(jComboBoxPattern, gridBagConstraints); 2263 2264 jButtonCreatePattern.setText("Create..."); 2265 jButtonCreatePattern.setPreferredSize(new java.awt.Dimension (80, 23)); 2266 jButtonCreatePattern.setMaximumSize(new java.awt.Dimension (300, 23)); 2267 jButtonCreatePattern.setMinimumSize(new java.awt.Dimension (80, 23)); 2268 jButtonCreatePattern.setMargin(new java.awt.Insets (2, 4, 2, 4)); 2269 jButtonCreatePattern.addActionListener(new java.awt.event.ActionListener () { 2270 public void actionPerformed(java.awt.event.ActionEvent evt) { 2271 jButtonCreatePatternActionPerformed(evt); 2272 } 2273 }); 2274 2275 gridBagConstraints = new java.awt.GridBagConstraints (); 2276 gridBagConstraints.gridx = 1; 2277 gridBagConstraints.gridy = 0; 2278 gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; 2279 jPanel2.add(jButtonCreatePattern, gridBagConstraints); 2280 2281 gridBagConstraints = new java.awt.GridBagConstraints (); 2282 gridBagConstraints.gridx = 0; 2283 gridBagConstraints.gridy = 6; 2284 gridBagConstraints.gridwidth = 2; 2285 gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; 2286 gridBagConstraints.insets = new java.awt.Insets (0, 0, 0, 20); 2287 jPanelTextField.add(jPanel2, gridBagConstraints); 2288 2289 jTabbedPane.addTab("Text Field", jPanelTextField); 2290 2291 jPanelSubreport1.setLayout(new java.awt.GridBagLayout ()); 2292 2293 jLabel41.setText("Connection / Datasource Expression"); 2294 gridBagConstraints = new java.awt.GridBagConstraints (); 2295 gridBagConstraints.gridx = 0; 2296 gridBagConstraints.gridy = 2; 2297 gridBagConstraints.gridwidth = 2; 2298 gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST; 2299 gridBagConstraints.insets = new java.awt.Insets (2, 6, 0, 0); 2300 jPanelSubreport1.add(jLabel41, gridBagConstraints); 2301 2302 jLabel42.setHorizontalAlignment(javax.swing.SwingConstants.LEFT); 2303 jLabel42.setText("Parameters Map Expression"); 2304 gridBagConstraints = new java.awt.GridBagConstraints (); 2305 gridBagConstraints.gridx = 0; 2306 gridBagConstraints.gridy = 0; 2307 gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST; 2308 gridBagConstraints.insets = new java.awt.Insets (6, 6, 0, 0); 2309 jPanelSubreport1.add(jLabel42, gridBagConstraints); 2310 2311 jRTextExpressionAreaSubreportMapExpression.setBorder(javax.swing.BorderFactory.createEtchedBorder()); 2312 jRTextExpressionAreaSubreportMapExpression.setElectricScroll(0); 2313 jRTextExpressionAreaSubreportMapExpression.setMinimumSize(new java.awt.Dimension (0, 0)); 2314 jRTextExpressionAreaSubreportMapExpression.setPreferredSize(new java.awt.Dimension (0, 0)); 2315 gridBagConstraints = new java.awt.GridBagConstraints (); 2316 gridBagConstraints.gridx = 0; 2317 gridBagConstraints.gridy = 1; 2318 gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH; 2319 gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; 2320 gridBagConstraints.weightx = 1.0; 2321 gridBagConstraints.weighty = 1.0; 2322 gridBagConstraints.insets = new java.awt.Insets (2, 6, 0, 6); 2323 jPanelSubreport1.add(jRTextExpressionAreaSubreportMapExpression, gridBagConstraints); 2324 2325 jComboBoxSubreportConnectionType.setMinimumSize(new java.awt.Dimension (300, 20)); 2326 jComboBoxSubreportConnectionType.setPreferredSize(new java.awt.Dimension (300, 20)); 2327 jComboBoxSubreportConnectionType.addActionListener(new java.awt.event.ActionListener () { 2328 public void actionPerformed(java.awt.event.ActionEvent evt) { 2329 jComboBoxSubreportConnectionTypeActionPerformed(evt); 2330 } 2331 }); 2332 2333 gridBagConstraints = new java.awt.GridBagConstraints (); 2334 gridBagConstraints.gridx = 0; 2335 gridBagConstraints.gridy = 3; 2336 gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST; 2337 gridBagConstraints.insets = new java.awt.Insets (2, 6, 0, 6); 2338 jPanelSubreport1.add(jComboBoxSubreportConnectionType, gridBagConstraints); 2339 2340 jRTextExpressionAreaTextConnectionExpression.setBorder(javax.swing.BorderFactory.createEtchedBorder()); 2341 jRTextExpressionAreaTextConnectionExpression.setEnabled(false); 2342 jRTextExpressionAreaTextConnectionExpression.setMinimumSize(new java.awt.Dimension (300, 50)); 2343 jRTextExpressionAreaTextConnectionExpression.setPreferredSize(new java.awt.Dimension (300, 50)); 2344 gridBagConstraints = new java.awt.GridBagConstraints (); 2345 gridBagConstraints.gridx = 0; 2346 gridBagConstraints.gridy = 4; 2347 gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH; 2348 gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; 2349 gridBagConstraints.weightx = 1.0; 2350 gridBagConstraints.weighty = 1.0; 2351 gridBagConstraints.insets = new java.awt.Insets (2, 6, 0, 6); 2352 jPanelSubreport1.add(jRTextExpressionAreaTextConnectionExpression, gridBagConstraints); 2353 2354 jCheckBoxSubreportCache.setSelected(true); 2355 jCheckBoxSubreportCache.setText("Using cache"); 2356 jCheckBoxSubreportCache.addActionListener(new java.awt.event.ActionListener () { 2357 public void actionPerformed(java.awt.event.ActionEvent evt) { 2358 jCheckBoxSubreportCacheActionPerformed(evt); 2359 } 2360 }); 2361 2362 gridBagConstraints = new java.awt.GridBagConstraints (); 2363 gridBagConstraints.gridx = 0; 2364 gridBagConstraints.gridy = 5; 2365 gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST; 2366 gridBagConstraints.insets = new java.awt.Insets (2, 6, 0, 0); 2367 jPanelSubreport1.add(jCheckBoxSubreportCache, gridBagConstraints); 2368 2369 jTabbedPane.addTab("Subreport", jPanelSubreport1); 2370 2371 jPanelSubreport2.setLayout(new java.awt.GridBagLayout ()); 2372 2373 jLabel26.setHorizontalAlignment(javax.swing.SwingConstants.LEFT); 2374 jLabel26.setText("Subreport Expression"); 2375 gridBagConstraints = new java.awt.GridBagConstraints (); 2376 gridBagConstraints.gridx = 0; 2377 gridBagConstraints.gridy = 2; 2378 gridBagConstraints.gridwidth = 3; 2379 gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST; 2380 gridBagConstraints.insets = new java.awt.Insets (6, 8, 0, 0); 2381 jPanelSubreport2.add(jLabel26, gridBagConstraints); 2382 2383 jRTextExpressionAreaSubreportExpression.setBorder(javax.swing.BorderFactory.createEtchedBorder()); 2384 jRTextExpressionAreaSubreportExpression.setElectricScroll(0); 2385 jRTextExpressionAreaSubreportExpression.setMinimumSize(new java.awt.Dimension (0, 0)); 2386 jRTextExpressionAreaSubreportExpression.setPreferredSize(new java.awt.Dimension (300, 50)); 2387 gridBagConstraints = new java.awt.GridBagConstraints (); 2388 gridBagConstraints.gridx = 0; 2389 gridBagConstraints.gridy = 3; 2390 gridBagConstraints.gridwidth = 3; 2391 gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH; 2392 gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST; 2393 gridBagConstraints.weightx = 1.0; 2394 gridBagConstraints.weighty = 1.0; 2395 gridBagConstraints.insets = new java.awt.Insets (2, 6, 0, 6); 2396 jPanelSubreport2.add(jRTextExpressionAreaSubreportExpression, gridBagConstraints); 2397 2398 jLabel33.setText("Subreport Expression Class"); 2399 gridBagConstraints = new java.awt.GridBagConstraints (); 2400 gridBagConstraints.gridx = 0; 2401 gridBagConstraints.gridy = 0; 2402 gridBagConstraints.gridwidth = 3; 2403 gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST; 2404 gridBagConstraints.insets = new java.awt.Insets (6, 8, 0, 0); 2405 jPanelSubreport2.add(jLabel33, gridBagConstraints); 2406 2407 jComboBoxSubreportExpressionClass.setMinimumSize(new java.awt.Dimension (300, 20)); 2408 jComboBoxSubreportExpressionClass.setPreferredSize(new java.awt.Dimension (300, 20)); 2409 jComboBoxSubreportExpressionClass.addActionListener(new java.awt.event.ActionListener () { 2410 public void actionPerformed(java.awt.event.ActionEvent evt) { 2411 jComboBoxSubreportExpressionClassActionPerformed(evt); 2412 } 2413 }); 2414 2415 gridBagConstraints = new java.awt.GridBagConstraints (); 2416 gridBagConstraints.gridx = 0; 2417 gridBagConstraints.gridy = 1; 2418 gridBagConstraints.gridwidth = 3; 2419 gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST; 2420 gridBagConstraints.weightx = 1.0; 2421 gridBagConstraints.insets = new java.awt.Insets (2, 6, 0, 0); 2422 jPanelSubreport2.add(jComboBoxSubreportExpressionClass, gridBagConstraints); 2423 2424 jPanel16.setLayout(new java.awt.GridBagLayout ()); 2425 2426 jScrollPane2.setMinimumSize(new java.awt.Dimension (300, 50)); 2427 jScrollPane2.setPreferredSize(new java.awt.Dimension (300, 50)); 2428 jTableSubreportParameters.setModel(new javax.swing.table.DefaultTableModel ( 2429 new Object [][] { 2430 2431 }, 2432 new String [] { 2433 "Parameter", "Expression" 2434 } 2435 ) { 2436 boolean[] canEdit = new boolean [] { 2437 false, false 2438 }; 2439 2440 public boolean isCellEditable(int rowIndex, int columnIndex) { 2441 return canEdit [columnIndex]; 2442 } 2443 }); 2444 jTableSubreportParameters.addMouseListener(new java.awt.event.MouseAdapter () { 2445 public void mouseClicked(java.awt.event.MouseEvent evt) { 2446 jTableSubreportParametersMouseClicked(evt); 2447 } 2448 }); 2449 2450 jScrollPane2.setViewportView(jTableSubreportParameters); 2451 2452 gridBagConstraints = new java.awt.GridBagConstraints (); 2453 gridBagConstraints.gridx = 0; 2454 gridBagConstraints.gridy = 7; 2455 gridBagConstraints.gridwidth = 3; 2456 gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH; 2457 gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST; 2458 gridBagConstraints.weightx = 1.0; 2459 gridBagConstraints.weighty = 1.0; 2460 gridBagConstraints.insets = new java.awt.Insets (2, 6, 0, 6); 2461 jPanel16.add(jScrollPane2, gridBagConstraints); 2462 2463 jPanel10.setLayout(new java.awt.GridBagLayout ()); 2464 2465 jButtonAddParameter.setText("Add"); 2466 jButtonAddParameter.addActionListener(new java.awt.event.ActionListener () { 2467 public void actionPerformed(java.awt.event.ActionEvent evt) { 2468 jButtonAddParameterActionPerformed(evt); 2469 } 2470 }); 2471 2472 gridBagConstraints = new java.awt.GridBagConstraints (); 2473 gridBagConstraints.gridx = 0; 2474 gridBagConstraints.gridy = 0; 2475 gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST; 2476 gridBagConstraints.insets = new java.awt.Insets (4, 0, 6, 0); 2477 jPanel10.add(jButtonAddParameter, gridBagConstraints); 2478 2479 jButtonModParameter.setText("Modify"); 2480 jButtonModParameter.setEnabled(false); 2481 jButtonModParameter.addActionListener(new java.awt.event.ActionListener () { 2482 public void actionPerformed(java.awt.event.ActionEvent evt) { 2483 jButtonModParameterActionPerformed(evt); 2484 } 2485 }); 2486 2487 gridBagConstraints = new java.awt.GridBagConstraints (); 2488 gridBagConstraints.gridx = 1; 2489 gridBagConstraints.gridy = 0; 2490 gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST; 2491 gridBagConstraints.insets = new java.awt.Insets (4, 6, 6, 0); 2492 jPanel10.add(jButtonModParameter, gridBagConstraints); 2493 2494 jButtonRemParameter.setText("Remove"); 2495 jButtonRemParameter.setEnabled(false); 2496 jButtonRemParameter.addActionListener(new java.awt.event.ActionListener () { 2497 public void actionPerformed(java.awt.event.ActionEvent evt) { 2498 jButtonRemParameterActionPerformed(evt); 2499 } 2500 }); 2501 2502 gridBagConstraints = new java.awt.GridBagConstraints (); 2503 gridBagConstraints.gridx = 2; 2504 gridBagConstraints.gridy = 0; 2505 gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST; 2506 gridBagConstraints.insets = new java.awt.Insets (4, 6, 6, 0); 2507 jPanel10.add(jButtonRemParameter, gridBagConstraints); 2508 2509 jButtonCopyParamsFromMaster.setText("Copy from master"); 2510 jButtonCopyParamsFromMaster.setToolTipText("Pass all the not-builtin parameters to the subreport"); 2511 jButtonCopyParamsFromMaster.addActionListener(new java.awt.event.ActionListener () { 2512 public void actionPerformed(java.awt.event.ActionEvent evt) { 2513 jButtonCopyParamsFromMasterActionPerformed(evt); 2514 } 2515 }); 2516 2517 gridBagConstraints = new java.awt.GridBagConstraints (); 2518 gridBagConstraints.insets = new java.awt.Insets (4, 6, 6, 0); 2519 jPanel10.add(jButtonCopyParamsFromMaster, gridBagConstraints); 2520 2521 gridBagConstraints = new java.awt.GridBagConstraints (); 2522 gridBagConstraints.gridx = 4; 2523 gridBagConstraints.weightx = 1.0; 2524 jPanel10.add(jPanel13, gridBagConstraints); 2525 2526 gridBagConstraints = new java.awt.GridBagConstraints (); 2527 gridBagConstraints.gridy = 9; 2528 gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; 2529 gridBagConstraints.weightx = 1.0; 2530 gridBagConstraints.insets = new java.awt.Insets (0, 6, 0, 6); 2531 jPanel16.add(jPanel10, gridBagConstraints); 2532 2533 jTabbedPane1.addTab("Subreport parameters", jPanel16); 2534 2535 jPanelSubreportReturnValues.setLayout(new java.awt.GridBagLayout ()); 2536 2537 jScrollPane3.setMinimumSize(new java.awt.Dimension (300, 50)); 2538 jScrollPane3.setPreferredSize(new java.awt.Dimension (300, 50)); 2539 jTableSubreportReturnValues.setModel(new javax.swing.table.DefaultTableModel ( 2540 new Object [][] { 2541 2542 }, 2543 new String [] { 2544 "Subreport variable", "Destination variable" 2545 } 2546 ) { 2547 boolean[] canEdit = new boolean [] { 2548 false, false 2549 }; 2550 2551 public boolean isCellEditable(int rowIndex, int columnIndex) { 2552 return canEdit [columnIndex]; 2553 } 2554 }); 2555 jTableSubreportReturnValues.addMouseListener(new java.awt.event.MouseAdapter () { 2556 public void mouseClicked(java.awt.event.MouseEvent evt) { 2557 jTableSubreportReturnValuesMouseClicked(evt); 2558 } 2559 }); 2560 2561 jScrollPane3.setViewportView(jTableSubreportReturnValues); 2562 2563 gridBagConstraints = new java.awt.GridBagConstraints (); 2564 gridBagConstraints.gridx = 0; 2565 gridBagConstraints.gridy = 7; 2566 gridBagConstraints.gridwidth = 3; 2567 gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH; 2568 gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST; 2569 gridBagConstraints.weightx = 1.0; 2570 gridBagConstraints.weighty = 1.0; 2571 gridBagConstraints.insets = new java.awt.Insets (2, 6, 0, 6); 2572 jPanelSubreportReturnValues.add(jScrollPane3, gridBagConstraints); 2573 2574 jPanel14.setLayout(new java.awt.GridBagLayout ()); 2575 2576 jButtonAddReturnValue.setText("Add"); 2577 jButtonAddReturnValue.addActionListener(new java.awt.event.ActionListener () { 2578 public void actionPerformed(java.awt.event.ActionEvent evt) { 2579 jButtonAddReturnValueActionPerformed(evt); 2580 } 2581 }); 2582 2583 gridBagConstraints = new java.awt.GridBagConstraints (); 2584 gridBagConstraints.gridx = 0; 2585 gridBagConstraints.gridy = 0; 2586 gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST; 2587 gridBagConstraints.insets = new java.awt.Insets (4, 0, 6, 0); 2588 jPanel14.add(jButtonAddReturnValue, gridBagConstraints); 2589 2590 jButtonModReturnValue.setText("Modify"); 2591 jButtonModReturnValue.setEnabled(false); 2592 jButtonModReturnValue.addActionListener(new java.awt.event.ActionListener () { 2593 public void actionPerformed(java.awt.event.ActionEvent evt) { 2594 jButtonModReturnValueActionPerformed(evt); 2595 } 2596 }); 2597 2598 gridBagConstraints = new java.awt.GridBagConstraints (); 2599 gridBagConstraints.gridx = 1; 2600 gridBagConstraints.gridy = 0; 2601 gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST; 2602 gridBagConstraints.insets = new java.awt.Insets (4, 6, 6, 0); 2603 jPanel14.add(jButtonModReturnValue, gridBagConstraints); 2604 2605 jButtonRemReturnValue.setText("Remove"); 2606 jButtonRemReturnValue.setEnabled(false); 2607 jButtonRemReturnValue.addActionListener(new java.awt.event.ActionListener () { 2608 public void actionPerformed(java.awt.event.ActionEvent evt) { 2609 jButtonRemReturnValueActionPerformed(evt); 2610 } 2611 }); 2612 2613 gridBagConstraints = new java.awt.GridBagConstraints (); 2614 gridBagConstraints.gridx = 2; 2615 gridBagConstraints.gridy = 0; 2616 gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST; 2617 gridBagConstraints.insets = new java.awt.Insets (4, 6, 6, 0); 2618 jPanel14.add(jButtonRemReturnValue, gridBagConstraints); 2619 2620 gridBagConstraints = new java.awt.GridBagConstraints (); 2621 gridBagConstraints.gridx = 4; 2622 gridBagConstraints.weightx = 1.0; 2623 jPanel14.add(jPanel15, gridBagConstraints); 2624 2625 gridBagConstraints = new java.awt.GridBagConstraints (); 2626 gridBagConstraints.gridy = 9; 2627 gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; 2628 gridBagConstraints.weightx = 1.0; 2629 gridBagConstraints.insets = new java.awt.Insets (0, 6, 0, 6); 2630 jPanelSubreportReturnValues.add(jPanel14, gridBagConstraints); 2631 2632 jTabbedPane1.addTab("Subreport return values", jPanelSubreportReturnValues); 2633 2634 gridBagConstraints = new java.awt.GridBagConstraints (); 2635 gridBagConstraints.gridx = 0; 2636 gridBagConstraints.gridy = 99; 2637 gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH; 2638 gridBagConstraints.weightx = 1.0; 2639 gridBagConstraints.weighty = 1.0; 2640 gridBagConstraints.insets = new java.awt.Insets (4, 6, 4, 6); 2641 jPanelSubreport2.add(jTabbedPane1, gridBagConstraints); 2642 2643 jTabbedPane.addTab("Subreport (Other)", jPanelSubreport2); 2644 2645 jPanelHyperLink.setLayout(new java.awt.GridBagLayout ()); 2646 2647 jRTextExpressionAreaAnchorName.setBorder(javax.swing.BorderFactory.createEtchedBorder()); 2648 jRTextExpressionAreaAnchorName.setElectricScroll(0); 2649 jRTextExpressionAreaAnchorName.setMinimumSize(new java.awt.Dimension (0, 0)); 2650 jRTextExpressionAreaAnchorName.setPreferredSize(new java.awt.Dimension (0, 0)); 2651 jRTextExpressionAreaAnchorName.setViewScrollbars(false); 2652 gridBagConstraints = new java.awt.GridBagConstraints (); 2653 gridBagConstraints.gridx = 0; 2654 gridBagConstraints.gridy = 1; 2655 gridBagConstraints.gridwidth = 2; 2656 gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH; 2657 gridBagConstraints.ipadx = 300; 2658 gridBagConstraints.ipady = 46; 2659 gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST; 2660 gridBagConstraints.weightx = 1.0; 2661 gridBagConstraints.weighty = 0.6; 2662 gridBagConstraints.insets = new java.awt.Insets (1, 6, 0, 6); 2663 jPanelHyperLink.add(jRTextExpressionAreaAnchorName, gridBagConstraints); 2664 2665 jLabel35.setHorizontalAlignment(javax.swing.SwingConstants.LEFT); 2666 jLabel35.setText("Anchor Name Expression"); 2667 gridBagConstraints = new java.awt.GridBagConstraints (); 2668 gridBagConstraints.gridx = 0; 2669 gridBagConstraints.gridy = 0; 2670 gridBagConstraints.gridwidth = 2; 2671 gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; 2672 gridBagConstraints.ipadx = 175; 2673 gridBagConstraints.insets = new java.awt.Insets (10, 8, 0, 6); 2674 jPanelHyperLink.add(jLabel35, gridBagConstraints); 2675 2676 gridBagConstraints = new java.awt.GridBagConstraints (); 2677 gridBagConstraints.gridx = 0; 2678 gridBagConstraints.gridy = 4; 2679 gridBagConstraints.gridwidth = 2; 2680 gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; 2681 gridBagConstraints.ipadx = 300; 2682 gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST; 2683 gridBagConstraints.weightx = 1.0; 2684 gridBagConstraints.insets = new java.awt.Insets (2, 6, 0, 2); 2685 jPanelHyperLink.add(jSeparator3, gridBagConstraints); 2686 2687 jComboBoxLinkType.setEditable(true); 2688 jComboBoxLinkType.setMinimumSize(new java.awt.Dimension (180, 20)); 2689 jComboBoxLinkType.setPreferredSize(new java.awt.Dimension (180, 20)); 2690 jComboBoxLinkType.addActionListener(new java.awt.event.ActionListener () { 2691 public void actionPerformed(java.awt.event.ActionEvent evt) { 2692 jComboBoxLinkTypeActionPerformed(evt); 2693 } 2694 }); 2695 2696 gridBagConstraints = new java.awt.GridBagConstraints (); 2697 gridBagConstraints.gridx = 1; 2698 gridBagConstraints.gridy = 8; 2699 gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST; 2700 gridBagConstraints.weightx = 1.0; 2701 gridBagConstraints.insets = new java.awt.Insets (0, 6, 0, 6); 2702 jPanelHyperLink.add(jComboBoxLinkType, gridBagConstraints); 2703 2704 jLabel36.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT); 2705 jLabel36.setText("Hyperlink type"); 2706 jLabel36.setMaximumSize(new java.awt.Dimension (200, 25)); 2707 jLabel36.setMinimumSize(new java.awt.Dimension (100, 20)); 2708 jLabel36.setPreferredSize(new java.awt.Dimension (100, 20)); 2709 gridBagConstraints = new java.awt.GridBagConstraints (); 2710 gridBagConstraints.gridx = 0; 2711 gridBagConstraints.gridy = 8; 2712 gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; 2713 gridBagConstraints.ipadx = 22; 2714 gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST; 2715 gridBagConstraints.insets = new java.awt.Insets (0, 8, 5, 0); 2716 jPanelHyperLink.add(jLabel36, gridBagConstraints); 2717 2718 jLabelTarget.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT); 2719 jLabelTarget.setText("Hyperlink target"); 2720 jLabelTarget.setMaximumSize(new java.awt.Dimension (200, 25)); 2721 jLabelTarget.setMinimumSize(new java.awt.Dimension (100, 20)); 2722 jLabelTarget.setPreferredSize(new java.awt.Dimension (100, 20)); 2723 gridBagConstraints = new java.awt.GridBagConstraints (); 2724 gridBagConstraints.gridx = 0; 2725 gridBagConstraints.gridy = 7; 2726 gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; 2727 gridBagConstraints.ipadx = 22; 2728 gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST; 2729 gridBagConstraints.insets = new java.awt.Insets (2, 8, 5, 0); 2730 jPanelHyperLink.add(jLabelTarget, gridBagConstraints); 2731 2732 jComboBoxLinkTarget.setMinimumSize(new java.awt.Dimension (180, 20)); 2733 jComboBoxLinkTarget.setPreferredSize(new java.awt.Dimension (180, 20)); 2734 jComboBoxLinkTarget.addActionListener(new java.awt.event.ActionListener () { 2735 public void actionPerformed(java.awt.event.ActionEvent evt) { 2736 jComboBoxLinkTargetActionPerformed(evt); 2737 } 2738 }); 2739 2740 gridBagConstraints = new java.awt.GridBagConstraints (); 2741 gridBagConstraints.gridx = 1; 2742 gridBagConstraints.gridy = 7; 2743 gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST; 2744 gridBagConstraints.weightx = 1.0; 2745 gridBagConstraints.insets = new java.awt.Insets (2, 6, 0, 2); 2746 jPanelHyperLink.add(jComboBoxLinkTarget, gridBagConstraints); 2747 2748 jLabelTarget1.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT); 2749 jLabelTarget1.setText("Bookmark level"); 2750 jLabelTarget1.setMaximumSize(new java.awt.Dimension (200, 25)); 2751 jLabelTarget1.setMinimumSize(new java.awt.Dimension (100, 20)); 2752 jLabelTarget1.setPreferredSize(new java.awt.Dimension (100, 20)); 2753 gridBagConstraints = new java.awt.GridBagConstraints (); 2754 gridBagConstraints.gridx = 0; 2755 gridBagConstraints.gridy = 3; 2756 gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; 2757 gridBagConstraints.ipadx = 22; 2758 gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST; 2759 gridBagConstraints.insets = new java.awt.Insets (2, 8, 5, 0); 2760 jPanelHyperLink.add(jLabelTarget1, gridBagConstraints); 2761 2762 jSpinnerBookmarkLevel.setFont(new java.awt.Font ("Default", 0, 11)); 2763 jSpinnerBookmarkLevel.setMinimumSize(new java.awt.Dimension (80, 20)); 2764 jSpinnerBookmarkLevel.setPreferredSize(new java.awt.Dimension (80, 20)); 2765 jSpinnerBookmarkLevel.setRequestFocusEnabled(false); 2766 jSpinnerBookmarkLevel.addChangeListener(new javax.swing.event.ChangeListener () { 2767 public void stateChanged(javax.swing.event.ChangeEvent evt) { 2768 jSpinnerBookmarkLevelStateChanged(evt); 2769 } 2770 }); 2771 2772 gridBagConstraints = new java.awt.GridBagConstraints (); 2773 gridBagConstraints.gridx = 1; 2774 gridBagConstraints.gridy = 3; 2775 gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST; 2776 gridBagConstraints.insets = new java.awt.Insets (2, 6, 0, 2); 2777 jPanelHyperLink.add(jSpinnerBookmarkLevel, gridBagConstraints); 2778 2779 jPanel24.setLayout(new java.awt.GridBagLayout ()); 2780 2781 jPanel24.setMinimumSize(new java.awt.Dimension (457, 163)); 2782 jPanel24.setPreferredSize(new java.awt.Dimension (321, 163)); 2783 jTabbedPane2.setMinimumSize(new java.awt.Dimension (445, 163)); 2784 jTabbedPane2.setPreferredSize(new java.awt.Dimension (309, 163)); 2785 jPanelReference.setLayout(new java.awt.GridBagLayout ()); 2786 2787 jPanelReference.setMinimumSize(new java.awt.Dimension (0, 100)); 2788 jRTextExpressionAreaReference.setBorder(javax.swing.BorderFactory.createEtchedBorder()); 2789 jRTextExpressionAreaReference.setEnabled(false); 2790 jRTextExpressionAreaReference.setMinimumSize(new java.awt.Dimension (300, 50)); 2791 jRTextExpressionAreaReference.setPreferredSize(new java.awt.Dimension (300, 50)); 2792 jRTextExpressionAreaReference.setViewScrollbars(false); 2793 gridBagConstraints = new java.awt.GridBagConstraints (); 2794 gridBagConstraints.gridx = 0; 2795 gridBagConstraints.gridy = 11; 2796 gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH; 2797 gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST; 2798 gridBagConstraints.weightx = 1.0; 2799 gridBagConstraints.weighty = 1.0; 2800 gridBagConstraints.insets = new java.awt.Insets (2, 2, 2, 2); 2801 jPanelReference.add(jRTextExpressionAreaReference, gridBagConstraints); 2802 2803 jLabelReference.setHorizontalAlignment(javax.swing.SwingConstants.LEFT); 2804 jLabelReference.setText("Hyperlink Reference Expression"); 2805 jLabelReference.setEnabled(false); 2806 gridBagConstraints = new java.awt.GridBagConstraints (); 2807 gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; 2808 gridBagConstraints.insets = new java.awt.Insets (2, 2, 2, 2); 2809 jPanelReference.add(jLabelReference, gridBagConstraints); 2810 2811 jTabbedPane2.addTab("Reference", jPanelReference); 2812 2813 jPanelAnchor.setLayout(new java.awt.GridBagLayout ()); 2814 2815 jPanelAnchor.setMinimumSize(new java.awt.Dimension (440, 100)); 2816 jRTextExpressionAreaAnchor.setBorder(javax.swing.BorderFactory.createEtchedBorder()); 2817 jRTextExpressionAreaAnchor.setEnabled(false); 2818 jRTextExpressionAreaAnchor.setMinimumSize(new java.awt.Dimension (300, 50)); 2819 jRTextExpressionAreaAnchor.setPreferredSize(new java.awt.Dimension (300, 50)); 2820 jRTextExpressionAreaAnchor.setViewScrollbars(false); 2821 gridBagConstraints = new java.awt.GridBagConstraints (); 2822 gridBagConstraints.gridx = 0; 2823 gridBagConstraints.gridy = 1; 2824 gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH; 2825 gridBagConstraints.weightx = 1.0; 2826 gridBagConstraints.weighty = 1.0; 2827 gridBagConstraints.insets = new java.awt.Insets (2, 2, 2, 2); 2828 jPanelAnchor.add(jRTextExpressionAreaAnchor, gridBagConstraints); 2829 2830 jLabelAnchor.setHorizontalAlignment(javax.swing.SwingConstants.LEFT); 2831 jLabelAnchor.setText("Hyperlink Anchor Expression"); 2832 jLabelAnchor.setEnabled(false); 2833 gridBagConstraints = new java.awt.GridBagConstraints (); 2834 gridBagConstraints.gridx = 0; 2835 gridBagConstraints.gridy = 0; 2836 gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; 2837 gridBagConstraints.insets = new java.awt.Insets (2, 2, 2, 2); 2838 jPanelAnchor.add(jLabelAnchor, gridBagConstraints); 2839 2840 jTabbedPane2.addTab("Anchor", jPanelAnchor); 2841 2842 jPanelPage.setLayout(new java.awt.GridBagLayout ()); 2843 2844 jPanelPage.setMinimumSize(new java.awt.Dimension (428, 100)); 2845 jLabelPage.setHorizontalAlignment(javax.swing.SwingConstants.LEFT); 2846 jLabelPage.setText("Hyperlink Page Expression"); 2847 jLabelPage.setEnabled(false); 2848 gridBagConstraints = new java.awt.GridBagConstraints (); 2849 gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; 2850 gridBagConstraints.insets = new java.awt.Insets (2, 2, 2, 2); 2851 jPanelPage.add(jLabelPage, gridBagConstraints); 2852 2853 jRTextExpressionAreaPage.setBorder(javax.swing.BorderFactory.createEtchedBorder()); 2854 jRTextExpressionAreaPage.setEnabled(false); 2855 jRTextExpressionAreaPage.setMinimumSize(new java.awt.Dimension (300, 50)); 2856 jRTextExpressionAreaPage.setPreferredSize(new java.awt.Dimension (300, 50)); 2857 jRTextExpressionAreaPage.setViewScrollbars(false); 2858 gridBagConstraints = new java.awt.GridBagConstraints (); 2859 gridBagConstraints.gridx = 0; 2860 gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH; 2861 gridBagConstraints.weightx = 1.0; 2862 gridBagConstraints.weighty = 1.0; 2863 gridBagConstraints.insets = new java.awt.Insets (2, 2, 2, 2); 2864 jPanelPage.add(jRTextExpressionAreaPage, gridBagConstraints); 2865 2866 jTabbedPane2.addTab("Page", jPanelPage); 2867 2868 jPanelLinkParams.setLayout(new java.awt.GridBagLayout ()); 2869 2870 jTableLinkParameters.setModel(new javax.swing.table.DefaultTableModel ( 2871 new Object [][] { 2872 2873 }, 2874 new String [] { 2875 "Link parameter", "Expression" 2876 } 2877 ) { 2878 boolean[] canEdit = new boolean [] { 2879 false, false 2880 }; 2881 2882 public boolean isCellEditable(int rowIndex, int columnIndex) { 2883 return canEdit [columnIndex]; 2884 } 2885 }); 2886 jTableLinkParameters.addMouseListener(new java.awt.event.MouseAdapter () { 2887 public void mouseClicked(java.awt.event.MouseEvent evt) { 2888 jTableLinkParametersMouseClicked(evt); 2889 } 2890 }); 2891 2892 jScrollPane5.setViewportView(jTableLinkParameters); 2893 2894 gridBagConstraints = new java.awt.GridBagConstraints (); 2895 gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH; 2896 gridBagConstraints.weightx = 1.0; 2897 gridBagConstraints.weighty = 1.0; 2898 gridBagConstraints.insets = new java.awt.Insets (2, 6, 0, 6); 2899 jPanelLinkParams.add(jScrollPane5, gridBagConstraints); 2900 2901 jPanel25.setLayout(new java.awt.GridBagLayout ()); 2902 2903 jButtonAddLinkParameter.setText("Add"); 2904 jButtonAddLinkParameter.addActionListener(new java.awt.event.ActionListener () { 2905 public void actionPerformed(java.awt.event.ActionEvent evt) { 2906 jButtonAddLinkParameterActionPerformed(evt); 2907 } 2908 }); 2909 2910 gridBagConstraints = new java.awt.GridBagConstraints (); 2911 gridBagConstraints.gridx = 0; 2912 gridBagConstraints.gridy = 0; 2913 gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST; 2914 gridBagConstraints.insets = new java.awt.Insets (4, 0, 6, 0); 2915 jPanel25.add(jButtonAddLinkParameter, gridBagConstraints); 2916 2917 jButtonModLinkParameter.setText("Modify"); 2918 jButtonModLinkParameter.setEnabled(false); 2919 jButtonModLinkParameter.addActionListener(new java.awt.event.ActionListener () { 2920 public void actionPerformed(java.awt.event.ActionEvent evt) { 2921 jButtonModLinkParameterActionPerformed(evt); 2922 } 2923 }); 2924 2925 gridBagConstraints = new java.awt.GridBagConstraints (); 2926 gridBagConstraints.gridx = 1; 2927 gridBagConstraints.gridy = 0; 2928 gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST; 2929 gridBagConstraints.insets = new java.awt.Insets (4, 6, 6, 0); 2930 jPanel25.add(jButtonModLinkParameter, gridBagConstraints); 2931 2932 jButtonRemLinkParameter.setText("Remove"); 2933 jButtonRemLinkParameter.setEnabled(false); 2934 jButtonRemLinkParameter.addActionListener(new java.awt.event.ActionListener () { 2935 public void actionPerformed(java.awt.event.ActionEvent evt) { 2936 jButtonRemLinkParameterActionPerformed(evt); 2937 } 2938 }); 2939 2940 gridBagConstraints = new java.awt.GridBagConstraints (); 2941 gridBagConstraints.gridx = 2; 2942 gridBagConstraints.gridy = 0; 2943 gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST; 2944 gridBagConstraints.weightx = 1.0; 2945 gridBagConstraints.insets = new java.awt.Insets (4, 6, 6, 0); 2946 jPanel25.add(jButtonRemLinkParameter, gridBagConstraints); 2947 2948 gridBagConstraints = new java.awt.GridBagConstraints (); 2949 gridBagConstraints.gridx = 0; 2950 gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; 2951 gridBagConstraints.weightx = 1.0; 2952 gridBagConstraints.insets = new java.awt.Insets (0, 6, 0, 6); 2953 jPanelLinkParams.add(jPanel25, gridBagConstraints); 2954 2955 jTabbedPane2.addTab("Link parameters", jPanelLinkParams); 2956 2957 gridBagConstraints = new java.awt.GridBagConstraints (); 2958 gridBagConstraints.gridx = 0; 2959 gridBagConstraints.gridy = 100; 2960 gridBagConstraints.gridwidth = 2; 2961 gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH; 2962 gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST; 2963 gridBagConstraints.weightx = 1.5; 2964 gridBagConstraints.weighty = 1.5; 2965 gridBagConstraints.insets = new java.awt.Insets (1, 6, 2, 6); 2966 jPanel24.add(jTabbedPane2, gridBagConstraints); 2967 2968 gridBagConstraints = new java.awt.GridBagConstraints (); 2969 gridBagConstraints.gridx = 0; 2970 gridBagConstraints.gridy = 100; 2971 gridBagConstraints.gridwidth = 2; 2972 gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH; 2973 gridBagConstraints.weightx = 1.0; 2974 gridBagConstraints.weighty = 1.5; 2975 jPanelHyperLink.add(jPanel24, gridBagConstraints); 2976 2977 jTabbedPane.addTab("Hyper Link", jPanelHyperLink); 2978 2979 jPanelBarcode.setLayout(new java.awt.GridBagLayout ()); 2980 2981 jLabel47.setText("Type"); 2982 gridBagConstraints = new java.awt.GridBagConstraints (); 2983 gridBagConstraints.gridx = 0; 2984 gridBagConstraints.gridy = 0; 2985 gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; 2986 gridBagConstraints.insets = new java.awt.Insets (2, 8, 0, 0); 2987 jPanelBarcode.add(jLabel47, gridBagConstraints); 2988 2989 jComboBoxBarcodeType.setMinimumSize(new java.awt.Dimension (100, 20)); 2990 jComboBoxBarcodeType.setPreferredSize(new java.awt.Dimension (200, 20)); 2991 jComboBoxBarcodeType.addActionListener(new java.awt.event.ActionListener () { 2992 public void actionPerformed(java.awt.event.ActionEvent evt) { 2993 jComboBoxBarcodeTypeActionPerformed(evt); 2994 } 2995 }); 2996 2997 gridBagConstraints = new java.awt.GridBagConstraints (); 2998 gridBagConstraints.gridx = 0; 2999 gridBagConstraints.gridy = 1; 3000 gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; 3001 gridBagConstraints.insets = new java.awt.Insets (2, 8, 0, 0); 3002 jPanelBarcode.add(jComboBoxBarcodeType, gridBagConstraints); 3003 3004 jBarcodeExpressionArea.setBorder(javax.swing.BorderFactory.createEtchedBorder()); 3005 jBarcodeExpressionArea.setAutoscrolls(true); 3006 jBarcodeExpressionArea.setElectricScroll(0); 3007 jBarcodeExpressionArea.setMinimumSize(new java.awt.Dimension (0, 21)); 3008 jBarcodeExpressionArea.setPreferredSize(new java.awt.Dimension (0, 0)); 3009 gridBagConstraints = new java.awt.GridBagConstraints (); 3010 gridBagConstraints.gridx = 0; 3011 gridBagConstraints.gridy = 3; 3012 gridBagConstraints.gridwidth = 3; 3013 gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH; 3014 gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST; 3015 gridBagConstraints.weightx = 1.0; 3016 gridBagConstraints.weighty = 1.0; 3017 gridBagConstraints.insets = new java.awt.Insets (2, 8, 6, 6); 3018 jPanelBarcode.add(jBarcodeExpressionArea, gridBagConstraints); 3019 3020 jLabel48.setHorizontalAlignment(javax.swing.SwingConstants.LEFT); 3021 jLabel48.setText("Barcode expression"); 3022 gridBagConstraints = new java.awt.GridBagConstraints (); 3023 gridBagConstraints.gridx = 0; 3024 gridBagConstraints.gridy = 2; 3025 gridBagConstraints.gridwidth = 2; 3026 gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST; 3027 gridBagConstraints.insets = new java.awt.Insets (2, 8, 0, 0); 3028 jPanelBarcode.add(jLabel48, gridBagConstraints); 3029 3030 jSeparator8.setMinimumSize(new java.awt.Dimension (300, 2)); 3031 jSeparator8.setPreferredSize(new java.awt.Dimension (300, 2)); 3032 gridBagConstraints = new java.awt.GridBagConstraints (); 3033 gridBagConstraints.gridx = 0; 3034 gridBagConstraints.gridy = 25; 3035 gridBagConstraints.gridwidth = 3; 3036 gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; 3037 gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST; 3038 gridBagConstraints.insets = new java.awt.Insets (5, 6, 0, 6); 3039 jPanelBarcode.add(jSeparator8, gridBagConstraints); 3040 3041 jComboBoxBarcodeGroup.setMinimumSize(new java.awt.Dimension (150, 20)); 3042 jComboBoxBarcodeGroup.setPreferredSize(new java.awt.Dimension (150, 20)); 3043 jComboBoxBarcodeGroup.addActionListener(new java.awt.event.ActionListener () { 3044 public void actionPerformed(java.awt.event.ActionEvent evt) { 3045 jComboBoxBarcodeGroupActionPerformed(evt); 3046 } 3047 }); 3048 3049 gridBagConstraints = new java.awt.GridBagConstraints (); 3050 gridBagConstraints.gridx = 1; 3051 gridBagConstraints.gridy = 30; 3052 gridBagConstraints.gridwidth = 2; 3053 gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; 3054 gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; 3055 gridBagConstraints.insets = new java.awt.Insets (1, 6, 6, 6); 3056 jPanelBarcode.add(jComboBoxBarcodeGroup, gridBagConstraints); 3057 3058 jLabel43.setText("Evaluation group"); 3059 gridBagConstraints = new java.awt.GridBagConstraints (); 3060 gridBagConstraints.gridx = 1; 3061 gridBagConstraints.gridy = 29; 3062 gridBagConstraints.gridwidth = 2; 3063 gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST; 3064 gridBagConstraints.insets = new java.awt.Insets (1, 8, 0, 0); 3065 jPanelBarcode.add(jLabel43, gridBagConstraints); 3066 3067 jComboBoxEvaluationTimeBarcode.setMinimumSize(new java.awt.Dimension (150, 20)); 3068 jComboBoxEvaluationTimeBarcode.setPreferredSize(new java.awt.Dimension (150, 20)); 3069 jComboBoxEvaluationTimeBarcode.addActionListener(new java.awt.event.ActionListener () { 3070 public void actionPerformed(java.awt.event.ActionEvent evt) { 3071 jComboBoxEvaluationTimeBarcodeActionPerformed(evt); 3072 } 3073 }); 3074 3075 gridBagConstraints = new java.awt.GridBagConstraints (); 3076 gridBagConstraints.gridx = 0; 3077 gridBagConstraints.gridy = 30; 3078 gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; 3079 gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; 3080 gridBagConstraints.insets = new java.awt.Insets (1, 6, 6, 0); 3081 jPanelBarcode.add(jComboBoxEvaluationTimeBarcode, gridBagConstraints); 3082 3083 jLabel50.setText("Evaluation time"); 3084 gridBagConstraints = new java.awt.GridBagConstraints (); 3085 gridBagConstraints.gridx = 0; 3086 gridBagConstraints.gridy = 29; 3087 gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; 3088 gridBagConstraints.insets = new java.awt.Insets (1, 8, 0, 0); 3089 jPanelBarcode.add(jLabel50, gridBagConstraints); 3090 3091 jLabel54.setText("Scale Barcode Image"); 3092 gridBagConstraints = new java.awt.GridBagConstraints (); 3093 gridBagConstraints.gridx = 0; 3094 gridBagConstraints.gridy = 17; 3095 gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; 3096 gridBagConstraints.insets = new java.awt.Insets (1, 8, 0, 0); 3097 jPanelBarcode.add(jLabel54, gridBagConstraints); 3098 3099 jLabel55.setText("On error type"); 3100 gridBagConstraints = new java.awt.GridBagConstraints (); 3101 gridBagConstraints.gridx = 1; 3102 gridBagConstraints.gridy = 17; 3103 gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; 3104 gridBagConstraints.insets = new java.awt.Insets (1, 8, 0, 0); 3105 jPanelBarcode.add(jLabel55, gridBagConstraints); 3106 3107 jComboBoxImageOnError1.setMinimumSize(new java.awt.Dimension (150, 20)); 3108 jComboBoxImageOnError1.setPreferredSize(new java.awt.Dimension (150, 20)); 3109 jComboBoxImageOnError1.addActionListener(new java.awt.event.ActionListener () { 3110 public void actionPerformed(java.awt.event.ActionEvent evt) { 3111 jComboBoxImageOnErrorActionPerformed1(evt); 3112 } 3113 }); 3114 3115 gridBagConstraints = new java.awt.GridBagConstraints (); 3116 gridBagConstraints.gridx = 1; 3117 gridBagConstraints.gridy = 18; 3118 gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; 3119 gridBagConstraints.insets = new java.awt.Insets (1, 6, 0, 0); 3120 jPanelBarcode.add(jComboBoxImageOnError1, gridBagConstraints); 3121 3122 jComboBoxScale1.setMinimumSize(new java.awt.Dimension (150, 20)); 3123 jComboBoxScale1.setPreferredSize(new java.awt.Dimension (150, 20)); 3124 jComboBoxScale1.addActionListener(new java.awt.event.ActionListener () { 3125 public void actionPerformed(java.awt.event.ActionEvent evt) { 3126 jComboBoxScaleActionPerformed1(evt); 3127 } 3128 }); 3129 3130 gridBagConstraints = new java.awt.GridBagConstraints (); 3131 gridBagConstraints.gridx = 0; 3132 gridBagConstraints.gridy = 18; 3133 gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; 3134 gridBagConstraints.insets = new java.awt.Insets (1, 6, 0, 0); 3135 jPanelBarcode.add(jComboBoxScale1, gridBagConstraints); 3136 3137 jLabel56.setText("Horizontal alignment"); 3138 gridBagConstraints = new java.awt.GridBagConstraints (); 3139 gridBagConstraints.gridx = 1; 3140 gridBagConstraints.gridy = 19; 3141 gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST; 3142 gridBagConstraints.insets = new java.awt.Insets (1, 8, 0, 0); 3143 jPanelBarcode.add(jLabel56, gridBagConstraints); 3144 3145 jLabel57.setText("Vertical alignment"); 3146 gridBagConstraints = new java.awt.GridBagConstraints (); 3147 gridBagConstraints.gridx = 0; 3148 gridBagConstraints.gridy = 19; 3149 gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; 3150 gridBagConstraints.insets = new java.awt.Insets (1, 8, 0, 0); 3151 jPanelBarcode.add(jLabel57, gridBagConstraints); 3152 3153 jComboBoxVerticalAlignment1.setMinimumSize(new java.awt.Dimension (150, 20)); 3154 jComboBoxVerticalAlignment1.setPreferredSize(new java.awt.Dimension (150, 20)); 3155 jComboBoxVerticalAlignment1.addActionListener(new java.awt.event.ActionListener () { 3156 public void actionPerformed(java.awt.event.ActionEvent evt) { 3157 jComboBoxVerticalAlignmentActionPerformed1(evt); 3158 } 3159 }); 3160 3161 gridBagConstraints = new java.awt.GridBagConstraints (); 3162 gridBagConstraints.gridx = 0; 3163 gridBagConstraints.gridy = 20; 3164 gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; 3165 gridBagConstraints.insets = new java.awt.Insets (1, 6, 0, 0); 3166 jPanelBarcode.add(jComboBoxVerticalAlignment1, gridBagConstraints); 3167 3168 jComboBoxHorizontalAlignment1.setMinimumSize(new java.awt.Dimension (150, 20)); 3169 jComboBoxHorizontalAlignment1.setPreferredSize(new java.awt.Dimension (150, 20)); 3170 jComboBoxHorizontalAlignment1.addActionListener(new java.awt.event.ActionListener () { 3171 public void actionPerformed(java.awt.event.ActionEvent evt) { 3172 jComboBoxHorizontalAlignmentActionPerformed1(evt); 3173 } 3174 }); 3175 3176 gridBagConstraints = new java.awt.GridBagConstraints (); 3177 gridBagConstraints.gridx = 1; 3178 gridBagConstraints.gridy = 20; 3179 gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST; 3180 gridBagConstraints.insets = new java.awt.Insets (1, 6, 0, 6); 3181 jPanelBarcode.add(jComboBoxHorizontalAlignment1, gridBagConstraints); 3182 3183 jSeparator10.setMinimumSize(new java.awt.Dimension (300, 2)); 3184 jSeparator10.setPreferredSize(new java.awt.Dimension (300, 2)); 3185 gridBagConstraints = new java.awt.GridBagConstraints (); 3186 gridBagConstraints.gridx = 0; 3187 gridBagConstraints.gridy = 16; 3188 gridBagConstraints.gridwidth = 3; 3189 gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; 3190 gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST; 3191 gridBagConstraints.insets = new java.awt.Insets (5, 6, 0, 6); 3192 jPanelBarcode.add(jSeparator10, gridBagConstraints); 3193 3194 jPanel22.setLayout(new java.awt.GridBagLayout ()); 3195 3196 jLabel58.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT); 3197 jLabel58.setText("Bar height"); 3198 gridBagConstraints = new java.awt.GridBagConstraints (); 3199 gridBagConstraints.gridx = 4; 3200 gridBagConstraints.gridy = 0; 3201 gridBagConstraints.anchor = java.awt.GridBagConstraints.EAST; 3202 gridBagConstraints.insets = new java.awt.Insets (2, 16, 0, 0); 3203 jPanel22.add(jLabel58, gridBagConstraints); 3204 3205 jLabel60.setHorizontalAlignment(javax.swing.SwingConstants.LEFT); 3206 jLabel60.setText("(0 = default)"); 3207 gridBagConstraints = new java.awt.GridBagConstraints (); 3208 gridBagConstraints.gridx = 10; 3209 gridBagConstraints.gridy = 0; 3210 gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; 3211 gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST; 3212 gridBagConstraints.weightx = 1.0; 3213 gridBagConstraints.insets = new java.awt.Insets (2, 8, 0, 0); 3214 jPanel22.add(jLabel60, gridBagConstraints); 3215 3216 jLabel61.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT); 3217 jLabel61.setText("Bar width"); 3218 gridBagConstraints = new java.awt.GridBagConstraints (); 3219 gridBagConstraints.gridx = 0; 3220 gridBagConstraints.gridy = 0; 3221 gridBagConstraints.anchor = java.awt.GridBagConstraints.EAST; 3222 gridBagConstraints.insets = new java.awt.Insets (2, 8, 0, 0); 3223 jPanel22.add(jLabel61, gridBagConstraints); 3224 3225 jNumberFieldBCWidth.setHorizontalAlignment(javax.swing.JTextField.RIGHT); 3226 jNumberFieldBCWidth.setText("0"); 3227 jNumberFieldBCWidth.setToolTipText("Sets the desired width for the bars in the barcode (in pixels)."); 3228 try { 3229 jNumberFieldBCWidth.setDecimals(0); 3230 } catch (java.beans.PropertyVetoException e1) { 3231 e1.printStackTrace(); 3232 } 3233 try { 3234 jNumberFieldBCWidth.setInteger(true); 3235 } catch (java.beans.PropertyVetoException e1) { 3236 e1.printStackTrace(); 3237 } 3238 jNumberFieldBCWidth.setMinimumSize(new java.awt.Dimension (45, 20)); 3239 jNumberFieldBCWidth.setPreferredSize(new java.awt.Dimension (45, 20)); 3240 jNumberFieldBCWidth.addActionListener(new java.awt.event.ActionListener () { 3241 public void actionPerformed(java.awt.event.ActionEvent evt) { 3242 jNumberFieldBCHeightjNumberFieldTopActionPerformed1(evt); 3243 } 3244 }); 3245 3246 gridBagConstraints = new java.awt.GridBagConstraints (); 3247 gridBagConstraints.gridx = 1; 3248 gridBagConstraints.gridy = 0; 3249 gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST; 3250 gridBagConstraints.insets = new java.awt.Insets (2, 5, 2, 0); 3251 jPanel22.add(jNumberFieldBCWidth, gridBagConstraints); 3252 3253 jNumberFieldBCHeight.setHorizontalAlignment(javax.swing.JTextField.RIGHT); 3254 jNumberFieldBCHeight.setText("0"); 3255 jNumberFieldBCHeight.setToolTipText("Sets the desired height for the bars in the barcode (in pixels)"); 3256 try { 3257 jNumberFieldBCHeight.setDecimals(0); 3258 } catch (java.beans.PropertyVetoException e1) { 3259 e1.printStackTrace(); 3260 } 3261 try { 3262 jNumberFieldBCHeight.setInteger(true); 3263 } catch (java.beans.PropertyVetoException e1) { 3264 e1.printStackTrace(); 3265 } 3266 jNumberFieldBCHeight.setMinimumSize(new java.awt.Dimension (45, 20)); 3267 jNumberFieldBCHeight.setPreferredSize(new java.awt.Dimension (45, 20)); 3268 jNumberFieldBCHeight.addActionListener(new java.awt.event.ActionListener () { 3269 public void actionPerformed(java.awt.event.ActionEvent evt) { 3270 jNumberFieldTopActionPerformed1(evt); 3271 } 3272 }); 3273 3274 gridBagConstraints = new java.awt.GridBagConstraints (); 3275 gridBagConstraints.gridx = 5; 3276 gridBagConstraints.gridy = 0; 3277 gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST; 3278 gridBagConstraints.insets = new java.awt.Insets (2, 5, 2, 8); 3279 jPanel22.add(jNumberFieldBCHeight, gridBagConstraints); 3280 3281 gridBagConstraints = new java.awt.GridBagConstraints (); 3282 gridBagConstraints.gridy = 10; 3283 gridBagConstraints.gridwidth = 3; 3284 gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; 3285 jPanelBarcode.add(jPanel22, gridBagConstraints); 3286 3287 jBarcodeExpressionAreaAppIdentifier.setBorder(javax.swing.BorderFactory.createEtchedBorder()); 3288 jBarcodeExpressionAreaAppIdentifier.setAutoscrolls(true); 3289 jBarcodeExpressionAreaAppIdentifier.setElectricScroll(0); 3290 jBarcodeExpressionAreaAppIdentifier.setMinimumSize(new java.awt.Dimension (0, 21)); 3291 jBarcodeExpressionAreaAppIdentifier.setPreferredSize(new java.awt.Dimension (0, 0)); 3292 gridBagConstraints = new java.awt.GridBagConstraints (); 3293 gridBagConstraints.gridx = 0; 3294 gridBagConstraints.gridy = 12; 3295 gridBagConstraints.gridwidth = 3; 3296 gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH; 3297 gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST; 3298 gridBagConstraints.weightx = 1.0; 3299 gridBagConstraints.weighty = 0.3; 3300 gridBagConstraints.insets = new java.awt.Insets (2, 8, 6, 6); 3301 jPanelBarcode.add(jBarcodeExpressionAreaAppIdentifier, gridBagConstraints); 3302 3303 jLabel59.setHorizontalAlignment(javax.swing.SwingConstants.LEFT); 3304 jLabel59.setText("Application identifier"); 3305 gridBagConstraints = new java.awt.GridBagConstraints (); 3306 gridBagConstraints.gridx = 0; 3307 gridBagConstraints.gridy = 11; 3308 gridBagConstraints.gridwidth = 2; 3309 gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST; 3310 gridBagConstraints.insets = new java.awt.Insets (2, 8, 0, 0); 3311 jPanelBarcode.add(jLabel59, gridBagConstraints); 3312 3313 jPanel23.setLayout(new java.awt.GridBagLayout ()); 3314 3315 jCheckBoxBarcodeCheckSum.setText("Checksum"); 3316 jCheckBoxBarcodeCheckSum.addActionListener(new java.awt.event.ActionListener () { 3317 public void actionPerformed(java.awt.event.ActionEvent evt) { 3318 BarcodeActionPerformed(evt); 3319 } 3320 }); 3321 3322 gridBagConstraints = new java.awt.GridBagConstraints (); 3323 gridBagConstraints.gridx = 1; 3324 gridBagConstraints.gridy = 1; 3325 gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; 3326 gridBagConstraints.insets = new java.awt.Insets (2, 8, 0, 0); 3327 jPanel23.add(jCheckBoxBarcodeCheckSum, gridBagConstraints); 3328 3329 jCheckBoxBarcodeShowText.setText("Show Text"); 3330 jCheckBoxBarcodeShowText.addActionListener(new java.awt.event.ActionListener () { 3331 public void actionPerformed(java.awt.event.ActionEvent evt) { 3332 BarcodeActionPerformed(evt); 3333 } 3334 }); 3335 3336 gridBagConstraints = new java.awt.GridBagConstraints (); 3337 gridBagConstraints.gridx = 2; 3338 gridBagConstraints.gridy = 1; 3339 gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; 3340 gridBagConstraints.insets = new java.awt.Insets (2, 8, 0, 0); 3341 jPanel23.add(jCheckBoxBarcodeShowText, gridBagConstraints); 3342 3343 gridBagConstraints = new java.awt.GridBagConstraints (); 3344 gridBagConstraints.gridx = 1; 3345 gridBagConstraints.gridy = 1; 3346 gridBagConstraints.weightx = 0.5; 3347 jPanelBarcode.add(jPanel23, gridBagConstraints); 3348 3349 jTabbedPane.addTab("Barcode", jPanelBarcode); 3350 3351 jPanelChart.setLayout(new java.awt.GridBagLayout ()); 3352 3353 jPanelChart.add(jSeparator6, new java.awt.GridBagConstraints ()); 3354 3355 jSeparator9.setMinimumSize(new java.awt.Dimension (300, 2)); 3356 jSeparator9.setPreferredSize(new java.awt.Dimension (300, 2)); 3357 gridBagConstraints = new java.awt.GridBagConstraints (); 3358 gridBagConstraints.gridx = 0; 3359 gridBagConstraints.gridy = 9; 3360 gridBagConstraints.gridwidth = 2; 3361 gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST; 3362 gridBagConstraints.insets = new java.awt.Insets (5, 6, 0, 6); 3363 jPanelChart.add(jSeparator9, gridBagConstraints); 3364 3365 jLabel44.setText("Evaluation time"); 3366 gridBagConstraints = new java.awt.GridBagConstraints (); 3367 gridBagConstraints.gridx = 0; 3368 gridBagConstraints.gridy = 10; 3369 gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; 3370 gridBagConstraints.insets = new java.awt.Insets (1, 8, 0, 0); 3371 jPanelChart.add(jLabel44, gridBagConstraints); 3372 3373 jComboBoxEvaluationTime1.setMinimumSize(new java.awt.Dimension (150, 20)); 3374 jComboBoxEvaluationTime1.setPreferredSize(new java.awt.Dimension (150, 20)); 3375 jComboBoxEvaluationTime1.addActionListener(new java.awt.event.ActionListener () { 3376 public void actionPerformed(java.awt.event.ActionEvent evt) { 3377 jComboBoxEvaluationTime1ActionPerformed(evt); 3378 } 3379 }); 3380 3381 gridBagConstraints = new java.awt.GridBagConstraints (); 3382 gridBagConstraints.gridx = 0; 3383 gridBagConstraints.gridy = 11; 3384 gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; 3385 gridBagConstraints.insets = new java.awt.Insets (1, 6, 6, 0); 3386 jPanelChart.add(jComboBoxEvaluationTime1, gridBagConstraints); 3387 3388 jLabel45.setText("Evaluation group"); 3389 gridBagConstraints = new java.awt.GridBagConstraints (); 3390 gridBagConstraints.gridx = 1; 3391 gridBagConstraints.gridy = 10; 3392 gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST; 3393 gridBagConstraints.insets = new java.awt.Insets (1, 8, 0, 0); 3394 jPanelChart.add(jLabel45, gridBagConstraints); 3395 3396 jComboBoxImageGroup1.setMinimumSize(new java.awt.Dimension (150, 20)); 3397 jComboBoxImageGroup1.setPreferredSize(new java.awt.Dimension (150, 20)); 3398 jComboBoxImageGroup1.addActionListener(new java.awt.event.ActionListener () { 3399 public void actionPerformed(java.awt.event.ActionEvent evt) { 3400 jComboBoxImageGroup1ActionPerformed(evt); 3401 } 3402 }); 3403 3404 gridBagConstraints = new java.awt.GridBagConstraints (); 3405 gridBagConstraints.gridx = 1; 3406 gridBagConstraints.gridy = 11; 3407 gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; 3408 gridBagConstraints.insets = new java.awt.Insets (1, 6, 6, 6); 3409 jPanelChart.add(jComboBoxImageGroup1, gridBagConstraints); 3410 3411 gridBagConstraints = new java.awt.GridBagConstraints (); 3412 gridBagConstraints.gridx = 0; 3413 gridBagConstraints.gridy = 12; 3414 gridBagConstraints.gridwidth = 3; 3415 gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH; 3416 gridBagConstraints.weightx = 1.0; 3417 gridBagConstraints.weighty = 1.0; 3418 jPanelChart.add(jPanel9, gridBagConstraints); 3419 3420 jButton1.setLabel("Edit chart properties"); 3421 jButton1.addActionListener(new java.awt.event.ActionListener () { 3422 public void actionPerformed(java.awt.event.ActionEvent evt) { 3423 jButton1ActionPerformed(evt); 3424 } 3425 }); 3426 3427 gridBagConstraints = new java.awt.GridBagConstraints (); 3428 gridBagConstraints.gridx = 0; 3429 gridBagConstraints.gridy = 0; 3430 gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; 3431 gridBagConstraints.insets = new java.awt.Insets (4, 4, 0, 0); 3432 jPanelChart.add(jButton1, gridBagConstraints); 3433 3434 jTabbedPane.addTab("Chart", jPanelChart); 3435 3436 jPanelBorder.setLayout(new java.awt.GridBagLayout ()); 3437 3438 jTabbedPane.addTab("Border", jPanelBorder); 3439 3440 jPanelSheet.setLayout(new java.awt.GridBagLayout ()); 3441 3442 jTabbedPane.addTab("All", jPanelSheet); 3443 3444 jPanelCrosstab.setLayout(new java.awt.GridBagLayout ()); 3445 3446 jLabel51.setHorizontalAlignment(javax.swing.SwingConstants.LEFT); 3447 jLabel51.setText("Parameters Map Expression"); 3448 gridBagConstraints = new java.awt.GridBagConstraints (); 3449 gridBagConstraints.gridx = 0; 3450 gridBagConstraints.gridy = 11; 3451 gridBagConstraints.gridwidth = 3; 3452 gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST; 3453 gridBagConstraints.insets = new java.awt.Insets (6, 8, 0, 0); 3454 jPanelCrosstab.add(jLabel51, gridBagConstraints); 3455 3456 jRTextExpressionAreaCrosstabParametersMapExpression.setBorder(javax.swing.BorderFactory.createEtchedBorder()); 3457 jRTextExpressionAreaCrosstabParametersMapExpression.setElectricScroll(0); 3458 jRTextExpressionAreaCrosstabParametersMapExpression.setMinimumSize(new java.awt.Dimension (0, 0)); 3459 jRTextExpressionAreaCrosstabParametersMapExpression.setPreferredSize(new java.awt.Dimension (300, 50)); 3460 gridBagConstraints = new java.awt.GridBagConstraints (); 3461 gridBagConstraints.gridx = 0; 3462 gridBagConstraints.gridy = 12; 3463 gridBagConstraints.gridwidth = 3; 3464 gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH; 3465 gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST; 3466 gridBagConstraints.weightx = 1.0; 3467 gridBagConstraints.weighty = 0.5; 3468 gridBagConstraints.insets = new java.awt.Insets (2, 6, 8, 6); 3469 jPanelCrosstab.add(jRTextExpressionAreaCrosstabParametersMapExpression, gridBagConstraints); 3470 3471 jPanel18.setLayout(new java.awt.GridBagLayout ()); 3472 3473 jScrollPane4.setMinimumSize(new java.awt.Dimension (300, 50)); 3474 jScrollPane4.setPreferredSize(new java.awt.Dimension (300, 50)); 3475 jTableCrosstabParameters.setModel(new javax.swing.table.DefaultTableModel ( 3476 new Object [][] { 3477 3478 }, 3479 new String [] { 3480 "Parameter", "Expression" 3481 } 3482 ) { 3483 boolean[] canEdit = new boolean [] { 3484 false, false 3485 }; 3486 3487 public boolean isCellEditable(int rowIndex, int columnIndex) { 3488 return canEdit [columnIndex]; 3489 } 3490 }); 3491 jTableCrosstabParameters.addMouseListener(new java.awt.event.MouseAdapter () { 3492 public void mouseClicked(java.awt.event.MouseEvent evt) { 3493 jTableCrosstabParametersMouseClicked(evt); 3494 } 3495 }); 3496 3497 jScrollPane4.setViewportView(jTableCrosstabParameters); 3498 3499 gridBagConstraints = new java.awt.GridBagConstraints (); 3500 gridBagConstraints.gridx = 0; 3501 gridBagConstraints.gridy = 7; 3502 gridBagConstraints.gridwidth = 3; 3503 gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH; 3504 gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST; 3505 gridBagConstraints.weightx = 1.0; 3506 gridBagConstraints.weighty = 1.0; 3507 gridBagConstraints.insets = new java.awt.Insets (2, 6, 0, 6); 3508 jPanel18.add(jScrollPane4, gridBagConstraints); 3509 3510 jPanel19.setLayout(new java.awt.GridBagLayout ()); 3511 3512 jButtonAddCrosstabParameter.setText("Add"); 3513 jButtonAddCrosstabParameter.addActionListener(new java.awt.event.ActionListener () { 3514 public void actionPerformed(java.awt.event.ActionEvent evt) { 3515 jButtonAddCrosstabParameterActionPerformed(evt); 3516 } 3517 }); 3518 3519 gridBagConstraints = new java.awt.GridBagConstraints (); 3520 gridBagConstraints.gridx = 0; 3521 gridBagConstraints.gridy = 0; 3522 gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST; 3523 gridBagConstraints.insets = new java.awt.Insets (4, 0, 6, 0); 3524 jPanel19.add(jButtonAddCrosstabParameter, gridBagConstraints); 3525 3526 jButtonModCrosstabParameter.setText("Modify"); 3527 jButtonModCrosstabParameter.setEnabled(false); 3528 jButtonModCrosstabParameter.addActionListener(new java.awt.event.ActionListener () { 3529 public void actionPerformed(java.awt.event.ActionEvent evt) { 3530 jButtonModCrosstabParameterActionPerformed(evt); 3531 } 3532 }); 3533 3534 gridBagConstraints = new java.awt.GridBagConstraints (); 3535 gridBagConstraints.gridx = 1; 3536 gridBagConstraints.gridy = 0; 3537 gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST; 3538 gridBagConstraints.insets = new java.awt.Insets (4, 6, 6, 0); 3539 jPanel19.add(jButtonModCrosstabParameter, gridBagConstraints); 3540 3541 jButtonRemCrosstabParameter.setText("Remove"); 3542 jButtonRemCrosstabParameter.setEnabled(false); 3543 jButtonRemCrosstabParameter.addActionListener(new java.awt.event.ActionListener () { 3544 public void actionPerformed(java.awt.event.ActionEvent evt) { 3545 jButtonRemCrosstabParameterActionPerformed(evt); 3546 } 3547 }); 3548 3549 gridBagConstraints = new java.awt.GridBagConstraints (); 3550 gridBagConstraints.gridx = 2; 3551 gridBagConstraints.gridy = 0; 3552 gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST; 3553 gridBagConstraints.insets = new java.awt.Insets (4, 6, 6, 0); 3554 jPanel19.add(jButtonRemCrosstabParameter, gridBagConstraints); 3555 3556 gridBagConstraints = new java.awt.GridBagConstraints (); 3557 gridBagConstraints.gridx = 4; 3558 gridBagConstraints.weightx = 1.0; 3559 jPanel19.add(jPanel20, gridBagConstraints); 3560 3561 gridBagConstraints = new java.awt.GridBagConstraints (); 3562 gridBagConstraints.gridy = 9; 3563 gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; 3564 gridBagConstraints.weightx = 1.0; 3565 gridBagConstraints.insets = new java.awt.Insets (0, 6, 0, 6); 3566 jPanel18.add(jPanel19, gridBagConstraints); 3567 3568 gridBagConstraints = new java.awt.GridBagConstraints (); 3569 gridBagConstraints.gridy = 9; 3570 gridBagConstraints.gridwidth = 3; 3571 gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH; 3572 gridBagConstraints.weightx = 1.0; 3573 gridBagConstraints.weighty = 1.0; 3574 jPanelCrosstab.add(jPanel18, gridBagConstraints); 3575 3576 jLabel52.setHorizontalAlignment(javax.swing.SwingConstants.LEFT); 3577 jLabel52.setText("Crosstab parameters"); 3578 gridBagConstraints = new java.awt.GridBagConstraints (); 3579 gridBagConstraints.gridx = 0; 3580 gridBagConstraints.gridy = 8; 3581 gridBagConstraints.gridwidth = 3; 3582 gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST; 3583 gridBagConstraints.insets = new java.awt.Insets (6, 8, 0, 0); 3584 jPanelCrosstab.add(jLabel52, gridBagConstraints); 3585 3586 jCheckBoxRepeatColumnHeaders.setText("Repeat column headers"); 3587 jCheckBoxRepeatColumnHeaders.setBorder(javax.swing.BorderFactory.createEmptyBorder(0, 0, 0, 0)); 3588 jCheckBoxRepeatColumnHeaders.setMargin(new java.awt.Insets (0, 0, 0, 0)); 3589 jCheckBoxRepeatColumnHeaders.setMaximumSize(new java.awt.Dimension (300, 15)); 3590 jCheckBoxRepeatColumnHeaders.setMinimumSize(new java.awt.Dimension (150, 15)); 3591 jCheckBoxRepeatColumnHeaders.setPreferredSize(new java.awt.Dimension (150, 15)); 3592 jCheckBoxRepeatColumnHeaders.addActionListener(new java.awt.event.ActionListener () { 3593 public void actionPerformed(java.awt.event.ActionEvent evt) { 3594 jCheckBoxRepeatColumnHeadersActionPerformed(evt); 3595 } 3596 }); 3597 3598 gridBagConstraints = new java.awt.GridBagConstraints (); 3599 gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; 3600 gridBagConstraints.insets = new java.awt.Insets (8, 6, 0, 0); 3601 jPanelCrosstab.add(jCheckBoxRepeatColumnHeaders, gridBagConstraints); 3602 3603 jCheckBoxRepeatRowHeaders.setText("Repeat row headers"); 3604 jCheckBoxRepeatRowHeaders.setBorder(javax.swing.BorderFactory.createEmptyBorder(0, 0, 0, 0)); 3605 jCheckBoxRepeatRowHeaders.setMargin(new java.awt.Insets (0, 0, 0, 0)); 3606 jCheckBoxRepeatRowHeaders.setMaximumSize(new java.awt.Dimension (150, 15)); 3607 jCheckBoxRepeatRowHeaders.setMinimumSize(new java.awt.Dimension (150, 15)); 3608 jCheckBoxRepeatRowHeaders.setPreferredSize(new java.awt.Dimension (150, 15)); 3609 jCheckBoxRepeatRowHeaders.addActionListener(new java.awt.event.ActionListener () { 3610 public void actionPerformed(java.awt.event.ActionEvent evt) { 3611 jCheckBoxRepeatRowHeadersActionPerformed(evt); 3612 } 3613 }); 3614 3615 gridBagConstraints = new java.awt.GridBagConstraints (); 3616 gridBagConstraints.gridy = 2; 3617 gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; 3618 gridBagConstraints.insets = new java.awt.Insets (4, 6, 0, 0); 3619 jPanelCrosstab.add(jCheckBoxRepeatRowHeaders, gridBagConstraints); 3620 3621 jButton2.setText("Edit crosstab properties"); 3622 jButton2.addActionListener(new java.awt.event.ActionListener () { 3623 public void actionPerformed(java.awt.event.ActionEvent evt) { 3624 jButton2ActionPerformed(evt); 3625 } 3626 }); 3627 3628 gridBagConstraints = new java.awt.GridBagConstraints (); 3629 gridBagConstraints.gridx = 1; 3630 gridBagConstraints.gridy = 2; 3631 gridBagConstraints.anchor = java.awt.GridBagConstraints.EAST; 3632 gridBagConstraints.insets = new java.awt.Insets (4, 20, 0, 6); 3633 jPanelCrosstab.add(jButton2, gridBagConstraints); 3634 3635 jPanel21.setLayout(new java.awt.GridBagLayout ()); 3636 3637 jNumberFieldColumnBreakOffset.setHorizontalAlignment(javax.swing.JTextField.RIGHT); 3638 jNumberFieldColumnBreakOffset.setText("0"); 3639 try { 3640 jNumberFieldColumnBreakOffset.setDecimals(0); 3641 } catch (java.beans.PropertyVetoException e1) { 3642 e1.printStackTrace(); 3643 } 3644 try { 3645 jNumberFieldColumnBreakOffset.setInteger(true); 3646 } catch (java.beans.PropertyVetoException e1) { 3647 e1.printStackTrace(); 3648 } 3649 jNumberFieldColumnBreakOffset.setMinimumSize(new java.awt.Dimension (45, 20)); 3650 jNumberFieldColumnBreakOffset.setPreferredSize(new java.awt.Dimension (45, 20)); 3651 jNumberFieldColumnBreakOffset.addActionListener(new java.awt.event.ActionListener () { 3652 public void actionPerformed(java.awt.event.ActionEvent evt) { 3653 jNumberFieldColumnBreakOffsetActionPerformed(evt); 3654 } 3655 }); 3656 3657 gridBagConstraints = new java.awt.GridBagConstraints (); 3658 gridBagConstraints.gridx = 2; 3659 gridBagConstraints.gridy = 0; 3660 gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST; 3661 gridBagConstraints.weightx = 1.0; 3662 gridBagConstraints.insets = new java.awt.Insets (8, 5, 0, 6); 3663 jPanel21.add(jNumberFieldColumnBreakOffset, gridBagConstraints); 3664 3665 jLabel53.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT); 3666 jLabel53.setText("Column break offset"); 3667 jLabel53.setMaximumSize(new java.awt.Dimension (200, 15)); 3668 jLabel53.setMinimumSize(new java.awt.Dimension (110, 15)); 3669 jLabel53.setPreferredSize(new java.awt.Dimension (130, 15)); 3670 gridBagConstraints = new java.awt.GridBagConstraints (); 3671 gridBagConstraints.gridx = 1; 3672 gridBagConstraints.gridy = 0; 3673 gridBagConstraints.anchor = java.awt.GridBagConstraints.EAST; 3674 gridBagConstraints.insets = new java.awt.Insets (8, 20, 0, 0); 3675 jPanel21.add(jLabel53, gridBagConstraints); 3676 3677 jPanelCrosstab.add(jPanel21, new java.awt.GridBagConstraints ()); 3678 3679 jTabbedPane.addTab("Crosstab", jPanelCrosstab); 3680 3681 getContentPane().add(jTabbedPane, java.awt.BorderLayout.CENTER); 3682 3683 java.awt.Dimension screenSize = java.awt.Toolkit.getDefaultToolkit().getScreenSize(); 3684 setBounds((screenSize.width-442)/2, (screenSize.height-408)/2, 442, 408); 3685 } 3687 private void jTableLinkParametersMouseClicked(java.awt.event.MouseEvent evt) { if (evt.getClickCount() == 2 && evt.getButton() == evt.BUTTON1) { 3689 if (jTableLinkParameters.getSelectedRowCount() > 0) { 3690 jButtonModLinkParameterActionPerformed(null); 3691 } 3692 } 3693 } 3695 private void jButtonRemLinkParameterActionPerformed(java.awt.event.ActionEvent evt) { if (this.isInit()) return; 3697 3698 if (jrf == null || getElementSelection().size()==0) return; 3699 3700 Enumeration e = getElementSelection().elements(); 3701 HyperLinkableReportElement element = (HyperLinkableReportElement)e.nextElement(); 3702 3703 javax.swing.table.DefaultTableModel dtm = (javax.swing.table.DefaultTableModel )jTableLinkParameters.getModel(); 3704 int[] rows= jTableLinkParameters.getSelectedRows(); 3705 for (int i=rows.length-1; i>=0; --i) { 3706 element.getLinkParameters().remove( jTableLinkParameters.getValueAt( rows[i], 0) ); 3707 dtm.removeRow(rows[i]); 3708 } 3709 3710 } 3712 private void jButtonModLinkParameterActionPerformed(java.awt.event.ActionEvent evt) { if (this.isInit()) return; 3714 3715 if (jrf == null || getElementSelection().size()==0) return; 3716 3717 Enumeration e = getElementSelection().elements(); 3718 HyperLinkableReportElement element = (HyperLinkableReportElement)e.nextElement(); 3719 3720 JRLinkParameter parameter = (JRLinkParameter)jTableLinkParameters.getValueAt( jTableLinkParameters.getSelectedRow(), 0); 3721 3722 JRLinkParameterDialog jrpd = new JRLinkParameterDialog(this, true); 3723 jrpd.setParameter( parameter ); 3724 jrpd.setVisible(true); 3725 3726 if (jrpd.getDialogResult() == javax.swing.JOptionPane.OK_OPTION) { 3727 parameter.setName( jrpd.getParameter().getName() ); 3728 parameter.setExpression( jrpd.getParameter().getExpression()); 3729 javax.swing.table.DefaultTableModel dtm = (javax.swing.table.DefaultTableModel )jTableLinkParameters.getModel(); 3730 dtm.setRowCount(0); 3731 3732 java.util.Iterator enum_parameters = element.getLinkParameters().iterator(); 3733 while (enum_parameters.hasNext()) { 3734 it.businesslogic.ireport.JRLinkParameter parameter2 = (it.businesslogic.ireport.JRLinkParameter)enum_parameters.next(); 3735 Vector row = new Vector(); 3736 row.addElement(parameter2); 3737 row.addElement(parameter2.getExpression()); 3738 dtm.addRow(row); 3739 } 3740 } 3741 } 3743 private void jButtonAddLinkParameterActionPerformed(java.awt.event.ActionEvent evt) { if (this.isInit()) return; 3745 3746 if (jrf == null || getElementSelection().size()==0) return; 3747 Enumeration e = getElementSelection().elements(); 3749 HyperLinkableReportElement element = (HyperLinkableReportElement)e.nextElement(); 3750 3751 JRLinkParameterDialog jrpd = new JRLinkParameterDialog(this, true); 3752 jrpd.setVisible(true); 3753 3754 if (jrpd.getDialogResult() == javax.swing.JOptionPane.OK_OPTION) { 3755 it.businesslogic.ireport.JRLinkParameter parameter = jrpd.getParameter(); 3756 element.getLinkParameters().add( parameter ); 3757 javax.swing.table.DefaultTableModel dtm = (javax.swing.table.DefaultTableModel )jTableLinkParameters.getModel(); 3758 dtm.addRow(new Object []{parameter, parameter.getExpression()}); 3759 } 3760 } 3762 private void jButtonCopyParamsFromMasterActionPerformed(java.awt.event.ActionEvent evt) { if (this.isInit()) return; 3764 3765 if (jrf == null || getElementSelection().size()==0) return; 3766 Enumeration e = getElementSelection().elements(); 3768 SubReportElement element = (SubReportElement)e.nextElement(); 3769 3770 javax.swing.table.DefaultTableModel dtm = (javax.swing.table.DefaultTableModel )jTableSubreportParameters.getModel(); 3771 3772 Vector parameters = jrf.getReport().getParameters(); 3773 3774 for (int i=0; i<parameters.size(); ++i) { 3775 JRParameter jrParameter = (JRParameter)parameters.get(i); 3776 if (jrParameter.isBuiltin()) continue; 3777 3778 boolean found = false; 3780 for (int k=0; k<element.getSubreportParameters().size(); ++k) { 3781 JRSubreportParameter sp = (JRSubreportParameter)element.getSubreportParameters().get(k); 3782 if (sp.getName().equals( jrParameter.getName())) { 3783 found = true; 3784 break; 3785 } 3786 } 3787 3788 if (!found) { 3789 JRSubreportParameter parameter = new JRSubreportParameter(jrParameter.getName(), "$P{" + jrParameter.getName() + "}"); 3790 element.getSubreportParameters().addElement( parameter ); 3791 dtm.addRow(new Object []{parameter, parameter.getExpression()}); 3792 } 3793 3794 } 3795 3796 } 3798 private void jNumberFieldBCHeightjNumberFieldTopActionPerformed1(java.awt.event.ActionEvent evt) { if (jrf == null || getElementSelection().size()==0) return; 3800 Enumeration e = getElementSelection().elements(); 3802 while (e.hasMoreElements()) { 3803 BarcodeReportElement element = (BarcodeReportElement)e.nextElement(); 3804 element.setImageWidth((int)jNumberFieldBCWidth.getValue() ); 3807 } 3808 repaintEditor(); 3809 3810 jrf.fireReportListenerReportElementsChanged(new ReportElementChangedEvent(jrf , getElementSelection() , ReportElementChangedEvent.CHANGED)); 3811 3812 } 3814 private void jNumberFieldTopActionPerformed1(java.awt.event.ActionEvent evt) { if (jrf == null || getElementSelection().size()==0) return; 3816 Enumeration e = getElementSelection().elements(); 3818 while (e.hasMoreElements()) { 3819 BarcodeReportElement element = (BarcodeReportElement)e.nextElement(); 3820 element.setImageHeight((int)jNumberFieldBCHeight.getValue() ); 3823 } 3824 repaintEditor(); 3825 3826 jrf.fireReportListenerReportElementsChanged(new ReportElementChangedEvent(jrf , getElementSelection() , ReportElementChangedEvent.CHANGED)); 3827 3828 } 3830 private void jComboBoxHorizontalAlignmentActionPerformed1(java.awt.event.ActionEvent evt) { if (this.isInit()) return; 3832 3833 if (jrf == null || getElementSelection().size()==0 || Misc.getComboboxSelectedValue(jComboBoxHorizontalAlignment1) == null || (Misc.getComboboxSelectedValue(jComboBoxHorizontalAlignment1)+"").equals("")) return; 3835 Enumeration e = getElementSelection().elements(); 3837 while (e.hasMoreElements()) { 3838 ImageReportElement element = (ImageReportElement)e.nextElement(); 3839 element.setHorizontalAlignment(""+ Misc.getComboboxSelectedValue(jComboBoxHorizontalAlignment1)); 3840 } 3841 3842 this.jComboBoxHorizontalAlignment1.removeItem(""); 3843 repaintEditor(); 3844 3845 jrf.fireReportListenerReportElementsChanged(new ReportElementChangedEvent(jrf , getElementSelection() , ReportElementChangedEvent.CHANGED)); 3846 3847 } 3849 private void jComboBoxVerticalAlignmentActionPerformed1(java.awt.event.ActionEvent evt) { if (this.isInit()) return; 3851 3852 if (jrf == null || getElementSelection().size()==0 || Misc.getComboboxSelectedValue(jComboBoxVerticalAlignment1) == null || (Misc.getComboboxSelectedValue(jComboBoxVerticalAlignment1)+"").equals("")) return; 3854 Enumeration e = getElementSelection().elements(); 3856 while (e.hasMoreElements()) { 3857 ImageReportElement element = (ImageReportElement)e.nextElement(); 3858 element.setVerticalAlignment(""+ Misc.getComboboxSelectedValue(jComboBoxVerticalAlignment1)); 3859 } 3860 3861 this.jComboBoxVerticalAlignment1.removeItem(""); 3862 repaintEditor(); 3863 3864 jrf.fireReportListenerReportElementsChanged(new ReportElementChangedEvent(jrf , getElementSelection() , ReportElementChangedEvent.CHANGED)); 3865 3866 } 3868 private void jComboBoxScaleActionPerformed1(java.awt.event.ActionEvent evt) { if (this.isInit()) return; 3870 3871 if (jrf == null || getElementSelection().size()==0 || Misc.getComboboxSelectedValue( jComboBoxScale1 ) == null || (Misc.getComboboxSelectedValue( jComboBoxScale1 )+"").equals("")) return; 3873 Enumeration e = getElementSelection().elements(); 3875 while (e.hasMoreElements()) { 3876 ImageReportElement element = (ImageReportElement)e.nextElement(); 3877 element.setScaleImage(""+ Misc.getComboboxSelectedValue( jComboBoxScale1 )); 3878 } 3879 3880 this.jComboBoxScale1.removeItem(""); 3881 repaintEditor(); 3882 3883 jrf.fireReportListenerReportElementsChanged(new ReportElementChangedEvent(jrf , getElementSelection() , ReportElementChangedEvent.CHANGED)); 3884 3885 } 3887 private void jComboBoxImageOnErrorActionPerformed1(java.awt.event.ActionEvent evt) { if (this.isInit()) return; 3889 3890 if (jrf == null || getElementSelection().size()==0 || Misc.getComboboxSelectedValue(jComboBoxImageOnError1) == null || (Misc.getComboboxSelectedValue(jComboBoxImageOnError1)+"").equals("")) return; 3892 Enumeration e = getElementSelection().elements(); 3894 while (e.hasMoreElements()) { 3895 ImageReportElement element = (ImageReportElement)e.nextElement(); 3896 element.setOnErrorType(""+ Misc.getComboboxSelectedValue(jComboBoxImageOnError1)); 3897 } 3898 3899 this.jComboBoxImageOnError1.removeItem(""); 3900 3901 jrf.fireReportListenerReportElementsChanged(new ReportElementChangedEvent(jrf , getElementSelection() , ReportElementChangedEvent.CHANGED)); 3902 3903 } 3905 private void jButton2ActionPerformed(java.awt.event.ActionEvent evt) { 3907 if (this.isInit()) return; 3908 3909 if (jrf == null || getElementSelection().size()==0) return; 3910 if (getElementSelection().size() > 0) { 3911 ReportElement re = (ReportElement)getElementSelection().elementAt(0); 3912 3913 if (re instanceof CrosstabReportElement ) { 3914 it.businesslogic.ireport.crosstab.gui.CrosstabPropertiesDialog cpd = new it.businesslogic.ireport.crosstab.gui.CrosstabPropertiesDialog(MainFrame.getMainInstance(),true); 3915 cpd.setCurrentCrosstabReportElement( (CrosstabReportElement)re); 3916 cpd.setVisible(true); 3917 } 3918 } 3919 3920 } 3922 private void jTableCrosstabParametersMouseClicked(java.awt.event.MouseEvent evt) { if (evt.getClickCount() == 2 && evt.getButton() == evt.BUTTON1) { 3924 if (jTableCrosstabParameters.getSelectedRowCount() > 0) { 3925 jButtonModCrosstabParameterActionPerformed(null); 3926 } 3927 } 3928 } 3930 private void jButtonRemCrosstabParameterActionPerformed(java.awt.event.ActionEvent evt) { if (this.isInit()) return; 3932 3933 if (jrf == null || getElementSelection().size()==0) return; 3934 3935 Enumeration e = getElementSelection().elements(); 3936 CrosstabReportElement element = (CrosstabReportElement)e.nextElement(); 3937 3938 jTableCrosstabParameters.getSelectedRows(); 3939 int[] rows= jTableCrosstabParameters.getSelectedRows(); 3940 while (jTableCrosstabParameters.getSelectedRowCount() > 0) { 3941 int i = jTableCrosstabParameters.getSelectedRow(); 3942 element.getCrosstabParameters().removeElement( jTableCrosstabParameters.getValueAt( i, 0) ); 3943 ((javax.swing.table.DefaultTableModel )jTableCrosstabParameters.getModel()).removeRow(i); 3944 3945 } 3946 jTableCrosstabParameters.updateUI(); 3947 jrf.fireReportListenerReportElementsChanged(new ReportElementChangedEvent(jrf , getElementSelection() , ReportElementChangedEvent.CHANGED)); 3948 3949 3950 } 3952 private void jButtonModCrosstabParameterActionPerformed(java.awt.event.ActionEvent evt) { if (this.isInit()) return; 3954 3955 if (jrf == null || getElementSelection().size()==0) return; 3956 3957 Enumeration e = getElementSelection().elements(); 3958 CrosstabReportElement element = (CrosstabReportElement)e.nextElement(); 3959 3960 it.businesslogic.ireport.crosstab.CrosstabParameter parameter = (it.businesslogic.ireport.crosstab.CrosstabParameter)jTableCrosstabParameters.getValueAt( jTableCrosstabParameters.getSelectedRow(), 0); 3961 3962 it.businesslogic.ireport.crosstab.gui.CrosstabParameterDialog jrpd = new it.businesslogic.ireport.crosstab.gui.CrosstabParameterDialog(this, true); 3963 jrpd.setParameter( parameter ); 3964 jrpd.setVisible(true); 3965 3966 if (jrpd.getDialogResult() == javax.swing.JOptionPane.OK_OPTION) { 3967 parameter.setName( jrpd.getParameter().getName() ); 3968 parameter.setParameterValueExpression( jrpd.getParameter().getParameterValueExpression()); 3969 3970 jTableCrosstabParameters.setValueAt(parameter, jTableCrosstabParameters.getSelectedRow(), 0); 3971 jTableCrosstabParameters.setValueAt(parameter.getParameterValueExpression(), jTableCrosstabParameters.getSelectedRow(), 1); 3972 jTableCrosstabParameters.updateUI(); 3973 3974 jrf.fireReportListenerReportElementsChanged(new ReportElementChangedEvent(jrf , getElementSelection() , ReportElementChangedEvent.CHANGED)); 3975 3976 } 3977 3978 } 3980 private void jButtonAddCrosstabParameterActionPerformed(java.awt.event.ActionEvent evt) { if (this.isInit()) return; 3982 3983 if (jrf == null || getElementSelection().size()==0) return; 3984 Enumeration e = getElementSelection().elements(); 3986 CrosstabReportElement element = (CrosstabReportElement)e.nextElement(); 3987 3988 it.businesslogic.ireport.crosstab.gui.CrosstabParameterDialog jrpd = new it.businesslogic.ireport.crosstab.gui.CrosstabParameterDialog(this, true); 3989 jrpd.setVisible(true); 3990 3991 if (jrpd.getDialogResult() == javax.swing.JOptionPane.OK_OPTION) { 3992 it.businesslogic.ireport.crosstab.CrosstabParameter parameter = jrpd.getParameter(); 3993 element.getCrosstabParameters().addElement( parameter ); 3994 javax.swing.table.DefaultTableModel dtm = (javax.swing.table.DefaultTableModel )jTableCrosstabParameters.getModel(); 3995 dtm.addRow(new Object []{parameter, parameter.getParameterValueExpression()}); 3996 jTableCrosstabParameters.updateUI(); 3997 3998 jrf.fireReportListenerReportElementsChanged(new ReportElementChangedEvent(jrf , getElementSelection() , ReportElementChangedEvent.CHANGED)); 3999 4000 } 4001 } 4003 private void jNumberFieldColumnBreakOffsetActionPerformed(java.awt.event.ActionEvent evt) { if (jrf == null || getElementSelection().size()==0) return; 4005 Enumeration e = getElementSelection().elements(); 4007 4008 while (e.hasMoreElements()) { 4009 CrosstabReportElement element = (CrosstabReportElement)e.nextElement(); 4010 element.setColumnBreakOffset( (int)jNumberFieldColumnBreakOffset.getValue()); 4011 4012 } 4013 4014 jrf.fireReportListenerReportElementsChanged(new ReportElementChangedEvent(jrf , getElementSelection() , ReportElementChangedEvent.CHANGED)); 4015 4016 } 4018 private void jCheckBoxRepeatRowHeadersActionPerformed(java.awt.event.ActionEvent evt) { if (this.isInit()) return; 4020 4021 if (jrf == null || getElementSelection().size()==0) return; 4023 Enumeration e = getElementSelection().elements(); 4025 while (e.hasMoreElements()) { 4026 CrosstabReportElement element = (CrosstabReportElement)e.nextElement(); 4027 element.setRepeatRowHeaders(jCheckBoxRepeatRowHeaders.isSelected()); 4028 } 4029 4030 jrf.fireReportListenerReportElementsChanged(new ReportElementChangedEvent(jrf , getElementSelection() , ReportElementChangedEvent.CHANGED)); 4031 4032 } 4034 private void jCheckBoxRepeatColumnHeadersActionPerformed(java.awt.event.ActionEvent evt) { if (this.isInit()) return; 4036 4037 if (jrf == null || getElementSelection().size()==0) return; 4039 Enumeration e = getElementSelection().elements(); 4041 while (e.hasMoreElements()) { 4042 CrosstabReportElement element = (CrosstabReportElement)e.nextElement(); 4043 element.setRepeatColumnHeaders(jCheckBoxRepeatColumnHeaders.isSelected()); 4044 } 4045 4046 jrf.fireReportListenerReportElementsChanged(new ReportElementChangedEvent(jrf , getElementSelection() , ReportElementChangedEvent.CHANGED)); 4047 4048 } 4050 private void jComboBoxStyleActionPerformed(java.awt.event.ActionEvent evt) { 4052 if (this.isInit()) return; 4053 4054 Style s = null; 4056 if (jComboBoxStyle.getSelectedIndex() <= 0) { 4057 s = null; 4058 } else { 4059 s = (Style)jComboBoxStyle.getSelectedItem(); 4060 } 4061 4062 Enumeration e = getElementSelection().elements(); 4063 while (e.hasMoreElements()) { 4064 ReportElement element = (ReportElement)e.nextElement(); 4065 element.setStyle(s); 4066 4067 } 4068 4069 jrf.fireReportListenerReportElementsChanged(new ReportElementChangedEvent(jrf , getElementSelection() , ReportElementChangedEvent.CHANGED)); 4070 repaintEditor(); 4072 4073 4074 4075 } 4077 private void jTableSubreportReturnValuesMouseClicked(java.awt.event.MouseEvent evt) { 4079 if (evt.getClickCount() == 2 && evt.getButton() == evt.BUTTON1) { 4080 if (jTableSubreportReturnValues.getSelectedRowCount() > 0) { 4081 jButtonModReturnValueActionPerformed(null); 4082 } 4083 } 4084 4085 } 4087 private void jTableSubreportParametersMouseClicked(java.awt.event.MouseEvent evt) { if (evt.getClickCount() == 2 && evt.getButton() == evt.BUTTON1) { 4089 if (jTableSubreportParameters.getSelectedRowCount() > 0) { 4090 jButtonModParameterActionPerformed(null); 4091 } 4092 } 4093 } 4095 private void jComboBoxImageOnErrorActionPerformed(java.awt.event.ActionEvent evt) { if (this.isInit()) return; 4097 4098 if (jrf == null || getElementSelection().size()==0 || Misc.getComboboxSelectedValue(jComboBoxImageOnError) == null || (Misc.getComboboxSelectedValue(jComboBoxImageOnError)+"").equals("")) return; 4100 Enumeration e = getElementSelection().elements(); 4102 while (e.hasMoreElements()) { 4103 ImageReportElement element = (ImageReportElement)e.nextElement(); 4104 element.setOnErrorType(""+ Misc.getComboboxSelectedValue(jComboBoxImageOnError)); 4105 } 4106 4107 this.jComboBoxImageOnError.removeItem(""); 4108 jrf.fireReportListenerReportElementsChanged(new ReportElementChangedEvent(jrf , getElementSelection() , ReportElementChangedEvent.CHANGED)); 4109 4110 } 4112 private void jSpinnerBookmarkLevelStateChanged(javax.swing.event.ChangeEvent evt) { if (this.isInit()) return; 4114 4115 if (jrf == null || getElementSelection().size()==0 || jComboBoxLinkTarget.getSelectedItem() == null || (jComboBoxLinkTarget.getSelectedItem()+"").equals("")) return; 4116 Enumeration e = getElementSelection().elements(); 4117 while (e.hasMoreElements()) { 4118 HyperLinkableReportElement element = (HyperLinkableReportElement)e.nextElement(); 4119 element.setBookmarkLevel( ((Integer )jSpinnerBookmarkLevel.getValue()).intValue() ); 4120 } 4121 jrf.fireReportListenerReportElementsChanged(new ReportElementChangedEvent(jrf , getElementSelection() , ReportElementChangedEvent.CHANGED)); 4122 4123 } 4125 private void jButtonRemReturnValueActionPerformed(java.awt.event.ActionEvent evt) { if (this.isInit()) return; 4127 4128 if (jrf == null || getElementSelection().size()==0) return; 4129 4130 Enumeration e = getElementSelection().elements(); 4131 SubReportElement element = (SubReportElement)e.nextElement(); 4132 4133 4137 javax.swing.table.DefaultTableModel dtm = (javax.swing.table.DefaultTableModel )jTableSubreportReturnValues.getModel(); 4138 while (jTableSubreportReturnValues.getSelectedRow() >= 0 ) { 4139 element.getReturnValues().removeElement( jTableSubreportReturnValues.getValueAt( jTableSubreportReturnValues.getSelectedRow(), 0) ); 4140 dtm.removeRow( jTableSubreportReturnValues.getSelectedRow() ); 4141 } 4142 jrf.fireReportListenerReportElementsChanged(new ReportElementChangedEvent(jrf , getElementSelection() , ReportElementChangedEvent.CHANGED)); 4143 4144 } 4146 private void jButtonModReturnValueActionPerformed(java.awt.event.ActionEvent evt) { if (this.isInit()) return; 4148 4149 if (jrf == null || getElementSelection().size()==0) return; 4150 4151 Enumeration e = getElementSelection().elements(); 4152 SubReportElement element = (SubReportElement)e.nextElement(); 4153 4154 JRSubreportReturnValue returnValue = (JRSubreportReturnValue)jTableSubreportReturnValues.getValueAt( jTableSubreportReturnValues.getSelectedRow(), 0); 4155 4156 JRSubreportReturnValueDialog jrpd = new JRSubreportReturnValueDialog(this, true); 4157 jrpd.setSubreportReturnValue( returnValue ); 4158 jrpd.setVisible(true); 4159 4160 if (jrpd.getDialogResult() == javax.swing.JOptionPane.OK_OPTION) { 4161 returnValue.setSubreportVariable( jrpd.getSubreportReturnValue().getSubreportVariable() ); 4162 returnValue.setToVariable( jrpd.getSubreportReturnValue().getToVariable() ); 4163 returnValue.setCalculation( jrpd.getSubreportReturnValue().getCalculation() ); 4164 returnValue.setIncrementFactoryClass( jrpd.getSubreportReturnValue().getIncrementFactoryClass() ); 4165 4166 javax.swing.table.DefaultTableModel dtm = (javax.swing.table.DefaultTableModel )jTableSubreportReturnValues.getModel(); 4167 dtm.setValueAt(returnValue, jTableSubreportReturnValues.getSelectedRow(), 0); 4168 dtm.setValueAt(returnValue.getToVariable(), jTableSubreportReturnValues.getSelectedRow(), 1); 4169 4170 jrf.fireReportListenerReportElementsChanged(new ReportElementChangedEvent(jrf , getElementSelection() , ReportElementChangedEvent.CHANGED)); 4171 4172 } 4173 } 4175 private void jButtonAddReturnValueActionPerformed(java.awt.event.ActionEvent evt) { if (this.isInit()) return; 4177 4178 if (jrf == null || getElementSelection().size()==0) return; 4179 Enumeration e = getElementSelection().elements(); 4181 SubReportElement element = (SubReportElement)e.nextElement(); 4182 4183 Vector variables = it.businesslogic.ireport.gui.MainFrame.getMainInstance().getActiveReportFrame().getReport().getVariables(); 4184 int var_count = 0; 4185 for (int i=0; i<variables.size(); ++i) { 4186 JRVariable var = (JRVariable)variables.elementAt(i); 4187 if (!var.isBuiltin()) { 4188 var_count++; 4189 } 4190 } 4191 4192 if (var_count == 0) { 4193 javax.swing.JOptionPane.showMessageDialog(this, 4194 I18n.getString("messages.elementPropertiesDialgo.noVariableAvailable","No variables are available in this report to store a return value.\nPlease define a variable first."), 4195 I18n.getString("messages.elementPropertiesDialgo.noVariableAvailableCaption","No variables"), 4196 javax.swing.JOptionPane.WARNING_MESSAGE); 4197 return; 4198 } 4199 4200 JRSubreportReturnValueDialog jrpd = new JRSubreportReturnValueDialog(this, true); 4201 jrpd.setVisible(true); 4202 4203 if (jrpd.getDialogResult() == javax.swing.JOptionPane.OK_OPTION) { 4204 it.businesslogic.ireport.JRSubreportReturnValue returnValue = jrpd.getSubreportReturnValue(); 4205 element.getReturnValues().addElement( returnValue ); 4206 javax.swing.table.DefaultTableModel dtm = (javax.swing.table.DefaultTableModel )jTableSubreportReturnValues.getModel(); 4207 dtm.addRow(new Object []{returnValue, returnValue.getToVariable()}); 4208 jrf.fireReportListenerReportElementsChanged(new ReportElementChangedEvent(jrf , getElementSelection() , ReportElementChangedEvent.CHANGED)); 4209 4210 } 4211 } 4213 private void jCheckBoxImageIsLazyActionPerformed(java.awt.event.ActionEvent evt) { if (jrf == null || getElementSelection().size()==0) return; 4215 Enumeration e = getElementSelection().elements(); 4217 while (e.hasMoreElements()) { 4218 ImageReportElement element = (ImageReportElement)e.nextElement(); 4219 element.setIsLazy(jCheckBoxImageIsLazy.isSelected() ); 4220 } 4221 jrf.fireReportListenerReportElementsChanged(new ReportElementChangedEvent(jrf , getElementSelection() , ReportElementChangedEvent.CHANGED)); 4222 4223 } 4225 private void jComboBoxPatternFocusLost(java.awt.event.FocusEvent evt) { } 4229 private void jComboBoxLinkTargetActionPerformed(java.awt.event.ActionEvent evt) { if (this.isInit()) return; 4231 4232 if (jrf == null || getElementSelection().size()==0 || jComboBoxLinkTarget.getSelectedItem() == null || (jComboBoxLinkTarget.getSelectedItem()+"").equals("")) return; 4233 Enumeration e = getElementSelection().elements(); 4234 while (e.hasMoreElements()) { 4235 HyperLinkableReportElement element = (HyperLinkableReportElement)e.nextElement(); 4236 element.setHyperlinkTarget( ""+jComboBoxLinkTarget.getSelectedItem()); 4237 } 4238 jComboBoxLinkTarget.removeItem(""); 4239 jrf.fireReportListenerReportElementsChanged(new ReportElementChangedEvent(jrf , getElementSelection() , ReportElementChangedEvent.CHANGED)); 4240 4241 } 4243 private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) { 4245 if (getElementSelection().elementAt(0) instanceof ChartReportElement) { 4246 it.businesslogic.ireport.chart.gui.IReportChartDialog icd = new it.businesslogic.ireport.chart.gui.IReportChartDialog(this,true); 4247 icd.setJReportFrame( jrf ); 4248 ChartReportElement cre = (ChartReportElement)getElementSelection().elementAt(0); 4249 icd.setProperties(cre.getProps()); 4250 icd.setVisible(true); 4251 if (icd.getDialogResult() == javax.swing.JOptionPane.OK_OPTION) { 4252 Properties props = icd.getProperties(); 4254 Iterator keys = props.keySet().iterator(); 4255 while (keys.hasNext()) { 4256 String key = ""+keys.next(); 4257 String val = props.getProperty(key); 4258 cre.getProps().setProperty(key, val); 4259 4260 } 4261 4262 cre.updateChartImage(); 4263 jrf.fireReportListenerReportElementsChanged(new ReportElementChangedEvent(jrf , getElementSelection() , ReportElementChangedEvent.CHANGED)); 4264 4265 repaintEditor(); 4267 } 4268 } else if (getElementSelection().elementAt(0) instanceof ChartReportElement2) { 4269 ChartReportElement2 cre = (ChartReportElement2)getElementSelection().elementAt(0); 4270 it.businesslogic.ireport.chart.gui.ChartPropertiesDialog cpd = new it.businesslogic.ireport.chart.gui.ChartPropertiesDialog(this,true); 4271 4272 try { 4273 cpd.setJReportFrame( jrf ); 4274 cpd.setChartElement(cre); 4275 cpd.setVisible(true); 4276 } catch (Exception ex) 4277 { 4278 ex.printStackTrace(); 4279 } 4280 if (cpd.getDialogResult() == javax.swing.JOptionPane.OK_OPTION) { 4281 } 4283 } 4284 4285 4286 } 4288 private void jComboBoxImageGroup1ActionPerformed(java.awt.event.ActionEvent evt) { if (this.isInit()) return; 4290 4291 if (jrf == null || getElementSelection().size()==0 || jComboBoxImageGroup1.getSelectedItem() == null || (jComboBoxImageGroup1.getSelectedItem()+"").equals("")) return; 4293 Enumeration e = getElementSelection().elements(); 4295 while (e.hasMoreElements()) { 4296 ReportElement element = (ReportElement)e.nextElement(); 4297 if (element instanceof ImageReportElement) { 4298 ((ImageReportElement)element).setEvaluationGroup(""+ jComboBoxImageGroup1.getSelectedItem()); 4299 } else if (element instanceof ChartReportElement2) { 4300 ((ChartReportElement2)element).setEvaluationGroup(""+ jComboBoxImageGroup1.getSelectedItem()); 4301 } 4302 } 4303 jrf.fireReportListenerReportElementsChanged(new ReportElementChangedEvent(jrf , getElementSelection() , ReportElementChangedEvent.CHANGED)); 4304 4305 this.jComboBoxImageGroup1.removeItem(""); 4306 } 4308 private void jComboBoxEvaluationTime1ActionPerformed(java.awt.event.ActionEvent evt) { if (this.isInit()) return; 4310 4311 if (jrf == null || getElementSelection().size()==0 || Misc.getComboboxSelectedValue(jComboBoxEvaluationTime1) == null || (Misc.getComboboxSelectedValue(jComboBoxEvaluationTime1)+"").equals("")) return; 4313 Enumeration e = getElementSelection().elements(); 4315 while (e.hasMoreElements()) { 4316 ReportElement element = (ReportElement)e.nextElement(); 4317 if (element instanceof ImageReportElement) { 4318 ((ImageReportElement)element).setEvaluationTime(""+ Misc.getComboboxSelectedValue(jComboBoxEvaluationTime1)); 4319 } else if (element instanceof ChartReportElement2) { 4320 4321 ((ChartReportElement2)element).setEvaluationTime(""+ Misc.getComboboxSelectedValue(jComboBoxEvaluationTime1)); 4322 } 4323 } 4324 jrf.fireReportListenerReportElementsChanged(new ReportElementChangedEvent(jrf , getElementSelection() , ReportElementChangedEvent.CHANGED)); 4325 4326 this.jComboBoxEvaluationTime1.removeItem(""); 4327 } 4329 private void jButtonCreatePatternActionPerformed(java.awt.event.ActionEvent evt) { 4331 FieldPatternDialog fpd = new FieldPatternDialog(MainFrame.getMainInstance() ,true); 4332 fpd.setVisible(true); 4333 if (fpd.getDialogResult() == javax.swing.JOptionPane.OK_OPTION) { 4334 jComboBoxPattern.setSelectedItem( fpd.getPattern() ); 4335 } 4336 4337 } 4339 private void jComboBoxBarcodeGroupActionPerformed(java.awt.event.ActionEvent evt) { if (this.isInit()) return; 4341 4342 if (jrf == null || getElementSelection().size()==0 || jComboBoxBarcodeGroup.getSelectedItem() == null || (jComboBoxBarcodeGroup.getSelectedItem()+"").equals("")) return; 4344 Enumeration e = getElementSelection().elements(); 4346 while (e.hasMoreElements()) { 4347 ImageReportElement element = (ImageReportElement)e.nextElement(); 4348 element.setEvaluationGroup(""+ jComboBoxBarcodeGroup.getSelectedItem()); 4349 } 4350 jrf.fireReportListenerReportElementsChanged(new ReportElementChangedEvent(jrf , getElementSelection() , ReportElementChangedEvent.CHANGED)); 4351 4352 this.jComboBoxBarcodeGroup.removeItem(""); 4353 } 4355 private void jComboBoxEvaluationTimeBarcodeActionPerformed(java.awt.event.ActionEvent evt) { if (this.isInit()) return; 4357 4358 if (jrf == null || getElementSelection().size()==0 || Misc.getComboboxSelectedValue(jComboBoxEvaluationTimeBarcode) == null || (Misc.getComboboxSelectedValue(jComboBoxEvaluationTimeBarcode)+"").equals("")) return; 4360 Enumeration e = getElementSelection().elements(); 4362 while (e.hasMoreElements()) { 4363 ImageReportElement element = (ImageReportElement)e.nextElement(); 4364 element.setEvaluationTime(""+ Misc.getComboboxSelectedValue(jComboBoxEvaluationTimeBarcode)); 4365 } 4366 jrf.fireReportListenerReportElementsChanged(new ReportElementChangedEvent(jrf , getElementSelection() , ReportElementChangedEvent.CHANGED)); 4367 4368 this.jComboBoxEvaluationTimeBarcode.removeItem(""); 4369 } 4371 private void jCheckBoxStyledTextActionPerformed(java.awt.event.ActionEvent evt) { if (this.isInit()) return; 4373 4374 if (jrf == null || getElementSelection().size()==0) return; 4376 Enumeration e = getElementSelection().elements(); 4378 while (e.hasMoreElements()) { 4379 TextReportElement element = (TextReportElement)e.nextElement(); 4380 element.setIsStyledText(jCheckBoxStyledText.isSelected()); 4381 element.setFont(null); 4382 4383 } 4384 fireReportElementsChangedEvent("styledText", ""+jCheckBoxStyledText.isSelected()); 4385 repaintEditor(); 4386 } 4388 private void jComboBoxRotationActionPerformed(java.awt.event.ActionEvent evt) { if (this.isInit()) return; 4390 4391 if (jrf == null || getElementSelection().size()==0 || Misc.getComboboxSelectedValue(jComboBoxRotation) == null || (Misc.getComboboxSelectedValue(jComboBoxRotation)+"").equals("")) return; 4393 Enumeration e = getElementSelection().elements(); 4395 while (e.hasMoreElements()) { 4396 TextReportElement element = (TextReportElement)e.nextElement(); 4397 element.setRotate(""+ Misc.getComboboxSelectedValue(jComboBoxRotation)); 4398 } 4399 fireReportElementsChangedEvent("rotate", ""+Misc.getComboboxSelectedValue(jComboBoxRotation)); 4400 this.jComboBoxRotation.removeItem(""); 4401 repaintEditor(); 4402 } 4404 private void BarcodeActionPerformed(java.awt.event.ActionEvent evt) { if (this.isInit()) return; 4406 4407 if (jrf == null || getElementSelection().size()==0) return; 4409 Enumeration e = getElementSelection().elements(); 4411 while (e.hasMoreElements()) { 4412 BarcodeReportElement element = (BarcodeReportElement) e.nextElement(); 4413 4414 if (jComboBoxBarcodeType.getSelectedItem() != null && jComboBoxBarcodeType.getSelectedItem() instanceof Tag) { 4415 element.setType( Integer.parseInt(""+((Tag)jComboBoxBarcodeType.getSelectedItem()).getValue()) ); 4416 } 4417 4418 element.setText(jBarcodeExpressionArea.getText()); 4419 element.setShowText(jCheckBoxBarcodeShowText.isSelected()); 4420 element.setCheckSum(jCheckBoxBarcodeCheckSum.isSelected()); 4421 repaintEditor(); 4422 4423 if(element.getLastError() != null){ 4425 jrf.getMainFrame().logOnConsole("Error BarcodeReportElement(" + element.getName() + "): " + element.getLastError()+"\n"); 4426 } 4427 } 4428 } 4430 private void jComboBoxBarcodeTypeActionPerformed(java.awt.event.ActionEvent evt) { BarcodeActionPerformed(evt); 4432 } 4434 private void jNumberFieldLeftActionPerformed(java.awt.event.ActionEvent evt) { if (jrf == null || getElementSelection().size()==0) return; 4436 Enumeration e = getElementSelection().elements(); 4438 while (e.hasMoreElements()) { 4439 ReportElement element = (ReportElement)e.nextElement(); 4440 if (element instanceof BreakReportElement) continue; 4441 int normalization = 0; 4442 if (element.getParentElement() != null) { 4443 normalization = (int)(element.getParentElement().getPosition().getX()) - 10; 4444 } else if (element.getCell() != null) { 4445 normalization = element.getCell().getLeft(); 4446 } else { 4447 normalization = jrf.getReport().getLeftMargin(); 4448 } 4449 4450 element.trasform( new Point( (int)jNumberFieldLeft.getValue()- (element.getPosition().x-10- normalization) ,0 ), TransformationType.TRANSFORMATION_MOVE); 4451 jrf.fireReportListenerReportElementsChanged(new ReportElementChangedEvent(jrf , element , ReportElementChangedEvent.CHANGED)); 4452 } 4453 repaintEditor(); 4454 } 4456 private void jNumberFieldTopActionPerformed(java.awt.event.ActionEvent evt) { if (jrf == null || getElementSelection().size()==0) return; 4458 Enumeration e = getElementSelection().elements(); 4460 Band last_band = null; 4461 int y_location = 0; 4462 while (e.hasMoreElements()) { 4463 ReportElement element = (ReportElement)e.nextElement(); 4464 if (element.getBand() != null && (last_band == null || last_band != element.getBand())) { 4467 y_location = this.jrf.getReport().getBandYLocation(element.getBand()); 4468 last_band = element.getBand(); 4469 } 4470 4471 if (element.getBand() == null && element.getCell() !=null) { 4472 y_location = element.getCell().getTop(); 4473 } 4474 4475 if (element.getParentElement() != null) { 4476 y_location = (int)(element.getParentElement().getPosition().getY())-10; 4477 } 4478 4479 element.trasform( new Point(0, (int)jNumberFieldTop.getValue()- (element.getPosition().y - 10 - y_location) ) , TransformationType.TRANSFORMATION_MOVE); 4480 jrf.fireReportListenerReportElementsChanged(new ReportElementChangedEvent(jrf , element , ReportElementChangedEvent.CHANGED)); 4481 4482 } 4483 repaintEditor(); 4484 } 4486 private void jComboBoxBandActionPerformed(java.awt.event.ActionEvent evt) { if (this.isInit()) return; 4488 4489 if (jrf == null || getElementSelection().size()==0 || jComboBoxBand.getSelectedItem() == null || (jComboBoxBand.getSelectedIndex() == 0 && (jComboBoxBand.getSelectedItem()+"").trim().equals("") )) return; 4491 Enumeration e = getElementSelection().elements(); 4493 while (e.hasMoreElements()) { 4494 ReportElement element = (ReportElement)e.nextElement(); 4495 4496 if (jrf.getSelectedCrosstabEditorPanel() == null) { 4497 element.setBand((Band) jComboBoxBand.getSelectedItem() ) ; 4498 } else { 4499 element.setCell((CrosstabCell) jComboBoxBand.getSelectedItem() ) ; 4500 element.setRelativePosition( new Point( element.getPosition().x - element.getCell().getLeft() - 10, element.getPosition().y - element.getCell().getTop() - 10 )); 4501 } 4502 4503 } 4504 jrf.fireReportListenerReportElementsChanged(new ReportElementChangedEvent(jrf , getElementSelection(), ReportElementChangedEvent.CHANGED)); 4505 4506 repaintEditor(); 4508 4509 e = getElementSelection().elements(); 4510 boolean isTheFirstElement = true; 4511 if (jrf.getSelectedCrosstabEditorPanel() == null) { 4512 Band last_band = null; 4513 int y_location = 0; 4514 while (e.hasMoreElements()) { 4515 ReportElement re = (ReportElement)e.nextElement(); 4516 if (last_band == null || last_band != re.getBand()) { 4519 y_location = this.jrf.getReport().getBandYLocation(re.getBand()); 4520 last_band = re.getBand(); 4521 } 4522 4523 this.setElementNumber(isTheFirstElement, re.getWidth(), jNumberFieldWidth); 4524 this.setElementNumber(isTheFirstElement, re.getHeight(), jNumberFieldHeight); 4525 this.setElementNumber(isTheFirstElement, re.getPosition().x - 10 - this.jrf.getReport().getLeftMargin(), jNumberFieldLeft); 4526 this.setElementNumber(isTheFirstElement, re.getPosition().y - y_location - 10, jNumberFieldTop); 4527 4528 this.setCheckBox(isTheFirstElement, re.getTransparent().equals("Transparent"),jCheckBoxTransparent); 4529 isTheFirstElement=false; 4530 } 4531 } else { 4532 CrosstabCell cell = null; 4533 while (e.hasMoreElements()) { 4534 ReportElement re = (ReportElement)e.nextElement(); 4535 cell = re.getCell(); 4536 if (cell != null) { 4537 this.setElementNumber(isTheFirstElement, re.getPosition().x - 10 - cell.getLeft(), jNumberFieldLeft); 4538 this.setElementNumber(isTheFirstElement, re.getPosition().y - 10 - cell.getTop(), jNumberFieldTop); 4539 isTheFirstElement=false; 4540 } 4541 } 4542 } 4543 4544 if (!(""+this.jComboBoxBand.getSelectedItem()).equals("")) { 4545 this.jComboBoxBand.removeItem(""); 4546 } 4547 } 4549 private void jNumberFieldHeightActionPerformed(java.awt.event.ActionEvent evt) { if (jrf == null || getElementSelection().size()==0) return; 4551 Enumeration e = getElementSelection().elements(); 4553 while (e.hasMoreElements()) { 4554 ReportElement element = (ReportElement)e.nextElement(); 4555 if (element instanceof BreakReportElement) continue; 4556 element.trasform( new Point(0, (int)jNumberFieldHeight.getValue()- element.getHeight() ), TransformationType.TRANSFORMATION_RESIZE_S); 4557 jrf.fireReportListenerReportElementsChanged(new ReportElementChangedEvent(jrf , element , ReportElementChangedEvent.CHANGED)); 4558 } 4559 repaintEditor(); 4560 } 4562 private void jNumberFieldWidthActionPerformed(java.awt.event.ActionEvent evt) { if (jrf == null || getElementSelection().size()==0) return; 4564 Enumeration e = getElementSelection().elements(); 4566 while (e.hasMoreElements()) { 4567 ReportElement element = (ReportElement)e.nextElement(); 4568 if (element instanceof BreakReportElement) continue; 4569 element.trasform( new Point( (int)jNumberFieldWidth.getValue()- element.getWidth(),0 ), TransformationType.TRANSFORMATION_RESIZE_E); 4570 jrf.fireReportListenerReportElementsChanged(new ReportElementChangedEvent(jrf , element , ReportElementChangedEvent.CHANGED)); 4571 } 4572 4573 repaintEditor(); 4574 } 4576 private void jButtonForegroundActionPerformed(java.awt.event.ActionEvent evt) { java.awt.Color color = javax.swing.JColorChooser.showDialog( null, "Select foreground color...", 4578 this.jButtonForeground.getBackground()); 4579 if (color != null) { 4580 this.jButtonForeground.setBackground(color); 4581 4582 if (jrf == null || getElementSelection().size()==0) return; 4583 Enumeration e = getElementSelection().elements(); 4585 while (e.hasMoreElements()) { 4586 ReportElement element = (ReportElement)e.nextElement(); 4587 element.setFgcolor(color); 4588 } 4589 jrf.fireReportListenerReportElementsChanged(new ReportElementChangedEvent(jrf , getElementSelection() , ReportElementChangedEvent.CHANGED)); 4590 repaintEditor(); 4591 } 4592 } 4594 private void jButtonBackgroundActionPerformed(java.awt.event.ActionEvent evt) { 4596 java.awt.Color color = javax.swing.JColorChooser.showDialog( null, "Select background color...", 4597 this.jButtonBackground.getBackground()); 4598 4599 if (color != null) { 4600 this.jButtonBackground.setBackground(color); 4601 if (jrf == null || getElementSelection().size()==0) return; 4602 Enumeration e = getElementSelection().elements(); 4604 while (e.hasMoreElements()) { 4605 ReportElement element = (ReportElement)e.nextElement(); 4606 element.setBgcolor( color ); 4607 4608 if (!element.getTransparent().equals("Opaque")) { 4612 element.setTransparent("Opaque"); 4613 } 4614 } 4616 jrf.fireReportListenerReportElementsChanged(new ReportElementChangedEvent(jrf , getElementSelection() , ReportElementChangedEvent.CHANGED)); 4617 setInit(true); 4621 this.jCheckBoxTransparent.setSelected( false ); 4622 setInit(false); 4623 jrf.getMainFrame().logOnConsole("Transparency switched off! \n"); 4624 4626 repaintEditor(); 4627 } 4628 4629 4630 4631 4632 4633 } 4635 private void jComboBoxReportFontActionPerformed(java.awt.event.ActionEvent evt) { if (this.isInit()) return; 4637 4638 if (jrf == null || getElementSelection().size()==0 || jComboBoxReportFont.getSelectedItem() == null) return; 4640 4641 4642 Enumeration fonts = jrf.getReport().getFonts().elements(); 4645 IReportFont font = null; 4646 while (fonts.hasMoreElements()) { 4647 font = (IReportFont)fonts.nextElement(); 4648 if (font != null && font.getReportFont().equals(""+ jComboBoxReportFont.getSelectedItem() ) ) { 4649 break; 4650 } else 4651 font = null; 4652 } 4653 4654 String reportFontName = ""; 4655 if (font==null) 4656 reportFontName = ""; 4657 else 4658 reportFontName = font.getReportFont(); 4659 4660 Enumeration e = getElementSelection().elements(); 4661 while (e.hasMoreElements()) { 4662 TextReportElement element = (TextReportElement)e.nextElement(); 4663 element.setReportFont(reportFontName); 4664 if (font != null) { 4665 element.setFontName( font.getFontName()); 4666 element.setBold( font.isBold()); 4667 element.setItalic( font.isItalic()); 4668 element.setUnderline( font.isUnderline()); 4669 element.setStrikeTrought( font.isStrikeTrought()); 4670 element.setPDFFontName( font.getPDFFontName()); 4671 element.setPdfEmbedded( font.isPdfEmbedded()); 4672 element.setPdfEncoding( font.getPdfEncoding()); 4673 element.setTTFFont( font.getTTFFont()); 4674 element.setFontSize( font.getFontSize()); 4675 } 4676 } 4677 4678 this.updateSelection(); 4679 this.jrf.getReportPanel().repaint(); 4680 4681 this.jComboBoxFontName.removeItem(""); 4682 repaintEditor(); 4683 } 4685 private void jComboBoxLinkTypeActionPerformed(java.awt.event.ActionEvent evt) { if (this.isInit()) return; 4687 4688 if (jrf == null || getElementSelection().size()==0 || jComboBoxLinkType.getSelectedItem() == null || (jComboBoxLinkType.getSelectedItem()+"").equals("")) return; 4689 Enumeration e = getElementSelection().elements(); 4690 4691 jTabbedPane2.removeAll(); 4692 4693 if (((String )this.jComboBoxLinkType.getSelectedItem()).equals("None")) { 4694 while (e.hasMoreElements()) { 4696 HyperLinkableReportElement element = (HyperLinkableReportElement)e.nextElement(); 4697 element.setHyperlinkType( ""+jComboBoxLinkType.getSelectedItem()); 4698 element.setHyperlinkReferenceExpression(""); 4699 element.setHyperlinkAnchorExpression(""); 4700 element.setHyperlinkPageExpression(""); 4701 element.getLinkParameters().clear(); 4702 this.jRTextExpressionAreaAnchor.setText(""); 4703 this.jRTextExpressionAreaAnchor.setEnabled(false); 4704 this.jLabelAnchor.setEnabled(false); 4705 this.jRTextExpressionAreaPage.setText(""); 4706 this.jRTextExpressionAreaPage.setEnabled(false); 4707 this.jLabelPage.setEnabled(false); 4708 this.jRTextExpressionAreaReference.setText(""); 4709 this.jRTextExpressionAreaReference.setEnabled(false); 4710 this.jLabelReference.setEnabled(false); 4711 } 4715 } else if (((String )this.jComboBoxLinkType.getSelectedItem()).equals("Reference")) { 4716 while (e.hasMoreElements()) { 4718 HyperLinkableReportElement element = (HyperLinkableReportElement)e.nextElement(); 4719 element.setHyperlinkType( ""+jComboBoxLinkType.getSelectedItem()); 4720 element.setHyperlinkReferenceExpression(""); 4721 element.setHyperlinkAnchorExpression(""); 4722 element.setHyperlinkPageExpression(""); 4723 this.jRTextExpressionAreaAnchor.setText(""); 4724 this.jRTextExpressionAreaAnchor.setEnabled(false); 4725 this.jLabelAnchor.setEnabled(false); 4726 this.jRTextExpressionAreaPage.setText(""); 4727 this.jRTextExpressionAreaPage.setEnabled(false); 4728 this.jLabelPage.setEnabled(false); 4729 this.jRTextExpressionAreaReference.setText(""); 4730 this.jRTextExpressionAreaReference.setEnabled(true); 4731 this.jLabelReference.setEnabled(true); 4732 4733 jTabbedPane2.addTab(I18n.getString("sectionItemHyperlinkPanel.tab.Reference","Reference"), this.jPanelReference); 4734 if (getElementSelection().size()==1) jTabbedPane2.addTab(I18n.getString("sectionItemHyperlinkPanel.tab.LinkParameters","Link parameters"), this.jPanelLinkParams); 4737 4738 } 4739 } else if (((String )this.jComboBoxLinkType.getSelectedItem()).equals("LocalAnchor")) { 4740 while (e.hasMoreElements()) { 4742 HyperLinkableReportElement element = (HyperLinkableReportElement)e.nextElement(); 4743 element.setHyperlinkType( ""+jComboBoxLinkType.getSelectedItem()); 4744 element.setHyperlinkReferenceExpression(""); 4745 element.setHyperlinkAnchorExpression(""); 4746 element.setHyperlinkPageExpression(""); 4747 this.jRTextExpressionAreaAnchor.setText(""); 4748 this.jRTextExpressionAreaAnchor.setEnabled(true); 4749 this.jLabelAnchor.setEnabled(true); 4750 this.jRTextExpressionAreaPage.setText(""); 4751 this.jRTextExpressionAreaPage.setEnabled(false); 4752 this.jLabelPage.setEnabled(false); 4753 this.jRTextExpressionAreaReference.setText(""); 4754 this.jRTextExpressionAreaReference.setEnabled(false); 4755 this.jLabelReference.setEnabled(false); 4756 4757 jTabbedPane2.addTab(I18n.getString("sectionItemHyperlinkPanel.tab.Anchor","Anchor"), this.jPanelAnchor); 4759 if (getElementSelection().size()==1) jTabbedPane2.addTab(I18n.getString("sectionItemHyperlinkPanel.tab.LinkParameters","Link parameters"), this.jPanelLinkParams); 4761 } 4762 } else if (((String )this.jComboBoxLinkType.getSelectedItem()).equals("LocalPage")) { 4763 while (e.hasMoreElements()) { 4765 HyperLinkableReportElement element = (HyperLinkableReportElement)e.nextElement(); 4766 element.setHyperlinkType( ""+jComboBoxLinkType.getSelectedItem()); 4767 element.setHyperlinkReferenceExpression(""); 4768 element.setHyperlinkAnchorExpression(""); 4769 element.setHyperlinkPageExpression(""); 4770 this.jRTextExpressionAreaAnchor.setText(""); 4771 this.jRTextExpressionAreaAnchor.setEnabled(false); 4772 this.jLabelAnchor.setEnabled(false); 4773 this.jRTextExpressionAreaPage.setText(""); 4774 this.jRTextExpressionAreaPage.setEnabled(true); 4775 this.jLabelPage.setEnabled(true); 4776 this.jRTextExpressionAreaReference.setText(""); 4777 this.jRTextExpressionAreaReference.setEnabled(false); 4778 this.jLabelReference.setEnabled(false); 4779 4780 jTabbedPane2.addTab(I18n.getString("sectionItemHyperlinkPanel.tab.Page","Page"),this.jPanelPage); 4783 if (getElementSelection().size()==1) jTabbedPane2.addTab(I18n.getString("sectionItemHyperlinkPanel.tab.LinkParameters","Link parameters"), this.jPanelLinkParams); 4784 } 4785 } 4786 4787 else if (((String )this.jComboBoxLinkType.getSelectedItem()).equals("RemoteAnchor")) { 4788 while (e.hasMoreElements()) { 4790 HyperLinkableReportElement element = (HyperLinkableReportElement)e.nextElement(); 4791 element.setHyperlinkType( ""+jComboBoxLinkType.getSelectedItem()); 4792 element.setHyperlinkReferenceExpression(""); 4793 element.setHyperlinkAnchorExpression(""); 4794 element.setHyperlinkPageExpression(""); 4795 this.jRTextExpressionAreaAnchor.setText(""); 4796 this.jRTextExpressionAreaAnchor.setEnabled(true); 4797 this.jLabelAnchor.setEnabled(true); 4798 this.jRTextExpressionAreaPage.setText(""); 4799 this.jRTextExpressionAreaPage.setEnabled(false); 4800 this.jLabelPage.setEnabled(false); 4801 this.jRTextExpressionAreaReference.setText(""); 4802 this.jRTextExpressionAreaReference.setEnabled(true); 4803 this.jLabelReference.setEnabled(true); 4804 4805 jTabbedPane2.addTab(I18n.getString("sectionItemHyperlinkPanel.tab.Reference","Reference"),this.jPanelReference); 4806 jTabbedPane2.addTab(I18n.getString("sectionItemHyperlinkPanel.tab.Anchor","Anchor"), this.jPanelAnchor); 4807 if (getElementSelection().size()==1) jTabbedPane2.addTab(I18n.getString("sectionItemHyperlinkPanel.tab.LinkParameters","Link parameters"), this.jPanelLinkParams); 4809 } 4810 } else if (((String )this.jComboBoxLinkType.getSelectedItem()).equals("RemotePage")) { 4811 while (e.hasMoreElements()) { 4813 HyperLinkableReportElement element = (HyperLinkableReportElement)e.nextElement(); 4814 element.setHyperlinkType( ""+jComboBoxLinkType.getSelectedItem()); 4815 element.setHyperlinkReferenceExpression(""); 4816 element.setHyperlinkAnchorExpression(""); 4817 element.setHyperlinkPageExpression(""); 4818 this.jRTextExpressionAreaAnchor.setText(""); 4819 this.jRTextExpressionAreaAnchor.setEnabled(false); 4820 this.jLabelAnchor.setEnabled(false); 4821 this.jRTextExpressionAreaPage.setText(""); 4822 this.jRTextExpressionAreaPage.setEnabled(true); 4823 this.jLabelPage.setEnabled(true); 4824 this.jRTextExpressionAreaReference.setText(""); 4825 this.jRTextExpressionAreaReference.setEnabled(true); 4826 this.jLabelReference.setEnabled(true); 4827 4828 jTabbedPane2.addTab(I18n.getString("sectionItemHyperlinkPanel.tab.Reference","Reference"),this.jPanelReference); 4829 jTabbedPane2.addTab(I18n.getString("sectionItemHyperlinkPanel.tab.Page","Page"),this.jPanelPage); 4831 if (getElementSelection().size()==1) jTabbedPane2.addTab(I18n.getString("sectionItemHyperlinkPanel.tab.LinkParameters","Link parameters"), this.jPanelLinkParams); 4832 } 4833 } else { 4834 while (e.hasMoreElements()) { 4836 HyperLinkableReportElement element = (HyperLinkableReportElement)e.nextElement(); 4837 element.setHyperlinkType( ""+jComboBoxLinkType.getSelectedItem()); 4838 this.jRTextExpressionAreaAnchor.setEnabled(true); 4843 this.jLabelAnchor.setEnabled(true); 4844 this.jRTextExpressionAreaPage.setEnabled(true); 4846 this.jLabelPage.setEnabled(true); 4847 this.jRTextExpressionAreaReference.setEnabled(true); 4849 this.jLabelReference.setEnabled(true); 4850 4851 jTabbedPane2.addTab(I18n.getString("sectionItemHyperlinkPanel.tab.Reference","Reference"),this.jPanelReference); 4852 jTabbedPane2.addTab(I18n.getString("sectionItemHyperlinkPanel.tab.Anchor","Anchor"), this.jPanelAnchor); 4853 jTabbedPane2.addTab(I18n.getString("sectionItemHyperlinkPanel.tab.Page","Page"),this.jPanelPage); 4854 if (getElementSelection().size()==1) jTabbedPane2.addTab(I18n.getString("sectionItemHyperlinkPanel.tab.LinkParameters","Link parameters"),this.jPanelLinkParams); 4855 } 4856 } 4857 4858 jComboBoxLinkType.removeItem(""); 4859 } 4861 private void jButtonRemParameterActionPerformed(java.awt.event.ActionEvent evt) { if (this.isInit()) return; 4863 4864 if (jrf == null || getElementSelection().size()==0) return; 4865 4866 Enumeration e = getElementSelection().elements(); 4867 SubReportElement element = (SubReportElement)e.nextElement(); 4868 4869 jTableSubreportParameters.getSelectedRows(); 4870 int[] rows= jTableSubreportParameters.getSelectedRows(); 4871 for (int i=rows.length-1; i>=0; --i) { 4872 element.getSubreportParameters().removeElement( jTableSubreportParameters.getValueAt( rows[i], 0) ); 4873 } 4875 4876 javax.swing.table.DefaultTableModel dtm = (javax.swing.table.DefaultTableModel )jTableSubreportParameters.getModel(); 4877 dtm.setRowCount(0); 4878 4879 java.util.Enumeration enum_parameters = element.getSubreportParameters().elements(); 4880 while (enum_parameters.hasMoreElements()) { 4881 it.businesslogic.ireport.JRSubreportParameter parameter = (it.businesslogic.ireport.JRSubreportParameter)enum_parameters.nextElement(); 4882 Vector row = new Vector(); 4883 row.addElement(parameter); 4884 row.addElement(parameter.getExpression()); 4885 dtm.addRow(row); 4886 } 4887 } 4889 private void jButtonModParameterActionPerformed(java.awt.event.ActionEvent evt) { if (this.isInit()) return; 4891 4892 if (jrf == null || getElementSelection().size()==0) return; 4893 4894 Enumeration e = getElementSelection().elements(); 4895 SubReportElement element = (SubReportElement)e.nextElement(); 4896 4897 JRSubreportParameter parameter = (JRSubreportParameter)jTableSubreportParameters.getValueAt( jTableSubreportParameters.getSelectedRow(), 0); 4898 4899 JRSubreportParameterDialog jrpd = new JRSubreportParameterDialog(this, true); 4900 jrpd.setParameter( parameter ); 4901 jrpd.setVisible(true); 4902 4903 if (jrpd.getDialogResult() == javax.swing.JOptionPane.OK_OPTION) { 4904 parameter.setName( jrpd.getParameter().getName() ); 4905 parameter.setExpression( jrpd.getParameter().getExpression()); 4906 javax.swing.table.DefaultTableModel dtm = (javax.swing.table.DefaultTableModel )jTableSubreportParameters.getModel(); 4907 dtm.setRowCount(0); 4908 4909 java.util.Enumeration enum_parameters = element.getSubreportParameters().elements(); 4910 while (enum_parameters.hasMoreElements()) { 4911 it.businesslogic.ireport.JRSubreportParameter parameter2 = (it.businesslogic.ireport.JRSubreportParameter)enum_parameters.nextElement(); 4912 Vector row = new Vector(); 4913 row.addElement(parameter2); 4914 row.addElement(parameter2.getExpression()); 4915 dtm.addRow(row); 4916 } 4917 } 4918 } 4920 private void jButtonAddParameterActionPerformed(java.awt.event.ActionEvent evt) { 4922 if (this.isInit()) return; 4923 4924 if (jrf == null || getElementSelection().size()==0) return; 4925 Enumeration e = getElementSelection().elements(); 4927 SubReportElement element = (SubReportElement)e.nextElement(); 4928 4929 JRSubreportParameterDialog jrpd = new JRSubreportParameterDialog(this, true); 4930 jrpd.setVisible(true); 4931 4932 if (jrpd.getDialogResult() == javax.swing.JOptionPane.OK_OPTION) { 4933 it.businesslogic.ireport.JRSubreportParameter parameter = jrpd.getParameter(); 4934 element.getSubreportParameters().addElement( parameter ); 4935 javax.swing.table.DefaultTableModel dtm = (javax.swing.table.DefaultTableModel )jTableSubreportParameters.getModel(); 4936 dtm.addRow(new Object []{parameter, parameter.getExpression()}); 4937 } 4938 } 4940 private void jComboBoxSubreportExpressionClassActionPerformed(java.awt.event.ActionEvent evt) { if (this.isInit()) return; 4942 4943 if (jrf == null || getElementSelection().size()==0 || jComboBoxSubreportExpressionClass.getSelectedItem() == null || (jComboBoxSubreportExpressionClass.getSelectedItem()+"").equals("")) return; 4945 Enumeration e = getElementSelection().elements(); 4947 while (e.hasMoreElements()) { 4948 SubReportElement element = (SubReportElement)e.nextElement(); 4949 element.setSubreportExpressionClass(""+ jComboBoxSubreportExpressionClass.getSelectedItem()); 4950 } 4951 4952 this.jComboBoxSubreportExpressionClass.removeItem(""); 4953 } 4955 private void jCheckBoxSubreportCacheActionPerformed(java.awt.event.ActionEvent evt) { if (this.isInit()) return; 4957 4958 if (jrf == null || getElementSelection().size()==0) return; 4960 Enumeration e = getElementSelection().elements(); 4962 while (e.hasMoreElements()) { 4963 SubReportElement element = (SubReportElement)e.nextElement(); 4964 element.setIsUsingCache(jCheckBoxSubreportCache.isSelected()); 4965 } 4966 } 4968 private void jComboBoxSubreportConnectionTypeActionPerformed(java.awt.event.ActionEvent evt) { if (this.isInit()) return; 4970 4971 if (jrf == null || getElementSelection().size()==0) return; 4972 Enumeration e = getElementSelection().elements(); 4974 SubReportElement element = (SubReportElement)e.nextElement(); 4975 4976 if (jComboBoxSubreportConnectionType.getSelectedIndex() == 0) { 4977 element.setUseConnection(false); 4978 element.setConnectionExpression(""); 4979 element.setDataSourceExpression(""); 4980 jRTextExpressionAreaTextConnectionExpression.setText(""); 4981 jRTextExpressionAreaTextConnectionExpression.setEnabled(false); 4982 jRTextExpressionAreaTextConnectionExpression.setBackground(Color.LIGHT_GRAY); 4983 } else if (jComboBoxSubreportConnectionType.getSelectedIndex() == 1) { 4984 element.setUseConnection(true); 4985 element.setDataSourceExpression(""); 4986 element.setConnectionExpression("$P{REPORT_CONNECTION}"); 4987 jRTextExpressionAreaTextConnectionExpression.setText("$P{REPORT_CONNECTION}"); 4988 jRTextExpressionAreaTextConnectionExpression.setEnabled(true); 4989 jRTextExpressionAreaTextConnectionExpression.setBackground(Color.WHITE); 4990 } else if (jComboBoxSubreportConnectionType.getSelectedIndex() == 2) { 4991 element.setUseConnection(false); 4992 element.setDataSourceExpression("$P{MyDataource}"); 4993 element.setConnectionExpression(""); 4994 jRTextExpressionAreaTextConnectionExpression.setText("$P{MyDataource}"); 4995 jRTextExpressionAreaTextConnectionExpression.setEnabled(true); 4996 jRTextExpressionAreaTextConnectionExpression.setBackground(Color.WHITE); 4997 } 4998 4999 } 5001 private void jComboBoxPatternInputMethodTextChanged(java.awt.event.InputMethodEvent evt) { 5003 5004 5005 } 5007 private void jComboBoxPatternActionPerformed(java.awt.event.ActionEvent evt) { if (this.isInit()) return; 5009 5010 if (jrf == null || 5012 ((getElementSelection().size()==0 || jComboBoxPdfEncoding.getSelectedItem() == null || (jComboBoxPdfEncoding.getSelectedItem()+"").equals("") ) && ((javax.swing.JTextField ) jComboBoxPattern.getEditor().getEditorComponent()).getText().trim().length() == 0)) return; 5013 Enumeration e = getElementSelection().elements(); 5015 5016 Object pattern = jComboBoxPattern.getSelectedItem(); 5017 if (pattern == null || pattern.equals("")) { 5018 pattern = ((javax.swing.JTextField ) jComboBoxPattern.getEditor().getEditorComponent()).getText().trim(); 5019 } else if (pattern instanceof PdfEncoding) { 5020 pattern = ""+ ((PdfEncoding)pattern).getEncoding(); 5021 jComboBoxPattern.setSelectedItem(pattern); 5022 } else 5023 pattern = ""+ pattern+""; 5024 5025 while (e.hasMoreElements()) { 5026 TextFieldReportElement element = (TextFieldReportElement)e.nextElement(); 5027 element.setPattern(""+ pattern+""); 5028 } 5029 fireReportElementsChangedEvent("pattern", ""+ pattern); 5030 } 5032 private void jCheckBoxBlankWhenNullActionPerformed(java.awt.event.ActionEvent evt) { if (this.isInit()) return; 5034 5035 if (jrf == null || getElementSelection().size()==0) return; 5037 Enumeration e = getElementSelection().elements(); 5039 while (e.hasMoreElements()) { 5040 TextFieldReportElement element = (TextFieldReportElement)e.nextElement(); 5041 element.setBlankWhenNull(jCheckBoxBlankWhenNull.isSelected()); 5042 } 5043 fireReportElementsChangedEvent("blankWhenNull", ""+ jCheckBoxStretchWithOverflow.isSelected()); 5044 } 5046 private void jCheckBoxStretchWithOverflowActionPerformed(java.awt.event.ActionEvent evt) { if (this.isInit()) return; 5048 5049 if (jrf == null || getElementSelection().size()==0) return; 5051 Enumeration e = getElementSelection().elements(); 5053 while (e.hasMoreElements()) { 5054 TextFieldReportElement element = (TextFieldReportElement)e.nextElement(); 5055 element.setStretchWithOverflow(jCheckBoxStretchWithOverflow.isSelected()); 5056 } 5057 fireReportElementsChangedEvent("stretchWithOverflow", ""+ jCheckBoxStretchWithOverflow.isSelected()); 5058 } 5060 private void jComboBoxTextFieldGroupActionPerformed(java.awt.event.ActionEvent evt) { if (this.isInit()) return; 5062 5063 if (jrf == null || getElementSelection().size()==0 || jComboBoxTextFieldGroup.getSelectedItem() == null || (jComboBoxTextFieldGroup.getSelectedItem()+"").equals("")) return; 5065 Enumeration e = getElementSelection().elements(); 5067 while (e.hasMoreElements()) { 5068 TextFieldReportElement element = (TextFieldReportElement)e.nextElement(); 5069 element.setGroup(""+ jComboBoxTextFieldGroup.getSelectedItem()); 5070 } 5071 fireReportElementsChangedEvent("textfieldEvaluationGroup", ""+ jComboBoxTextFieldGroup.getSelectedItem()); 5072 this.jComboBoxTextFieldGroup.removeItem(""); 5073 } 5075 private void jComboBoxTextFieldEvaluationTimeActionPerformed(java.awt.event.ActionEvent evt) { if (this.isInit()) return; 5077 5078 if (jrf == null || getElementSelection().size()==0 || Misc.getComboboxSelectedValue(jComboBoxTextFieldEvaluationTime) == null || (Misc.getComboboxSelectedValue(jComboBoxTextFieldEvaluationTime)+"").equals("")) return; 5080 Enumeration e = getElementSelection().elements(); 5082 while (e.hasMoreElements()) { 5083 TextFieldReportElement element = (TextFieldReportElement)e.nextElement(); 5084 element.setEvaluationTime(""+ Misc.getComboboxSelectedValue(jComboBoxTextFieldEvaluationTime)); 5085 if (element.getEvaluationTime().equals("Group")) { 5086 jComboBoxTextFieldGroup.setEnabled(true); 5087 } else { 5088 element.setGroup(""); 5089 jComboBoxTextFieldGroup.setEnabled(false); 5090 } 5091 } 5092 fireReportElementsChangedEvent("textfieldEvaluationTime", ""+ Misc.getComboboxSelectedValue(jComboBoxTextFieldEvaluationTime)); 5093 this.jComboBoxTextFieldEvaluationTime.removeItem(""); 5094 } 5096 private void jComboBoxTextFieldExpressionClassActionPerformed(java.awt.event.ActionEvent evt) { if (this.isInit()) return; 5098 5099 if (jrf == null || getElementSelection().size()==0 || jComboBoxTextFieldExpressionClass.getSelectedItem() == null || (jComboBoxTextFieldExpressionClass.getSelectedItem()+"").equals("")) return; 5101 Enumeration e = getElementSelection().elements(); 5103 while (e.hasMoreElements()) { 5104 TextFieldReportElement element = (TextFieldReportElement)e.nextElement(); 5105 element.setClassExpression(""+ jComboBoxTextFieldExpressionClass.getSelectedItem()); 5106 } 5107 fireReportElementsChangedEvent("textfieldExpressionClass", ""+ jComboBoxTextFieldExpressionClass.getSelectedItem()); 5108 this.jComboBoxTextFieldExpressionClass.removeItem(""); 5109 } 5111 private void jCheckBoxPDFEmbeddedActionPerformed(java.awt.event.ActionEvent evt) { if (this.isInit()) return; 5113 5114 if (jrf == null || getElementSelection().size()==0) return; 5116 Enumeration e = getElementSelection().elements(); 5118 while (e.hasMoreElements()) { 5119 TextReportElement element = (TextReportElement)e.nextElement(); 5120 element.setPdfEmbedded(jCheckBoxPDFEmbedded.isSelected()); 5121 } 5122 fireReportElementsChangedEvent("pdfEmbedded", ""+jCheckBoxPDFEmbedded.isSelected()); 5123 } 5125 private void jComboBoxPdfEncodingActionPerformed(java.awt.event.ActionEvent evt) { if (this.isInit()) return; 5127 5128 if (jrf == null || getElementSelection().size()==0 || jComboBoxPdfEncoding.getSelectedItem() == null || (jComboBoxPdfEncoding.getSelectedItem()+"").equals("")) return; 5130 Enumeration e = getElementSelection().elements(); 5132 String newValue = null; 5133 Object encoding = jComboBoxPdfEncoding.getSelectedItem(); 5134 if (encoding instanceof PdfEncoding) { 5135 newValue = ""+ ((PdfEncoding)encoding).getEncoding(); 5136 } else { 5137 newValue = encoding+""; 5138 } 5139 while (e.hasMoreElements()) { 5140 TextReportElement element = (TextReportElement)e.nextElement(); 5141 element.setPdfEncoding( newValue); 5142 } 5143 fireReportElementsChangedEvent("pdfEncoding", newValue); 5144 } 5146 private void jComboBoxVAlignActionPerformed(java.awt.event.ActionEvent evt) { if (this.isInit()) return; 5148 5149 if (jrf == null || getElementSelection().size()==0 || Misc.getComboboxSelectedValue(jComboBoxVAlign) == null || (Misc.getComboboxSelectedValue(jComboBoxVAlign)+"").equals("")) return; 5151 Enumeration e = getElementSelection().elements(); 5153 while (e.hasMoreElements()) { 5154 TextReportElement element = (TextReportElement)e.nextElement(); 5155 element.setVerticalAlign(""+ Misc.getComboboxSelectedValue(jComboBoxVAlign)); 5156 } 5157 fireReportElementsChangedEvent("vAlign", ""+Misc.getComboboxSelectedValue(jComboBoxVAlign)); 5158 this.jComboBoxVAlign.removeItem(""); 5159 repaintEditor(); 5160 } 5162 private void jComboBoxHAlignActionPerformed(java.awt.event.ActionEvent evt) { if (this.isInit()) return; 5164 5165 if (jrf == null || getElementSelection().size()==0 || Misc.getComboboxSelectedValue(jComboBoxHAlign) == null || (Misc.getComboboxSelectedValue(jComboBoxHAlign)+"").equals("")) return; 5167 Enumeration e = getElementSelection().elements(); 5169 while (e.hasMoreElements()) { 5170 TextReportElement element = (TextReportElement)e.nextElement(); 5171 element.setAlign(""+ Misc.getComboboxSelectedValue(jComboBoxHAlign)); 5172 } 5173 fireReportElementsChangedEvent("hAlign", ""+Misc.getComboboxSelectedValue(jComboBoxHAlign)); 5174 this.jComboBoxHAlign.removeItem(""); 5175 repaintEditor(); 5176 } 5178 private void jComboBoxLineSpacingActionPerformed(java.awt.event.ActionEvent evt) { if (this.isInit()) return; 5180 5181 if (jrf == null || getElementSelection().size()==0 || Misc.getComboboxSelectedValue(jComboBoxLineSpacing) == null || (Misc.getComboboxSelectedValue(jComboBoxLineSpacing)+"").equals("")) return; 5183 Enumeration e = getElementSelection().elements(); 5185 while (e.hasMoreElements()) { 5186 TextReportElement element = (TextReportElement)e.nextElement(); 5187 element.setLineSpacing(""+ Misc.getComboboxSelectedValue(jComboBoxLineSpacing)); 5188 } 5189 5190 fireReportElementsChangedEvent("lineSpacing", ""+Misc.getComboboxSelectedValue(jComboBoxLineSpacing)); 5191 this.jComboBoxLineSpacing.removeItem(""); 5192 repaintEditor(); 5193 } 5195 private void jCheckBoxStrokeTroughActionPerformed(java.awt.event.ActionEvent evt) { if (this.isInit()) return; 5197 5198 if (jrf == null || getElementSelection().size()==0) return; 5200 Enumeration e = getElementSelection().elements(); 5202 while (e.hasMoreElements()) { 5203 TextReportElement element = (TextReportElement)e.nextElement(); 5204 element.setStrikeTrought(jCheckBoxStrokeTrough.isSelected()); 5205 element.setFont(null); 5206 5207 } 5208 fireReportElementsChangedEvent("strikethrough", ""+jCheckBoxStrokeTrough.isSelected()); 5209 repaintEditor(); 5210 } 5212 private void jCheckBoxUnderlineActionPerformed(java.awt.event.ActionEvent evt) { if (this.isInit()) return; 5214 5215 if (jrf == null || getElementSelection().size()==0) return; 5217 Enumeration e = getElementSelection().elements(); 5219 while (e.hasMoreElements()) { 5220 TextReportElement element = (TextReportElement)e.nextElement(); 5221 element.setUnderline(jCheckBoxUnderline.isSelected()); 5222 element.setFont(null); 5223 5224 } 5225 fireReportElementsChangedEvent("underline", ""+jCheckBoxUnderline.isSelected()); 5226 repaintEditor(); 5227 } 5229 private void jCheckBoxItalicActionPerformed(java.awt.event.ActionEvent evt) { if (this.isInit()) return; 5231 5232 if (jrf == null || getElementSelection().size()==0) return; 5234 Enumeration e = getElementSelection().elements(); 5236 boolean adjusted = false; 5237 while (e.hasMoreElements()) { 5238 TextReportElement element = (TextReportElement)e.nextElement(); 5239 element.setItalic(jCheckBoxItalic.isSelected()); 5240 element.setFont(null); 5241 5242 if (IReportFont.adjustPdfFontName(element)) { 5243 adjusted = true; 5244 } 5245 } 5246 if (adjusted) pdfFontUpdated(); 5247 fireReportElementsChangedEvent(null, null); 5248 repaintEditor(); 5249 } 5251 private void jCheckBoxBoldActionPerformed(java.awt.event.ActionEvent evt) { if (this.isInit()) return; 5253 5254 if (jrf == null || getElementSelection().size()==0) return; 5256 Enumeration e = getElementSelection().elements(); 5258 boolean adjusted = false; 5259 while (e.hasMoreElements()) { 5260 TextReportElement element = (TextReportElement)e.nextElement(); 5261 element.setBold(jCheckBoxBold.isSelected()); 5262 element.setFont(null); 5263 5264 5265 if (IReportFont.adjustPdfFontName(element)) { 5266 adjusted = true; 5267 } 5268 } 5269 if (adjusted) pdfFontUpdated(); 5270 fireReportElementsChangedEvent(null, null); 5271 repaintEditor(); 5272 } 5274 public void pdfFontUpdated() { 5275 if (this.isInit()) return; 5276 if (jrf == null || getElementSelection().size()==0) return; 5277 5278 boolean samePDFFontName = true; 5279 boolean sameTTFFont = true; 5280 5281 boolean isTheFirstElement = true; 5282 5283 Enumeration e = getElementSelection().elements(); 5284 boolean adjusted = false; 5285 while (e.hasMoreElements()) { 5286 TextReportElement tre = (TextReportElement)e.nextElement(); 5287 5288 if (samePDFFontName) { 5289 if (tre.getPDFFontName().toUpperCase().endsWith(".TTF") || tre.getPDFFontName().toUpperCase().indexOf(".TTC,") >= 0) 5290 samePDFFontName = this.setComboBoxText(isTheFirstElement, "External TTF font..." , jComboBoxPDFFontName ); 5291 else 5292 samePDFFontName = this.setComboBoxText(isTheFirstElement, tre.getPDFFontName() , jComboBoxPDFFontName ); 5293 } 5294 5295 5296 5297 isTheFirstElement = false; 5298 } 5299 5300 5301 } 5302 5303 private void jNumberComboBoxSizeItemStateChanged(java.awt.event.ItemEvent evt) { jNumberComboBoxSizeActionPerformed(new java.awt.event.ActionEvent (jNumberComboBoxSize,0,"")); 5305 } 5307 private void jTextAreaTextInputMethodTextChanged(java.awt.event.InputMethodEvent evt) { 5309 } 5311 private void jComboBoxFontNameActionPerformed(java.awt.event.ActionEvent evt) { if (this.isInit()) return; 5313 5314 if (jrf == null || getElementSelection().size()==0 || jComboBoxFontName.getSelectedItem() == null || (jComboBoxFontName.getSelectedItem()+"").equals("")) return; 5316 Enumeration e = getElementSelection().elements(); 5318 while (e.hasMoreElements()) { 5319 TextReportElement element = (TextReportElement)e.nextElement(); 5320 element.setFontName(""+ jComboBoxFontName.getSelectedItem()); 5321 } 5322 fireReportElementsChangedEvent("fontName", ""+ jComboBoxFontName.getSelectedItem()); 5323 this.jComboBoxFontName.removeItem(""); 5324 repaintEditor(); 5325 } 5327 private void jNumberComboBoxSizeActionPerformed(java.awt.event.ActionEvent evt) { if (this.isInit()) return; 5329 5330 if (jrf == null || getElementSelection().size()==0 || jNumberComboBoxSize.getValue() ==0) return; 5332 Enumeration e = getElementSelection().elements(); 5334 while (e.hasMoreElements()) { 5335 TextReportElement element = (TextReportElement)e.nextElement(); 5336 element.setFontSize((int)jNumberComboBoxSize.getValue()); 5337 } 5338 fireReportElementsChangedEvent("fontSize", ""+(int)jNumberComboBoxSize.getValue()); 5339 repaintEditor(); 5340 } 5342 private void jComboBoxPDFFontNameActionPerformed(java.awt.event.ActionEvent evt) { if (this.isInit()) return; 5344 5345 if (jrf == null || getElementSelection().size()==0 || jComboBoxPDFFontName.getSelectedItem() == null || (jComboBoxPDFFontName.getSelectedItem()+"").equals("")) return; 5347 Object obj = jComboBoxPDFFontName.getSelectedItem(); 5349 String fontName = ""+ obj; 5350 if (obj instanceof Tag) { 5351 fontName = ""+((Tag)obj).getValue(); 5352 } else { 5353 fontName = ""+obj; 5354 } 5355 5356 Enumeration e = getElementSelection().elements(); 5357 while (e.hasMoreElements()) { 5358 TextReportElement element = (TextReportElement)e.nextElement(); 5359 element.getIReportFont().setPropertyValue( IReportFont.PDF_FONT_NAME, (fontName.length() > 0) ? fontName : null); 5360 } 5361 fireReportElementsChangedEvent(null, null); 5362 } 5365 private void jButtonFindImageActionPerformed(java.awt.event.ActionEvent evt) { String fileName = ""; 5367 javax.swing.JFileChooser jfc = new javax.swing.JFileChooser ( this.jrf.getMainFrame().getCurrentDirectory() ); 5368 jfc.setDialogTitle("Load XML jasperreports file...."); 5369 jfc.setFileFilter( new javax.swing.filechooser.FileFilter () { 5370 public boolean accept(java.io.File file) { 5371 String filename = file.getName(); 5372 return (filename.endsWith(".jpg") || 5373 filename.endsWith(".jpeg") || 5374 filename.endsWith(".gif") || 5375 file.isDirectory()) ; 5376 } 5377 public String getDescription() { 5378 return "Image *.gif|*.jpg"; 5379 } 5380 }); 5381 5382 jfc.setMultiSelectionEnabled(false); 5383 jfc.setDialogType( javax.swing.JFileChooser.OPEN_DIALOG); 5384 if (jfc.showOpenDialog( null) == javax.swing.JOptionPane.OK_OPTION) { 5385 this.jRTextExpressionAreaImageExpression.setText("\""+ Misc.string_replace("\\\\","\\",jfc.getSelectedFile().getPath() +"\"")); 5386 this.jrf.getMainFrame().setCurrentDirectory(jfc.getSelectedFile(), true); 5387 } 5388 } 5390 private void jCheckBoxImageCacheActionPerformed(java.awt.event.ActionEvent evt) { if (jrf == null || getElementSelection().size()==0) return; 5392 Enumeration e = getElementSelection().elements(); 5394 while (e.hasMoreElements()) { 5395 ImageReportElement element = (ImageReportElement)e.nextElement(); 5396 element.setIsUsingCache( jCheckBoxImageCache.isSelected() ); 5397 } 5398 } 5400 private void jComboBoxImageGroupActionPerformed(java.awt.event.ActionEvent evt) { if (this.isInit()) return; 5402 5403 if (jrf == null || getElementSelection().size()==0 || jComboBoxImageGroup.getSelectedItem() == null || (jComboBoxImageGroup.getSelectedItem()+"").equals("")) return; 5405 Enumeration e = getElementSelection().elements(); 5407 while (e.hasMoreElements()) { 5408 ImageReportElement element = (ImageReportElement)e.nextElement(); 5409 element.setEvaluationGroup(""+ jComboBoxImageGroup.getSelectedItem()); 5410 } 5411 5412 this.jComboBoxImageGroup.removeItem(""); 5413 } 5415 private void jComboBoxEvaluationTimeActionPerformed(java.awt.event.ActionEvent evt) { if (this.isInit()) return; 5417 5418 if (jrf == null || getElementSelection().size()==0 || Misc.getComboboxSelectedValue(jComboBoxEvaluationTime) == null || (Misc.getComboboxSelectedValue(jComboBoxEvaluationTime)+"").equals("")) return; 5420 Enumeration e = getElementSelection().elements(); 5422 while (e.hasMoreElements()) { 5423 ImageReportElement element = (ImageReportElement)e.nextElement(); 5424 element.setEvaluationTime(""+ Misc.getComboboxSelectedValue(jComboBoxEvaluationTime)); 5425 } 5426 5427 this.jComboBoxEvaluationTime.removeItem(""); 5428 } 5430 private void jComboBoxImageExpressionClassActionPerformed(java.awt.event.ActionEvent evt) { if (this.isInit()) return; 5432 5433 if (jrf == null || getElementSelection().size()==0 || jComboBoxImageExpressionClass.getSelectedItem() == null || (jComboBoxImageExpressionClass.getSelectedItem()+"").equals("")) return; 5435 Enumeration e = getElementSelection().elements(); 5437 while (e.hasMoreElements()) { 5438 ImageReportElement element = (ImageReportElement)e.nextElement(); 5439 element.setImageClass(""+ jComboBoxImageExpressionClass.getSelectedItem()); 5440 } 5441 5442 this.jComboBoxImageExpressionClass.removeItem(""); 5443 } 5445 private void jComboBoxHorizontalAlignmentActionPerformed(java.awt.event.ActionEvent evt) { if (this.isInit()) return; 5447 5448 if (jrf == null || getElementSelection().size()==0 || Misc.getComboboxSelectedValue(jComboBoxHorizontalAlignment) == null || (Misc.getComboboxSelectedValue(jComboBoxHorizontalAlignment)+"").equals("")) return; 5450 Enumeration e = getElementSelection().elements(); 5452 while (e.hasMoreElements()) { 5453 ImageReportElement element = (ImageReportElement)e.nextElement(); 5454 element.setHorizontalAlignment(""+ Misc.getComboboxSelectedValue(jComboBoxHorizontalAlignment)); 5455 } 5456 5457 this.jComboBoxHorizontalAlignment.removeItem(""); 5458 repaintEditor(); 5459 } 5461 private void jComboBoxVerticalAlignmentActionPerformed(java.awt.event.ActionEvent evt) { if (this.isInit()) return; 5463 5464 if (jrf == null || getElementSelection().size()==0 || Misc.getComboboxSelectedValue(jComboBoxVerticalAlignment) == null || (Misc.getComboboxSelectedValue(jComboBoxVerticalAlignment)+"").equals("")) return; 5466 Enumeration e = getElementSelection().elements(); 5468 while (e.hasMoreElements()) { 5469 ImageReportElement element = (ImageReportElement)e.nextElement(); 5470 element.setVerticalAlignment(""+ Misc.getComboboxSelectedValue(jComboBoxVerticalAlignment)); 5471 } 5472 5473 this.jComboBoxVerticalAlignment.removeItem(""); 5474 repaintEditor(); 5475 } 5477 private void jComboBoxScaleActionPerformed(java.awt.event.ActionEvent evt) { if (this.isInit()) return; 5479 5480 if (jrf == null || getElementSelection().size()==0 || Misc.getComboboxSelectedValue( jComboBoxScale ) == null || (Misc.getComboboxSelectedValue( jComboBoxScale )+"").equals("")) return; 5482 Enumeration e = getElementSelection().elements(); 5484 while (e.hasMoreElements()) { 5485 ImageReportElement element = (ImageReportElement)e.nextElement(); 5486 element.setScaleImage(""+ Misc.getComboboxSelectedValue( jComboBoxScale )); 5487 } 5488 5489 this.jComboBoxScale.removeItem(""); 5490 repaintEditor(); 5491 } 5493 private void jComboBoxLineDirectionActionPerformed(java.awt.event.ActionEvent evt) { if (this.isInit()) return; 5495 5496 if (jrf == null || getElementSelection().size()==0 || Misc.getComboboxSelectedValue(jComboBoxLineDirection) == null || (Misc.getComboboxSelectedValue(jComboBoxLineDirection)+"").equals("")) return; 5498 Enumeration e = getElementSelection().elements(); 5500 while (e.hasMoreElements()) { 5501 LineReportElement element = (LineReportElement)e.nextElement(); 5502 element.direction = ""+ Misc.getComboboxSelectedValue(jComboBoxLineDirection); 5503 } 5504 fireReportElementsChangedEvent("direction", ""+ Misc.getComboboxSelectedValue(jComboBoxLineDirection)); 5505 this.jComboBoxLineDirection.removeItem(""); 5506 repaintEditor(); 5507 } 5509 private void jNumberFieldRadiusActionPerformed(java.awt.event.ActionEvent evt) { if (jrf == null || getElementSelection().size()==0) return; 5511 Enumeration e = getElementSelection().elements(); 5513 while (e.hasMoreElements()) { 5514 RectangleReportElement element = (RectangleReportElement)e.nextElement(); 5515 element.setRadius( (int)jNumberFieldRadius.getValue() ); 5516 } 5517 fireReportElementsChangedEvent("radius", ""+ (int)jNumberFieldRadius.getValue()); 5518 repaintEditor(); 5519 } 5521 private void jTabbedPaneStateChanged(javax.swing.event.ChangeEvent evt) { if (this.isInit()) return; 5523 5524 if (jTabbedPane.getSelectedComponent() != null) { 5525 lastSelectedPanel = (javax.swing.JPanel )jTabbedPane.getSelectedComponent(); 5526 } 5528 } 5530 private void jComboBoxFillActionPerformed(java.awt.event.ActionEvent evt) { if (this.isInit()) return; 5532 5533 if (jrf == null || getElementSelection().size()==0 || Misc.getComboboxSelectedValue(jComboBoxFill) == null || (Misc.getComboboxSelectedValue(jComboBoxFill)+"").equals("")) return; 5535 Enumeration e = getElementSelection().elements(); 5537 while (e.hasMoreElements()) { 5538 GraphicReportElement element = (GraphicReportElement)e.nextElement(); 5539 element.setFill(""+ Misc.getComboboxSelectedValue(jComboBoxFill)); 5540 } 5541 fireReportElementsChangedEvent("fill", ""+ Misc.getComboboxSelectedValue(jComboBoxFill)); 5542 this.jComboBoxFill.removeItem(""); 5543 } 5545 private void jComboBoxStretchTypeActionPerformed(java.awt.event.ActionEvent evt) { if (this.isInit()) return; 5547 5548 if (jrf == null || getElementSelection().size()==0 || Misc.getComboboxSelectedValue(jComboBoxStretchType) == null || (Misc.getComboboxSelectedValue(jComboBoxStretchType)+"").equals("")) return; 5550 Enumeration e = getElementSelection().elements(); 5552 while (e.hasMoreElements()) { 5553 ReportElement element = (ReportElement)e.nextElement(); 5554 element.setStretchType(""+ Misc.getComboboxSelectedValue(jComboBoxStretchType)); 5555 } 5556 String value = ""+ Misc.getComboboxSelectedValue(jComboBoxStretchType); 5557 if (value.length() == 0) value = null; 5558 fireReportElementsChangedEvent("stretchType", value); 5559 this.jComboBoxStretchType.removeItem(""); 5560 } 5562 private void jComboBoxPenActionPerformed(java.awt.event.ActionEvent evt) { if (this.isInit()) return; 5564 5565 if (jrf == null || getElementSelection().size()==0 || Misc.getComboboxSelectedValue( jComboBoxPen ) == null || ( Misc.getComboboxSelectedValue( jComboBoxPen )+"").equals("")) return; 5567 Enumeration e = getElementSelection().elements(); 5569 while (e.hasMoreElements()) { 5570 GraphicReportElement element = (GraphicReportElement)e.nextElement(); 5571 element.setGraphicElementPen(""+ Misc.getComboboxSelectedValue( jComboBoxPen )); 5572 } 5573 fireReportElementsChangedEvent("pen", ""+ Misc.getComboboxSelectedValue( jComboBoxPen )); 5574 this.jComboBoxPen.removeItem(""); 5575 repaintEditor(); 5576 5577 } 5579 private void jComboBoxGroupsActionPerformed(java.awt.event.ActionEvent evt) { if (this.isInit()) return; 5581 5582 if (jrf == null || getElementSelection().size()==0) return; 5584 Enumeration e = getElementSelection().elements(); 5586 while (e.hasMoreElements()) { 5587 ReportElement element = (ReportElement)e.nextElement(); 5588 element.printWhenGroupChanges = ""+ jComboBoxGroups.getSelectedItem(); 5589 } 5590 5591 fireReportElementsChangedEvent("printWhenGroupChanges", ""+ jComboBoxGroups.getSelectedItem()); 5592 } 5594 private void jRTextExpressionAreaPrintWhenExpressionInputMethodTextChanged(java.awt.event.InputMethodEvent evt) { 5596 } 5598 private void jComboBoxPositionTypeActionPerformed(java.awt.event.ActionEvent evt) { if (this.isInit()) return; 5600 5601 if (jrf == null || getElementSelection().size()==0 || Misc.getComboboxSelectedValue(jComboBoxPositionType) == null || (Misc.getComboboxSelectedValue(jComboBoxPositionType)+"").equals("")) return; 5603 Enumeration e = getElementSelection().elements(); 5605 while (e.hasMoreElements()) { 5606 ReportElement element = (ReportElement)e.nextElement(); 5607 element.setPositionType( ""+ Misc.getComboboxSelectedValue(jComboBoxPositionType) ); 5608 } 5609 5610 fireReportElementsChangedEvent("positionType", ""+ Misc.getComboboxSelectedValue(jComboBoxPositionType)); 5611 this.jComboBoxPositionType.removeItem(""); 5612 } 5614 private void jCheckBoxPrintRepeatedValuesActionPerformed(java.awt.event.ActionEvent evt) { if (jrf == null || getElementSelection().size()==0) return; 5616 Enumeration e = getElementSelection().elements(); 5618 while (e.hasMoreElements()) { 5619 ReportElement element = (ReportElement)e.nextElement(); 5620 element.setIsPrintRepeatedValues(jCheckBoxPrintRepeatedValues.isSelected() ); 5621 } 5622 5623 ReportElementChangedEvent rece = new ReportElementChangedEvent(jrf , getElementSelection() , ReportElementChangedEvent.CHANGED); 5624 rece.setNewValue( new Boolean (jCheckBoxPrintRepeatedValues.isSelected())); 5625 rece.setPropertyChanged("printRepeatedValues"); 5626 jrf.fireReportListenerReportElementsChanged(rece); 5627 } 5629 private void jCheckBoxPrintWhenDetailOverflowsActionPerformed(java.awt.event.ActionEvent evt) { if (jrf == null || getElementSelection().size()==0) return; 5631 Enumeration e = getElementSelection().elements(); 5633 while (e.hasMoreElements()) { 5634 ReportElement element = (ReportElement)e.nextElement(); 5635 element.setIsPrintWhenDetailOverflows(jCheckBoxPrintWhenDetailOverflows.isSelected()); 5636 } 5637 ReportElementChangedEvent rece = new ReportElementChangedEvent(jrf , getElementSelection() , ReportElementChangedEvent.CHANGED); 5638 rece.setNewValue( new Boolean (jCheckBoxPrintWhenDetailOverflows.isSelected())); 5639 rece.setPropertyChanged("printWhenDetailOverflows"); 5640 jrf.fireReportListenerReportElementsChanged(rece); 5641 } 5643 private void jCheckBoxPrintInFirstWholeBandActionPerformed(java.awt.event.ActionEvent evt) { if (jrf == null || getElementSelection().size()==0) return; 5645 Enumeration e = getElementSelection().elements(); 5647 while (e.hasMoreElements()) { 5648 ReportElement element = (ReportElement)e.nextElement(); 5649 element.setIsPrintInFirstWholeBand(jCheckBoxPrintInFirstWholeBand.isSelected()); 5650 } 5651 ReportElementChangedEvent rece = new ReportElementChangedEvent(jrf , getElementSelection() , ReportElementChangedEvent.CHANGED); 5652 rece.setNewValue( new Boolean (jCheckBoxPrintInFirstWholeBand.isSelected())); 5653 rece.setPropertyChanged("printInFirstWholeBand"); 5654 jrf.fireReportListenerReportElementsChanged(rece); 5655 } 5657 private void jCheckBoxRemoveLineWhenBlankActionPerformed(java.awt.event.ActionEvent evt) { if (jrf == null || getElementSelection().size()==0) return; 5659 Enumeration e = getElementSelection().elements(); 5661 while (e.hasMoreElements()) { 5662 ReportElement element = (ReportElement)e.nextElement(); 5663 element.setIsRemoveLineWhenBlank(jCheckBoxRemoveLineWhenBlank.isSelected()); 5664 } 5665 ReportElementChangedEvent rece = new ReportElementChangedEvent(jrf , getElementSelection() , ReportElementChangedEvent.CHANGED); 5666 rece.setNewValue( new Boolean (jCheckBoxRemoveLineWhenBlank.isSelected())); 5667 rece.setPropertyChanged("removeLineWhenBlank"); 5668 jrf.fireReportListenerReportElementsChanged(rece); 5669 } 5672 private void jCheckBoxTransparentActionPerformed(java.awt.event.ActionEvent evt) { if (jrf == null || getElementSelection().size()==0) return; 5674 Enumeration e = getElementSelection().elements(); 5676 while (e.hasMoreElements()) { 5677 ReportElement element = (ReportElement)e.nextElement(); 5678 element.setTransparent(( (jCheckBoxTransparent.isSelected()) ? "Transparent" : "Opaque") ); 5679 } 5680 ReportElementChangedEvent rece = new ReportElementChangedEvent(jrf , getElementSelection() , ReportElementChangedEvent.CHANGED); 5681 rece.setNewValue( (jCheckBoxTransparent.isSelected()) ? "Transparent" : "Opaque"); 5682 rece.setPropertyChanged("mode"); 5683 jrf.fireReportListenerReportElementsChanged(rece); 5684 repaintEditor(); 5685 } 5687 5688 private void closeDialog(java.awt.event.WindowEvent evt) { setVisible(false); 5690 } 5692 5695 public static void main(String args[]) { 5696 new ElementPropertiesDialog(new javax.swing.JFrame (), true).setVisible(true); 5697 } 5698 5699 private javax.swing.ButtonGroup buttonGroupCharts; 5701 private it.businesslogic.ireport.gui.JRTextExpressionArea jBarcodeExpressionArea; 5702 private it.businesslogic.ireport.gui.JRTextExpressionArea jBarcodeExpressionAreaAppIdentifier; 5703 private javax.swing.JButton jButton1; 5704 private javax.swing.JButton jButton2; 5705 private javax.swing.JButton jButtonAddCrosstabParameter; 5706 private javax.swing.JButton jButtonAddLinkParameter; 5707 private javax.swing.JButton jButtonAddParameter; 5708 private javax.swing.JButton jButtonAddReturnValue; 5709 private javax.swing.JButton jButtonBackground; 5710 private javax.swing.JButton jButtonCopyParamsFromMaster; 5711 private javax.swing.JButton jButtonCreatePattern; 5712 private javax.swing.JButton jButtonFindImage; 5713 private javax.swing.JButton jButtonForeground; 5714 private javax.swing.JButton jButtonModCrosstabParameter; 5715 private javax.swing.JButton jButtonModLinkParameter; 5716 private javax.swing.JButton jButtonModParameter; 5717 private javax.swing.JButton jButtonModReturnValue; 5718 private javax.swing.JButton jButtonRemCrosstabParameter; 5719 private javax.swing.JButton jButtonRemLinkParameter; 5720 private javax.swing.JButton jButtonRemParameter; 5721 private javax.swing.JButton jButtonRemReturnValue; 5722 private javax.swing.JCheckBox jCheckBoxBarcodeCheckSum; 5723 private javax.swing.JCheckBox jCheckBoxBarcodeShowText; 5724 private javax.swing.JCheckBox jCheckBoxBlankWhenNull; 5725 private javax.swing.JCheckBox jCheckBoxBold; 5726 private javax.swing.JCheckBox jCheckBoxImageCache; 5727 private javax.swing.JCheckBox jCheckBoxImageIsLazy; 5728 private javax.swing.JCheckBox jCheckBoxItalic; 5729 private javax.swing.JCheckBox jCheckBoxPDFEmbedded; 5730 private javax.swing.JCheckBox jCheckBoxPrintInFirstWholeBand; 5731 private javax.swing.JCheckBox jCheckBoxPrintRepeatedValues; 5732 private javax.swing.JCheckBox jCheckBoxPrintWhenDetailOverflows; 5733 private javax.swing.JCheckBox jCheckBoxRemoveLineWhenBlank; 5734 private javax.swing.JCheckBox jCheckBoxRepeatColumnHeaders; 5735 private javax.swing.JCheckBox jCheckBoxRepeatRowHeaders; 5736 private javax.swing.JCheckBox jCheckBoxStretchWithOverflow; 5737 private javax.swing.JCheckBox jCheckBoxStrokeTrough; 5738 private javax.swing.JCheckBox jCheckBoxStyledText; 5739 private javax.swing.JCheckBox jCheckBoxSubreportCache; 5740 private javax.swing.JCheckBox jCheckBoxTransparent; 5741 private javax.swing.JCheckBox jCheckBoxUnderline; 5742 private javax.swing.JComboBox jComboBoxBand; 5743 private javax.swing.JComboBox jComboBoxBarcodeGroup; 5744 private javax.swing.JComboBox jComboBoxBarcodeType; 5745 private javax.swing.JComboBox jComboBoxEvaluationTime; 5746 private javax.swing.JComboBox jComboBoxEvaluationTime1; 5747 private javax.swing.JComboBox jComboBoxEvaluationTimeBarcode; 5748 private javax.swing.JComboBox jComboBoxFill; 5749 private javax.swing.JComboBox jComboBoxFontName; 5750 private javax.swing.JComboBox jComboBoxGroups; 5751 private javax.swing.JComboBox jComboBoxHAlign; 5752 private javax.swing.JComboBox jComboBoxHorizontalAlignment; 5753 private javax.swing.JComboBox jComboBoxHorizontalAlignment1; 5754 private javax.swing.JComboBox jComboBoxImageExpressionClass; 5755 private javax.swing.JComboBox jComboBoxImageGroup; 5756 private javax.swing.JComboBox jComboBoxImageGroup1; 5757 private javax.swing.JComboBox jComboBoxImageOnError; 5758 private javax.swing.JComboBox jComboBoxImageOnError1; 5759 private javax.swing.JComboBox jComboBoxLineDirection; 5760 private javax.swing.JComboBox jComboBoxLineSpacing; 5761 private javax.swing.JComboBox jComboBoxLinkTarget; 5762 private javax.swing.JComboBox jComboBoxLinkType; 5763 private javax.swing.JComboBox jComboBoxPDFFontName; 5764 private javax.swing.JComboBox jComboBoxPattern; 5765 private javax.swing.JComboBox jComboBoxPdfEncoding; 5766 private javax.swing.JComboBox jComboBoxPen; 5767 private javax.swing.JComboBox jComboBoxPositionType; 5768 private javax.swing.JComboBox jComboBoxReportFont; 5769 private javax.swing.JComboBox jComboBoxRotation; 5770 private javax.swing.JComboBox jComboBoxScale; 5771 private javax.swing.JComboBox jComboBoxScale1; 5772 private javax.swing.JComboBox jComboBoxStretchType; 5773 private javax.swing.JComboBox jComboBoxStyle; 5774 private javax.swing.JComboBox jComboBoxSubreportConnectionType; 5775 private javax.swing.JComboBox jComboBoxSubreportExpressionClass; 5776 private javax.swing.JComboBox jComboBoxTextFieldEvaluationTime; 5777 private javax.swing.JComboBox jComboBoxTextFieldExpressionClass; 5778 private javax.swing.JComboBox jComboBoxTextFieldGroup; 5779 private javax.swing.JComboBox jComboBoxVAlign; 5780 private javax.swing.JComboBox jComboBoxVerticalAlignment; 5781 private javax.swing.JComboBox jComboBoxVerticalAlignment1; 5782 private javax.swing.JLabel jLabel1; 5783 private javax.swing.JLabel jLabel10; 5784 private javax.swing.JLabel jLabel11; 5785 private javax.swing.JLabel jLabel12; 5786 private javax.swing.JLabel jLabel13; 5787 private javax.swing.JLabel jLabel14; 5788 private javax.swing.JLabel jLabel15; 5789 private javax.swing.JLabel jLabel16; 5790 private javax.swing.JLabel jLabel17; 5791 private javax.swing.JLabel jLabel18; 5792 private javax.swing.JLabel jLabel19; 5793 private javax.swing.JLabel jLabel2; 5794 private javax.swing.JLabel jLabel20; 5795 private javax.swing.JLabel jLabel21; 5796 private javax.swing.JLabel jLabel22; 5797 private javax.swing.JLabel jLabel23; 5798 private javax.swing.JLabel jLabel24; 5799 private javax.swing.JLabel jLabel25; 5800 private javax.swing.JLabel jLabel26; 5801 private javax.swing.JLabel jLabel27; 5802 private javax.swing.JLabel jLabel28; 5803 private javax.swing.JLabel jLabel29; 5804 private javax.swing.JLabel jLabel3; 5805 private javax.swing.JLabel jLabel30; 5806 private javax.swing.JLabel jLabel31; 5807 private javax.swing.JLabel jLabel32; 5808 private javax.swing.JLabel jLabel33; 5809 private javax.swing.JLabel jLabel34; 5810 private javax.swing.JLabel jLabel35; 5811 private javax.swing.JLabel jLabel36; 5812 private javax.swing.JLabel jLabel37; 5813 private javax.swing.JLabel jLabel38; 5814 private javax.swing.JLabel jLabel39; 5815 private javax.swing.JLabel jLabel4; 5816 private javax.swing.JLabel jLabel40; 5817 private javax.swing.JLabel jLabel41; 5818 private javax.swing.JLabel jLabel42; 5819 private javax.swing.JLabel jLabel43; 5820 private javax.swing.JLabel jLabel44; 5821 private javax.swing.JLabel jLabel45; 5822 private javax.swing.JLabel jLabel46; 5823 private javax.swing.JLabel jLabel47; 5824 private javax.swing.JLabel jLabel48; 5825 private javax.swing.JLabel jLabel49; 5826 private javax.swing.JLabel jLabel5; 5827 private javax.swing.JLabel jLabel50; 5828 private javax.swing.JLabel jLabel51; 5829 private javax.swing.JLabel jLabel52; 5830 private javax.swing.JLabel jLabel53; 5831 private javax.swing.JLabel jLabel54; 5832 private javax.swing.JLabel jLabel55; 5833 private javax.swing.JLabel jLabel56; 5834 private javax.swing.JLabel jLabel57; 5835 private javax.swing.JLabel jLabel58; 5836 private javax.swing.JLabel jLabel59; 5837 private javax.swing.JLabel jLabel6; 5838 private javax.swing.JLabel jLabel60; 5839 private javax.swing.JLabel jLabel61; 5840 private javax.swing.JLabel jLabel7; 5841 private javax.swing.JLabel jLabel8; 5842 private javax.swing.JLabel jLabel9; 5843 private javax.swing.JLabel jLabelAnchor; 5844 private javax.swing.JLabel jLabelPage; 5845 private javax.swing.JLabel jLabelReference; 5846 private javax.swing.JLabel jLabelStyle; 5847 private javax.swing.JLabel jLabelTarget; 5848 private javax.swing.JLabel jLabelTarget1; 5849 private it.businesslogic.ireport.gui.JNumberComboBox jNumberComboBoxSize; 5850 private it.businesslogic.ireport.gui.JNumberField jNumberFieldBCHeight; 5851 private it.businesslogic.ireport.gui.JNumberField jNumberFieldBCWidth; 5852 private it.businesslogic.ireport.gui.JNumberField jNumberFieldColumnBreakOffset; 5853 private it.businesslogic.ireport.gui.JNumberField jNumberFieldHeight; 5854 private it.businesslogic.ireport.gui.JNumberField jNumberFieldLeft; 5855 private it.businesslogic.ireport.gui.JNumberField jNumberFieldRadius; 5856 private it.businesslogic.ireport.gui.JNumberField jNumberFieldTop; 5857 private it.businesslogic.ireport.gui.JNumberField jNumberFieldWidth; 5858 private javax.swing.JPanel jPanel1; 5859 private javax.swing.JPanel jPanel10; 5860 private javax.swing.JPanel jPanel11; 5861 private javax.swing.JPanel jPanel12; 5862 private javax.swing.JPanel jPanel13; 5863 private javax.swing.JPanel jPanel14; 5864 private javax.swing.JPanel jPanel15; 5865 private javax.swing.JPanel jPanel16; 5866 private javax.swing.JPanel jPanel17; 5867 private javax.swing.JPanel jPanel18; 5868 private javax.swing.JPanel jPanel19; 5869 private javax.swing.JPanel jPanel2; 5870 private javax.swing.JPanel jPanel20; 5871 private javax.swing.JPanel jPanel21; 5872 private javax.swing.JPanel jPanel22; 5873 private javax.swing.JPanel jPanel23; 5874 private javax.swing.JPanel jPanel24; 5875 private javax.swing.JPanel jPanel25; 5876 private javax.swing.JPanel jPanel3; 5877 private javax.swing.JPanel jPanel4; 5878 private javax.swing.JPanel jPanel5; 5879 private javax.swing.JPanel jPanel6; 5880 private javax.swing.JPanel jPanel7; 5881 private javax.swing.JPanel jPanel8; 5882 private javax.swing.JPanel jPanel9; 5883 private javax.swing.JPanel jPanelAnchor; 5884 private javax.swing.JPanel jPanelBarcode; 5885 private javax.swing.JPanel jPanelBorder; 5886 private javax.swing.JPanel jPanelChart; 5887 private javax.swing.JPanel jPanelCommon; 5888 private javax.swing.JPanel jPanelCrosstab; 5889 private javax.swing.JPanel jPanelFont; 5890 private javax.swing.JPanel jPanelGraphicselement; 5891 private javax.swing.JPanel jPanelHyperLink; 5892 private javax.swing.JPanel jPanelImage; 5893 private javax.swing.JPanel jPanelLine; 5894 private javax.swing.JPanel jPanelLinkParams; 5895 private javax.swing.JPanel jPanelPage; 5896 private javax.swing.JPanel jPanelRectangle; 5897 private javax.swing.JPanel jPanelReference; 5898 private javax.swing.JPanel jPanelSheet; 5899 private javax.swing.JPanel jPanelSubreport1; 5900 private javax.swing.JPanel jPanelSubreport2; 5901 private javax.swing.JPanel jPanelSubreportReturnValues; 5902 private javax.swing.JPanel jPanelText; 5903 private javax.swing.JPanel jPanelTextField; 5904 private it.businesslogic.ireport.gui.JRTextExpressionArea jRTextExpressionAreaAnchor; 5905 private it.businesslogic.ireport.gui.JRTextExpressionArea jRTextExpressionAreaAnchorName; 5906 private it.businesslogic.ireport.gui.JRTextExpressionArea jRTextExpressionAreaCrosstabParametersMapExpression; 5907 private it.businesslogic.ireport.gui.JRTextExpressionArea jRTextExpressionAreaImageExpression; 5908 private it.businesslogic.ireport.gui.JRTextExpressionArea jRTextExpressionAreaPage; 5909 private it.businesslogic.ireport.gui.JRTextExpressionArea jRTextExpressionAreaPrintWhenExpression; 5910 private it.businesslogic.ireport.gui.JRTextExpressionArea jRTextExpressionAreaReference; 5911 private it.businesslogic.ireport.gui.JRTextExpressionArea jRTextExpressionAreaSubreportExpression; 5912 private it.businesslogic.ireport.gui.JRTextExpressionArea jRTextExpressionAreaSubreportMapExpression; 5913 private it.businesslogic.ireport.gui.JRTextExpressionArea jRTextExpressionAreaTextConnectionExpression; 5914 private it.businesslogic.ireport.gui.JRTextExpressionArea jRTextExpressionAreaTextFieldExpression; 5915 private javax.swing.JScrollPane jScrollPane1; 5916 private javax.swing.JScrollPane jScrollPane2; 5917 private javax.swing.JScrollPane jScrollPane3; 5918 private javax.swing.JScrollPane jScrollPane4; 5919 private javax.swing.JScrollPane jScrollPane5; 5920 private javax.swing.JSeparator jSeparator1; 5921 private javax.swing.JSeparator jSeparator10; 5922 private javax.swing.JSeparator jSeparator2; 5923 private javax.swing.JSeparator jSeparator3; 5924 private javax.swing.JSeparator jSeparator4; 5925 private javax.swing.JSeparator jSeparator5; 5926 private javax.swing.JSeparator jSeparator6; 5927 private javax.swing.JSeparator jSeparator7; 5928 private javax.swing.JSeparator jSeparator8; 5929 private javax.swing.JSeparator jSeparator9; 5930 private javax.swing.JSpinner jSpinnerBookmarkLevel; 5931 private javax.swing.JTabbedPane jTabbedPane; 5932 private javax.swing.JTabbedPane jTabbedPane1; 5933 private javax.swing.JTabbedPane jTabbedPane2; 5934 private javax.swing.JTable jTableCrosstabParameters; 5935 private javax.swing.JTable jTableLinkParameters; 5936 private javax.swing.JTable jTableSubreportParameters; 5937 private javax.swing.JTable jTableSubreportReturnValues; 5938 private javax.swing.JTextArea jTextAreaText; 5939 private javax.swing.JTextField jTextFieldName; 5940 5942 private boolean init; 5943 5944 5947 public void setJReportFrame(JReportFrame jrf) { 5948 this.jrf = jrf; 5949 if (jrf == null) { 5950 setVisible(false); 5951 this.jTabbedPane.removeAll(); 5952 this.jTabbedPane.updateUI(); 5953 return; 5954 } 5955 5956 this.setTitle(jrf.getReport().getName()); 5957 updateBands(); 5958 updateGroups(); 5959 updateStyles(); 5960 updateReportFonts(); 5961 updateSelection(); 5962 5963 initExpressionArea(jRTextExpressionAreaSubreportExpression); 5964 initExpressionArea(jRTextExpressionAreaAnchor); 5965 initExpressionArea(jRTextExpressionAreaAnchorName); 5966 initExpressionArea(jRTextExpressionAreaImageExpression); 5967 initExpressionArea(jRTextExpressionAreaPage); 5968 initExpressionArea(jRTextExpressionAreaPrintWhenExpression); 5969 initExpressionArea(jRTextExpressionAreaReference); 5970 initExpressionArea(jRTextExpressionAreaSubreportExpression); 5971 initExpressionArea(jRTextExpressionAreaSubreportMapExpression); 5972 initExpressionArea(jRTextExpressionAreaTextConnectionExpression); 5973 initExpressionArea(jRTextExpressionAreaTextFieldExpression); 5974 initExpressionArea(jBarcodeExpressionArea); 5975 } 5976 5977 5978 5983 public void clearExpressionEditorContext() { 5984 jRTextExpressionAreaSubreportExpression.setSubDataset(null); 5985 jRTextExpressionAreaAnchor.setSubDataset(null); 5986 jRTextExpressionAreaAnchorName.setSubDataset(null); 5987 jRTextExpressionAreaImageExpression.setSubDataset(null); 5988 jRTextExpressionAreaPage.setSubDataset(null); 5989 jRTextExpressionAreaPrintWhenExpression.setSubDataset(null); 5990 jRTextExpressionAreaReference.setSubDataset(null); 5991 jRTextExpressionAreaSubreportExpression.setSubDataset(null); 5992 jRTextExpressionAreaSubreportMapExpression.setSubDataset(null); 5993 jRTextExpressionAreaTextConnectionExpression.setSubDataset(null); 5994 jRTextExpressionAreaTextFieldExpression.setSubDataset(null); 5995 jBarcodeExpressionArea.setSubDataset(null); 5996 5997 jRTextExpressionAreaSubreportExpression.getCrosstabElements().removeAllElements(); 5998 jRTextExpressionAreaAnchor.getCrosstabElements().removeAllElements(); 5999 jRTextExpressionAreaAnchorName.getCrosstabElements().removeAllElements(); 6000 jRTextExpressionAreaImageExpression.getCrosstabElements().removeAllElements(); 6001 jRTextExpressionAreaPage.getCrosstabElements().removeAllElements(); 6002 jRTextExpressionAreaPrintWhenExpression.getCrosstabElements().removeAllElements(); 6003 jRTextExpressionAreaReference.getCrosstabElements().removeAllElements(); 6004 jRTextExpressionAreaSubreportExpression.getCrosstabElements().removeAllElements(); 6005 jRTextExpressionAreaSubreportMapExpression.getCrosstabElements().removeAllElements(); 6006 jRTextExpressionAreaTextConnectionExpression.getCrosstabElements().removeAllElements(); 6007 jRTextExpressionAreaTextFieldExpression.getCrosstabElements().removeAllElements(); 6008 jBarcodeExpressionArea.getCrosstabElements().removeAllElements(); 6009 6010 } 6011 6012 6015 public void updateSelection() { 6016 updateSelection(false); 6017 6018 } 6019 6020 public void updateSelection(boolean force) { 6021 6022 6023 if (!force && !this.isVisible()) return; 6024 6025 if (jTabbedPane.getTabCount() > 0) { 6026 jTabbedPane.removeAll(); 6027 this.jTabbedPane.updateUI(); 6028 } 6029 if (jrf == null || getElementSelection().size() == 0) { 6030 return; 6031 } else { 6032 6033 updateBands(); 6034 updateGroups(); 6035 updateStyles(); 6036 updateReportFonts(); 6037 6038 this.setInit(true); 6039 6040 6041 Enumeration e = getElementSelection().elements(); 6042 6043 boolean isTheFirstElement = true; 6044 Band last_band = null; 6045 int y_location = 0; 6046 6047 boolean sameTransparent = true; 6049 boolean sameWidth = true; 6050 boolean sameHeight = true; 6051 boolean sameTop = true; 6052 boolean sameLeft = true; 6053 boolean sameBand = true; 6054 boolean sameRemoveLineWhenBlank = true; 6055 boolean samePrintInFirstWholeBand = true; 6056 boolean samePrintWhenDetailOverflows = true; 6057 boolean samePrintRepeatedValues = true; 6058 boolean samePositionType = true; 6059 boolean sameBackgroud = true; 6060 boolean sameForecolor = true; 6061 boolean samePrintWhenGroupChanges = true; 6062 boolean samePrintWhenExpression = true; 6063 boolean sameKey = true; 6064 boolean sameStretchWithOverflow = true; 6065 boolean sameStyle = true; 6066 6067 boolean areAllGraphicsElements = true; 6069 boolean samePen = true; 6070 boolean sameStretchType = true; 6071 boolean sameFill = true; 6072 boolean areAllRectangleElements = true; 6074 boolean sameRadius = true; 6075 boolean areAllLineElements = true; 6077 boolean sameLineDirection = true; 6078 boolean areAllImageElements = true; 6080 boolean sameScaleImage = true; 6081 boolean sameImageExpression = true; 6082 boolean sameImageGroup = true; 6083 boolean sameEvaluationTime = true; 6084 boolean sameVerticalAlignment = true; 6085 boolean sameHorizontalAlignment = true; 6086 boolean sameImageCache = true; 6087 boolean sameImageLazy = true; 6088 boolean sameImageExpressionClass = true; 6089 boolean sameImageOnError = true; 6090 boolean areAllTextElements = true; 6092 boolean sameReportFont = true; 6093 boolean sameFontName = true; 6094 boolean samePDFFontName = true; 6095 boolean sameTTFFont = true; 6096 boolean sameFontSize = true; 6097 boolean sameIsBold = true; 6098 boolean sameIsItalic = true; 6099 boolean sameIsUnderline = true; 6100 boolean sameIsStrokeTrough = true; 6101 boolean sameTextVAlign = true; 6102 boolean sameTextHAlign = true; 6103 boolean sameTextLineSpacing = true; 6104 boolean sameIsPdfEmbedded = true; 6105 boolean samePdfEncoding = true; 6106 boolean sameRotation = true; 6107 boolean sameIsStyledTexdt = true; 6108 boolean areAllStaticTextElements = true; 6110 boolean sameText = true; 6111 boolean areAllTextFieldElements = true; 6113 boolean sameTextExpressionClass = true; 6114 boolean sameTextExpression = true; 6115 boolean sameTextEvaluationTime = true; 6116 boolean sameTextGroup = true; 6117 boolean sameTextStretchWithOverflow = true; 6118 boolean sameTextBlankWhenNull = true; 6119 boolean sameTextPattern = true; 6120 boolean areAllHyperLinkableElements = true; 6122 boolean sameHyperLinkAnchorName = true; 6123 boolean sameHyperLinkType = true; 6124 boolean sameHyperLinkTarget = true; 6125 boolean sameHyperLinkAnchor = true; 6126 boolean sameHyperLinkPage = true; 6127 boolean sameHyperLinkReference = true; 6128 boolean sameBookmarkLevel = true; 6129 6130 boolean areAllBarcodeElements = true; 6132 boolean sameBarcodeExpression = true; 6133 boolean sameBarcodeGroup = true; 6134 boolean sameBarcodeEvaluationTime = true; 6135 boolean sameBarcodeShowText = true; 6136 boolean sameBarcodeChecksum = true; 6137 boolean sameBarcodeText = true; 6138 boolean sameBarcodeType = true; 6139 boolean sameBCVerticalAlignment = true; 6140 boolean sameBCHorizontalAlignment = true; 6141 boolean sameBCImageOnError = true; 6142 boolean sameBCScaleImage = true; 6143 boolean sameBCHeight = true; 6144 boolean sameBCWidth = true; 6145 boolean sameBCAppIdentifier = true; 6146 6147 boolean isSubreportElement = false; 6148 boolean isCrosstabElement = false; 6149 boolean isChartElement = false; 6150 6151 boolean areAllBorder = true; 6153 6154 6155 6157 if (!jComboBoxPositionType.getItemAt(0).equals("")) 6158 this.jComboBoxPositionType.insertItemAt("",0); 6159 if (jComboBoxStyle.getItemCount() == 0 || !jComboBoxStyle.getItemAt(0).equals("")) 6160 this.jComboBoxStyle.insertItemAt("",0); 6161 if (!jComboBoxPen.getItemAt(0).equals("")) 6162 this.jComboBoxPen.insertItemAt("",0); 6163 if (!jComboBoxStretchType.getItemAt(0).equals("")) 6164 this.jComboBoxStretchType.insertItemAt("",0); 6165 if (!jComboBoxFill.getItemAt(0).equals("")) 6166 this.jComboBoxFill.insertItemAt("",0); 6167 if (!jComboBoxLineDirection.getItemAt(0).equals("")) 6168 this.jComboBoxLineDirection.insertItemAt("",0); 6169 if (!jComboBoxScale.getItemAt(0).equals("")) 6170 this.jComboBoxScale.insertItemAt("",0); 6171 if (!jComboBoxImageExpressionClass.getItemAt(0).equals("")) 6172 this.jComboBoxImageExpressionClass.insertItemAt("",0); 6173 if (!jComboBoxVerticalAlignment.getItemAt(0).equals("")) 6174 this.jComboBoxVerticalAlignment.insertItemAt("",0); 6175 if (!jComboBoxHorizontalAlignment.getItemAt(0).equals("")) 6176 this.jComboBoxHorizontalAlignment.insertItemAt("",0); 6177 if (!jComboBoxEvaluationTime.getItemAt(0).equals("")) 6178 this.jComboBoxEvaluationTime.insertItemAt("",0); 6179 if (jComboBoxReportFont.getItemCount() == 0 || !jComboBoxReportFont.getItemAt(0).equals("")) 6180 this.jComboBoxReportFont.insertItemAt("",0); 6181 if (jComboBoxHAlign.getItemCount() == 0 || !jComboBoxHAlign.getItemAt(0).equals("")) 6182 this.jComboBoxHAlign.insertItemAt("",0); 6183 if (jComboBoxVAlign.getItemCount() == 0 || !jComboBoxVAlign.getItemAt(0).equals("")) 6184 this.jComboBoxVAlign.insertItemAt("",0); 6185 if (jComboBoxLineSpacing.getItemCount() == 0 || !jComboBoxLineSpacing.getItemAt(0).equals("")) 6186 this.jComboBoxLineSpacing.insertItemAt("",0); 6187 if (jComboBoxPdfEncoding.getItemCount() == 0 || !jComboBoxPdfEncoding.getItemAt(0).equals("")) 6188 this.jComboBoxPdfEncoding.insertItemAt("",0); 6189 if (jComboBoxTextFieldEvaluationTime.getItemCount() == 0 || !jComboBoxTextFieldEvaluationTime.getItemAt(0).equals("")) 6190 this.jComboBoxTextFieldEvaluationTime.insertItemAt("",0); 6191 if (jComboBoxTextFieldExpressionClass.getItemCount() == 0 || !jComboBoxTextFieldExpressionClass.getItemAt(0).equals("")) 6192 this.jComboBoxTextFieldExpressionClass.insertItemAt("",0); 6193 if (jComboBoxTextFieldGroup.getItemCount() == 0 || !jComboBoxTextFieldGroup.getItemAt(0).equals("")) 6194 this.jComboBoxTextFieldGroup.insertItemAt("",0); 6195 if (jComboBoxPattern.getItemCount() == 0 || !jComboBoxPattern.getItemAt(0).equals("")) 6196 this.jComboBoxPattern.insertItemAt("",0); 6197 if (jComboBoxLinkType.getItemCount() == 0 || !jComboBoxLinkType.getItemAt(0).equals("")) 6198 this.jComboBoxLinkType.insertItemAt("",0); 6199 if (!jComboBoxRotation.getItemAt(0).equals("")) 6200 this.jComboBoxRotation.insertItemAt("",0); 6201 if (jComboBoxEvaluationTimeBarcode.getItemCount() == 0 || !jComboBoxEvaluationTimeBarcode.getItemAt(0).equals("")) 6202 this.jComboBoxEvaluationTimeBarcode.insertItemAt("",0); 6203 if (jComboBoxBarcodeGroup.getItemCount() == 0 || !jComboBoxBarcodeGroup.getItemAt(0).equals("")) 6204 this.jComboBoxBarcodeGroup.insertItemAt("",0); 6205 if (jComboBoxBarcodeType.getItemCount() == 0 || !jComboBoxBarcodeType.getItemAt(0).equals("")) 6206 this.jComboBoxBarcodeType.insertItemAt("",0); 6207 if (jComboBoxLinkTarget.getItemCount() == 0 || !jComboBoxLinkTarget.getItemAt(0).equals("")) 6208 this.jComboBoxLinkTarget.insertItemAt("",0); 6209 if (jComboBoxImageOnError.getItemCount() == 0 || !jComboBoxImageOnError.getItemAt(0).equals("")) 6210 this.jComboBoxImageOnError.insertItemAt("",0); 6211 6212 jComboBoxPattern.setSelectedIndex(0); 6213 ((javax.swing.JTextField ) jComboBoxPattern.getEditor().getEditorComponent()).setText(""); 6214 6215 6216 while (e.hasMoreElements()) { 6217 ReportElement re = (ReportElement)e.nextElement(); 6218 if (re.getBand() != null && (last_band == null || last_band != re.getBand())) { 6221 y_location = this.jrf.getReport().getBandYLocation(re.getBand()); 6222 last_band = re.getBand(); 6223 } 6224 6225 int x_location = this.jrf.getReport().getLeftMargin(); 6226 6227 if (re.getBand() == null && re.getCell() != null) { 6228 y_location = re.getCell().getTop(); 6229 x_location = re.getCell().getLeft(); 6230 } 6231 6232 6233 6234 if (sameStretchType) sameStretchType = this.setComboBoxTag(isTheFirstElement, re.getStretchType() , jComboBoxStretchType ); 6235 if (sameKey) sameKey = this.setTextField(isTheFirstElement, re.getKey(), jTextFieldName); 6236 if (sameWidth) sameWidth = this.setElementNumber(isTheFirstElement, re.getWidth(), jNumberFieldWidth); 6237 if (sameHeight) sameHeight = this.setElementNumber(isTheFirstElement, re.getHeight(), jNumberFieldHeight); 6238 6239 int position_x = re.getPosition().x; 6240 if (re.getParentElement() != null) position_x -= re.getParentElement().getPosition().x; 6241 else position_x = position_x - 10 - x_location; 6242 6243 if (sameLeft) sameLeft = this.setElementNumber(isTheFirstElement,position_x, jNumberFieldLeft); 6244 6245 int position_y = re.getPosition().y; 6246 if (re.getParentElement() != null) position_y -= re.getParentElement().getPosition().y; 6247 else position_y = position_y - y_location - 10; 6248 6249 if (sameTop) sameTop = this.setElementNumber(isTheFirstElement, position_y, jNumberFieldTop); 6250 6251 if (sameTransparent) sameTransparent = this.setCheckBox(isTheFirstElement, re.getTransparent().equals("Transparent"), jCheckBoxTransparent); 6252 if (sameBand) sameBand = this.setComboBox(isTheFirstElement, (re.getCell() != null) ? (Object )re.getCell() : (Object )re.getBand(), jComboBoxBand ); 6253 if (sameRemoveLineWhenBlank) sameRemoveLineWhenBlank = this.setCheckBox(isTheFirstElement, re.isIsRemoveLineWhenBlank(), jCheckBoxRemoveLineWhenBlank); 6254 if (samePrintInFirstWholeBand) samePrintInFirstWholeBand = this.setCheckBox(isTheFirstElement, re.isIsPrintInFirstWholeBand(), jCheckBoxPrintInFirstWholeBand); 6255 if (samePrintWhenDetailOverflows) samePrintWhenDetailOverflows = this.setCheckBox(isTheFirstElement, re.isIsPrintWhenDetailOverflows(), jCheckBoxPrintWhenDetailOverflows); 6256 if (samePrintRepeatedValues) samePrintRepeatedValues = this.setCheckBox(isTheFirstElement, re.isIsPrintRepeatedValues(), jCheckBoxPrintRepeatedValues); 6257 if (samePositionType) samePositionType = this.setComboBoxTag(isTheFirstElement, re.getPositionType(), jComboBoxPositionType ); 6258 if (sameBackgroud) sameBackgroud= setElementColor(isTheFirstElement, re.getBgcolor(), jButtonBackground); 6259 if (sameForecolor) sameForecolor = setElementColor(isTheFirstElement, re.getFgcolor(), jButtonForeground); 6260 if (samePrintWhenExpression) samePrintWhenExpression = setTextArea(isTheFirstElement, re.printWhenExpression, jRTextExpressionAreaPrintWhenExpression); 6261 if (samePrintWhenGroupChanges) samePrintWhenGroupChanges = this.setComboBoxText(isTheFirstElement, Misc.nvl( re.printWhenGroupChanges,""), jComboBoxGroups); 6262 if (sameStyle) sameStyle = this.setComboBox(isTheFirstElement, re.getStyle(), jComboBoxStyle ); 6263 if (areAllGraphicsElements && (re instanceof GraphicReportElement)) { 6265 GraphicReportElement gre = (GraphicReportElement)re; 6266 if (samePen) samePen = this.setComboBoxTag(isTheFirstElement, gre.getGraphicElementPen() , jComboBoxPen ); 6267 6268 if (sameFill) sameFill = this.setComboBoxTag(isTheFirstElement, gre.getFill() , jComboBoxFill ); 6269 } else { 6270 areAllGraphicsElements = false; 6271 } 6272 6273 if (areAllRectangleElements && (re instanceof RectangleReportElement)) { 6275 RectangleReportElement rre = (RectangleReportElement)re; 6276 if (sameRadius) sameRadius = this.setElementNumber(isTheFirstElement, rre.getRadius(), jNumberFieldRadius); 6277 6278 } else { 6279 areAllRectangleElements = false; 6280 } 6281 6282 if (areAllLineElements && (re instanceof LineReportElement)) { 6284 LineReportElement lre = (LineReportElement)re; 6285 if (sameLineDirection) samePen = this.setComboBoxTag(isTheFirstElement, lre.direction , jComboBoxLineDirection ); 6286 } else { 6287 areAllLineElements = false; 6288 } 6289 6290 if (areAllBarcodeElements && re instanceof BarcodeReportElement) { 6292 BarcodeReportElement bre = (BarcodeReportElement)re; 6293 if (sameBarcodeExpression) sameBarcodeExpression = setTextArea(isTheFirstElement, bre.getText(), jBarcodeExpressionArea); 6294 if (sameBarcodeGroup) sameBarcodeGroup = this.setComboBoxText(isTheFirstElement, Misc.nvl( bre.getEvaluationGroup(),""), jComboBoxBarcodeGroup); 6295 if (sameBarcodeType) sameBarcodeType = this.setTagComboBox(isTheFirstElement, bre.getType()+"", jComboBoxBarcodeType); 6296 if (sameBarcodeEvaluationTime) sameBarcodeEvaluationTime = this.setComboBoxTag(isTheFirstElement, Misc.nvl( bre.getEvaluationTime(),""), jComboBoxEvaluationTimeBarcode); 6297 if (sameBarcodeShowText) sameBarcodeShowText = this.setCheckBox(isTheFirstElement, bre.isShowText(), jCheckBoxBarcodeShowText ); 6298 if (sameBarcodeChecksum) sameBarcodeChecksum = this.setCheckBox(isTheFirstElement, bre.isCheckSum(), jCheckBoxBarcodeCheckSum ); 6299 if (sameBCScaleImage) sameBCScaleImage = this.setComboBoxTag(isTheFirstElement, bre.getScaleImage() , jComboBoxScale1 ); 6300 if (sameBCImageOnError) sameBCImageOnError = this.setComboBoxTag(isTheFirstElement, Misc.nvl( bre.getOnErrorType(),""), jComboBoxImageOnError1); 6301 if (sameBCVerticalAlignment) sameBCVerticalAlignment = this.setComboBoxTag(isTheFirstElement, Misc.nvl( bre.getVerticalAlignment(),""), jComboBoxVerticalAlignment1); 6302 if (sameBCHorizontalAlignment) sameBCHorizontalAlignment = this.setComboBoxTag(isTheFirstElement, Misc.nvl( bre.getHorizontalAlignment(),""), jComboBoxHorizontalAlignment1); 6303 if (sameBCHeight) sameBCHeight = this.setElementNumber(isTheFirstElement, bre.getImageHeight(), jNumberFieldBCHeight); 6304 if (sameBCAppIdentifier) sameBCAppIdentifier = this.setTextArea(isTheFirstElement, bre.getApplicationIdentifier(), jBarcodeExpressionAreaAppIdentifier); 6305 if (sameBCWidth) sameBCWidth = this.setElementNumber(isTheFirstElement, bre.getImageWidth(), jNumberFieldBCWidth); 6306 } else { 6307 areAllBarcodeElements = false; 6308 } 6309 6310 6311 if (areAllImageElements && (re instanceof ImageReportElement ) && !(re instanceof ChartReportElement ) && !(re instanceof BarcodeReportElement )) { 6312 ImageReportElement ire = (ImageReportElement)re; 6313 if (sameScaleImage) sameScaleImage = this.setComboBoxTag(isTheFirstElement, ire.getScaleImage() , jComboBoxScale ); 6314 if (sameImageExpression) sameImageExpression = setTextArea(isTheFirstElement, ire.getImageExpression(), jRTextExpressionAreaImageExpression); 6315 if (sameImageGroup) sameImageGroup = this.setComboBoxText(isTheFirstElement, Misc.nvl( ire.getEvaluationGroup(),""), jComboBoxImageGroup); 6316 if (sameEvaluationTime) sameEvaluationTime = this.setComboBoxTag(isTheFirstElement, Misc.nvl( ire.getEvaluationTime(),""), jComboBoxEvaluationTime); 6317 if (sameVerticalAlignment) sameVerticalAlignment = this.setComboBoxTag(isTheFirstElement, Misc.nvl( ire.getVerticalAlignment(),""), jComboBoxVerticalAlignment); 6318 if (sameHorizontalAlignment) sameHorizontalAlignment = this.setComboBoxTag(isTheFirstElement, Misc.nvl( ire.getHorizontalAlignment(),""), jComboBoxHorizontalAlignment); 6319 if (sameImageCache) sameImageCache = this.setCheckBox(isTheFirstElement, ire.isIsUsingCache(), jCheckBoxImageCache ); 6320 if (sameImageLazy) sameImageLazy = this.setCheckBox(isTheFirstElement, ire.isIsLazy(), jCheckBoxImageIsLazy ); 6321 if (sameImageExpressionClass) sameImageExpressionClass = this.setComboBoxText(isTheFirstElement, Misc.nvl( ire.getImageClass(),""), jComboBoxImageExpressionClass); 6322 if (sameImageOnError) sameImageOnError = this.setComboBoxTag(isTheFirstElement, Misc.nvl( ire.getOnErrorType(),""), jComboBoxImageOnError); 6323 6324 } else { 6325 areAllImageElements = false; 6326 } 6327 6328 if (areAllTextElements && (re instanceof TextReportElement)) { 6330 TextReportElement tre = (TextReportElement)re; 6331 if (sameReportFont) sameReportFont = this.setComboBoxText(isTheFirstElement, tre.getReportFont() , jComboBoxReportFont ); 6332 if (sameFontName) sameFontName = setComboBoxText(isTheFirstElement, tre.getFontName() , jComboBoxFontName); 6333 if (samePDFFontName) { 6334 samePDFFontName = this.setMixedTagComboBox(isTheFirstElement, tre.getPDFFontName() , jComboBoxPDFFontName ); 6335 } 6336 if (sameFontSize) sameFontSize = this.setElementComboNumber(isTheFirstElement, tre.getFontSize() , jNumberComboBoxSize ); 6337 if (sameIsBold) sameIsBold = this.setCheckBox(isTheFirstElement, tre.isBold(), jCheckBoxBold ); 6338 if (sameIsStyledTexdt) sameIsStyledTexdt = this.setCheckBox(isTheFirstElement, tre.isIsStyledText(), jCheckBoxStyledText ); 6339 if (sameIsItalic) sameIsItalic = this.setCheckBox(isTheFirstElement, tre.isItalic(), jCheckBoxItalic ); 6340 if (sameIsUnderline) sameIsUnderline = this.setCheckBox(isTheFirstElement, tre.isUnderline(), jCheckBoxUnderline ); 6341 if (sameIsStrokeTrough) sameIsStrokeTrough = this.setCheckBox(isTheFirstElement, tre.isStrikeTrought(), jCheckBoxStrokeTrough ); 6342 if (sameTextVAlign) sameTextVAlign = this.setComboBoxTag(isTheFirstElement, tre.getVerticalAlign(), jComboBoxVAlign ); 6343 if (sameTextHAlign) sameTextHAlign = this.setComboBoxTag(isTheFirstElement, tre.getAlign() , jComboBoxHAlign ); 6344 if (sameTextLineSpacing) sameTextHAlign = this.setComboBoxTag(isTheFirstElement, tre.getLineSpacing() , jComboBoxLineSpacing ); 6345 if (sameIsPdfEmbedded) sameIsPdfEmbedded = this.setCheckBox(isTheFirstElement, tre.isPdfEmbedded(), jCheckBoxPDFEmbedded ); 6346 if (samePdfEncoding) samePdfEncoding = this.setPdfEncodingComboBox(isTheFirstElement, tre.getPdfEncoding() , jComboBoxPdfEncoding ); 6347 6348 if (sameRotation) sameRotation = this.setComboBoxTag(isTheFirstElement, tre.getRotate(), jComboBoxRotation); 6349 6350 } else { 6351 areAllTextElements = false; 6352 } 6353 6354 if (areAllStaticTextElements && (re instanceof StaticTextReportElement)) { 6356 TextReportElement tre = (TextReportElement)re; 6357 if (sameText) sameText = this.setJTextArea(isTheFirstElement, tre.getText() , jTextAreaText ); 6358 } else { 6359 areAllStaticTextElements = false; 6360 } 6361 6362 6363 6364 if (areAllBorder && (re instanceof BoxElement)) { 6365 if (isTheFirstElement) { 6366 boxPanel.setBox( ((BoxElement)re).getBox().cloneMe() ); 6367 } 6368 } else { 6369 areAllBorder = false; 6370 } 6371 6372 if (areAllTextFieldElements && (re instanceof TextFieldReportElement)) { 6374 TextFieldReportElement tre = (TextFieldReportElement)re; 6375 if (sameTextExpression) sameText = this.setTextArea(isTheFirstElement, tre.getText() , jRTextExpressionAreaTextFieldExpression ); 6376 if (sameTextExpressionClass) sameTextExpressionClass = this.setComboBoxText(isTheFirstElement, tre.getClassExpression(), jComboBoxTextFieldExpressionClass ); 6377 if (sameTextEvaluationTime) sameTextEvaluationTime = this.setComboBoxTag(isTheFirstElement, tre.getEvaluationTime(), jComboBoxTextFieldEvaluationTime ); 6378 if (sameTextGroup) sameTextGroup = this.setComboBoxText(isTheFirstElement, tre.getGroup(), jComboBoxTextFieldGroup ); 6379 if (sameTextStretchWithOverflow) sameTextStretchWithOverflow = this.setCheckBox(isTheFirstElement, tre.isStretchWithOverflow(), jCheckBoxStretchWithOverflow); 6380 if (sameTextBlankWhenNull) sameTextBlankWhenNull = this.setCheckBox(isTheFirstElement, tre.isBlankWhenNull(), jCheckBoxBlankWhenNull); 6381 if (sameTextPattern) sameTextPattern = this.setWritableComboBoxText(isTheFirstElement, tre.getPattern(), jComboBoxPattern); 6382 } else { 6383 areAllTextFieldElements = false; 6384 } 6385 6386 if (areAllHyperLinkableElements && (re instanceof HyperLinkableReportElement)) { 6387 HyperLinkableReportElement hlre = (HyperLinkableReportElement)re; 6388 if (sameHyperLinkAnchorName) sameHyperLinkAnchorName = setTextArea(isTheFirstElement, hlre.getAnchorNameExpression(), jRTextExpressionAreaAnchorName); 6389 if (sameHyperLinkType) sameHyperLinkType = this.setComboBoxText(isTheFirstElement, hlre.getHyperlinkType(), jComboBoxLinkType); 6390 if (sameHyperLinkTarget) sameHyperLinkTarget = this.setComboBoxText(isTheFirstElement, hlre.getHyperlinkTarget(), jComboBoxLinkTarget); 6391 if (sameBookmarkLevel) sameBookmarkLevel = setSpinnerLevel(isTheFirstElement, hlre.getBookmarkLevel(), jSpinnerBookmarkLevel); 6392 6393 if (sameHyperLinkType) { 6394 if (sameHyperLinkAnchor) sameHyperLinkAnchor = setTextArea(isTheFirstElement, hlre.getHyperlinkAnchorExpression(), jRTextExpressionAreaAnchor); 6395 if (sameHyperLinkPage) sameHyperLinkPage = setTextArea(isTheFirstElement, hlre.getHyperlinkPageExpression(), jRTextExpressionAreaPage); 6396 if (sameHyperLinkReference) sameHyperLinkReference = setTextArea(isTheFirstElement, hlre.getHyperlinkReferenceExpression(), jRTextExpressionAreaReference); 6397 6398 } else { 6399 jRTextExpressionAreaAnchor.setText(""); 6400 jRTextExpressionAreaAnchor.setText(""); 6401 jRTextExpressionAreaPage.setText(""); 6402 jRTextExpressionAreaReference.setText(""); 6403 } 6404 6405 } else { 6406 areAllHyperLinkableElements = false; 6407 } 6408 6409 if (isTheFirstElement && !e.hasMoreElements() && re instanceof SubReportElement) { 6410 isSubreportElement = true; 6411 SubReportElement sre = (SubReportElement)re; 6412 this.setTextArea(isTheFirstElement, sre.getParametersMapExpression(), jRTextExpressionAreaSubreportMapExpression ); 6413 this.setComboBoxText(isTheFirstElement, sre.getSubreportExpressionClass(), jComboBoxSubreportExpressionClass); 6414 this.setTextArea(isTheFirstElement, sre.getSubreportExpression(), jRTextExpressionAreaSubreportExpression); 6415 if (!sre.isUseConnection() && Misc.nvl( sre.getDataSourceExpression(),"").trim().equals("")) { 6416 this.jComboBoxSubreportConnectionType.setSelectedIndex(0); 6417 this.jRTextExpressionAreaTextConnectionExpression.setEnabled(false); 6418 this.jRTextExpressionAreaTextConnectionExpression.setBackground(Color.LIGHT_GRAY); 6419 this.jRTextExpressionAreaTextConnectionExpression.setText(""); 6420 } else if (sre.isUseConnection()) { 6421 this.jComboBoxSubreportConnectionType.setSelectedIndex(1); 6422 this.jRTextExpressionAreaTextConnectionExpression.setEnabled(true); 6423 this.jRTextExpressionAreaTextConnectionExpression.setBackground(Color.WHITE); 6424 this.jRTextExpressionAreaTextConnectionExpression.setText( sre.getConnectionExpression()); 6425 } else { 6426 this.jComboBoxSubreportConnectionType.setSelectedIndex(2); 6427 this.jRTextExpressionAreaTextConnectionExpression.setEnabled(true); 6428 this.jRTextExpressionAreaTextConnectionExpression.setBackground(Color.WHITE); 6429 this.jRTextExpressionAreaTextConnectionExpression.setText( sre.getDataSourceExpression()); 6430 } 6431 6432 jCheckBoxSubreportCache.setSelected( sre.isIsUsingCache()); 6433 6434 javax.swing.table.DefaultTableModel dtm = (javax.swing.table.DefaultTableModel )jTableSubreportParameters.getModel(); 6436 dtm.setRowCount(0); 6437 6438 java.util.Enumeration enum_parameters = sre.getSubreportParameters().elements(); 6439 while (enum_parameters.hasMoreElements()) { 6440 it.businesslogic.ireport.JRSubreportParameter parameter = (it.businesslogic.ireport.JRSubreportParameter)enum_parameters.nextElement(); 6441 Vector row = new Vector(); 6442 row.addElement(parameter); 6443 row.addElement(parameter.getExpression()); 6444 dtm.addRow(row); 6445 } 6446 6447 dtm = (javax.swing.table.DefaultTableModel )jTableSubreportReturnValues.getModel(); 6448 dtm.setRowCount(0); 6449 6450 java.util.Enumeration enum_returnValues = sre.getReturnValues().elements(); 6451 while (enum_returnValues.hasMoreElements()) { 6452 it.businesslogic.ireport.JRSubreportReturnValue returnValue2 = (it.businesslogic.ireport.JRSubreportReturnValue)enum_returnValues.nextElement(); 6453 Vector row = new Vector(); 6454 row.addElement(returnValue2); 6455 row.addElement(returnValue2.getToVariable()); 6456 dtm.addRow(row); 6457 } 6458 6459 } else 6460 isSubreportElement = false; 6461 6462 if (isTheFirstElement && !e.hasMoreElements() && (re instanceof ChartReportElement || re instanceof ChartReportElement2)) { 6463 isChartElement = true; 6464 6465 if (re instanceof ChartReportElement) { 6466 ImageReportElement ire = (ImageReportElement)re; 6467 this.setComboBoxText(isTheFirstElement, Misc.nvl( ire.getEvaluationGroup(),""), jComboBoxImageGroup1); 6468 this.setComboBoxTag(isTheFirstElement, Misc.nvl( ire.getEvaluationTime(),""), jComboBoxEvaluationTime1); 6469 } else { 6470 ChartReportElement2 ire = (ChartReportElement2)re; 6471 this.setComboBoxText(isTheFirstElement, Misc.nvl( ire.getEvaluationGroup(),""), jComboBoxImageGroup1); 6472 this.setComboBoxTag(isTheFirstElement, Misc.nvl( ire.getEvaluationTime(),""), jComboBoxEvaluationTime1); 6473 } 6474 } else 6475 isChartElement = false; 6476 6477 6478 if (isTheFirstElement && !e.hasMoreElements() && re instanceof CrosstabReportElement) { 6479 isCrosstabElement = true; 6480 CrosstabReportElement cre = (CrosstabReportElement)re; 6481 this.setTextArea(isTheFirstElement, cre.getParametersMapExpression(), jRTextExpressionAreaCrosstabParametersMapExpression ); 6482 6483 jCheckBoxRepeatColumnHeaders.setSelected( cre.isRepeatColumnHeaders()); 6484 jCheckBoxRepeatRowHeaders.setSelected( cre.isRepeatRowHeaders()); 6485 6486 this.setElementNumber(isTheFirstElement, cre.getColumnBreakOffset(), jNumberFieldColumnBreakOffset); 6487 6488 javax.swing.table.DefaultTableModel dtm = (javax.swing.table.DefaultTableModel )jTableCrosstabParameters.getModel(); 6490 dtm.setRowCount(0); 6491 6492 java.util.Enumeration enum_parameters = cre.getCrosstabParameters().elements(); 6493 while (enum_parameters.hasMoreElements()) { 6494 it.businesslogic.ireport.crosstab.CrosstabParameter parameter = (it.businesslogic.ireport.crosstab.CrosstabParameter)enum_parameters.nextElement(); 6495 Vector row = new Vector(); 6496 row.addElement(parameter); 6497 row.addElement(parameter.getParameterValueExpression()); 6498 dtm.addRow(row); 6499 } 6500 } else 6501 isCrosstabElement = false; 6502 6503 6504 isTheFirstElement=false; 6505 } 6506 6507 if (jComboBoxTextFieldEvaluationTime.getSelectedItem().equals("Group")) { 6508 jComboBoxTextFieldGroup.setEnabled(true); 6509 } else { 6510 jComboBoxTextFieldGroup.setEnabled(false); 6511 } 6512 6513 if (this.jComboBoxBand.getSelectedIndex() != 0) { 6515 this.jComboBoxBand.removeItemAt(0); 6516 } 6517 if (this.jComboBoxPositionType.getSelectedIndex() != 0) { 6518 this.jComboBoxPositionType.removeItemAt(0); 6519 } 6520 6521 if (this.jComboBoxLineDirection.getSelectedIndex() != 0) this.jComboBoxLineDirection.removeItemAt(0); 6522 if (this.jComboBoxPen.getSelectedIndex() != 0) this.jComboBoxPen.removeItemAt(0); 6523 if (this.jComboBoxStretchType.getSelectedIndex() != 0) this.jComboBoxStretchType.removeItemAt(0); 6524 if (this.jComboBoxFill.getSelectedIndex() != 0) this.jComboBoxFill.removeItemAt(0); 6525 if (this.jComboBoxScale.getSelectedIndex() != 0) this.jComboBoxScale.removeItemAt(0); 6526 if (this.jComboBoxVerticalAlignment.getSelectedIndex() != 0) this.jComboBoxVerticalAlignment.removeItemAt(0); 6527 if (this.jComboBoxHorizontalAlignment.getSelectedIndex() != 0) this.jComboBoxHorizontalAlignment.removeItemAt(0); 6528 if (this.jComboBoxImageExpressionClass.getSelectedIndex() != 0) this.jComboBoxImageExpressionClass.removeItemAt(0); 6529 if (this.jComboBoxEvaluationTime.getSelectedIndex() != 0) this.jComboBoxEvaluationTime.removeItemAt(0); 6530 if (this.jComboBoxHAlign.getSelectedIndex() != 0) this.jComboBoxHAlign.removeItemAt(0); 6532 if (this.jComboBoxVAlign.getSelectedIndex() != 0) this.jComboBoxVAlign.removeItemAt(0); 6533 if (this.jComboBoxLineSpacing.getSelectedIndex() != 0) this.jComboBoxLineSpacing.removeItemAt(0); 6534 if (this.jComboBoxTextFieldEvaluationTime.getSelectedIndex() != 0) this.jComboBoxTextFieldEvaluationTime.removeItemAt(0); 6535 if (this.jComboBoxTextFieldExpressionClass.getSelectedIndex() != 0) this.jComboBoxTextFieldExpressionClass.removeItemAt(0); 6536 if (this.jComboBoxLinkTarget.getSelectedIndex() != 0) this.jComboBoxLinkTarget.removeItemAt(0); 6537 6539 jTabbedPane2.removeAll(); 6540 javax.swing.table.DefaultTableModel dtmLinkParams = (javax.swing.table.DefaultTableModel )jTableLinkParameters.getModel(); 6541 dtmLinkParams.setRowCount(0); 6542 6543 if (this.jComboBoxLinkType.getSelectedIndex() != 0) { 6544 this.jComboBoxLinkType.removeItemAt(0); 6545 6546 if (((String )this.jComboBoxLinkType.getSelectedItem()).equals("None")) { 6547 this.jRTextExpressionAreaAnchor.setEnabled(false); 6548 this.jLabelAnchor.setEnabled(false); 6549 this.jRTextExpressionAreaPage.setEnabled(false); 6550 this.jLabelPage.setEnabled(false); 6551 this.jRTextExpressionAreaReference.setEnabled(false); 6552 this.jLabelReference.setEnabled(false); 6553 6558 } else if (((String )this.jComboBoxLinkType.getSelectedItem()).equals("Reference")) { 6559 this.jRTextExpressionAreaAnchor.setEnabled(false); 6560 this.jLabelAnchor.setEnabled(false); 6561 this.jRTextExpressionAreaPage.setEnabled(false); 6562 this.jLabelPage.setEnabled(false); 6563 this.jRTextExpressionAreaReference.setEnabled(true); 6564 this.jLabelReference.setEnabled(true); 6565 6566 jTabbedPane2.addTab(I18n.getString("sectionItemHyperlinkPanel.tab.Reference","Reference"),this.jPanelReference); 6567 if (getElementSelection().size()==1) jTabbedPane2.addTab(I18n.getString("sectionItemHyperlinkPanel.tab.LinkParameters","Link parameters"), this.jPanelLinkParams); 6570 } else if (((String )this.jComboBoxLinkType.getSelectedItem()).equals("LocalAnchor")) { 6571 this.jRTextExpressionAreaAnchor.setEnabled(true); 6572 this.jLabelAnchor.setEnabled(true); 6573 this.jRTextExpressionAreaPage.setEnabled(false); 6574 this.jLabelPage.setEnabled(false); 6575 this.jRTextExpressionAreaReference.setEnabled(false); 6576 this.jLabelReference.setEnabled(false); 6577 6578 jTabbedPane2.addTab(I18n.getString("sectionItemHyperlinkPanel.tab.Anchor","Anchor"), this.jPanelAnchor); 6580 if (getElementSelection().size()==1) jTabbedPane2.addTab(I18n.getString("sectionItemHyperlinkPanel.tab.LinkParameters","Link parameters"), this.jPanelLinkParams); 6582 } else if (((String )this.jComboBoxLinkType.getSelectedItem()).equals("LocalPage")) { 6583 this.jRTextExpressionAreaAnchor.setEnabled(false); 6584 this.jLabelAnchor.setEnabled(false); 6585 this.jRTextExpressionAreaPage.setEnabled(true); 6586 this.jLabelPage.setEnabled(true); 6587 this.jRTextExpressionAreaReference.setEnabled(false); 6588 this.jLabelReference.setEnabled(false); 6589 6590 jTabbedPane2.addTab(I18n.getString("sectionItemHyperlinkPanel.tab.Page","Page"),this.jPanelPage); 6593 if (getElementSelection().size()==1) jTabbedPane2.addTab(I18n.getString("sectionItemHyperlinkPanel.tab.LinkParameters","Link parameters"), this.jPanelLinkParams); 6594 } 6595 6596 else if (((String )this.jComboBoxLinkType.getSelectedItem()).equals("RemoteAnchor")) { 6597 this.jRTextExpressionAreaAnchor.setEnabled(true); 6598 this.jLabelAnchor.setEnabled(true); 6599 this.jRTextExpressionAreaPage.setEnabled(false); 6600 this.jLabelPage.setEnabled(false); 6601 this.jRTextExpressionAreaReference.setEnabled(true); 6602 this.jLabelReference.setEnabled(true); 6603 6604 jTabbedPane2.addTab(I18n.getString("sectionItemHyperlinkPanel.tab.Reference","Reference"),this.jPanelReference); 6605 jTabbedPane2.addTab(I18n.getString("sectionItemHyperlinkPanel.tab.Anchor","Anchor"), this.jPanelAnchor); 6606 if (getElementSelection().size()==1) jTabbedPane2.addTab(I18n.getString("sectionItemHyperlinkPanel.tab.LinkParameters","Link parameters"), this.jPanelLinkParams); 6608 } else if (((String )this.jComboBoxLinkType.getSelectedItem()).equals("RemotePage")) { 6609 this.jRTextExpressionAreaAnchor.setEnabled(false); 6610 this.jLabelAnchor.setEnabled(false); 6611 this.jRTextExpressionAreaPage.setEnabled(true); 6612 this.jLabelPage.setEnabled(true); 6613 this.jRTextExpressionAreaReference.setEnabled(true); 6614 this.jLabelReference.setEnabled(true); 6615 6616 jTabbedPane2.addTab(I18n.getString("sectionItemHyperlinkPanel.tab.Reference","Reference"),this.jPanelReference); 6617 jTabbedPane2.addTab(I18n.getString("sectionItemHyperlinkPanel.tab.Page","Page"),this.jPanelPage); 6619 if (getElementSelection().size()==1) jTabbedPane2.addTab(I18n.getString("sectionItemHyperlinkPanel.tab.LinkParameters","Link parameters"), this.jPanelLinkParams); 6620 } else { 6621 this.jRTextExpressionAreaAnchor.setEnabled(true); 6622 this.jLabelAnchor.setEnabled(true); 6623 this.jRTextExpressionAreaPage.setEnabled(true); 6624 this.jLabelPage.setEnabled(true); 6625 this.jRTextExpressionAreaReference.setEnabled(true); 6626 this.jLabelReference.setEnabled(true); 6627 6628 jTabbedPane2.addTab(I18n.getString("sectionItemHyperlinkPanel.tab.Reference","Reference"),this.jPanelReference); 6629 jTabbedPane2.addTab(I18n.getString("sectionItemHyperlinkPanel.tab.Anchor","Anchor"), this.jPanelAnchor); 6630 jTabbedPane2.addTab(I18n.getString("sectionItemHyperlinkPanel.tab.Page","Page"),this.jPanelPage); 6631 if (getElementSelection().size()==1) jTabbedPane2.addTab(I18n.getString("sectionItemHyperlinkPanel.tab.LinkParameters","Link parameters"), this.jPanelLinkParams); 6632 } 6633 6634 if (getElementSelection().size()==1 && getElementSelection().get(0) instanceof HyperLinkableReportElement) { 6635 HyperLinkableReportElement hre = (HyperLinkableReportElement)getElementSelection().get(0); 6637 6638 java.util.Iterator enum_parameters = hre.getLinkParameters().iterator(); 6639 while (enum_parameters.hasNext()) { 6640 it.businesslogic.ireport.JRLinkParameter parameter = (it.businesslogic.ireport.JRLinkParameter)enum_parameters.next(); 6641 Vector row = new Vector(); 6642 row.addElement(parameter); 6643 row.addElement(parameter.getExpression()); 6644 dtmLinkParams.addRow(row); 6645 } 6646 } 6647 } else { 6648 this.jRTextExpressionAreaAnchor.setEnabled(false); 6649 this.jLabelAnchor.setEnabled(false); 6650 this.jRTextExpressionAreaPage.setEnabled(false); 6651 this.jLabelPage.setEnabled(false); 6652 this.jRTextExpressionAreaReference.setEnabled(false); 6653 this.jLabelReference.setEnabled(false); 6654 6655 } 6656 jTabbedPane.add(I18n.getString("elementPropertiesDialog.tab.Common","Common"), jPanelCommon); 6657 if (areAllGraphicsElements) jTabbedPane.add(I18n.getString("elementPropertiesDialog.tab.GraphicsElement","Graphics Element"), jPanelGraphicselement); 6658 if (areAllRectangleElements) jTabbedPane.add(I18n.getString("elementPropertiesDialog.tab.Rectangle","Rectangle"), jPanelRectangle); 6659 if (areAllLineElements) jTabbedPane.add(I18n.getString("elementPropertiesDialog.tab.Line","Line"), jPanelLine ); 6660 if (areAllImageElements) jTabbedPane.add(I18n.getString("elementPropertiesDialog.tab.Image","Image"), jPanelImage ); 6661 if (areAllTextElements) jTabbedPane.add(I18n.getString("elementPropertiesDialog.tab.Font","Font"), jPanelFont); 6662 if (areAllStaticTextElements) jTabbedPane.add(I18n.getString("elementPropertiesDialog.tab.StaticText","Static Text"), jPanelText); 6663 if (areAllTextFieldElements) jTabbedPane.add(I18n.getString("elementPropertiesDialog.tab.TextField","Text Field"), jPanelTextField); 6664 if (areAllHyperLinkableElements) jTabbedPane.add(I18n.getString("elementPropertiesDialog.tab.HyperLink","Hyper Link"), jPanelHyperLink); 6665 if (isSubreportElement) jTabbedPane.add(I18n.getString("elementPropertiesDialog.tab.Subreport","Subreport"), jPanelSubreport1); 6666 if (isSubreportElement) jTabbedPane.add(I18n.getString("elementPropertiesDialog.tab.Subreport2","Subreport (Other)"), jPanelSubreport2); 6667 if (isCrosstabElement) jTabbedPane.add(I18n.getString("elementPropertiesDialog.tab.Crosstab","Crosstab"), jPanelCrosstab); 6668 if (isChartElement) jTabbedPane.add(I18n.getString("elementPropertiesDialog.tab.Chart","Chart"), jPanelChart); 6669 if (areAllBarcodeElements) jTabbedPane.add(I18n.getString("elementPropertiesDialog.tab.Barcode","Barcode"), jPanelBarcode); 6670 if (areAllBorder) jTabbedPane.add(I18n.getString("elementPropertiesDialog.tab.Border","Border"), jPanelBorder); 6671 jTabbedPane.add(I18n.getString("elementPropertiesDialog.tab.All","All"), jPanelSheet); 6672 6673 6674 if (lastSelectedPanel != null) 6675 6676 try { 6677 jTabbedPane.setSelectedComponent( lastSelectedPanel); 6678 } catch (Exception ex) { 6679 lastSelectedPanel = jPanelCommon; 6680 } 6681 jTabbedPane.updateUI(); 6682 this.setInit(false); 6683 } 6684 } 6685 6686 6689 public void updateGroups() { 6690 this.setInit(true); 6691 Vector group_names = new Vector(); 6693 Enumeration e = jrf.getReport().getGroups().elements(); 6694 while (e.hasMoreElements()) { 6695 group_names.addElement(""+e.nextElement()); 6696 } 6697 Misc.updateComboBox( jComboBoxGroups, group_names,true); 6698 Misc.updateComboBox( jComboBoxImageGroup , group_names,true); 6699 Misc.updateComboBox( jComboBoxImageGroup1 , group_names,true); 6700 Misc.updateComboBox( jComboBoxTextFieldGroup , group_names,true); 6701 Misc.updateComboBox( jComboBoxBarcodeGroup , group_names,true); 6702 this.setInit(false); 6703 } 6704 6705 6706 6709 public void updateBands() { 6710 this.setInit(true); 6711 if (jrf != null) { 6712 if (jrf.getSelectedCrosstabEditorPanel() == null) { 6713 jLabel1.setText(I18n.getString("elementPropertiesDialog.label1","Band") ); 6714 Misc.updateComboBox( jComboBoxBand, jrf.getReport().getBands(), true); 6715 } else { 6716 jLabel1.setText(I18n.getString("elementPropertiesDialog.label1Cell","Cell")); 6717 Misc.updateComboBox( jComboBoxBand, jrf.getSelectedCrosstabEditorPanel().getCrosstabElement().getCells(), true); 6718 } 6719 } 6720 this.setInit(false); 6721 } 6722 6723 6724 6725 6726 public void updateStyles() { 6727 this.setInit(true); 6728 Misc.updateComboBox( jComboBoxStyle, jrf.getReport().getStyles(), true); 6729 this.setInit(false); 6730 } 6731 6732 6733 6736 public void updateReportFonts() { 6737 this.setInit(true); 6738 Vector font_names = new Vector(); 6740 Enumeration e = jrf.getReport().getFonts().elements(); 6741 while (e.hasMoreElements()) { 6742 font_names.addElement(""+e.nextElement()); 6743 } 6744 Misc.updateStringComboBox(jComboBoxReportFont, font_names,true); 6745 this.setInit(false); 6746 } 6747 6748 6749 public void updateFonts() { 6750 6751 boolean localInit = this.isInit(); 6752 this.setInit(true); 6753 Vector fontsVec = new Vector(); 6755 fontsVec.addElement(new Tag("Helvetica")); 6756 fontsVec.addElement(new Tag("Helvetica-Bold")); 6757 fontsVec.addElement(new Tag("Helvetica-BoldOblique")); 6758 fontsVec.addElement(new Tag("Helvetica-Oblique")); 6759 fontsVec.addElement(new Tag("Courier")); 6760 fontsVec.addElement(new Tag("Courier-Bold")); 6761 fontsVec.addElement(new Tag("Courier-BoldOblique")); 6762 fontsVec.addElement(new Tag("Courier-Oblique")); 6763 fontsVec.addElement(new Tag("Symbol")); 6764 fontsVec.addElement(new Tag("Times-Roman")); 6765 fontsVec.addElement(new Tag("Times-Bold")); 6766 fontsVec.addElement(new Tag("Times-BoldItalic")); 6767 fontsVec.addElement(new Tag("Times-Italic")); 6768 fontsVec.addElement(new Tag("ZapfDingbats")); 6769 fontsVec.addElement(new Tag("STSong-Light")); 6770 fontsVec.addElement(new Tag("MHei-Medium")); 6771 fontsVec.addElement(new Tag("MSung-Light")); 6772 fontsVec.addElement(new Tag("HeiseiKakuGo-W5")); 6773 fontsVec.addElement(new Tag("HeiseiMin-W3")); 6774 fontsVec.addElement(new Tag("HYGoThic-Medium")); 6775 fontsVec.addElement(new Tag("HYSMyeongJo-Medium")); 6776 Vector iRfonts = MainFrame.getMainInstance().getTtfFonts(); 6777 for (int i_f=0; i_f<iRfonts.size(); ++i_f) { 6778 fontsVec.addElement(new Tag( ((IRFont)iRfonts.elementAt(i_f)).getFile(), 6779 iRfonts.elementAt(i_f)+"")); 6780 } 6781 Misc.updateComboBox(jComboBoxPDFFontName,fontsVec); 6782 this.setInit(localInit); 6783 } 6784 6785 6786 6787 6788 protected boolean setElementNumber( boolean firstTime, double value, JNumberField numberField ) { 6789 if (( ! firstTime ) && (!(numberField.getValue() == value))) { 6790 numberField.setText(""); 6791 return false; 6792 } else { 6793 try { 6794 numberField.setValue( value ); 6795 } catch (Exception ex){ 6796 ex.printStackTrace(); 6797 } 6798 } 6799 return true; 6800 } 6801 6802 6803 6804 6805 protected boolean setSpinnerLevel( boolean firstTime, int value, javax.swing.JSpinner spinner ) { 6806 javax.swing.SpinnerNumberModel snm = (javax.swing.SpinnerNumberModel )spinner.getModel(); 6807 if (( ! firstTime ) && (!( ((Number )snm.getNumber()).intValue() == value))) { 6808 snm.setValue(new Integer (0)); 6809 return false; 6810 } else { 6811 try { 6812 snm.setValue(new Integer (value) ); 6813 } catch (Exception ex){ 6814 ex.printStackTrace(); 6815 } 6816 } 6817 return true; 6818 } 6819 6820 6821 6822 6823 public static boolean setElementComboNumber( boolean firstTime, double value, JNumberComboBox numberField ) { 6824 if (( ! firstTime ) && (!(numberField.getValue() == value))) { 6825 numberField.setSelectedItem(""); 6826 return false; 6827 } else { 6828 try { 6829 numberField.setValue( value ); 6830 } catch (Exception ex){ 6831 ex.printStackTrace(); 6832 } 6833 } 6834 return true; 6835 } 6836 6837 6838 6839 6840 6841 protected boolean setCheckBox( boolean firstTime, boolean value, javax.swing.JCheckBox checkField ) { 6842 if (( ! firstTime ) && (!(checkField.isSelected() == value))) { 6843 checkField.setSelected(false); 6844 return false; 6845 } else { 6846 try { 6847 checkField.setSelected( value ); 6848 } catch (Exception ex){ 6849 ex.printStackTrace(); 6850 } 6851 } 6852 return true; 6853 } 6854 6855 6856 6857 6858 6859 protected boolean setComboBox( boolean firstTime, Object value, javax.swing.JComboBox comboField ) { 6860 if (( ! firstTime ) && (!(comboField.getSelectedItem() == value))) { 6861 comboField.setSelectedIndex(0); 6862 return false; 6863 } else { 6864 try { 6865 comboField.setSelectedItem( value ); 6866 } catch (Exception ex){ 6867 ex.printStackTrace(); 6868 } 6869 } 6870 return true; 6871 } 6872 6873 6874 6875 6876 protected boolean setFontComboBox( boolean firstTime, String value, javax.swing.JComboBox comboField ) { 6877 if (( ! firstTime ) && (!(comboField.getSelectedItem()!=null && comboField.getSelectedItem() instanceof IRFont && ((IRFont)comboField.getSelectedItem()).getFile().equals(value)))) { 6878 if (comboField.getItemCount() > 0) 6879 comboField.setSelectedIndex(0); 6880 return false; 6881 } else { 6882 try { 6883 for (int i=0; i<comboField.getItemCount(); ++i) { 6884 if (comboField.getItemAt(i) instanceof IRFont && ((IRFont)comboField.getItemAt(i)).getFile().equals(value) ) { 6885 comboField.setSelectedIndex(i); 6886 return true; 6887 } 6888 } 6889 if (comboField.getItemCount() > 0) 6890 comboField.setSelectedIndex(0); 6891 } catch (Exception ex){ 6892 ex.printStackTrace(); 6893 } 6894 } 6895 return true; 6896 } 6897 6898 6899 6900 6901 protected boolean setPdfEncodingComboBox( boolean firstTime, String value, javax.swing.JComboBox comboField ) { 6902 if (( ! firstTime ) && (!(comboField.getSelectedItem()!=null && ( (comboField.getSelectedItem() instanceof PdfEncoding && ((PdfEncoding)comboField.getSelectedItem()).getEncoding().equalsIgnoreCase(value)) || (comboField.getSelectedItem()+"").equals(value) )))) { 6903 if (comboField.getItemCount() > 0) 6904 comboField.setSelectedIndex(0); 6905 return false; 6906 } else { 6907 try { 6908 for (int i=0; i<comboField.getItemCount(); ++i) { 6909 if (comboField.getItemAt(i) instanceof PdfEncoding && ((PdfEncoding)comboField.getItemAt(i)).getEncoding().equals(value) ) { 6910 comboField.setSelectedIndex(i); 6911 return true; 6912 } 6913 } 6914 comboField.setSelectedItem(value); 6915 } catch (Exception ex){ 6916 ex.printStackTrace(); 6917 } 6918 } 6919 return true; 6920 } 6921 6922 6923 6924 6925 public static boolean setComboBoxText( boolean firstTime, String value, javax.swing.JComboBox comboField ) { 6926 if (( ! firstTime ) && (!( Misc.nvl(comboField.getSelectedItem(),"").equalsIgnoreCase(value)))) { 6927 comboField.setSelectedIndex(0); 6928 return false; 6929 } else { 6930 try { 6931 comboField.setSelectedItem( value ); 6932 } catch (Exception ex){ 6933 ex.printStackTrace(); 6934 } 6935 } 6936 return true; 6937 } 6938 6939 public static boolean setComboBoxTag( boolean firstTime, String value, javax.swing.JComboBox comboField ) { 6940 if ((!firstTime ) && (!( Misc.nvl( Misc.getComboboxSelectedValue(comboField),"").equalsIgnoreCase(value)))) { 6941 comboField.setSelectedIndex(0); 6942 return false; 6943 } else { 6944 try { 6945 Misc.setComboboxSelectedTagValue(comboField, value); 6946 } catch (Exception ex){ 6947 ex.printStackTrace(); 6948 } 6949 } 6950 return true; 6951 } 6952 6953 6954 6955 6956 protected boolean setTagComboBox( boolean firstTime, Object value, javax.swing.JComboBox comboField ) { 6957 if (( ! firstTime ) && (!( 6958 comboField.getSelectedItem() != null && 6959 comboField.getSelectedItem() instanceof Tag && 6960 ((Tag)comboField.getSelectedItem()).getValue().equals(value)))) { 6961 comboField.setSelectedIndex(0); 6962 return false; 6963 } else { 6964 try { 6965 for (int i=0; i<comboField.getItemCount(); ++i) { 6966 if (comboField.getItemAt(i) instanceof Tag && ((Tag)comboField.getItemAt(i)).getValue().equals(value) ) { 6967 comboField.setSelectedIndex(i); 6968 return true; 6969 } 6970 } 6971 } catch (Exception ex){ 6972 ex.printStackTrace(); 6973 } 6974 } 6975 return true; 6976 } 6977 6978 protected boolean setMixedTagComboBox( boolean firstTime, Object value, javax.swing.JComboBox comboField ) { 6979 if (firstTime) { 6980 try { 6981 for (int i=0; i<comboField.getItemCount(); ++i) { 6982 if (comboField.getItemAt(i) instanceof Tag && ((Tag)comboField.getItemAt(i)).getValue().equals(value) ) { 6983 comboField.setSelectedIndex(i); 6984 return true; 6985 } 6986 } 6987 comboField.setSelectedItem(value); 6989 6990 } catch (Exception ex){ 6991 ex.printStackTrace(); 6992 } 6993 return true; 6994 } else { 6995 Object selectedValue = comboField.getSelectedItem(); 6996 if (selectedValue == null && value == null) return true; 6997 if (selectedValue == null) return false; 6998 if (selectedValue instanceof Tag) { 6999 selectedValue = ((Tag)selectedValue).getValue(); 7000 } 7001 7002 if (selectedValue.equals(value)) return true; 7003 } 7004 return false; 7005 } 7006 7007 7008 7009 7010 protected boolean setTextField( boolean firstTime, String value, javax.swing.JTextField textField ) { 7011 if (( ! firstTime ) && (!textField.getText().equalsIgnoreCase(value))) { 7012 textField.setText(""); 7013 return false; 7014 } else { 7015 try { 7016 textField.setText( (value == null) ? "" : value+""); 7017 } catch (Exception ex){ 7018 ex.printStackTrace(); 7019 } 7020 } 7021 return true; 7022 } 7023 7024 7025 7026 7027 public void setVisible(boolean visible) { 7028 try { 7029 7030 if (visible == isVisible()) return; 7031 7032 7033 if (visible == true) { 7034 this.updateSelection(true); 7035 } 7036 } catch (Exception ex) { 7037 ex.printStackTrace(); 7038 } 7039 super.setVisible(visible); 7040 7041 } 7042 7043 7047 public boolean isInit() { 7048 return init; 7049 } 7050 7051 7055 public void setInit(boolean init) { 7056 this.init = init; 7057 } 7058 7059 7060 protected boolean setElementColor( boolean firstTime, Color value, javax.swing.JButton colorField ) { 7061 7062 if (firstTime ) { 7063 colorField.setBackground( value ); 7064 return true; 7065 } else { 7066 java.awt.Color c1 = colorField.getBackground(); 7067 if (c1 == value) { 7068 return true; 7069 } 7070 if (c1 != null && value != null && c1.getRGB() == value.getRGB()) { 7071 return true; 7072 } 7073 7074 colorField.setBackground( Color.GRAY); 7075 } 7076 7077 return false; 7078 } 7079 7080 protected boolean setTextArea( boolean firstTime, String value, JRTextExpressionArea textField ) { 7081 7082 7083 if (( ! firstTime ) && (!(textField.getText().equals(value) ))) { 7084 textField.setText(""); 7085 ((org.syntax.jedit.SyntaxDocument)textField.getDocument()).getUM().discardAllEdits(); 7086 return false; 7087 } else { 7088 try { 7089 textField.setText( value ); 7090 ((org.syntax.jedit.SyntaxDocument)textField.getDocument()).getUM().discardAllEdits(); 7091 } catch (Exception ex){ 7092 ex.printStackTrace(); 7093 } 7094 } 7095 return true; 7096 } 7097 7098 protected boolean setJTextArea( boolean firstTime, String value, javax.swing.JTextArea textField ) { 7099 7100 if (( ! firstTime ) && (!(textField.getText().equals(value) ))) { 7101 textField.setText(""); 7102 return false; 7103 } else { 7104 try { 7105 textField.setText( value ); 7106 7107 } catch (Exception ex){ 7108 ex.printStackTrace(); 7109 } 7110 } 7111 return true; 7112 } 7113 7114 protected boolean setPatternComboBox( boolean firstTime, String value, javax.swing.JComboBox comboField ) { 7115 if (( !firstTime) && (!((comboField.getSelectedItem()+"").equals(value) ))) { 7116 comboField.setSelectedItem(""); 7117 return false; 7118 } else { 7119 try { 7120 comboField.addItem(value); 7121 comboField.setSelectedItem( value ); 7122 } catch (Exception ex){ 7123 ex.printStackTrace(); 7124 } 7125 } 7126 return true; 7127 } 7128 7129 protected boolean setWritableComboBoxText( boolean firstTime, String value, javax.swing.JComboBox comboField ) { 7130 7131 if (( !firstTime) && (!((comboField.getSelectedItem()+"").equals(value) ))) { 7132 comboField.setSelectedItem(""); 7133 return false; 7134 } else { 7135 try { 7136 if (value == null || value.equals("") ) comboField.setSelectedIndex(0); 7137 comboField.setSelectedItem( value ); 7138 } catch (Exception ex){ 7139 ex.printStackTrace(); 7140 } 7141 } 7142 return true; 7143 } 7144 7145 public void jRTextExpressionAreaPrintWhenExpressionTextChanged() { 7146 if (this.isInit()) return; 7147 7148 Enumeration e = getElementSelection().elements(); 7149 while (e.hasMoreElements()) { 7150 ReportElement element = (ReportElement)e.nextElement(); 7151 element.printWhenExpression = jRTextExpressionAreaPrintWhenExpression.getText(); 7152 } 7154 7155 fireReportElementsChangedEvent("printWhenExpression", jRTextExpressionAreaPrintWhenExpression.getText()); 7156 } 7157 7158 public void jRTextExpressionAreaImageExpressionTextChanged() { 7159 if (this.isInit()) return; 7160 Enumeration e = getElementSelection().elements(); 7161 while (e.hasMoreElements()) { 7162 ImageReportElement element = (ImageReportElement)e.nextElement(); 7163 element.setImageExpression( jRTextExpressionAreaImageExpression.getText()); 7164 } 7165 repaintEditor(); 7166 jrf.fireReportListenerReportElementsChanged(new ReportElementChangedEvent(jrf , getElementSelection() , ReportElementChangedEvent.CHANGED)); 7167 7168 } 7169 public void jTextAreaTextChanged() { 7170 if (this.isInit()) return; 7171 7172 if (jrf == null || getElementSelection().size()==0) return; 7174 Enumeration e = getElementSelection().elements(); 7176 while (e.hasMoreElements()) { 7177 TextReportElement element = (TextReportElement)e.nextElement(); 7178 element.setText(""+ jTextAreaText.getText()); 7179 } 7180 fireReportElementsChangedEvent("text", jTextAreaText.getText()); 7181 repaintEditor(); 7182 } 7183 7184 public void jRTextExpressionAreaTextFieldExpressionTextChanged() { 7185 if (this.isInit()) return; 7186 Enumeration e = getElementSelection().elements(); 7187 while (e.hasMoreElements()) { 7188 TextFieldReportElement element = (TextFieldReportElement)e.nextElement(); 7189 element.setText(""+jRTextExpressionAreaTextFieldExpression.getText()); 7190 } 7191 fireReportElementsChangedEvent("textfieldExpression", jRTextExpressionAreaTextFieldExpression.getText()); 7192 repaintEditor(); 7193 } 7194 7195 public void jRTextExpressionAreaSubreportExpressionTextChanged() { 7196 if (this.isInit()) return; 7197 Enumeration e = getElementSelection().elements(); 7198 while (e.hasMoreElements()) { 7199 SubReportElement element = (SubReportElement)e.nextElement(); 7200 element.setSubreportExpression(""+jRTextExpressionAreaSubreportExpression.getText()); 7201 } 7202 jrf.fireReportListenerReportElementsChanged(new ReportElementChangedEvent(jrf , getElementSelection() , ReportElementChangedEvent.CHANGED)); 7203 7204 repaintEditor(); 7205 } 7206 7207 public void jRTextExpressionAreaTextConnectionExpressionTextChanged() { 7208 if (this.isInit()) return; 7209 Enumeration e = getElementSelection().elements(); 7210 while (e.hasMoreElements()) { 7211 SubReportElement element = (SubReportElement)e.nextElement(); 7212 if (element.isUseConnection()) 7213 element.setConnectionExpression(""+jRTextExpressionAreaTextConnectionExpression.getText()); 7214 else 7215 element.setDataSourceExpression(""+jRTextExpressionAreaTextConnectionExpression.getText()); 7216 } 7217 jrf.fireReportListenerReportElementsChanged(new ReportElementChangedEvent(jrf , getElementSelection() , ReportElementChangedEvent.CHANGED)); 7218 7219 repaintEditor(); 7220 } 7221 7222 public void jRTextExpressionAreaCrosstabParametersMapExpressionTextChanged() { 7223 if (this.isInit()) return; 7224 Enumeration e = getElementSelection().elements(); 7225 while (e.hasMoreElements()) { 7226 CrosstabReportElement element = (CrosstabReportElement)e.nextElement(); 7227 element.setParametersMapExpression(""+jRTextExpressionAreaCrosstabParametersMapExpression.getText()); 7228 } 7229 jrf.fireReportListenerReportElementsChanged(new ReportElementChangedEvent(jrf , getElementSelection() , ReportElementChangedEvent.CHANGED)); 7230 7231 repaintEditor(); 7232 } 7233 7234 public void jRTextExpressionAreaSubreportMapExpressionTextChanged() { 7235 if (this.isInit()) return; 7236 Enumeration e = getElementSelection().elements(); 7237 while (e.hasMoreElements()) { 7238 SubReportElement element = (SubReportElement)e.nextElement(); 7239 element.setParametersMapExpression(""+jRTextExpressionAreaSubreportMapExpression.getText()); 7240 repaintEditor(); 7241 } 7242 jrf.fireReportListenerReportElementsChanged(new ReportElementChangedEvent(jrf , getElementSelection() , ReportElementChangedEvent.CHANGED)); 7243 7244 } 7245 7246 public void jRTextExpressionAreaAnchorNameTextChanged() { 7247 if (this.isInit()) return; 7248 Enumeration e = getElementSelection().elements(); 7249 while (e.hasMoreElements()) { 7250 HyperLinkableReportElement element = (HyperLinkableReportElement)e.nextElement(); 7251 element.setAnchorNameExpression(""+jRTextExpressionAreaAnchorName.getText()); 7252 } 7253 jrf.fireReportListenerReportElementsChanged(new ReportElementChangedEvent(jrf , getElementSelection() , ReportElementChangedEvent.CHANGED)); 7254 7255 } 7256 7257 public void jRTextExpressionAreaAnchorTextChanged() { 7258 if (this.isInit()) return; 7259 Enumeration e = getElementSelection().elements(); 7260 while (e.hasMoreElements()) { 7261 HyperLinkableReportElement element = (HyperLinkableReportElement)e.nextElement(); 7262 element.setHyperlinkAnchorExpression(""+jRTextExpressionAreaAnchor.getText()); 7263 } 7264 jrf.fireReportListenerReportElementsChanged(new ReportElementChangedEvent(jrf , getElementSelection() , ReportElementChangedEvent.CHANGED)); 7265 7266 } 7267 7268 public void jRTextExpressionAreaPageTextChanged() { 7269 if (this.isInit()) return; 7270 Enumeration e = getElementSelection().elements(); 7271 while (e.hasMoreElements()) { 7272 HyperLinkableReportElement element = (HyperLinkableReportElement)e.nextElement(); 7273 element.setHyperlinkPageExpression(""+jRTextExpressionAreaPage.getText()); 7274 } 7275 jrf.fireReportListenerReportElementsChanged(new ReportElementChangedEvent(jrf , getElementSelection() , ReportElementChangedEvent.CHANGED)); 7276 7277 } 7278 7279 public void jRTextExpressionAreaReferenceTextChanged() { 7280 if (this.isInit()) return; 7281 Enumeration e = getElementSelection().elements(); 7282 while (e.hasMoreElements()) { 7283 HyperLinkableReportElement element = (HyperLinkableReportElement)e.nextElement(); 7284 element.setHyperlinkReferenceExpression(""+jRTextExpressionAreaReference.getText()); 7285 } 7286 jrf.fireReportListenerReportElementsChanged(new ReportElementChangedEvent(jrf , getElementSelection() , ReportElementChangedEvent.CHANGED)); 7287 7288 } 7289 7290 7291 public JRTextExpressionArea getJRTextExpressionArea(javax.swing.JComponent c, int x, int y) { 7292 JRTextExpressionArea xxx= null; 7293 if (c.getClass().isAssignableFrom(it.businesslogic.ireport.gui.JRTextExpressionArea.class) ) { 7295 if ( ((JRTextExpressionArea)c).isRequestFocusEnabled() == true && c.contains(x,y)) { 7296 return (JRTextExpressionArea)c; 7298 } 7299 return null; 7300 } else { 7301 for (int i=0; i< c.getComponentCount(); ++i) { 7302 Component child = c.getComponent(i); 7303 if (child instanceof javax.swing.JComponent ) { 7304 xxx = getJRTextExpressionArea((javax.swing.JComponent )child, x, y ); 7305 if (xxx != null) return xxx; 7306 } 7307 } 7308 7309 } 7310 return null; 7311 } 7312 7313 7314 7315 7316 public void gotoTab(int tabCode ) { 7317 try { 7318 switch (tabCode) { 7319 case GRAPHICS_TAB: 7320 jTabbedPane.setSelectedComponent( jPanelGraphicselement ); 7321 break; 7322 case RECTANGLE_TAB: 7323 jTabbedPane.setSelectedComponent( jPanelRectangle); 7324 break; 7325 case LINE_TAB: 7326 jTabbedPane.setSelectedComponent( jPanelLine ); 7327 break; 7328 case IMAGE_TAB: 7329 jTabbedPane.setSelectedComponent( jPanelImage ); 7330 break; 7331 case FONT_TAB: 7332 jTabbedPane.setSelectedComponent( jPanelFont ); 7333 break; 7334 case STATITEXT_TAB: 7335 jTabbedPane.setSelectedComponent( jPanelText ); 7336 break; 7337 case TEXTFIELD_TAB: 7338 jTabbedPane.setSelectedComponent( jPanelTextField ); 7339 break; 7340 case HYPERLINK_TAB: 7341 jTabbedPane.setSelectedComponent( jPanelHyperLink ); 7342 try { 7343 jTabbedPane2.setSelectedComponent(jPanelLinkParams); 7344 } catch (Exception ex){ } 7345 break; 7346 case SUBREPORT1_TAB: 7347 jTabbedPane.setSelectedComponent( jPanelSubreport1 ); 7348 break; 7349 case SUBREPORT2_TAB: 7350 jTabbedPane.setSelectedComponent( jPanelSubreport2 ); 7351 break; 7352 case CHART_TAB: 7353 jTabbedPane.setSelectedComponent( jPanelChart ); 7354 break; 7355 case BARCODE_TAB: 7356 jTabbedPane.setSelectedComponent( jPanelBarcode ); 7357 break; 7358 case COMMON_TAB: 7359 default: 7360 jTabbedPane.setSelectedComponent( jPanelCommon ); 7361 break; 7362 } 7363 7364 } catch (Exception ex) {} 7365 } 7366 7367 7370 private void initExpressionArea( JRTextExpressionArea area) { 7371 area.getTokenMarker().setKeywordLookup(jrf.getReport().getKeywordLookup()); 7372 } 7373 7374 public void jTextFieldNameChanged() { 7375 if (this.isInit()) return; 7376 7377 if (jrf == null || getElementSelection().size()==0) return; 7378 7379 Enumeration e = getElementSelection().elements(); 7380 ReportElement element = (ReportElement)e.nextElement(); 7381 7382 element.setKey( jTextFieldName.getText() ); 7383 jrf.fireReportListenerReportElementsChanged(new ReportElementChangedEvent(jrf , element , ReportElementChangedEvent.CHANGED)); 7384 repaintEditor(); 7385 } 7386 7387 public void jTextFieldAppIdentifierChanged() { 7388 if (this.isInit()) return; 7389 7390 if (jrf == null || getElementSelection().size()==0) return; 7391 7392 Enumeration e = getElementSelection().elements(); 7393 BarcodeReportElement element = (BarcodeReportElement)e.nextElement(); 7394 7395 element.setApplicationIdentifier( jBarcodeExpressionAreaAppIdentifier.getText() ); 7396 jrf.fireReportListenerReportElementsChanged(new ReportElementChangedEvent(jrf , element , ReportElementChangedEvent.CHANGED)); 7397 repaintEditor(); 7398 } 7399 7400 public Vector getElementSelection() { 7401 if (jrf.getSelectedCrosstabEditorPanel() == null) { 7402 return jrf.getSelectedElements( ); 7403 } else { 7404 return jrf.getSelectedCrosstabEditorPanel().getSelectedElements(); 7405 } 7406 } 7407 7408 public void repaintEditor() { 7409 7410 if (jrf.getSelectedCrosstabEditorPanel() == null) { 7411 jrf.getJPanelReport().repaint( ); 7412 } else { 7413 jrf.getSelectedCrosstabEditorPanel().repaint(); 7414 } 7415 } 7416 7417 7421 public void fireReportElementsChangedEvent(String propertyName, Object newValue) { 7422 if (jrf == null) return; 7423 ReportElementChangedEvent changedEvent = new ReportElementChangedEvent(jrf ,(jrf.getSelectedCrosstabEditorPanel() != null) ? jrf.getSelectedCrosstabEditorPanel().getCrosstabElement() : null , getElementSelection() , ReportElementChangedEvent.CHANGED); 7424 changedEvent.setEventSource( this ); 7425 changedEvent.setPropertyChanged( propertyName ); 7426 changedEvent.setNewValue(newValue); 7427 jrf.fireReportListenerReportElementsChanged(changedEvent); 7428 } 7429 7430 private static Locale lastLocale = null; 7431 public void applyI18n(){ 7432 7433 if (lastLocale != null && lastLocale == I18n.getCurrentLocale()) return; 7434 lastLocale = I18n.getCurrentLocale(); 7435 7436 this.setInit(true); 7437 jCheckBoxBarcodeCheckSum.setText(I18n.getString("elementPropertiesDialog.checkBoxBarcodeCheckSum","Checksum")); 7439 jCheckBoxBarcodeShowText.setText(I18n.getString("elementPropertiesDialog.checkBoxBarcodeShowText","Show Text")); 7440 jCheckBoxBlankWhenNull.setText(I18n.getString("elementPropertiesDialog.checkBoxBlankWhenNull","Blank when null")); 7441 jCheckBoxBold.setText(I18n.getString("elementPropertiesDialog.checkBoxBold","Bold")); 7442 jCheckBoxImageCache.setText(I18n.getString("elementPropertiesDialog.checkBoxImageCache","Using cache")); 7443 jCheckBoxImageIsLazy.setText(I18n.getString("elementPropertiesDialog.checkBoxImageIsLazy","Is Lazy")); 7444 jCheckBoxItalic.setText(I18n.getString("elementPropertiesDialog.checkBoxItalic","Italic")); 7445 jCheckBoxPDFEmbedded.setText(I18n.getString("elementPropertiesDialog.checkBoxPDFEmbedded","PDF Embedded")); 7446 jCheckBoxPrintInFirstWholeBand.setText(I18n.getString("elementPropertiesDialog.checkBoxPrintInFirstWholeBand","Print in first whole band")); 7447 jCheckBoxPrintRepeatedValues.setText(I18n.getString("elementPropertiesDialog.checkBoxPrintRepeatedValues","Print repeated values")); 7448 jCheckBoxPrintWhenDetailOverflows.setText(I18n.getString("elementPropertiesDialog.checkBoxPrintWhenDetailOverflows","Print when detail overflows")); 7449 jCheckBoxRemoveLineWhenBlank.setText(I18n.getString("elementPropertiesDialog.checkBoxRemoveLineWhenBlank","Remove line when blank")); 7450 jCheckBoxRepeatColumnHeaders.setText(I18n.getString("elementPropertiesDialog.checkBoxRepeatColumnHeaders","Repeat column headers")); 7451 jCheckBoxRepeatRowHeaders.setText(I18n.getString("elementPropertiesDialog.checkBoxRepeatRowHeaders","Repeat row headers")); 7452 jCheckBoxStretchWithOverflow.setText(I18n.getString("elementPropertiesDialog.checkBoxStretchWithOverflow","Stretch with overflow")); 7453 jCheckBoxStrokeTrough.setText(I18n.getString("elementPropertiesDialog.checkBoxStrokeTrough","Strike Trough")); 7454 jCheckBoxStyledText.setText(I18n.getString("elementPropertiesDialog.checkBoxStyledText","Is styled text")); 7455 jCheckBoxSubreportCache.setText(I18n.getString("elementPropertiesDialog.checkBoxSubreportCache","Using cache")); 7456 jCheckBoxTransparent.setText(I18n.getString("elementPropertiesDialog.checkBoxTransparent","Transparent")); 7457 jCheckBoxUnderline.setText(I18n.getString("elementPropertiesDialog.checkBoxUnderline","Underline")); 7458 jButton2.setText(I18n.getString("elementPropertiesDialog.button2","Edit crosstab properties")); 7461 jButtonAddCrosstabParameter.setText(I18n.getString("elementPropertiesDialog.buttonAddCrosstabParameter","Add")); 7462 jButtonAddLinkParameter.setText(I18n.getString("elementPropertiesDialog.buttonAddLinkParameter","Add")); 7463 jButtonAddParameter.setText(I18n.getString("elementPropertiesDialog.buttonAddParameter","Add")); 7464 jButtonAddReturnValue.setText(I18n.getString("elementPropertiesDialog.buttonAddReturnValue","Add")); 7465 jButtonCopyParamsFromMaster.setText(I18n.getString("elementPropertiesDialog.buttonCopyParamsFromMaster","Copy from master")); 7466 jButtonCreatePattern.setText(I18n.getString("elementPropertiesDialog.buttonCreatePattern","Create...")); 7467 jButtonFindImage.setText(I18n.getString("elementPropertiesDialog.buttonFindImage","Find...")); 7468 jButtonModCrosstabParameter.setText(I18n.getString("elementPropertiesDialog.buttonModCrosstabParameter","Modify")); 7469 jButtonModLinkParameter.setText(I18n.getString("elementPropertiesDialog.buttonModLinkParameter","Modify")); 7470 jButtonModParameter.setText(I18n.getString("elementPropertiesDialog.buttonModParameter","Modify")); 7471 jButtonModReturnValue.setText(I18n.getString("elementPropertiesDialog.buttonModReturnValue","Modify")); 7472 jButtonRemCrosstabParameter.setText(I18n.getString("elementPropertiesDialog.buttonRemCrosstabParameter","Remove")); 7473 jButtonRemLinkParameter.setText(I18n.getString("elementPropertiesDialog.buttonRemLinkParameter","Remove")); 7474 jButtonRemParameter.setText(I18n.getString("elementPropertiesDialog.buttonRemParameter","Remove")); 7475 jButtonRemReturnValue.setText(I18n.getString("elementPropertiesDialog.buttonRemReturnValue","Remove")); 7476 jLabel1.setText(I18n.getString("elementPropertiesDialog.label1","Band ")); 7477 jLabel10.setText(I18n.getString("elementPropertiesDialog.label10","Print when expression")); 7478 jLabel11.setText(I18n.getString("elementPropertiesDialog.label11","Pen")); 7479 jLabel12.setText(I18n.getString("elementPropertiesDialog.label12","Stretch Type")); 7480 jLabel13.setText(I18n.getString("elementPropertiesDialog.label13","Fill")); 7481 jLabel14.setText(I18n.getString("elementPropertiesDialog.label14","Radius")); 7482 jLabel15.setText(I18n.getString("elementPropertiesDialog.label15","Line direction")); 7483 jLabel16.setText(I18n.getString("elementPropertiesDialog.label16","Image Expression")); 7484 jLabel17.setText(I18n.getString("elementPropertiesDialog.label17","Image Expression Class")); 7485 jLabel18.setText(I18n.getString("elementPropertiesDialog.label18","Scale Image")); 7486 jLabel19.setText(I18n.getString("elementPropertiesDialog.label19","Vertical alignment")); 7487 jLabel2.setText(I18n.getString("elementPropertiesDialog.label2","Top ")); 7488 jLabel20.setText(I18n.getString("elementPropertiesDialog.label20","Horizontal alignment")); 7489 jLabel21.setText(I18n.getString("elementPropertiesDialog.label21","Evaluation time")); 7490 jLabel22.setText(I18n.getString("elementPropertiesDialog.label22","Evaluation group")); 7491 jLabel23.setText(I18n.getString("elementPropertiesDialog.label23","Report font")); 7492 jLabel24.setText(I18n.getString("elementPropertiesDialog.label24","Font name")); 7493 jLabel25.setText(I18n.getString("elementPropertiesDialog.label25","PDF font name")); 7494 jLabel26.setText(I18n.getString("elementPropertiesDialog.label26","Subreport Expression")); 7495 jLabel27.setText(I18n.getString("elementPropertiesDialog.label27","Size")); 7496 jLabel28.setText(I18n.getString("elementPropertiesDialog.label28","Textfield Expression Class")); 7497 jLabel29.setText(I18n.getString("elementPropertiesDialog.label29","Line spacing")); 7498 jLabel3.setText(I18n.getString("elementPropertiesDialog.label3","Left ")); 7499 jLabel30.setText(I18n.getString("elementPropertiesDialog.label30","Horizontal align")); 7500 jLabel31.setText(I18n.getString("elementPropertiesDialog.label31","Vertical align")); 7501 jLabel32.setText(I18n.getString("elementPropertiesDialog.label32","PDF Encoding")); 7502 jLabel33.setText(I18n.getString("elementPropertiesDialog.label33","Subreport Expression Class")); 7503 jLabel34.setText(I18n.getString("elementPropertiesDialog.label34","On error type")); 7504 jLabel35.setText(I18n.getString("elementPropertiesDialog.label35","Anchor Name Expression")); 7505 jLabel36.setText(I18n.getString("elementPropertiesDialog.label36","Hyperlink type")); 7506 jLabel37.setText(I18n.getString("elementPropertiesDialog.label37","Evaluation time")); 7507 jLabel38.setText(I18n.getString("elementPropertiesDialog.label38","Evaluation group")); 7508 jLabel39.setText(I18n.getString("elementPropertiesDialog.label39","Pattern")); 7509 jLabel4.setText(I18n.getString("elementPropertiesDialog.label4","Width")); 7510 jLabel40.setText(I18n.getString("elementPropertiesDialog.label40","Textfield expression")); 7511 jLabel41.setText(I18n.getString("elementPropertiesDialog.label41","Connection / Datasource Expression")); 7512 jLabel42.setText(I18n.getString("elementPropertiesDialog.label42","Parameters Map Expression")); 7513 jLabel43.setText(I18n.getString("elementPropertiesDialog.label43","Evaluation group")); 7514 jLabel44.setText(I18n.getString("elementPropertiesDialog.label44","Evaluation time")); 7515 jLabel45.setText(I18n.getString("elementPropertiesDialog.label45","Evaluation group")); 7516 jLabel46.setText(I18n.getString("elementPropertiesDialog.label46","Key")); 7517 jLabel47.setText(I18n.getString("elementPropertiesDialog.label47","Type")); 7518 jLabel48.setText(I18n.getString("elementPropertiesDialog.label48","Barcode expression")); 7519 jLabel49.setText(I18n.getString("elementPropertiesDialog.label49","Rotation")); 7520 jLabel5.setText(I18n.getString("elementPropertiesDialog.label5","Height ")); 7521 jLabel50.setText(I18n.getString("elementPropertiesDialog.label50","Evaluation time")); 7522 jLabel51.setText(I18n.getString("elementPropertiesDialog.label51","Parameters Map Expression")); 7523 jLabel52.setText(I18n.getString("elementPropertiesDialog.label52","Crosstab parameters")); 7524 jLabel53.setText(I18n.getString("elementPropertiesDialog.label53","Column break offset")); 7525 jLabel54.setText(I18n.getString("elementPropertiesDialog.label54","Scale Barcode Image")); 7526 jLabel55.setText(I18n.getString("elementPropertiesDialog.label55","On error type")); 7527 jLabel56.setText(I18n.getString("elementPropertiesDialog.label56","Horizontal alignment")); 7528 jLabel57.setText(I18n.getString("elementPropertiesDialog.label57","Vertical alignment")); 7529 jLabel58.setText(I18n.getString("elementPropertiesDialog.label58","Bar height")); 7530 jLabel59.setText(I18n.getString("elementPropertiesDialog.label59","Application identifier")); 7531 jLabel6.setText(I18n.getString("elementPropertiesDialog.label6","Foreground ")); 7532 jLabel60.setText(I18n.getString("elementPropertiesDialog.label60","(0 = default)")); 7533 jLabel61.setText(I18n.getString("elementPropertiesDialog.label61","Bar width")); 7534 jLabel7.setText(I18n.getString("elementPropertiesDialog.label7","Background ")); 7535 jLabel8.setText(I18n.getString("elementPropertiesDialog.label8","Position type")); 7536 jLabel9.setText(I18n.getString("elementPropertiesDialog.label9","Print when group changes")); 7537 jLabelAnchor.setText(I18n.getString("elementPropertiesDialog.labelAnchor","Hyperlink Anchor Expression")); 7538 jLabelPage.setText(I18n.getString("elementPropertiesDialog.labelPage","Hyperlink Page Expression")); 7539 jLabelReference.setText(I18n.getString("elementPropertiesDialog.labelReference","Hyperlink Reference Expression")); 7540 jLabelStyle.setText(I18n.getString("elementPropertiesDialog.labelStyle","Style")); 7541 jLabelTarget.setText(I18n.getString("elementPropertiesDialog.labelTarget","Hyperlink target")); 7542 jLabelTarget1.setText(I18n.getString("elementPropertiesDialog.labelTarget1","Bookmark level")); 7543 7545 jTableSubreportParameters.getColumnModel().getColumn(0).setHeaderValue( I18n.getString("elementPropertiesDialog.subreportParameters.parameter","Parameter") ); 7546 jTableSubreportParameters.getColumnModel().getColumn(1).setHeaderValue( I18n.getString("elementPropertiesDialog.subreportParameters.expression","Expression") ); 7547 7548 jTableSubreportReturnValues.getColumnModel().getColumn(0).setHeaderValue( I18n.getString("elementPropertiesDialog.subreportReturnValues.subreportVariable","Subreport variable") ); 7549 jTableSubreportReturnValues.getColumnModel().getColumn(1).setHeaderValue( I18n.getString("elementPropertiesDialog.subreportReturnValues.destinationVariable","Destination variable") ); 7550 7551 jTableLinkParameters.getColumnModel().getColumn(0).setHeaderValue( I18n.getString("elementPropertiesDialog.linkParameters.linkParameter","Link parameter") ); 7552 jTableLinkParameters.getColumnModel().getColumn(1).setHeaderValue( I18n.getString("elementPropertiesDialog.linkParameters.expression","Expression") ); 7553 7554 jTableCrosstabParameters.getColumnModel().getColumn(0).setHeaderValue( I18n.getString("elementPropertiesDialog.crosstabParameters.parameter","Parameter") ); 7555 jTableCrosstabParameters.getColumnModel().getColumn(1).setHeaderValue( I18n.getString("elementPropertiesDialog.crosstabParameters.expression","Expression") ); 7556 7557 7558 jComboBoxPositionType.removeAllItems(); 7560 jComboBoxPositionType.addItem(new Tag("FixRelativeToTop", I18n.getString("gui.elementpropertiessheet.positionType.FixRelativeToTop","FixRelativeToTop"))); 7561 jComboBoxPositionType.addItem(new Tag("Float", I18n.getString("gui.elementpropertiessheet.positionType.Float","Float"))); 7562 jComboBoxPositionType.addItem(new Tag("FixRelativeToBottom", I18n.getString("gui.elementpropertiessheet.positionType.FixRelativeToBottom","FixRelativeToBottom"))); 7563 7564 jComboBoxPen.removeAllItems(); 7566 jComboBoxPen.addItem(new Tag("None", I18n.getString("gui.elementpropertiessheet.pen.None","None")) ); 7567 jComboBoxPen.addItem(new Tag("Thin", I18n.getString("gui.elementpropertiessheet.pen.Thin","Thin"))); 7568 jComboBoxPen.addItem(new Tag("1Point", I18n.getString("gui.elementpropertiessheet.pen.1Point","1Point")) ); 7569 jComboBoxPen.addItem(new Tag("2Point", I18n.getString("gui.elementpropertiessheet.pen.2Point","2Point")) ); 7570 jComboBoxPen.addItem(new Tag("4Point", I18n.getString("gui.elementpropertiessheet.pen.4Point","4Point")) ); 7571 jComboBoxPen.addItem(new Tag("Dotted", I18n.getString("gui.elementpropertiessheet.pen.Dotted","Dotted")) ); 7572 7573 jComboBoxStretchType.removeAllItems(); 7575 jComboBoxStretchType.addItem(new Tag("NoStretch", I18n.getString("gui.elementpropertiessheet.stretchType.NoStretch","No stretch")) ); 7576 jComboBoxStretchType.addItem(new Tag("RelativeToTallestObject", I18n.getString("gui.elementpropertiessheet.stretchType.RelativeToTallestObject","Relative to tallest object")) ); 7577 jComboBoxStretchType.addItem(new Tag("RelativeToBandHeight", I18n.getString("gui.elementpropertiessheet.stretchType.RelativeToBandHeight","Relative to band height")) ); 7578 7579 jComboBoxFill.removeAllItems(); 7581 jComboBoxFill.addItem(new Tag("Solid", I18n.getString("gui.elementpropertiessheet.fill.Solid","Solid"))); 7582 7583 jComboBoxLineDirection.removeAllItems(); 7585 jComboBoxLineDirection.addItem(new Tag("TopDown", I18n.getString("gui.elementpropertiessheet.direction.TopDown","Top-down (\\)"))); 7586 jComboBoxLineDirection.addItem(new Tag("BottomUp", I18n.getString("gui.elementpropertiessheet.direction.BottomUp","Bottom-up (/)"))); 7587 7588 jComboBoxRotation.removeAllItems(); 7590 jComboBoxRotation.addItem(new Tag("None", I18n.getString("gui.elementpropertiessheet.rotate.None","None"))); 7591 jComboBoxRotation.addItem(new Tag("Left", I18n.getString("gui.elementpropertiessheet.rotate.Left","Left"))); 7592 jComboBoxRotation.addItem(new Tag("Right", I18n.getString("gui.elementpropertiessheet.rotate.Right","Right"))); 7593 jComboBoxRotation.addItem(new Tag("UpsideDown", I18n.getString("gui.elementpropertiessheet.rotate.UpsideDown","Upside down"))); 7594 7595 7596 jComboBoxScale.removeAllItems(); 7598 jComboBoxScale.addItem(new Tag("Clip", I18n.getString("gui.elementpropertiessheet.imageScale.Clip","Clip"))); 7599 jComboBoxScale.addItem(new Tag("FillFrame", I18n.getString("gui.elementpropertiessheet.imageScale.FillFrame","Fill frame"))); 7600 jComboBoxScale.addItem(new Tag("RetainShape", I18n.getString("gui.elementpropertiessheet.imageScale.RetainShape","Retain shape"))); 7601 7602 jComboBoxScale1.removeAllItems(); 7604 jComboBoxScale1.addItem(new Tag("Clip", I18n.getString("gui.elementpropertiessheet.imageScale.Clip","Clip"))); 7605 jComboBoxScale1.addItem(new Tag("FillFrame", I18n.getString("gui.elementpropertiessheet.imageScale.FillFrame","Fill frame"))); 7606 jComboBoxScale1.addItem(new Tag("RetainShape", I18n.getString("gui.elementpropertiessheet.imageScale.RetainShape","Retain shape"))); 7607 7608 jComboBoxImageOnError.removeAllItems(); 7610 jComboBoxImageOnError.addItem(new Tag("Error", I18n.getString("gui.elementpropertiessheet.imageScale.Error","Error"))); 7611 jComboBoxImageOnError.addItem(new Tag("Blank", I18n.getString("gui.elementpropertiessheet.imageScale.Blank","Blank"))); 7612 jComboBoxImageOnError.addItem(new Tag("Icon", I18n.getString("gui.elementpropertiessheet.imageScale.Icon","Icon"))); 7613 7614 jComboBoxImageOnError1.removeAllItems(); 7616 jComboBoxImageOnError1.addItem(new Tag("Error", I18n.getString("gui.elementpropertiessheet.imageScale.Error","Error"))); 7617 jComboBoxImageOnError1.addItem(new Tag("Blank", I18n.getString("gui.elementpropertiessheet.imageScale.Blank","Blank"))); 7618 jComboBoxImageOnError1.addItem(new Tag("Icon", I18n.getString("gui.elementpropertiessheet.imageScale.Icon","Icon"))); 7619 7620 jComboBoxEvaluationTime.removeAllItems(); 7622 jComboBoxEvaluationTime.addItem(new Tag("Now", I18n.getString("gui.elementpropertiessheet.textfieldEvaluationTime.Now","Now"))); 7623 jComboBoxEvaluationTime.addItem(new Tag("Report", I18n.getString("gui.elementpropertiessheet.textfieldEvaluationTime.Report","Report"))); 7624 jComboBoxEvaluationTime.addItem(new Tag("Page", I18n.getString("gui.elementpropertiessheet.textfieldEvaluationTime.Page","Page"))); 7625 jComboBoxEvaluationTime.addItem(new Tag("Column", I18n.getString("gui.elementpropertiessheet.textfieldEvaluationTime.Column","Column"))); 7626 jComboBoxEvaluationTime.addItem(new Tag("Group", I18n.getString("gui.elementpropertiessheet.textfieldEvaluationTime.Group","Group"))); 7627 jComboBoxEvaluationTime.addItem(new Tag("Band", I18n.getString("gui.elementpropertiessheet.textfieldEvaluationTime.Band","Band"))); 7628 jComboBoxEvaluationTime.addItem(new Tag("Auto", I18n.getString("gui.elementpropertiessheet.textfieldEvaluationTime.Auto","Auto"))); 7629 7630 jComboBoxEvaluationTime1.removeAllItems(); 7632 jComboBoxEvaluationTime1.addItem(new Tag("Now", I18n.getString("gui.elementpropertiessheet.textfieldEvaluationTime.Now","Now"))); 7633 jComboBoxEvaluationTime1.addItem(new Tag("Report", I18n.getString("gui.elementpropertiessheet.textfieldEvaluationTime.Report","Report"))); 7634 jComboBoxEvaluationTime1.addItem(new Tag("Page", I18n.getString("gui.elementpropertiessheet.textfieldEvaluationTime.Page","Page"))); 7635 jComboBoxEvaluationTime1.addItem(new Tag("Column", I18n.getString("gui.elementpropertiessheet.textfieldEvaluationTime.Column","Column"))); 7636 jComboBoxEvaluationTime1.addItem(new Tag("Group", I18n.getString("gui.elementpropertiessheet.textfieldEvaluationTime.Group","Group"))); 7637 jComboBoxEvaluationTime1.addItem(new Tag("Band", I18n.getString("gui.elementpropertiessheet.textfieldEvaluationTime.Band","Band"))); 7638 jComboBoxEvaluationTime1.addItem(new Tag("Auto", I18n.getString("gui.elementpropertiessheet.textfieldEvaluationTime.Auto","Auto"))); 7639 7640 7641 7642 jComboBoxVerticalAlignment.removeAllItems(); 7644 jComboBoxVerticalAlignment.addItem(new Tag("Top", I18n.getString("gui.elementpropertiessheet.valign.Top","Top"))); 7645 jComboBoxVerticalAlignment.addItem(new Tag("Middle", I18n.getString("gui.elementpropertiessheet.valign.Middle","Middle"))); 7646 jComboBoxVerticalAlignment.addItem(new Tag("Bottom", I18n.getString("gui.elementpropertiessheet.valign.Bottom","Bottom"))); 7647 7648 jComboBoxHorizontalAlignment.removeAllItems(); 7650 jComboBoxHorizontalAlignment.addItem(new Tag("Left", I18n.getString("gui.elementpropertiessheet.halign.Left","Left"))); 7651 jComboBoxHorizontalAlignment.addItem(new Tag("Center", I18n.getString("gui.elementpropertiessheet.halign.Center","Center"))); 7652 jComboBoxHorizontalAlignment.addItem(new Tag("Right", I18n.getString("gui.elementpropertiessheet.halign.Right","Right"))); 7653 7654 7655 jComboBoxVerticalAlignment1.removeAllItems(); 7657 jComboBoxVerticalAlignment1.addItem(new Tag("Top", I18n.getString("gui.elementpropertiessheet.valign.Top","Top"))); 7658 jComboBoxVerticalAlignment1.addItem(new Tag("Middle", I18n.getString("gui.elementpropertiessheet.valign.Middle","Middle"))); 7659 jComboBoxVerticalAlignment1.addItem(new Tag("Bottom", I18n.getString("gui.elementpropertiessheet.valign.Bottom","Bottom"))); 7660 7661 jComboBoxHorizontalAlignment1.removeAllItems(); 7663 jComboBoxHorizontalAlignment1.addItem(new Tag("Left", I18n.getString("gui.elementpropertiessheet.halign.Left","Left"))); 7664 jComboBoxHorizontalAlignment1.addItem(new Tag("Center", I18n.getString("gui.elementpropertiessheet.halign.Center","Center"))); 7665 jComboBoxHorizontalAlignment1.addItem(new Tag("Right", I18n.getString("gui.elementpropertiessheet.halign.Right","Right"))); 7666 7667 7669 jComboBoxVAlign.removeAllItems(); 7671 jComboBoxVAlign.addItem(new Tag("Top", I18n.getString("gui.elementpropertiessheet.valign.Top","Top"))); 7672 jComboBoxVAlign.addItem(new Tag("Middle", I18n.getString("gui.elementpropertiessheet.valign.Middle","Middle"))); 7673 jComboBoxVAlign.addItem(new Tag("Bottom", I18n.getString("gui.elementpropertiessheet.valign.Bottom","Bottom"))); 7674 7675 7676 jComboBoxHAlign.removeAllItems(); 7678 jComboBoxHAlign.addItem(new Tag("Left", I18n.getString("gui.elementpropertiessheet.halign.Left","Left"))); 7679 jComboBoxHAlign.addItem(new Tag("Center", I18n.getString("gui.elementpropertiessheet.halign.Center","Center"))); 7680 jComboBoxHAlign.addItem(new Tag("Right", I18n.getString("gui.elementpropertiessheet.halign.Right","Right"))); 7681 jComboBoxHAlign.addItem(new Tag("Justified", I18n.getString("gui.elementpropertiessheet.halign.Justified","Justified"))); 7682 7683 7684 jComboBoxLineSpacing.removeAllItems(); 7685 jComboBoxLineSpacing.addItem(new Tag("Single", I18n.getString("gui.elementpropertiessheet.lineSpacing.Single","Single"))); 7686 jComboBoxLineSpacing.addItem(new Tag("1_1_2", I18n.getString("gui.elementpropertiessheet.lineSpacing.1_1_2","1-1-2"))); 7687 jComboBoxLineSpacing.addItem(new Tag("Double", I18n.getString("gui.elementpropertiessheet.lineSpacing.Double","Double"))); 7688 7689 jComboBoxTextFieldEvaluationTime.removeAllItems(); 7691 jComboBoxTextFieldEvaluationTime.addItem(new Tag("Now", I18n.getString("gui.elementpropertiessheet.textfieldEvaluationTime.Now","Now"))); 7692 jComboBoxTextFieldEvaluationTime.addItem(new Tag("Report", I18n.getString("gui.elementpropertiessheet.textfieldEvaluationTime.Report","Report"))); 7693 jComboBoxTextFieldEvaluationTime.addItem(new Tag("Page", I18n.getString("gui.elementpropertiessheet.textfieldEvaluationTime.Page","Page"))); 7694 jComboBoxTextFieldEvaluationTime.addItem(new Tag("Column", I18n.getString("gui.elementpropertiessheet.textfieldEvaluationTime.Column","Column"))); 7695 jComboBoxTextFieldEvaluationTime.addItem(new Tag("Group", I18n.getString("gui.elementpropertiessheet.textfieldEvaluationTime.Group","Group"))); 7696 jComboBoxTextFieldEvaluationTime.addItem(new Tag("Band", I18n.getString("gui.elementpropertiessheet.textfieldEvaluationTime.Band","Band"))); 7697 jComboBoxTextFieldEvaluationTime.addItem(new Tag("Auto", I18n.getString("gui.elementpropertiessheet.textfieldEvaluationTime.Auto","Auto"))); 7698 7699 jComboBoxSubreportConnectionType.removeAllItems(); 7700 jComboBoxSubreportConnectionType.addItem(I18n.getString("ConnectionType.1","Don't use connection or datasource")); 7701 jComboBoxSubreportConnectionType.addItem(I18n.getString("ConnectionType.2","Use connection expression")); 7702 jComboBoxSubreportConnectionType.addItem(I18n.getString("ConnectionType.3","Use datasource expression")); 7703 7704 jComboBoxEvaluationTimeBarcode.removeAllItems(); 7706 jComboBoxEvaluationTimeBarcode.addItem(new Tag("Now", I18n.getString("gui.elementpropertiessheet.textfieldEvaluationTime.Now","Now"))); 7707 jComboBoxEvaluationTimeBarcode.addItem(new Tag("Report", I18n.getString("gui.elementpropertiessheet.textfieldEvaluationTime.Report","Report"))); 7708 jComboBoxEvaluationTimeBarcode.addItem(new Tag("Page", I18n.getString("gui.elementpropertiessheet.textfieldEvaluationTime.Page","Page"))); 7709 jComboBoxEvaluationTimeBarcode.addItem(new Tag("Column", I18n.getString("gui.elementpropertiessheet.textfieldEvaluationTime.Column","Column"))); 7710 jComboBoxEvaluationTimeBarcode.addItem(new Tag("Group", I18n.getString("gui.elementpropertiessheet.textfieldEvaluationTime.Group","Group"))); 7711 jComboBoxEvaluationTimeBarcode.addItem(new Tag("Band", I18n.getString("gui.elementpropertiessheet.textfieldEvaluationTime.Band","Band"))); 7712 jComboBoxEvaluationTimeBarcode.addItem(new Tag("Auto", I18n.getString("gui.elementpropertiessheet.textfieldEvaluationTime.Auto","Auto"))); 7713 7714 jTabbedPane1.setTitleAt(0, it.businesslogic.ireport.util.I18n.getString("elementPropertiesDialog.tab.SubreportParameters","Subreport parameters")); 7715 jTabbedPane1.setTitleAt(1, it.businesslogic.ireport.util.I18n.getString("elementPropertiesDialog.tab.SubreportReturnValues","Subreport return values")); 7716 7717 ((javax.swing.border.TitledBorder )jPanel1.getBorder()).setTitle( it.businesslogic.ireport.util.I18n.getString("elementPropertiesDialog.panelBorder.RectangleRadius","Rectangle radius") ); 7718 7719 this.updateSelection(); 7720 } 7721} 7722 | Popular Tags |