Source Code Cross Referenced for ReportElementSheetPanel.java in  » Report » iReport-2.0.5 » it » businesslogic » ireport » gui » sheet » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Report » iReport 2.0.5 » it.businesslogic.ireport.gui.sheet 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


0001:        /*
0002:         * Copyright (C) 2005 - 2008 JasperSoft Corporation.  All rights reserved. 
0003:         * http://www.jaspersoft.com.
0004:         *
0005:         * Unless you have purchased a commercial license agreement from JasperSoft,
0006:         * the following license terms apply:
0007:         *
0008:         * This program is free software; you can redistribute it and/or modify
0009:         * it under the terms of the GNU General Public License version 2 as published by
0010:         * the Free Software Foundation.
0011:         *
0012:         * This program is distributed WITHOUT ANY WARRANTY; and without the
0013:         * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
0014:         * See the GNU General Public License for more details.
0015:         *
0016:         * You should have received a copy of the GNU General Public License
0017:         * along with this program; if not, see http://www.gnu.org/licenses/gpl.txt
0018:         * or write to:
0019:         *
0020:         * Free Software Foundation, Inc.,
0021:         * 59 Temple Place - Suite 330,
0022:         * Boston, MA  USA  02111-1307
0023:         *
0024:         *
0025:         *
0026:         *
0027:         * ReportElementSheetPanel.java
0028:         * 
0029:         * Created on 16 febbraio 2005, 6.57
0030:         *
0031:         */
0032:
0033:        package it.businesslogic.ireport.gui.sheet;
0034:
0035:        import it.businesslogic.ireport.*;
0036:        import it.businesslogic.ireport.BarcodeReportElement;
0037:        import it.businesslogic.ireport.FontListLoader;
0038:        import it.businesslogic.ireport.GraphicReportElement;
0039:        import it.businesslogic.ireport.IReportFont;
0040:        import it.businesslogic.ireport.LineReportElement;
0041:        import it.businesslogic.ireport.RectangleReportElement;
0042:        import it.businesslogic.ireport.TextFieldReportElement;
0043:        import it.businesslogic.ireport.TextReportElement;
0044:        import it.businesslogic.ireport.crosstab.CrosstabCell;
0045:        import it.businesslogic.ireport.gui.*;
0046:        import it.businesslogic.ireport.gui.JNumberComboBox;
0047:        import it.businesslogic.ireport.gui.JNumberField;
0048:        import it.businesslogic.ireport.gui.event.*;
0049:        import it.businesslogic.ireport.util.*;
0050:        import it.businesslogic.ireport.util.LanguageChangedEvent;
0051:        import it.businesslogic.ireport.util.LanguageChangedListener;
0052:        import java.awt.Point;
0053:        import java.util.*;
0054:        import javax.swing.FocusManager;
0055:        import javax.swing.JCheckBox;
0056:        import javax.swing.JComboBox;
0057:        import javax.swing.JComponent;
0058:        import javax.swing.SwingUtilities;
0059:
0060:        /**
0061:         *
0062:         * @author  Administrator
0063:         */
0064:        public class ReportElementSheetPanel extends CategorySheetPanel
0065:                implements  ReportListener, LanguageChangedListener,
0066:                ReportFrameActivatedListener {
0067:
0068:            // Sheet properties
0069:            private ComboBoxSheetProperty spBands;
0070:            private SheetProperty spTop;
0071:            private SheetProperty spLeft;
0072:            private SheetProperty spHeight;
0073:            private SheetProperty spWidth;
0074:            private SheetProperty spFgColor;
0075:            private SheetProperty spBgColor;
0076:            private SheetProperty spMode;
0077:
0078:            private SheetProperty spPrintRepeatedValues;
0079:            private SheetProperty spPrintWhenDetailOverflows;
0080:            private SheetProperty spPrintInFirstWholeBand;
0081:            private SheetProperty spRemoveLineWhenBlank;
0082:            private SheetProperty spPositionType;
0083:            private SheetProperty spElementKey;
0084:            private SheetProperty spStretchType;
0085:            private ComboBoxSheetProperty spStyle;
0086:
0087:            private ComboBoxSheetProperty spGroups;
0088:            private ExpressionSheetProperty spPrintWhenExpression;
0089:
0090:            private SheetProperty spFill;
0091:            private SheetProperty spPen;
0092:            private SheetProperty spLineWidth;
0093:            private LineComboBoxSheetProperty spLineStyle;
0094:
0095:            private SheetProperty spRadius;
0096:            private SheetProperty spDirection;
0097:
0098:            private SheetProperty spTextHAlign;
0099:            private SheetProperty spTextVAlign;
0100:            private SheetProperty spStyledText;
0101:            private SheetProperty spLineSpacing;
0102:            private SheetProperty spRotate;
0103:            private SheetProperty spMarkup;
0104:
0105:            private SheetProperty spFontName;
0106:            private NumberComboBoxSheetProperty spFontSize;
0107:            private SheetProperty spPdfFontName;
0108:            private SheetProperty spBold;
0109:            private SheetProperty spItalic;
0110:            private SheetProperty spUnderline;
0111:            private SheetProperty spStriketrough;
0112:            private SheetProperty spPdfEmbedded;
0113:            private SheetProperty spPdfEncoding;
0114:
0115:            private ExpressionSheetProperty spStaticText;
0116:            private ExpressionSheetProperty spTextfieldExpression;
0117:            private SheetProperty spTextfieldExpressionClass;
0118:            private SheetProperty spTextfieldEvaluationTime;
0119:            private ComboBoxSheetProperty spTextfieldEvaluationGroup;
0120:            private SheetProperty spStretchWithOverflow;
0121:            private SheetProperty spTextfieldBlankWhenNull;
0122:            private PatternSheetProperty spPattern;
0123:
0124:            private ExpressionSheetProperty spImageExpression;
0125:            private SheetProperty spImageExpressionClass;
0126:            private SheetProperty spImageEvaluationTime;
0127:            private ComboBoxSheetProperty spImageEvaluationGroup;
0128:            private SheetProperty spImageScale;
0129:            private SheetProperty spImageError;
0130:            private SheetProperty spRenderType;
0131:
0132:            private SheetProperty spImageHAlign;
0133:            private SheetProperty spImageVAlign;
0134:            private SheetProperty spImageLazy;
0135:            private SheetProperty spImageCache;
0136:
0137:            private SheetProperty spBCType;
0138:            private SheetProperty spBCChecksum;
0139:            private SheetProperty spBCShowText;
0140:            private ExpressionSheetProperty spBCExpression;
0141:            private SheetProperty spBCBarWidth;
0142:            private SheetProperty spBCBarHeight;
0143:            private ExpressionSheetProperty spBCApplicationIdentifier;
0144:            private SheetProperty spBCScale;
0145:            private SheetProperty spBCError;
0146:            private SheetProperty spBCHAlign;
0147:            private SheetProperty spBCVAlign;
0148:            private SheetProperty spBCEvaluationTime;
0149:            private ComboBoxSheetProperty spBCEvaluationGroup;
0150:
0151:            private SheetProperty spBreakType;
0152:
0153:            // --- CAHRT ---
0154:            private SheetProperty spChartEvaluationTime;
0155:            private ComboBoxSheetProperty spChartEvaluationGroup;
0156:
0157:            public static java.awt.Color sharedDifferentValueLabelColor = java.awt.Color.red
0158:                    .darker().darker();
0159:            public static java.awt.Color mandatoryPropertiesLabelColor = java.awt.Color.blue;
0160:            public static java.awt.Color notMandatoryPropertiesLabelColor = java.awt.Color.black;
0161:
0162:            private JReportFrame jrf = null;
0163:            private boolean init = false;
0164:
0165:            private Vector elementSelection = new Vector();
0166:
0167:            /** Creates a new instance of ReportElementSheetPanel */
0168:            public ReportElementSheetPanel() {
0169:                super ();
0170:
0171:                initSheetProperties();
0172:                // We have to register for element changes...
0173:                MainFrame mf = MainFrame.getMainInstance();
0174:                mf.addReportListener(this );
0175:                mf.addReportFrameActivatedListener(this );
0176:
0177:                I18n.addOnLanguageChangedListener(this );
0178:
0179:                MainFrame.getMainInstance().addFontsListChangedListener(
0180:                        new FontsListChangedListener() {
0181:                            public void fontsListChanged(
0182:                                    FontsListChangedEvent evt) {
0183:
0184:                                boolean localinit = isInit();
0185:                                setInit(true);
0186:                                updateReportFonts();
0187:                                setInit(localinit);
0188:                            }
0189:                        });
0190:
0191:            }
0192:
0193:            public void reportFrameActivated(ReportFrameActivatedEvent evt) {
0194:
0195:                if (evt.getReportFrame() == null) {
0196:                    updateSelection(evt.getReportFrame());
0197:                }
0198:
0199:            }
0200:
0201:            public void languageChanged(LanguageChangedEvent evt) {
0202:                super .applyI18n();
0203:                this .removeAllProperties();
0204:                initSheetProperties();
0205:                updateSelection();
0206:            }
0207:
0208:            public void updateSelection() {
0209:                JReportFrame newJrf = MainFrame.getMainInstance()
0210:                        .getActiveReportFrame();
0211:                updateSelection(newJrf);
0212:            }
0213:
0214:            /**
0215:             * Numbers do not change when the focus is lost due to a selection change.
0216:             * This apply the value....
0217:             */
0218:            public void applyValueForNumbers() {
0219:                Enumeration e = getProperties().elements();
0220:                while (e.hasMoreElements()) {
0221:                    SheetProperty sp = (SheetProperty) e.nextElement();
0222:
0223:                    //if (sp instanceof NumberComboBoxSheetProperty)
0224:                    //{
0225:                    //    JNumberComboBox c = (JNumberComboBox)sp.getEditor();
0226:                    //    System.out.println("NNNN");
0227:                    //    if (c.hasFocus())
0228:                    //    {
0229:                    //       FocusManager.getCurrentManager().clearGlobalFocusOwner();
0230:                    //       System.out.println(FocusManager.getCurrentManager().getFocusOwner());
0231:                    //       return; // Only a component can be focused at time...
0232:                    //    }
0233:                    //}
0234:                    if (sp.getType() == sp.INTEGER || sp.getType() == sp.NUMBER) {
0235:                        JComponent c = sp.getEditor();
0236:                        if (c.hasFocus() && c instanceof  JNumberField) {
0237:                            ((JNumberField) c).focusLost(null);
0238:                            return; // Only a component can be focused at time...
0239:                        }
0240:                    }
0241:
0242:                }
0243:            }
0244:
0245:            /**
0246:             * Update all the element properties...
0247:             * 
0248:             */
0249:            public void updateSelection(JReportFrame newJrf) {
0250:                if (getElementSelection().size() == 0
0251:                        && (newJrf == null
0252:                                || (newJrf.getSelectedCrosstabEditorPanel() != null && newJrf
0253:                                        .getSelectedCrosstabEditorPanel()
0254:                                        .getSelectedElements().size() == 0) || newJrf
0255:                                .getSelectedCrosstabEditorPanel() == null
0256:                                && newJrf.getSelectedElements().size() == 0)) {
0257:                    // Nothind to do!
0258:                    return;
0259:                }
0260:
0261:                // Fix for numbers focus losing...
0262:                //****//       
0263:
0264:                applyValueForNumbers();
0265:
0266:                setInit(true);
0267:
0268:                if (newJrf != null) {
0269:                    if (newJrf.getSelectedCrosstabEditorPanel() == null) {
0270:                        setElementSelection(newJrf.getSelectedElements());
0271:                    } else {
0272:                        setElementSelection(newJrf
0273:                                .getSelectedCrosstabEditorPanel()
0274:                                .getSelectedElements());
0275:                    }
0276:                } else {
0277:                    getElementSelection().removeAllElements();
0278:                }
0279:
0280:                this .removeAllProperties();
0281:
0282:                this .jrf = newJrf;
0283:
0284:                if (jrf == null || getElementSelection().size() == 0) {
0285:                    this .recreateSheet();
0286:                    return;
0287:                }
0288:
0289:                updateAllComboBoxes();
0290:
0291:                try {
0292:                    Vector selectedElements = getElementSelection();
0293:
0294:                    boolean sameBand = true;
0295:                    boolean sameTop = true;
0296:                    boolean sameLeft = true;
0297:                    boolean sameWidth = true;
0298:                    boolean sameHeight = true;
0299:                    boolean sameForeground = true;
0300:                    boolean sameBackground = true;
0301:                    boolean sameMode = true;
0302:                    boolean samePrintRepeatedValues = true;
0303:                    boolean samePrintWhenDetailOverflows = true;
0304:                    boolean samePrintInFirstWholeBand = true;
0305:                    boolean sameRemoveLineWhenBlank = true;
0306:                    boolean samePositionType = true;
0307:                    boolean samePrintWhenGroupChanges = true;
0308:                    boolean sameStretchType = true;
0309:                    boolean sameStyle = true;
0310:                    boolean samePrintWhenExpression = true;
0311:
0312:                    // ---- GRAPHICS ELEMENT -----
0313:                    boolean areAllGraphicsElements = true;
0314:                    boolean sameFill = true;
0315:                    boolean samePen = true;
0316:                    boolean sameLineWidth = true;
0317:                    boolean sameLineStyle = true;
0318:
0319:                    // ---- RECTANGLE ELEMENT -----
0320:                    boolean areAllRectangleElements = true;
0321:                    boolean sameRadius = true;
0322:
0323:                    // ---- LINE ELEMENT -----
0324:                    boolean areAllLineElements = true;
0325:                    boolean sameDirection = true;
0326:
0327:                    // ---- TEXT ELEMENT ELEMENT -----
0328:                    boolean areAllTextElements = true;
0329:                    boolean sameHAlign = true;
0330:                    boolean sameVAlign = true;
0331:                    boolean sameStyledText = true;
0332:                    boolean sameLineSpacing = true;
0333:                    boolean sameRotate = true;
0334:                    boolean sameBold = true;
0335:                    boolean sameItalic = true;
0336:                    boolean sameUnderline = true;
0337:                    boolean sameStrikethrough = true;
0338:                    boolean samePdfEmbedded = true;
0339:                    boolean sameFontSize = true;
0340:                    boolean sameFontName = true;
0341:                    boolean samePDFFontName = true;
0342:                    boolean samePdfEncoding = true;
0343:                    boolean sameMarkup = true;
0344:
0345:                    // ---- BREAK ELEMENT ELEMENT -----
0346:                    boolean areAllBreakElements = true;
0347:                    boolean sameBreakType = true;
0348:
0349:                    // ---- SATIC TEXT ELEMENT ELEMENT -----
0350:                    boolean areAllStaticTextElements = true;
0351:                    boolean sameText = true;
0352:
0353:                    // ---- TEXTFIELD ELEMENT ELEMENT -----
0354:                    boolean areAllTextfieldElements = true;
0355:                    boolean sameTextfieldExpression = true;
0356:                    boolean sameTextfieldExpressionClass = true;
0357:                    boolean sameTextfieldEvaluationTime = true;
0358:                    boolean sameTextfieldEvaluationGroup = true;
0359:                    boolean sameStrtchWithOverflow = true;
0360:                    boolean sameBlankWhenNull = true;
0361:                    boolean samePattern = true;
0362:
0363:                    // ---- IAMGE ELEMENT -----
0364:                    boolean areAllImageElements = true;
0365:                    boolean sameImageExpression = true;
0366:                    boolean sameImageExpressionClass = true;
0367:                    boolean sameImageEvaluationTime = true;
0368:                    boolean sameImageEvaluationGroup = true;
0369:                    boolean sameImageLazy = true;
0370:                    boolean sameImageCache = true;
0371:                    boolean sameImageScale = true;
0372:                    boolean sameImageOnError = true;
0373:                    boolean sameImageVAlign = true;
0374:                    boolean sameImageHAlign = true;
0375:
0376:                    // ---- BARCODE ELEMENT ----
0377:                    boolean areAllBarcodeElements = true;
0378:                    boolean sameBCType = true;
0379:                    boolean sameBCChecksum = true;
0380:                    boolean sameBCShowText = true;
0381:                    boolean sameBCExpression = true;
0382:                    boolean sameBCBarWidth = true;
0383:                    boolean sameBCBarHeight = true;
0384:                    boolean sameBCApplicationIdentifier = true;
0385:                    boolean sameBCScale = true;
0386:                    boolean sameBCError = true;
0387:                    boolean sameBCHAlign = true;
0388:                    boolean sameBCVAlign = true;
0389:                    boolean sameBCEvaluationTime = true;
0390:                    boolean sameBCEvaluationGroup = true;
0391:
0392:                    // --- CHART ELEMENT ----
0393:                    boolean areAllChartElements = true;
0394:                    boolean sameChartEvaluationTime = true;
0395:                    boolean sameChartEvaluationGroup = true;
0396:                    boolean sameRenderType = true;
0397:
0398:                    boolean isTheFirstElement = true;
0399:
0400:                    //spBands.setSetting(true);
0401:                    Band last_band = null;
0402:                    int y_location = 0;
0403:
0404:                    for (int i = 0; i < selectedElements.size(); ++i) {
0405:                        ReportElement re = (ReportElement) selectedElements
0406:                                .elementAt(i);
0407:                        if (re.getBand() != null
0408:                                && (last_band == null || last_band != re
0409:                                        .getBand())) {
0410:                            y_location = this .jrf.getReport().getBandYLocation(
0411:                                    re.getBand());
0412:                            last_band = re.getBand();
0413:                        }
0414:
0415:                        int x_location = this .jrf.getReport().getLeftMargin();
0416:
0417:                        if (re.getBand() == null && re.getCell() != null) {
0418:                            y_location = re.getCell().getTop();
0419:                            x_location = re.getCell().getLeft();
0420:                        }
0421:
0422:                        //if (sameBand) sameBand = setComboBox(isTheFirstElement, (re.getBand() == null) ? (Object)re.getCell() : (Object)re.getBand(), (JComboBox)spBands.getEditor());
0423:
0424:                        if (sameTop) {
0425:                            int position_y = re.getPosition().y;
0426:                            if (re.getParentElement() != null)
0427:                                position_y -= re.getParentElement()
0428:                                        .getPosition().y;
0429:                            else
0430:                                position_y = position_y - y_location - 10;
0431:
0432:                            sameTop = this .setElementNumber(isTheFirstElement,
0433:                                    (double) position_y, (JNumberField) spTop
0434:                                            .getEditor());
0435:                        }
0436:
0437:                        if (sameLeft) {
0438:                            int position_x = re.getPosition().x;
0439:                            if (re.getParentElement() != null)
0440:                                position_x -= re.getParentElement()
0441:                                        .getPosition().x;
0442:                            else
0443:                                position_x = position_x - 10 - x_location;
0444:
0445:                            sameLeft = this .setElementNumber(isTheFirstElement,
0446:                                    position_x, (JNumberField) spLeft
0447:                                            .getEditor());
0448:                        }
0449:                        if (sameWidth)
0450:                            sameWidth = this .setElementNumber(
0451:                                    isTheFirstElement, re.getWidth(),
0452:                                    (JNumberField) spWidth.getEditor());
0453:                        if (sameHeight)
0454:                            sameHeight = this .setElementNumber(
0455:                                    isTheFirstElement, re.getHeight(),
0456:                                    (JNumberField) spHeight.getEditor());
0457:                        if (sameForeground)
0458:                            sameForeground = this .setColorProperty(
0459:                                    isTheFirstElement, re.getColorValue(
0460:                                            re.FGCOLOR, null), spFgColor);
0461:                        if (sameBackground)
0462:                            sameBackground = this .setColorProperty(
0463:                                    isTheFirstElement, re.getColorValue(
0464:                                            re.BGCOLOR, null), spBgColor);
0465:
0466:                        if (sameMode)
0467:                            sameMode = this .setCheckBox(isTheFirstElement, re
0468:                                    .getTransparent().equals("Transparent"), re
0469:                                    .getPropertyValue(re.MODE) == null, spMode);
0470:                        if (samePrintRepeatedValues)
0471:                            samePrintRepeatedValues = this .setCheckBox(
0472:                                    isTheFirstElement, re
0473:                                            .isIsPrintRepeatedValues(), false,
0474:                                    spPrintRepeatedValues);
0475:                        if (samePrintWhenDetailOverflows)
0476:                            samePrintWhenDetailOverflows = this .setCheckBox(
0477:                                    isTheFirstElement, re
0478:                                            .isIsPrintWhenDetailOverflows(),
0479:                                    false, spPrintWhenDetailOverflows);
0480:                        if (samePrintInFirstWholeBand)
0481:                            samePrintInFirstWholeBand = this .setCheckBox(
0482:                                    isTheFirstElement, re
0483:                                            .isIsPrintInFirstWholeBand(),
0484:                                    false, spPrintInFirstWholeBand);
0485:                        if (sameRemoveLineWhenBlank)
0486:                            sameRemoveLineWhenBlank = this .setCheckBox(
0487:                                    isTheFirstElement, re
0488:                                            .isIsRemoveLineWhenBlank(), false,
0489:                                    spRemoveLineWhenBlank);
0490:                        if (samePositionType)
0491:                            samePositionType = setTagComboBox(
0492:                                    isTheFirstElement, re.getPositionType(),
0493:                                    spPositionType);
0494:                        if (samePrintWhenGroupChanges)
0495:                            samePrintWhenGroupChanges = setTagComboBox(
0496:                                    isTheFirstElement, re
0497:                                            .getPrintWhenGroupChanges(),
0498:                                    spGroups);
0499:                        if (sameStretchType)
0500:                            sameStretchType = setTagComboBox(isTheFirstElement,
0501:                                    re.getStretchType(), spStretchType);
0502:                        if (sameStyle)
0503:                            sameStyle = setTagComboBox(isTheFirstElement, (re
0504:                                    .getStyle() == null) ? (Object) ""
0505:                                    : (Object) re.getStyle(), spStyle);
0506:                        if (samePrintWhenExpression)
0507:                            samePrintWhenExpression = setTextArea(
0508:                                    isTheFirstElement, re
0509:                                            .getPrintWhenExpression(),
0510:                                    spPrintWhenExpression);
0511:                        if (i == 0)
0512:                            spElementKey.setValue(re.getKey());
0513:
0514:                        // ---- GRAPHIC ELEMENTS ----
0515:                        if (areAllGraphicsElements
0516:                                && (re instanceof  GraphicReportElement)) {
0517:                            GraphicReportElement gre = (GraphicReportElement) re;
0518:                            if (sameLineStyle)
0519:                                sameLineStyle = setComboBox(isTheFirstElement,
0520:                                        gre.getPen() != null ? gre.getPen()
0521:                                                .getLineStyle() : null,
0522:                                        (JComboBox) spLineStyle.getEditor());
0523:                            if (sameLineWidth)
0524:                                sameLineWidth = setElementNumber(
0525:                                        isTheFirstElement,
0526:                                        gre.getPen() != null ? gre.getPen()
0527:                                                .getLineWidth() : 0.0,
0528:                                        (JNumberField) spLineWidth.getEditor());
0529:
0530:                            if (samePen)
0531:                                samePen = setTagComboBox(isTheFirstElement, re
0532:                                        .getPropertyValue(gre.PEN), spPen);
0533:                            if (sameFill)
0534:                                sameFill = setTagComboBox(isTheFirstElement, re
0535:                                        .getPropertyValue(gre.FILL), spFill);
0536:                        } else {
0537:                            areAllGraphicsElements = false;
0538:                        }
0539:
0540:                        // ---- RECTANGLE ELEMENTS ----
0541:                        if (areAllRectangleElements
0542:                                && (re instanceof  RectangleReportElement)) {
0543:                            RectangleReportElement rre = (RectangleReportElement) re;
0544:                            if (sameRadius)
0545:                                sameRadius = setGenericSheetProperty(
0546:                                        isTheFirstElement, rre
0547:                                                .getPropertyValue(rre.RADIUS),
0548:                                        spRadius);
0549:                        } else {
0550:                            areAllRectangleElements = false;
0551:                        }
0552:
0553:                        // ---- LINE ELEMENTS ----
0554:                        if (areAllLineElements
0555:                                && (re instanceof  LineReportElement)) {
0556:                            LineReportElement rre = (LineReportElement) re;
0557:                            if (sameDirection)
0558:                                sameDirection = setTagComboBox(
0559:                                        isTheFirstElement, rre.getDirection(),
0560:                                        spDirection);
0561:                        } else {
0562:                            areAllLineElements = false;
0563:                        }
0564:
0565:                        // ---- TEXT ELEMENTS ----
0566:                        if (areAllTextElements
0567:                                && (re instanceof  TextReportElement)) {
0568:                            TextReportElement rre = (TextReportElement) re;
0569:                            if (sameHAlign)
0570:                                sameHAlign = setTagComboBox(isTheFirstElement,
0571:                                        re.getPropertyValue(rre.ALIGN),
0572:                                        spTextHAlign);
0573:                            if (sameVAlign)
0574:                                sameVAlign = setTagComboBox(
0575:                                        isTheFirstElement,
0576:                                        re.getPropertyValue(rre.VERTICAL_ALIGN),
0577:                                        spTextVAlign);
0578:                            if (sameStyledText)
0579:                                sameStyledText = this 
0580:                                        .setCheckBox(
0581:                                                isTheFirstElement,
0582:                                                rre.isIsStyledText(),
0583:                                                re
0584:                                                        .getPropertyValue(rre.IS_STYLED_TEXT) == null,
0585:                                                spStyledText);
0586:                            if (sameLineSpacing)
0587:                                sameLineSpacing = setTagComboBox(
0588:                                        isTheFirstElement,
0589:                                        re.getPropertyValue(rre.LINE_SPACING),
0590:                                        spLineSpacing);
0591:                            if (sameRotate)
0592:                                sameRotate = setTagComboBox(isTheFirstElement,
0593:                                        re.getPropertyValue(rre.ROTATE),
0594:                                        spRotate);
0595:                            if (sameMarkup)
0596:                                sameMarkup = setTagComboBox(isTheFirstElement,
0597:                                        re.getPropertyValue(rre.MARKUP),
0598:                                        spMarkup);
0599:
0600:                            if (sameBold)
0601:                                sameBold = this .setCheckBox(isTheFirstElement,
0602:                                        rre.isBold(),
0603:                                        rre.getIReportFont().getPropertyValue(
0604:                                                IReportFont.IS_BOLD) == null,
0605:                                        spBold);
0606:                            if (sameItalic)
0607:                                sameItalic = this .setCheckBox(
0608:                                        isTheFirstElement, rre.isItalic(),
0609:                                        rre.getIReportFont().getPropertyValue(
0610:                                                IReportFont.IS_ITALIC) == null,
0611:                                        spItalic);
0612:                            if (sameUnderline)
0613:                                sameUnderline = this 
0614:                                        .setCheckBox(
0615:                                                isTheFirstElement,
0616:                                                rre.isUnderline(),
0617:                                                rre
0618:                                                        .getIReportFont()
0619:                                                        .getPropertyValue(
0620:                                                                IReportFont.IS_UNDERLINE) == null,
0621:                                                spUnderline);
0622:                            if (sameStrikethrough)
0623:                                sameStrikethrough = this 
0624:                                        .setCheckBox(
0625:                                                isTheFirstElement,
0626:                                                rre.isStrikeTrought(),
0627:                                                rre
0628:                                                        .getIReportFont()
0629:                                                        .getPropertyValue(
0630:                                                                IReportFont.IS_STRIKETROUGHT) == null,
0631:                                                spStriketrough);
0632:                            if (samePdfEmbedded)
0633:                                samePdfEmbedded = this 
0634:                                        .setCheckBox(
0635:                                                isTheFirstElement,
0636:                                                rre.isPdfEmbedded(),
0637:                                                rre
0638:                                                        .getIReportFont()
0639:                                                        .getPropertyValue(
0640:                                                                IReportFont.IS_PDF_EMBEDDED) == null,
0641:                                                spPdfEmbedded);
0642:                            if (sameFontSize)
0643:                                sameFontSize = this .setElementNumber(
0644:                                        isTheFirstElement, rre.getFontSize(),
0645:                                        rre.getIReportFont().getPropertyValue(
0646:                                                IReportFont.FONT_SIZE),
0647:                                        spFontSize);
0648:                            if (sameFontName)
0649:                                sameFontName = setTagComboBox(
0650:                                        isTheFirstElement, rre.getIReportFont()
0651:                                                .getPropertyValue(
0652:                                                        IReportFont.FONT_NAME),
0653:                                        spFontName);
0654:                            if (samePDFFontName)
0655:                                samePDFFontName = this .setTagComboBox(
0656:                                        isTheFirstElement,
0657:                                        rre.getIReportFont().getPropertyValue(
0658:                                                IReportFont.PDF_FONT_NAME),
0659:                                        spPdfFontName);
0660:                            if (samePdfEncoding)
0661:                                samePdfEncoding = this .setTagComboBox(
0662:                                        isTheFirstElement,
0663:                                        rre.getIReportFont().getPropertyValue(
0664:                                                IReportFont.PDF_ENCODING),
0665:                                        spPdfEncoding);
0666:
0667:                        } else {
0668:                            areAllTextElements = false;
0669:                        }
0670:
0671:                        // ---- STATIC TEXT ELEMENTS ----
0672:                        if (areAllStaticTextElements
0673:                                && (re instanceof  StaticTextReportElement)) {
0674:                            StaticTextReportElement rre = (StaticTextReportElement) re;
0675:                            if (sameText)
0676:                                sameText = setTextArea(isTheFirstElement, rre
0677:                                        .getText(), spStaticText);
0678:                        } else {
0679:                            areAllStaticTextElements = false;
0680:                        }
0681:
0682:                        // ---- TEXTFIELD ELEMENTS ----
0683:                        if (areAllTextfieldElements
0684:                                && (re instanceof  TextFieldReportElement)) {
0685:                            TextFieldReportElement rre = (TextFieldReportElement) re;
0686:                            if (sameTextfieldExpression)
0687:                                sameTextfieldExpression = setTextArea(
0688:                                        isTheFirstElement, rre.getText(),
0689:                                        spTextfieldExpression);
0690:                            if (sameTextfieldExpressionClass)
0691:                                sameTextfieldExpressionClass = setTagComboBox(
0692:                                        isTheFirstElement, rre
0693:                                                .getClassExpression(),
0694:                                        spTextfieldExpressionClass);
0695:                            if (sameTextfieldEvaluationTime)
0696:                                sameTextfieldEvaluationTime = setTagComboBox(
0697:                                        isTheFirstElement, rre
0698:                                                .getEvaluationTime(),
0699:                                        spTextfieldEvaluationTime);
0700:                            if (sameTextfieldEvaluationGroup
0701:                                    && sameTextfieldEvaluationTime)
0702:                                sameTextfieldEvaluationGroup = setTagComboBox(
0703:                                        isTheFirstElement, rre.getGroup(),
0704:                                        spTextfieldEvaluationGroup);
0705:                            if (sameStrtchWithOverflow)
0706:                                sameStrtchWithOverflow = setCheckBox(
0707:                                        isTheFirstElement, rre
0708:                                                .isStretchWithOverflow(),
0709:                                        false, spStretchWithOverflow);
0710:                            if (sameBlankWhenNull)
0711:                                sameBlankWhenNull = setCheckBox(
0712:                                        isTheFirstElement, rre
0713:                                                .isBlankWhenNull(), false,
0714:                                        spTextfieldBlankWhenNull);
0715:                            if (samePattern)
0716:                                samePattern = setTextPattern(isTheFirstElement,
0717:                                        re.getPropertyValue(rre.PATTERN),
0718:                                        spPattern);
0719:                        } else {
0720:                            areAllTextfieldElements = false;
0721:                        }
0722:
0723:                        // ---- IMAGE ELEMENTS ----
0724:                        if (areAllImageElements
0725:                                && (re instanceof  ImageReportElement)
0726:                                && !(re instanceof  BarcodeReportElement)) {
0727:                            ImageReportElement rre = (ImageReportElement) re;
0728:                            if (sameImageExpression)
0729:                                sameImageExpression = setTextArea(
0730:                                        isTheFirstElement, rre
0731:                                                .getImageExpression(),
0732:                                        spImageExpression);
0733:                            if (sameImageExpressionClass)
0734:                                sameImageExpressionClass = setTagComboBox(
0735:                                        isTheFirstElement, rre.getImageClass(),
0736:                                        spImageExpressionClass);
0737:                            if (sameImageEvaluationTime)
0738:                                sameImageEvaluationTime = setTagComboBox(
0739:                                        isTheFirstElement, rre
0740:                                                .getEvaluationTime(),
0741:                                        spImageEvaluationTime);
0742:                            if (sameImageEvaluationGroup
0743:                                    && sameImageEvaluationTime)
0744:                                sameImageEvaluationGroup = setTagComboBox(
0745:                                        isTheFirstElement, rre
0746:                                                .getEvaluationGroup(),
0747:                                        spImageEvaluationGroup);
0748:                            if (sameImageLazy)
0749:                                sameImageLazy = setCheckBox(isTheFirstElement,
0750:                                        rre.isIsLazy(), false, spImageLazy);
0751:                            if (sameImageScale)
0752:                                sameImageScale = setTagComboBox(
0753:                                        isTheFirstElement, re
0754:                                                .getPropertyValue(rre.SCALE),
0755:                                        spImageScale);
0756:                            if (sameImageCache)
0757:                                sameImageCache = setCheckBox(
0758:                                        isTheFirstElement,
0759:                                        rre.isIsUsingCache(),
0760:                                        rre.getPropertyValue(rre.USING_CACHE) == null,
0761:                                        spImageCache);
0762:                            if (sameImageVAlign)
0763:                                sameImageVAlign = setTagComboBox(
0764:                                        isTheFirstElement,
0765:                                        re.getPropertyValue(rre.VERTICAL_ALIGN),
0766:                                        spImageVAlign);
0767:                            if (sameImageHAlign)
0768:                                sameImageHAlign = setTagComboBox(
0769:                                        isTheFirstElement,
0770:                                        re
0771:                                                .getPropertyValue(rre.HORIZONTAL_ALIGN),
0772:                                        spImageHAlign);
0773:                        } else {
0774:                            areAllImageElements = false;
0775:                        }
0776:
0777:                        // ---- IMAGE ELEMENTS ----
0778:                        if (areAllBarcodeElements
0779:                                && re instanceof  BarcodeReportElement) {
0780:                            BarcodeReportElement rre = (BarcodeReportElement) re;
0781:                            if (sameBCType)
0782:                                sameBCType = setTagComboBox(isTheFirstElement,
0783:                                        rre.getType() + "", spBCType);
0784:                            if (sameBCBarWidth)
0785:                                sameBCBarWidth = setGenericSheetProperty(
0786:                                        isTheFirstElement, ""
0787:                                                + rre.getImageWidth(),
0788:                                        spBCBarWidth);
0789:                            if (sameBCBarHeight)
0790:                                sameBCBarHeight = setGenericSheetProperty(
0791:                                        isTheFirstElement, ""
0792:                                                + rre.getImageHeight(),
0793:                                        spBCBarHeight);
0794:                            if (sameBCExpression)
0795:                                sameBCExpression = setTextArea(
0796:                                        isTheFirstElement, rre.getText(),
0797:                                        spBCExpression);
0798:                            if (sameBCApplicationIdentifier)
0799:                                sameBCApplicationIdentifier = setTextArea(
0800:                                        isTheFirstElement, rre
0801:                                                .getApplicationIdentifier(),
0802:                                        spBCApplicationIdentifier);
0803:                            if (sameBCEvaluationTime)
0804:                                sameBCEvaluationTime = setTagComboBox(
0805:                                        isTheFirstElement, rre
0806:                                                .getEvaluationTime(),
0807:                                        spBCEvaluationTime);
0808:                            if (sameBCEvaluationGroup && sameBCEvaluationTime)
0809:                                sameBCEvaluationGroup = setTagComboBox(
0810:                                        isTheFirstElement, rre
0811:                                                .getEvaluationGroup(),
0812:                                        spBCEvaluationGroup);
0813:                            if (sameBCShowText)
0814:                                sameBCShowText = setCheckBox(isTheFirstElement,
0815:                                        rre.isShowText(), false, spBCShowText);
0816:                            if (sameBCChecksum)
0817:                                sameBCChecksum = setCheckBox(isTheFirstElement,
0818:                                        rre.isCheckSum(), false, spBCChecksum);
0819:                            if (sameBCScale)
0820:                                sameBCScale = setTagComboBox(isTheFirstElement,
0821:                                        re.getPropertyValue(rre.SCALE),
0822:                                        spBCScale);
0823:                            if (sameBCVAlign)
0824:                                sameBCVAlign = setTagComboBox(
0825:                                        isTheFirstElement,
0826:                                        re.getPropertyValue(rre.VERTICAL_ALIGN),
0827:                                        spBCVAlign);
0828:                            if (sameBCHAlign)
0829:                                sameBCHAlign = setTagComboBox(
0830:                                        isTheFirstElement,
0831:                                        re
0832:                                                .getPropertyValue(rre.HORIZONTAL_ALIGN),
0833:                                        spBCHAlign);
0834:                        } else {
0835:                            areAllBarcodeElements = false;
0836:                        }
0837:
0838:                        if (areAllBreakElements
0839:                                && (re instanceof  BreakReportElement)) {
0840:                            BreakReportElement rre = (BreakReportElement) re;
0841:                            if (sameBreakType)
0842:                                sameBreakType = setTagComboBox(
0843:                                        isTheFirstElement, rre.getType(),
0844:                                        spBreakType);
0845:
0846:                        } else {
0847:                            areAllBreakElements = false;
0848:                        }
0849:
0850:                        // ---- IMAGE ELEMENTS ----
0851:                        if (areAllChartElements
0852:                                && re instanceof  ChartReportElement2) {
0853:                            ChartReportElement2 rre = (ChartReportElement2) re;
0854:                            if (sameChartEvaluationTime)
0855:                                sameChartEvaluationTime = setTagComboBox(
0856:                                        isTheFirstElement, rre
0857:                                                .getEvaluationTime(),
0858:                                        spChartEvaluationTime);
0859:                            if (sameChartEvaluationGroup
0860:                                    && sameChartEvaluationTime)
0861:                                sameChartEvaluationGroup = setTagComboBox(
0862:                                        isTheFirstElement, rre
0863:                                                .getEvaluationGroup(),
0864:                                        spChartEvaluationGroup);
0865:                            if (sameRenderType)
0866:                                sameRenderType = setTagComboBox(
0867:                                        isTheFirstElement, rre.getRenderType(),
0868:                                        spRenderType);
0869:                        } else {
0870:                            areAllChartElements = false;
0871:                        }
0872:
0873:                        if (sameBand)
0874:                            sameBand = setComboBox(isTheFirstElement, (re
0875:                                    .getBand() == null) ? (Object) re.getCell()
0876:                                    : (Object) re.getBand(),
0877:                                    (JComboBox) spBands.getEditor());
0878:
0879:                        isTheFirstElement = false;
0880:                    }
0881:
0882:                    spBands
0883:                            .setLabelColor((sameBand) ? mandatoryPropertiesLabelColor
0884:                                    : sharedDifferentValueLabelColor);
0885:                    spTop
0886:                            .setLabelColor((sameTop) ? mandatoryPropertiesLabelColor
0887:                                    : sharedDifferentValueLabelColor);
0888:                    spLeft
0889:                            .setLabelColor((sameLeft) ? mandatoryPropertiesLabelColor
0890:                                    : sharedDifferentValueLabelColor);
0891:                    spHeight
0892:                            .setLabelColor((sameHeight) ? mandatoryPropertiesLabelColor
0893:                                    : sharedDifferentValueLabelColor);
0894:                    spWidth
0895:                            .setLabelColor((sameWidth) ? mandatoryPropertiesLabelColor
0896:                                    : sharedDifferentValueLabelColor);
0897:                    spFgColor
0898:                            .setLabelColor((sameForeground) ? notMandatoryPropertiesLabelColor
0899:                                    : sharedDifferentValueLabelColor);
0900:                    spBgColor
0901:                            .setLabelColor((sameBackground) ? notMandatoryPropertiesLabelColor
0902:                                    : sharedDifferentValueLabelColor);
0903:                    spMode
0904:                            .setLabelColor((sameMode) ? notMandatoryPropertiesLabelColor
0905:                                    : sharedDifferentValueLabelColor);
0906:                    spPrintRepeatedValues
0907:                            .setLabelColor((samePrintRepeatedValues) ? mandatoryPropertiesLabelColor
0908:                                    : sharedDifferentValueLabelColor);
0909:                    spPrintWhenDetailOverflows
0910:                            .setLabelColor((samePrintWhenDetailOverflows) ? mandatoryPropertiesLabelColor
0911:                                    : sharedDifferentValueLabelColor);
0912:                    spPrintInFirstWholeBand
0913:                            .setLabelColor((samePrintInFirstWholeBand) ? mandatoryPropertiesLabelColor
0914:                                    : sharedDifferentValueLabelColor);
0915:                    spRemoveLineWhenBlank
0916:                            .setLabelColor((sameRemoveLineWhenBlank) ? mandatoryPropertiesLabelColor
0917:                                    : sharedDifferentValueLabelColor);
0918:                    spPositionType
0919:                            .setLabelColor((samePositionType) ? mandatoryPropertiesLabelColor
0920:                                    : sharedDifferentValueLabelColor);
0921:                    spGroups
0922:                            .setLabelColor((samePrintWhenGroupChanges) ? mandatoryPropertiesLabelColor
0923:                                    : sharedDifferentValueLabelColor);
0924:                    spStretchType
0925:                            .setLabelColor((sameStretchType) ? mandatoryPropertiesLabelColor
0926:                                    : sharedDifferentValueLabelColor);
0927:                    spStyle
0928:                            .setLabelColor((sameStyle) ? notMandatoryPropertiesLabelColor
0929:                                    : sharedDifferentValueLabelColor);
0930:                    spPrintWhenExpression
0931:                            .setLabelColor((samePrintWhenExpression) ? mandatoryPropertiesLabelColor
0932:                                    : sharedDifferentValueLabelColor);
0933:                    spPen
0934:                            .setLabelColor((samePen) ? notMandatoryPropertiesLabelColor
0935:                                    : sharedDifferentValueLabelColor);
0936:                    spFill
0937:                            .setLabelColor((sameFill) ? notMandatoryPropertiesLabelColor
0938:                                    : sharedDifferentValueLabelColor);
0939:                    spLineWidth
0940:                            .setLabelColor((sameLineWidth) ? notMandatoryPropertiesLabelColor
0941:                                    : sharedDifferentValueLabelColor);
0942:                    spLineStyle
0943:                            .setLabelColor((sameLineStyle) ? notMandatoryPropertiesLabelColor
0944:                                    : sharedDifferentValueLabelColor);
0945:                    spRadius
0946:                            .setLabelColor((sameRadius) ? notMandatoryPropertiesLabelColor
0947:                                    : sharedDifferentValueLabelColor);
0948:                    spDirection
0949:                            .setLabelColor((sameDirection) ? mandatoryPropertiesLabelColor
0950:                                    : sharedDifferentValueLabelColor);
0951:                    spBreakType
0952:                            .setLabelColor((sameBreakType) ? mandatoryPropertiesLabelColor
0953:                                    : sharedDifferentValueLabelColor);
0954:                    spTextHAlign
0955:                            .setLabelColor((sameHAlign) ? notMandatoryPropertiesLabelColor
0956:                                    : sharedDifferentValueLabelColor);
0957:                    spTextVAlign
0958:                            .setLabelColor((sameVAlign) ? notMandatoryPropertiesLabelColor
0959:                                    : sharedDifferentValueLabelColor);
0960:                    spStyledText
0961:                            .setLabelColor((sameStyledText) ? notMandatoryPropertiesLabelColor
0962:                                    : sharedDifferentValueLabelColor);
0963:                    spLineSpacing
0964:                            .setLabelColor((sameLineSpacing) ? notMandatoryPropertiesLabelColor
0965:                                    : sharedDifferentValueLabelColor);
0966:                    spRotate
0967:                            .setLabelColor((sameRotate) ? notMandatoryPropertiesLabelColor
0968:                                    : sharedDifferentValueLabelColor);
0969:                    spMarkup
0970:                            .setLabelColor((sameMarkup) ? notMandatoryPropertiesLabelColor
0971:                                    : sharedDifferentValueLabelColor);
0972:                    spBold
0973:                            .setLabelColor((sameBold) ? notMandatoryPropertiesLabelColor
0974:                                    : sharedDifferentValueLabelColor);
0975:                    spItalic
0976:                            .setLabelColor((sameItalic) ? notMandatoryPropertiesLabelColor
0977:                                    : sharedDifferentValueLabelColor);
0978:                    spUnderline
0979:                            .setLabelColor((sameUnderline) ? notMandatoryPropertiesLabelColor
0980:                                    : sharedDifferentValueLabelColor);
0981:                    spStriketrough
0982:                            .setLabelColor((sameStrikethrough) ? notMandatoryPropertiesLabelColor
0983:                                    : sharedDifferentValueLabelColor);
0984:                    spPdfEmbedded
0985:                            .setLabelColor((samePdfEmbedded) ? notMandatoryPropertiesLabelColor
0986:                                    : sharedDifferentValueLabelColor);
0987:                    spFontSize
0988:                            .setLabelColor((sameFontSize) ? notMandatoryPropertiesLabelColor
0989:                                    : sharedDifferentValueLabelColor);
0990:                    spFontName
0991:                            .setLabelColor((sameFontName) ? notMandatoryPropertiesLabelColor
0992:                                    : sharedDifferentValueLabelColor);
0993:                    spPdfFontName
0994:                            .setLabelColor((samePDFFontName) ? notMandatoryPropertiesLabelColor
0995:                                    : sharedDifferentValueLabelColor);
0996:                    spPdfEncoding
0997:                            .setLabelColor((samePdfEncoding) ? notMandatoryPropertiesLabelColor
0998:                                    : sharedDifferentValueLabelColor);
0999:                    spStaticText
1000:                            .setLabelColor((sameText) ? mandatoryPropertiesLabelColor
1001:                                    : sharedDifferentValueLabelColor);
1002:                    spTextfieldExpression
1003:                            .setLabelColor((sameTextfieldExpression) ? mandatoryPropertiesLabelColor
1004:                                    : sharedDifferentValueLabelColor);
1005:                    spTextfieldExpressionClass
1006:                            .setLabelColor((sameTextfieldExpressionClass) ? mandatoryPropertiesLabelColor
1007:                                    : sharedDifferentValueLabelColor);
1008:                    spTextfieldEvaluationTime
1009:                            .setLabelColor((sameTextfieldEvaluationTime) ? mandatoryPropertiesLabelColor
1010:                                    : sharedDifferentValueLabelColor);
1011:                    spTextfieldEvaluationGroup
1012:                            .setLabelColor((sameTextfieldEvaluationGroup) ? mandatoryPropertiesLabelColor
1013:                                    : sharedDifferentValueLabelColor);
1014:                    spStretchWithOverflow
1015:                            .setLabelColor((sameStrtchWithOverflow) ? mandatoryPropertiesLabelColor
1016:                                    : sharedDifferentValueLabelColor);
1017:                    spTextfieldBlankWhenNull
1018:                            .setLabelColor((sameBlankWhenNull) ? mandatoryPropertiesLabelColor
1019:                                    : sharedDifferentValueLabelColor);
1020:                    spPattern
1021:                            .setLabelColor((sameBlankWhenNull) ? notMandatoryPropertiesLabelColor
1022:                                    : sharedDifferentValueLabelColor);
1023:
1024:                    spImageExpression
1025:                            .setLabelColor((sameImageExpression) ? mandatoryPropertiesLabelColor
1026:                                    : sharedDifferentValueLabelColor);
1027:                    spImageExpressionClass
1028:                            .setLabelColor((sameImageExpressionClass) ? mandatoryPropertiesLabelColor
1029:                                    : sharedDifferentValueLabelColor);
1030:                    spImageEvaluationTime
1031:                            .setLabelColor((sameImageEvaluationTime) ? mandatoryPropertiesLabelColor
1032:                                    : sharedDifferentValueLabelColor);
1033:                    spImageEvaluationGroup
1034:                            .setLabelColor((sameImageEvaluationGroup) ? mandatoryPropertiesLabelColor
1035:                                    : sharedDifferentValueLabelColor);
1036:                    spImageLazy
1037:                            .setLabelColor((sameImageLazy) ? mandatoryPropertiesLabelColor
1038:                                    : sharedDifferentValueLabelColor);
1039:                    spImageCache
1040:                            .setLabelColor((sameImageCache) ? notMandatoryPropertiesLabelColor
1041:                                    : sharedDifferentValueLabelColor);
1042:                    spImageScale
1043:                            .setLabelColor((sameImageScale) ? notMandatoryPropertiesLabelColor
1044:                                    : sharedDifferentValueLabelColor);
1045:                    spImageError
1046:                            .setLabelColor((sameImageOnError) ? mandatoryPropertiesLabelColor
1047:                                    : sharedDifferentValueLabelColor);
1048:
1049:                    spImageVAlign
1050:                            .setLabelColor((sameImageVAlign) ? notMandatoryPropertiesLabelColor
1051:                                    : sharedDifferentValueLabelColor);
1052:                    spImageHAlign
1053:                            .setLabelColor((sameImageHAlign) ? notMandatoryPropertiesLabelColor
1054:                                    : sharedDifferentValueLabelColor);
1055:                    spBCType
1056:                            .setLabelColor((sameBCType) ? mandatoryPropertiesLabelColor
1057:                                    : sharedDifferentValueLabelColor);
1058:                    spBCChecksum
1059:                            .setLabelColor((sameBCChecksum) ? mandatoryPropertiesLabelColor
1060:                                    : sharedDifferentValueLabelColor);
1061:                    spBCShowText
1062:                            .setLabelColor((sameBCShowText) ? mandatoryPropertiesLabelColor
1063:                                    : sharedDifferentValueLabelColor);
1064:                    spBCExpression
1065:                            .setLabelColor((sameBCExpression) ? mandatoryPropertiesLabelColor
1066:                                    : sharedDifferentValueLabelColor);
1067:                    spBCBarWidth
1068:                            .setLabelColor((sameBCBarWidth) ? mandatoryPropertiesLabelColor
1069:                                    : sharedDifferentValueLabelColor);
1070:                    spBCBarHeight
1071:                            .setLabelColor((sameBCBarHeight) ? mandatoryPropertiesLabelColor
1072:                                    : sharedDifferentValueLabelColor);
1073:                    spBCApplicationIdentifier
1074:                            .setLabelColor((sameBCApplicationIdentifier) ? mandatoryPropertiesLabelColor
1075:                                    : sharedDifferentValueLabelColor);
1076:                    spBCScale
1077:                            .setLabelColor((sameBCScale) ? notMandatoryPropertiesLabelColor
1078:                                    : sharedDifferentValueLabelColor);
1079:                    spBCError
1080:                            .setLabelColor((sameBCError) ? mandatoryPropertiesLabelColor
1081:                                    : sharedDifferentValueLabelColor);
1082:                    spBCHAlign
1083:                            .setLabelColor((sameBCHAlign) ? notMandatoryPropertiesLabelColor
1084:                                    : sharedDifferentValueLabelColor);
1085:                    spBCVAlign
1086:                            .setLabelColor((sameBCVAlign) ? notMandatoryPropertiesLabelColor
1087:                                    : sharedDifferentValueLabelColor);
1088:                    spBCEvaluationTime
1089:                            .setLabelColor((sameBCEvaluationTime) ? mandatoryPropertiesLabelColor
1090:                                    : sharedDifferentValueLabelColor);
1091:                    spBCEvaluationGroup
1092:                            .setLabelColor((sameBCEvaluationGroup) ? mandatoryPropertiesLabelColor
1093:                                    : sharedDifferentValueLabelColor);
1094:                    spChartEvaluationTime
1095:                            .setLabelColor((sameChartEvaluationTime) ? mandatoryPropertiesLabelColor
1096:                                    : sharedDifferentValueLabelColor);
1097:                    spChartEvaluationGroup
1098:                            .setLabelColor((sameChartEvaluationGroup) ? mandatoryPropertiesLabelColor
1099:                                    : sharedDifferentValueLabelColor);
1100:                    spRenderType
1101:                            .setLabelColor((sameRenderType) ? mandatoryPropertiesLabelColor
1102:                                    : sharedDifferentValueLabelColor);
1103:
1104:                    ExpressionContext ec = new ExpressionContext();
1105:                    if (jrf.getSelectedCrosstabEditorPanel() == null) {
1106:                        ec.setSubDataset(jrf.getReport());
1107:                    } else {
1108:                        ec.addCrosstabReportElement(jrf
1109:                                .getSelectedCrosstabEditorPanel()
1110:                                .getCrosstabElement());
1111:                    }
1112:                    spPrintWhenExpression.setExpressionContext(ec);
1113:                    spTextfieldExpression.setExpressionContext(ec);
1114:                    spImageExpression.setExpressionContext(ec);
1115:                    spBCExpression.setExpressionContext(ec);
1116:                    spBCApplicationIdentifier.setExpressionContext(ec);
1117:
1118:                    String commonStr = it.businesslogic.ireport.util.I18n
1119:                            .getString("gui.elementpropertiessheet.common",
1120:                                    "Common");
1121:                    this .addSheetProperty(commonStr, spBands);
1122:                    this .addSheetProperty(commonStr, spTop);
1123:                    this .addSheetProperty(commonStr, spLeft);
1124:                    this .addSheetProperty(commonStr, spHeight);
1125:                    this .addSheetProperty(commonStr, spWidth);
1126:                    this .addSheetProperty(commonStr, spFgColor);
1127:                    this .addSheetProperty(commonStr, spBgColor);
1128:                    this .addSheetProperty(commonStr, spMode);
1129:
1130:                    spPrintRepeatedValues.setDefaultValue(new Boolean(true));
1131:
1132:                    this .addSheetProperty(commonStr, spRemoveLineWhenBlank);
1133:                    this .addSheetProperty(commonStr, spPrintInFirstWholeBand);
1134:                    this 
1135:                            .addSheetProperty(commonStr,
1136:                                    spPrintWhenDetailOverflows);
1137:                    this .addSheetProperty(commonStr, spPrintRepeatedValues);
1138:                    this .addSheetProperty(commonStr, spPositionType);
1139:                    this .addSheetProperty(commonStr, spGroups);
1140:                    if (selectedElements.size() == 1) {
1141:                        this .addSheetProperty(commonStr, spElementKey);
1142:                    }
1143:                    this .addSheetProperty(commonStr, spStretchType);
1144:                    this .addSheetProperty(commonStr, spStyle);
1145:                    this .addSheetProperty(commonStr, spPrintWhenExpression);
1146:
1147:                    if (areAllGraphicsElements) {
1148:                        String graphicStr = it.businesslogic.ireport.util.I18n
1149:                                .getString(
1150:                                        "gui.elementpropertiessheet.graphic",
1151:                                        "Graphic");
1152:
1153:                        this .addSheetProperty(graphicStr, spLineWidth);
1154:                        this .addSheetProperty(graphicStr, spLineStyle);
1155:
1156:                        this .addSheetProperty(graphicStr, spPen);
1157:                        this .addSheetProperty(graphicStr, spFill);
1158:                    }
1159:
1160:                    if (areAllRectangleElements) {
1161:                        String rectangleStr = it.businesslogic.ireport.util.I18n
1162:                                .getString(
1163:                                        "gui.elementpropertiessheet.rectangle",
1164:                                        "Rectangle");
1165:                        this .addSheetProperty(rectangleStr, spRadius);
1166:                    }
1167:
1168:                    if (areAllLineElements) {
1169:                        String lineStr = it.businesslogic.ireport.util.I18n
1170:                                .getString("gui.elementpropertiessheet.line",
1171:                                        "Line");
1172:                        this .addSheetProperty(lineStr, spDirection);
1173:                    }
1174:
1175:                    if (areAllBreakElements) {
1176:                        String breakStr = it.businesslogic.ireport.util.I18n
1177:                                .getString("gui.elementpropertiessheet.break",
1178:                                        "Break");
1179:                        this .addSheetProperty(breakStr, spBreakType);
1180:                    }
1181:
1182:                    if (areAllTextElements) {
1183:                        String textStr = it.businesslogic.ireport.util.I18n
1184:                                .getString("gui.elementpropertiessheet.text",
1185:                                        "Text");
1186:
1187:                        this .addSheetProperty(textStr, spFontName);
1188:                        this .addSheetProperty(textStr, spFontSize);
1189:                        this .addSheetProperty(textStr, spBold);
1190:                        this .addSheetProperty(textStr, spItalic);
1191:                        this .addSheetProperty(textStr, spUnderline);
1192:                        this .addSheetProperty(textStr, spStriketrough);
1193:                        this .addSheetProperty(textStr, spPdfFontName);
1194:                        this .addSheetProperty(textStr, spPdfEmbedded);
1195:                        this .addSheetProperty(textStr, spPdfEncoding);
1196:                        this .addSheetProperty(textStr, spTextHAlign);
1197:                        this .addSheetProperty(textStr, spTextVAlign);
1198:                        this .addSheetProperty(textStr, spLineSpacing);
1199:                        this .addSheetProperty(textStr, spRotate);
1200:                        this .addSheetProperty(textStr, spStyledText);
1201:                        this .addSheetProperty(textStr, spMarkup);
1202:
1203:                    }
1204:
1205:                    if (areAllStaticTextElements) {
1206:                        String staticTextStr = it.businesslogic.ireport.util.I18n
1207:                                .getString(
1208:                                        "gui.elementpropertiessheet.staticText",
1209:                                        "Static text");
1210:                        this .addSheetProperty(staticTextStr, spStaticText);
1211:                    }
1212:
1213:                    if (areAllTextfieldElements) {
1214:                        String textFieldStr = it.businesslogic.ireport.util.I18n
1215:                                .getString(
1216:                                        "gui.elementpropertiessheet.textField",
1217:                                        "Textfield");
1218:                        this .addSheetProperty(textFieldStr,
1219:                                spTextfieldExpression);
1220:                        this .addSheetProperty(textFieldStr,
1221:                                spTextfieldExpressionClass);
1222:                        this .addSheetProperty(textFieldStr,
1223:                                spTextfieldEvaluationTime);
1224:                        this .addSheetProperty(textFieldStr,
1225:                                spTextfieldEvaluationGroup);
1226:                        this .addSheetProperty(textFieldStr,
1227:                                spStretchWithOverflow);
1228:                        this .addSheetProperty(textFieldStr,
1229:                                spTextfieldBlankWhenNull);
1230:                        this .addSheetProperty(textFieldStr, spPattern);
1231:
1232:                        if (!sameTextfieldEvaluationTime
1233:                                || !spTextfieldEvaluationTime.getValue()
1234:                                        .equals("Group")) {
1235:                            spTextfieldEvaluationGroup.setReadOnly(true);
1236:                        } else {
1237:                            spTextfieldEvaluationGroup.setReadOnly(false);
1238:                        }
1239:                    }
1240:
1241:                    if (areAllImageElements) {
1242:                        String imageStr = it.businesslogic.ireport.util.I18n
1243:                                .getString("gui.elementpropertiessheet.image",
1244:                                        "Image");
1245:                        this .addSheetProperty(imageStr, spImageExpression);
1246:                        this .addSheetProperty(imageStr, spImageExpressionClass);
1247:                        this .addSheetProperty(imageStr, spImageEvaluationTime);
1248:                        this .addSheetProperty(imageStr, spImageEvaluationGroup);
1249:                        this .addSheetProperty(imageStr, spImageScale);
1250:                        this .addSheetProperty(imageStr, spImageError);
1251:                        this .addSheetProperty(imageStr, spImageVAlign);
1252:                        this .addSheetProperty(imageStr, spImageHAlign);
1253:                        this .addSheetProperty(imageStr, spImageLazy);
1254:                        this .addSheetProperty(imageStr, spImageCache);
1255:
1256:                        if (!sameImageEvaluationTime
1257:                                || !spImageEvaluationTime.getValue().equals(
1258:                                        "Group")) {
1259:                            spImageEvaluationGroup.setReadOnly(true);
1260:                        } else {
1261:                            spImageEvaluationGroup.setReadOnly(false);
1262:                        }
1263:                    }
1264:
1265:                    if (areAllBarcodeElements) {
1266:                        String barcodeStr = it.businesslogic.ireport.util.I18n
1267:                                .getString(
1268:                                        "gui.elementpropertiessheet.barcode",
1269:                                        "Barcode");
1270:                        this .addSheetProperty(barcodeStr, spBCType);
1271:                        this .addSheetProperty(barcodeStr, spBCChecksum);
1272:                        this .addSheetProperty(barcodeStr, spBCShowText);
1273:                        this .addSheetProperty(barcodeStr, spBCExpression);
1274:                        this .addSheetProperty(barcodeStr, spBCBarWidth);
1275:                        this .addSheetProperty(barcodeStr, spBCBarHeight);
1276:                        this .addSheetProperty(barcodeStr,
1277:                                spBCApplicationIdentifier);
1278:                        this .addSheetProperty(barcodeStr, spBCScale);
1279:                        this .addSheetProperty(barcodeStr, spBCError);
1280:                        this .addSheetProperty(barcodeStr, spBCHAlign);
1281:                        this .addSheetProperty(barcodeStr, spBCVAlign);
1282:                        this .addSheetProperty(barcodeStr, spBCEvaluationTime);
1283:                        this .addSheetProperty(barcodeStr, spBCEvaluationGroup);
1284:
1285:                        if (!sameBCEvaluationTime
1286:                                || !spBCEvaluationTime.getValue().equals(
1287:                                        "Group")) {
1288:                            spBCEvaluationGroup.setReadOnly(true);
1289:                        } else {
1290:                            spBCEvaluationGroup.setReadOnly(false);
1291:                        }
1292:                    }
1293:
1294:                    if (areAllChartElements) {
1295:                        String chartStr = it.businesslogic.ireport.util.I18n
1296:                                .getString("gui.elementpropertiessheet.chart",
1297:                                        "Chart");
1298:                        this .addSheetProperty(chartStr, spChartEvaluationTime);
1299:                        this .addSheetProperty(chartStr, spChartEvaluationGroup);
1300:
1301:                        if (!sameChartEvaluationTime
1302:                                || !spChartEvaluationTime.getValue().equals(
1303:                                        "Group")) {
1304:                            spChartEvaluationGroup.setReadOnly(true);
1305:                        } else {
1306:                            spChartEvaluationGroup.setReadOnly(false);
1307:                        }
1308:
1309:                        this .addSheetProperty(chartStr, spRenderType);
1310:                    }
1311:
1312:                    for (int i = 0; i < this .getProperties().size(); ++i) {
1313:                        SheetProperty sp = (SheetProperty) this .getProperties()
1314:                                .get(i);
1315:                        sp.setLabelError(null);
1316:                    }
1317:
1318:                    this .recreateSheet();
1319:
1320:                } catch (Exception ex) {
1321:                    ex.printStackTrace();
1322:                } finally {
1323:
1324:                }
1325:
1326:                setInit(false);
1327:
1328:            }
1329:
1330:            /**
1331:             * This methos is called when a property changes...
1332:             */
1333:            public void sheetPropertyValueChanged(
1334:                    SheetPropertyValueChangedEvent evt) {
1335:                if (isInit())
1336:                    return;
1337:
1338:                //System.out.println("Changed: " + evt.getPropertyName());
1339:                if (isNullItem((SheetProperty) evt.getSource()))
1340:                    return;
1341:
1342:                removeNullItem((SheetProperty) evt.getSource());
1343:
1344:                Vector selectedElements = getElementSelection();
1345:
1346:                for (int i = 0; i < selectedElements.size(); ++i) {
1347:
1348:                    ReportElement re = (ReportElement) selectedElements
1349:                            .elementAt(i);
1350:                    applyNewProperty(re, evt.getPropertyName(), evt
1351:                            .getOldValue(), evt.getNewValue());
1352:                }
1353:                repaintEditor();
1354:
1355:                ReportElementChangedEvent changedEvent = new ReportElementChangedEvent(
1356:                        jrf, selectedElements,
1357:                        ReportElementChangedEvent.CHANGED);
1358:                changedEvent.setEventSource(this );
1359:                if (evt.getPropertyName().equals("textfieldEvaluationTime")) {
1360:                    changedEvent.setPropertyChanged(evt.getPropertyName());
1361:                    changedEvent.setNewValue(evt.getNewValue());
1362:                }
1363:                jrf.fireReportListenerReportElementsChanged(changedEvent);
1364:                MainFrame.getMainInstance().getElementPropertiesDialog()
1365:                        .updateSelection();
1366:            }
1367:
1368:            /*
1369:             * This method apply the new value for the specified property
1370:             * The oldValue can be wrong or null if a multiselection was performed
1371:             */
1372:            private void applyNewProperty(ReportElement re,
1373:                    String propertyName, Object oldValue, Object newValue) {
1374:
1375:                if (propertyName == null)
1376:                    return;
1377:                if (isInit())
1378:                    return;
1379:
1380:                if (propertyName.equals("band")) {
1381:                    if (newValue != null && newValue instanceof  Band)
1382:                        re.setBand((Band) newValue);
1383:                    else if (newValue != null
1384:                            && newValue instanceof  CrosstabCell)
1385:                        re.setCell((CrosstabCell) newValue);
1386:                } else if (propertyName.equals("top")) {
1387:                    if (newValue != null && !newValue.equals("")) {
1388:                        int val = Integer.parseInt("" + newValue);
1389:                        int y_location = 0;
1390:                        // For each panel, search
1391:                        if (re.getBand() != null) {
1392:                            y_location = this .jrf.getReport().getBandYLocation(
1393:                                    re.getBand());
1394:                        }
1395:
1396:                        if (re.getBand() == null && re.getCell() != null) {
1397:                            y_location = re.getCell().getTop();
1398:                        }
1399:
1400:                        if (re.getParentElement() != null) {
1401:                            y_location = (int) (re.getParentElement()
1402:                                    .getPosition().getY()) - 10;
1403:                        }
1404:
1405:                        //System.out.println("Imposto position a: " + (val - (re.getPosition().y - 10 - y_location) ));
1406:                        re.trasform(new Point(0, val
1407:                                - (re.getPosition().y - 10 - y_location)),
1408:                                TransformationType.TRANSFORMATION_MOVE);
1409:                    }
1410:                } else if (propertyName.equals("left")) {
1411:                    if (newValue != null && !newValue.equals("")
1412:                            && !(re instanceof  BreakReportElement)) {
1413:                        int val = Integer.parseInt("" + newValue);
1414:
1415:                        int normalization = 0;
1416:                        if (re.getParentElement() != null) {
1417:                            normalization = (int) (re.getParentElement()
1418:                                    .getPosition().getX()) - 10;
1419:                        } else if (re.getCell() != null) {
1420:                            normalization = re.getCell().getLeft();
1421:                        } else {
1422:                            normalization = jrf.getReport().getLeftMargin();
1423:                        }
1424:
1425:                        re
1426:                                .trasform(
1427:                                        new Point(
1428:                                                val
1429:                                                        - (re.getPosition().x - 10 - normalization),
1430:                                                0),
1431:                                        TransformationType.TRANSFORMATION_MOVE);
1432:                    }
1433:                } else if (propertyName.equals("width")) {
1434:                    if (newValue != null && !newValue.equals("")
1435:                            && !(re instanceof  BreakReportElement)) {
1436:                        int val = Integer.parseInt("" + newValue);
1437:                        re.trasform(new Point(val - re.getWidth(), 0),
1438:                                TransformationType.TRANSFORMATION_RESIZE_E);
1439:                    }
1440:                } else if (propertyName.equals("height")) {
1441:                    if (newValue != null && !newValue.equals("")
1442:                            && !(re instanceof  BreakReportElement)) {
1443:                        int val = Integer.parseInt("" + newValue);
1444:                        re.trasform(new Point(0, val - re.getHeight()),
1445:                                TransformationType.TRANSFORMATION_RESIZE_S);
1446:                    }
1447:                } else if (propertyName.equals("fgcolor")) {
1448:                    re.setPropertyValue(re.FGCOLOR, ColorSelectorPanel
1449:                            .parseColorString((String) newValue));
1450:                } else if (propertyName.equals("bgcolor")) {
1451:                    re.setPropertyValue(re.BGCOLOR, ColorSelectorPanel
1452:                            .parseColorString((String) newValue));
1453:                } else if (propertyName.equals("mode")) {
1454:                    if (newValue == null)
1455:                        re.setPropertyValue(re.MODE, null);
1456:                    else {
1457:                        re.setPropertyValue(re.MODE, (newValue + "")
1458:                                .equals("true") ? "Transparent" : "Opaque");
1459:                    }
1460:                } else if (propertyName.equals("printRepeatedValues")) {
1461:                    if (newValue == null)
1462:                        re.setPropertyValue(re.PRINT_REPEATED_VALUES, null);
1463:                    else {
1464:                        re.setPropertyValue(re.PRINT_REPEATED_VALUES, newValue
1465:                                + "");
1466:                    }
1467:                } else if (propertyName.equals("printWhenDetailOverflows")) {
1468:                    if (newValue == null)
1469:                        re
1470:                                .setPropertyValue(
1471:                                        re.PRINT_WHEN_DETAIL_OVERFLOW, null);
1472:                    else {
1473:                        re.setPropertyValue(re.PRINT_WHEN_DETAIL_OVERFLOW,
1474:                                newValue + "");
1475:                    }
1476:                } else if (propertyName.equals("printInFirstWholeBand")) {
1477:                    if (newValue == null)
1478:                        re.setPropertyValue(re.PRINT_IN_FIRST_WHOLE_BAND, null);
1479:                    else {
1480:                        re.setPropertyValue(re.PRINT_IN_FIRST_WHOLE_BAND,
1481:                                newValue + "");
1482:                    }
1483:                } else if (propertyName.equals("removeLineWhenBlank")) {
1484:                    if (newValue == null)
1485:                        re.setPropertyValue(re.REMOVE_LINE_WHEN_BLANK, null);
1486:                    else {
1487:                        re.setPropertyValue(re.REMOVE_LINE_WHEN_BLANK, newValue
1488:                                + "");
1489:                    }
1490:                } else if (propertyName.equals("positionType")) {
1491:                    if (newValue == null)
1492:                        re.setPropertyValue(re.POSITION_TYPE, null);
1493:                    else {
1494:                        re.setPropertyValue(re.POSITION_TYPE, newValue + "");
1495:                    }
1496:                } else if (propertyName.equals("printWhenGroupChanges")) {
1497:                    if (newValue != null) {
1498:                        re.setPrintWhenGroupChanges("" + newValue);
1499:                    }
1500:                } else if (propertyName.equals("stretchType")) {
1501:                    if (newValue != null) {
1502:                        re.setStretchType("" + newValue);
1503:                    }
1504:                } else if (propertyName.equals("style")) {
1505:                    if ((newValue + "").equals(""))
1506:                        newValue = null;
1507:
1508:                    if (newValue != null && newValue instanceof  String) {
1509:                        String sname = ("" + newValue).trim();
1510:                        if (sname.length() == 0)
1511:                            return;
1512:                        // Look for a style with that name...
1513:                        Enumeration senum = jrf.getReport().getStyles()
1514:                                .elements();
1515:                        boolean found = false;
1516:                        while (senum.hasMoreElements()) {
1517:                            Style s = (Style) senum.nextElement();
1518:                            if (s.getName().equals(sname)) {
1519:                                re.setStyle(s);
1520:                                found = true;
1521:                                break;
1522:                            }
1523:                        }
1524:                        if (!found) {
1525:                            final UndefinedStyle us = new UndefinedStyle();
1526:                            us.setName(sname);
1527:                            final ComboBoxSheetProperty sp = spStyle;
1528:                            re.setStyle(us);
1529:                            jrf.getReport().addStyle(us);
1530:                            final Vector styles = jrf.getReport().getStyles();
1531:                            SwingUtilities.invokeLater(new Runnable() {
1532:
1533:                                public void run() {
1534:                                    ((JComboBox) sp.getEditor()).addItem(us);
1535:                                }
1536:                            });
1537:
1538:                        }
1539:
1540:                    } else {
1541:                        re.setStyle((Style) newValue);
1542:                    }
1543:                } else if (propertyName.equals("printWhenExpression")) {
1544:                    if (newValue != null) {
1545:                        re.setPrintWhenExpression("" + newValue);
1546:                    }
1547:                } else if (propertyName.equals("lineWidth")) {
1548:                    if ((newValue + "").equals(""))
1549:                        newValue = null;
1550:                    if (((GraphicReportElement) re).getPen() == null
1551:                            && newValue != null) {
1552:                        ((GraphicReportElement) re).setPen(new Pen());
1553:                    }
1554:                    if (((GraphicReportElement) re).getPen() != null) {
1555:                        if (newValue != null) {
1556:                            ((GraphicReportElement) re).getPen().setLineWidth(
1557:                                    Float.parseFloat("" + newValue));
1558:                        } else {
1559:                            if (re instanceof  ImageReportElement)
1560:                                ((GraphicReportElement) re).getPen()
1561:                                        .setLineWidth(0f);
1562:                            else
1563:                                ((GraphicReportElement) re).getPen()
1564:                                        .setLineWidth(1f);
1565:                        }
1566:                    }
1567:                } else if (propertyName.equals("lineStyle")) {
1568:                    if ((newValue + "").equals(""))
1569:                        newValue = null;
1570:                    if (((GraphicReportElement) re).getPen() == null
1571:                            && newValue != null) {
1572:                        ((GraphicReportElement) re).setPen(new Pen());
1573:                    }
1574:                    if (((GraphicReportElement) re).getPen() != null) {
1575:                        if (newValue == null)
1576:                            newValue = "Solid";
1577:                        ((GraphicReportElement) re).getPen().setLineStyle(
1578:                                "" + newValue);
1579:                    }
1580:                } else if (propertyName.equals("pen")) {
1581:                    if ((newValue + "").equals(""))
1582:                        newValue = null;
1583:                    re.setPropertyValue(GraphicReportElement.PEN, newValue);
1584:                } else if (propertyName.equals("fill")) {
1585:                    if ((newValue + "").equals(""))
1586:                        newValue = null;
1587:                    re.setPropertyValue(GraphicReportElement.FILL, newValue);
1588:                } else if (propertyName.equals("radius")) {
1589:                    if (newValue != null) {
1590:                        try {
1591:
1592:                            newValue = ""
1593:                                    + (int) Double.parseDouble("" + newValue);
1594:                        } catch (Exception ex) {
1595:                            newValue = null;
1596:                        }
1597:                    }
1598:                    re
1599:                            .setPropertyValue(RectangleReportElement.RADIUS,
1600:                                    newValue);
1601:                } else if (propertyName.equals("direction")) {
1602:                    if (newValue != null) {
1603:                        ((LineReportElement) re).setDirection("" + newValue);
1604:                    }
1605:                } else if (propertyName.equals("hAlign")) {
1606:                    re.setPropertyValue(((TextReportElement) re).ALIGN,
1607:                            newValue);
1608:                } else if (propertyName.equals("vAlign")) {
1609:                    re.setPropertyValue(
1610:                            ((TextReportElement) re).VERTICAL_ALIGN, newValue);
1611:                } else if (propertyName.equals("styledText")) {
1612:                    if (newValue == null)
1613:                        re.setPropertyValue(
1614:                                ((TextReportElement) re).IS_STYLED_TEXT, null);
1615:                    else
1616:                        re.setPropertyValue(
1617:                                ((TextReportElement) re).IS_STYLED_TEXT,
1618:                                newValue + "");
1619:                } else if (propertyName.equals("lineSpacing")) {
1620:                    re.setPropertyValue(((TextReportElement) re).LINE_SPACING,
1621:                            newValue);
1622:                } else if (propertyName.equals("rotate")) {
1623:                    re.setPropertyValue(((TextReportElement) re).ROTATE,
1624:                            newValue);
1625:                } else if (propertyName.equals("markup")) {
1626:                    re.setPropertyValue(((TextReportElement) re).MARKUP,
1627:                            newValue);
1628:                } else if (propertyName.equals("bold")) {
1629:                    ((TextReportElement) re).getIReportFont().setPropertyValue(
1630:                            IReportFont.IS_BOLD,
1631:                            (newValue == null) ? null : "" + newValue);
1632:                } else if (propertyName.equals("italic")) {
1633:                    ((TextReportElement) re).getIReportFont().setPropertyValue(
1634:                            IReportFont.IS_ITALIC,
1635:                            (newValue == null) ? null : "" + newValue);
1636:                } else if (propertyName.equals("underline")) {
1637:                    ((TextReportElement) re).getIReportFont().setPropertyValue(
1638:                            IReportFont.IS_UNDERLINE,
1639:                            (newValue == null) ? null : "" + newValue);
1640:                } else if (propertyName.equals("strikethrough")) {
1641:                    ((TextReportElement) re).getIReportFont().setPropertyValue(
1642:                            IReportFont.IS_STRIKETROUGHT,
1643:                            (newValue == null) ? null : "" + newValue);
1644:                } else if (propertyName.equals("pdfEmbedded")) {
1645:                    ((TextReportElement) re).getIReportFont().setPropertyValue(
1646:                            IReportFont.IS_PDF_EMBEDDED,
1647:                            (newValue == null) ? null : "" + newValue);
1648:                } else if (propertyName.equals("fontSize")) {
1649:                    try {
1650:                        if (newValue == null
1651:                                || Integer.parseInt("" + newValue) != ((TextReportElement) re)
1652:                                        .getFontSize()) {
1653:                            ((TextReportElement) re).getIReportFont()
1654:                                    .setPropertyValue(
1655:                                            IReportFont.FONT_SIZE,
1656:                                            (newValue == null) ? null : ""
1657:                                                    + newValue);
1658:                        }
1659:                    } catch (Exception ex) {
1660:                    }
1661:                } else if (propertyName.equals("fontName")) {
1662:                    ((TextReportElement) re).getIReportFont().setPropertyValue(
1663:                            IReportFont.FONT_NAME,
1664:                            (newValue == null) ? null : "" + newValue);
1665:                } else if (propertyName.equals("pdfFontName")) {
1666:                    ((TextReportElement) re).getIReportFont().setPropertyValue(
1667:                            IReportFont.PDF_FONT_NAME,
1668:                            (newValue == null) ? null : "" + newValue);
1669:                } else if (propertyName.equals("pdfEncoding")) {
1670:                    ((TextReportElement) re).getIReportFont().setPropertyValue(
1671:                            IReportFont.PDF_ENCODING,
1672:                            (newValue == null) ? null : "" + newValue);
1673:                } else if (propertyName.equals("text")) {
1674:                    ((TextReportElement) re).setText((newValue == null) ? ""
1675:                            : "" + newValue);
1676:                } else if (propertyName.equals("textfieldExpression")) {
1677:                    ((TextReportElement) re).setText((newValue == null) ? ""
1678:                            : "" + newValue);
1679:                } else if (propertyName.equals("textfieldExpressionClass")) {
1680:                    ((TextFieldReportElement) re)
1681:                            .setClassExpression((newValue == null) ? "" : ""
1682:                                    + newValue);
1683:                } else if (propertyName.equals("textfieldEvaluationTime")) {
1684:                    ((TextFieldReportElement) re)
1685:                            .setEvaluationTime((newValue == null) ? "" : ""
1686:                                    + newValue);
1687:                    if (newValue != null && newValue.equals("Group")) {
1688:                        spTextfieldEvaluationGroup.setReadOnly(false);
1689:                        ((TextFieldReportElement) re)
1690:                                .setGroup(spTextfieldEvaluationGroup.getValue()
1691:                                        + "");
1692:                    } else {
1693:                        spTextfieldEvaluationGroup.setReadOnly(true);
1694:                        ((TextFieldReportElement) re).setGroup("");
1695:                    }
1696:                    spTextfieldEvaluationGroup.updateLabel();
1697:                } else if (propertyName.equals("textfieldEvaluationGroup")) {
1698:                    ((TextFieldReportElement) re)
1699:                            .setGroup((newValue == null) ? "" : "" + newValue);
1700:                } else if (propertyName.equals("blankWhenNull")) {
1701:                    try {
1702:                        ((TextFieldReportElement) re).setBlankWhenNull(Boolean
1703:                                .valueOf(newValue + "").booleanValue());
1704:                    } catch (Exception ex) {
1705:                    }
1706:                } else if (propertyName.equals("stretchWithOverflow")) {
1707:                    try {
1708:                        ((TextFieldReportElement) re)
1709:                                .setStretchWithOverflow(Boolean.valueOf(
1710:                                        newValue + "").booleanValue());
1711:                    } catch (Exception ex) {
1712:                    }
1713:                } else if (propertyName.equals("pattern")) {
1714:                    if ((newValue + "").equals(""))
1715:                        newValue = null;
1716:                    re.setPropertyValue(TextFieldReportElement.PATTERN,
1717:                            newValue);
1718:                } else if (propertyName.equals("imageExpression")) {
1719:                    ((ImageReportElement) re)
1720:                            .setImageExpression((newValue == null) ? "" : ""
1721:                                    + newValue);
1722:                } else if (propertyName.equals("imageExpressionClass")) {
1723:                    ((ImageReportElement) re)
1724:                            .setImageClass((newValue == null) ? "" : ""
1725:                                    + newValue);
1726:                } else if (propertyName.equals("imageEvaluationTime")) {
1727:                    ((ImageReportElement) re)
1728:                            .setEvaluationTime((newValue == null) ? "" : ""
1729:                                    + newValue);
1730:                    if (newValue != null && newValue.equals("Group")) {
1731:                        spImageEvaluationGroup.setReadOnly(false);
1732:                        ((ImageReportElement) re)
1733:                                .setEvaluationGroup(spImageEvaluationGroup
1734:                                        .getValue()
1735:                                        + "");
1736:                    } else {
1737:                        spImageEvaluationGroup.setReadOnly(true);
1738:                        ((ImageReportElement) re).setEvaluationGroup("");
1739:                    }
1740:                    spImageEvaluationGroup.updateLabel();
1741:                } else if (propertyName.equals("imageEvaluationGroup")) {
1742:                    ((ImageReportElement) re)
1743:                            .setEvaluationGroup((newValue == null) ? "" : ""
1744:                                    + newValue);
1745:                } else if (propertyName.equals("imageLazy")) {
1746:                    try {
1747:                        ((ImageReportElement) re).setIsLazy(Boolean.valueOf(
1748:                                newValue + "").booleanValue());
1749:                    } catch (Exception ex) {
1750:                    }
1751:                } else if (propertyName.equals("imageCache")) {
1752:                    re.setPropertyValue(ImageReportElement.USING_CACHE,
1753:                            newValue);
1754:                } else if (propertyName.equals("imageScale")) {
1755:                    re.setPropertyValue(ImageReportElement.SCALE, newValue);
1756:                } else if (propertyName.equals("imageError")) {
1757:                    ((ImageReportElement) re).setOnErrorType("" + newValue);
1758:                } else if (propertyName.equals("imageVAlign")) {
1759:                    re.setPropertyValue(ImageReportElement.VERTICAL_ALIGN,
1760:                            newValue);
1761:                } else if (propertyName.equals("imageHAlign")) {
1762:                    re.setPropertyValue(ImageReportElement.HORIZONTAL_ALIGN,
1763:                            newValue);
1764:                } else if (propertyName.equals("barcodeType")) {
1765:                    ((BarcodeReportElement) re)
1766:                            .setType(Integer.parseInt((newValue == null) ? "13"
1767:                                    : "" + newValue));
1768:                    ((BarcodeReportElement) re).update();
1769:
1770:                } else if (propertyName.equals("barcodeBarWidth")) {
1771:                    ((BarcodeReportElement) re)
1772:                            .setImageWidth(Integer
1773:                                    .parseInt((newValue == null) ? "1" : ""
1774:                                            + newValue));
1775:
1776:                } else if (propertyName.equals("barcodeBarHeight")) {
1777:                    ((BarcodeReportElement) re)
1778:                            .setImageHeight(Integer
1779:                                    .parseInt((newValue == null) ? "1" : ""
1780:                                            + newValue));
1781:
1782:                } else if (propertyName.equals("barcodeExpression")) {
1783:                    ((BarcodeReportElement) re).setText((newValue == null) ? ""
1784:                            : "" + newValue);
1785:                } else if (propertyName
1786:                        .equals("barcodeAppIdentifierExpression")) {
1787:                    ((BarcodeReportElement) re)
1788:                            .setApplicationIdentifier((newValue == null) ? ""
1789:                                    : "" + newValue);
1790:                } else if (propertyName.equals("barcodeEvaluationTime")) {
1791:                    ((ImageReportElement) re)
1792:                            .setEvaluationTime((newValue == null) ? "" : ""
1793:                                    + newValue);
1794:                    if (newValue != null && newValue.equals("Group")) {
1795:                        spBCEvaluationGroup.setReadOnly(false);
1796:                        ((ImageReportElement) re)
1797:                                .setEvaluationGroup(spBCEvaluationGroup
1798:                                        .getValue()
1799:                                        + "");
1800:                    } else {
1801:                        spBCEvaluationGroup.setReadOnly(true);
1802:                        ((ImageReportElement) re).setEvaluationGroup("");
1803:                    }
1804:                    spBCEvaluationGroup.updateLabel();
1805:                } else if (propertyName.equals("barcodeEvaluationGroup")) {
1806:                    ((ImageReportElement) re)
1807:                            .setEvaluationGroup((newValue == null) ? "" : ""
1808:                                    + newValue);
1809:                } else if (propertyName.equals("barcodeShowText")) {
1810:                    try {
1811:                        ((BarcodeReportElement) re).setShowText(Boolean
1812:                                .valueOf(newValue + "").booleanValue());
1813:                    } catch (Exception ex) {
1814:                    }
1815:                } else if (propertyName.equals("barcodeChecksum")) {
1816:                    try {
1817:                        ((BarcodeReportElement) re).setCheckSum(Boolean
1818:                                .valueOf(newValue + "").booleanValue());
1819:                    } catch (Exception ex) {
1820:                    }
1821:                } else if (propertyName.equals("barcodeScale")) {
1822:                    re.setPropertyValue(ImageReportElement.SCALE, newValue);
1823:                } else if (propertyName.equals("barcodeError")) {
1824:                    ((ImageReportElement) re).setOnErrorType("" + newValue);
1825:                } else if (propertyName.equals("barcodeVAlign")) {
1826:                    re.setPropertyValue(ImageReportElement.VERTICAL_ALIGN,
1827:                            newValue);
1828:                } else if (propertyName.equals("barcodeHAlign")) {
1829:                    re.setPropertyValue(ImageReportElement.HORIZONTAL_ALIGN,
1830:                            newValue);
1831:                } else if (propertyName.equals("renderType")) {
1832:                    ((ChartReportElement2) re)
1833:                            .setRenderType(newValue == null ? null : ""
1834:                                    + newValue);
1835:                } else if (propertyName.equals("chartEvaluationTime")) {
1836:                    ((ChartReportElement2) re)
1837:                            .setEvaluationTime((newValue == null) ? "" : ""
1838:                                    + newValue);
1839:                    if (newValue != null && newValue.equals("Group")) {
1840:                        spChartEvaluationGroup.setReadOnly(false);
1841:                        ((ChartReportElement2) re)
1842:                                .setEvaluationGroup(spChartEvaluationGroup
1843:                                        .getValue()
1844:                                        + "");
1845:                    } else {
1846:                        spChartEvaluationGroup.setReadOnly(true);
1847:                        ((ChartReportElement2) re).setEvaluationGroup("");
1848:                    }
1849:                    spChartEvaluationGroup.updateLabel();
1850:                } else if (propertyName.equals("chartEvaluationGroup")) {
1851:                    ((ChartReportElement2) re)
1852:                            .setEvaluationGroup((newValue == null) ? "" : ""
1853:                                    + newValue);
1854:                }
1855:            }
1856:
1857:            /**
1858:             *     This method is called when a new element is selected,
1859:             *     or deselected.
1860:             */
1861:
1862:            public void reportElementsSelectionChanged(
1863:                    ReportElementsSelectionEvent evt) {
1864:
1865:                updateSelection();
1866:
1867:            }
1868:
1869:            /*
1870:             *     This method is called when an element is removed, changed or added.
1871:             */
1872:            public void reportElementsChanged(ReportElementChangedEvent evt) {
1873:
1874:                if (evt.getEventSource() == null
1875:                        || evt.getEventSource() != this ) {
1876:                    if (evt.getType() == evt.CHANGED
1877:                            && evt.getPropertyChanged() != null
1878:                            && !evt.getPropertyChanged().equals(
1879:                                    "textfieldEvaluationTime")) {
1880:                        setPropertyValue(evt.getPropertyChanged(), evt
1881:                                .getNewValue());
1882:                    } else {
1883:                        updateSelection();
1884:                    }
1885:                }
1886:            }
1887:
1888:            /*
1889:             *     This method is called when a band is removed, changed or added.
1890:             */
1891:            public void reportBandChanged(ReportBandChangedEvent evt) {
1892:                updateSelection();
1893:            }
1894:
1895:            protected void initSheetProperties() {
1896:                spBands = new ComboBoxSheetProperty("band",
1897:                        it.businesslogic.ireport.util.I18n.getString(
1898:                                "gui.elementpropertiessheet.band", "Band"));
1899:                spBands.setShowResetButton(false);
1900:
1901:                spLeft = new SheetProperty("left",
1902:                        it.businesslogic.ireport.util.I18n.getString(
1903:                                "gui.elementpropertiessheet.left", "Left"),
1904:                        SheetProperty.INTEGER);
1905:                spLeft.setShowResetButton(false);
1906:
1907:                spTop = new SheetProperty("top",
1908:                        it.businesslogic.ireport.util.I18n.getString(
1909:                                "gui.elementpropertiessheet.top", "Top"),
1910:                        SheetProperty.INTEGER);
1911:                spTop.setShowResetButton(false);
1912:
1913:                spWidth = new SheetProperty("width",
1914:                        it.businesslogic.ireport.util.I18n.getString(
1915:                                "gui.elementpropertiessheet.width", "Width"),
1916:                        SheetProperty.INTEGER);
1917:                spWidth.setShowResetButton(false);
1918:
1919:                spHeight = new SheetProperty("height",
1920:                        it.businesslogic.ireport.util.I18n.getString(
1921:                                "gui.elementpropertiessheet.height", "Height"),
1922:                        SheetProperty.INTEGER);
1923:                spHeight.setShowResetButton(false);
1924:
1925:                spFgColor = new SheetProperty("fgcolor",
1926:                        it.businesslogic.ireport.util.I18n.getString(
1927:                                "gui.elementpropertiessheet.fgcolor",
1928:                                "Foreground"), SheetProperty.COLOR);
1929:                spBgColor = new SheetProperty("bgcolor",
1930:                        it.businesslogic.ireport.util.I18n.getString(
1931:                                "gui.elementpropertiessheet.bgcolor",
1932:                                "Background"), SheetProperty.COLOR);
1933:                spMode = new SheetProperty("mode",
1934:                        it.businesslogic.ireport.util.I18n.getString(
1935:                                "gui.elementpropertiessheet.mode",
1936:                                "Transparent"), SheetProperty.BOOLEAN);
1937:                spPrintRepeatedValues = new SheetProperty(
1938:                        "printRepeatedValues",
1939:                        it.businesslogic.ireport.util.I18n
1940:                                .getString(
1941:                                        "gui.elementpropertiessheet.printRepeatedValues",
1942:                                        "Print repeated values"),
1943:                        SheetProperty.BOOLEAN);
1944:                spPrintRepeatedValues.setShowResetButton(false);
1945:                spPrintWhenDetailOverflows = new SheetProperty(
1946:                        "printWhenDetailOverflows",
1947:                        it.businesslogic.ireport.util.I18n
1948:                                .getString(
1949:                                        "gui.elementpropertiessheet.printWhenDetailOverflows",
1950:                                        "Print when detail overflows"),
1951:                        SheetProperty.BOOLEAN);
1952:                spPrintWhenDetailOverflows.setShowResetButton(false);
1953:                spPrintInFirstWholeBand = new SheetProperty(
1954:                        "printInFirstWholeBand",
1955:                        it.businesslogic.ireport.util.I18n
1956:                                .getString(
1957:                                        "gui.elementpropertiessheet.printInFirstWholeBand",
1958:                                        "Print in first whole band"),
1959:                        SheetProperty.BOOLEAN);
1960:                spPrintInFirstWholeBand.setShowResetButton(false);
1961:                spRemoveLineWhenBlank = new SheetProperty(
1962:                        "removeLineWhenBlank",
1963:                        it.businesslogic.ireport.util.I18n
1964:                                .getString(
1965:                                        "gui.elementpropertiessheet.removeLineWhenBlank",
1966:                                        "Remove line when blank"),
1967:                        SheetProperty.BOOLEAN);
1968:                spRemoveLineWhenBlank.setShowResetButton(false);
1969:
1970:                spPositionType = new SheetProperty("positionType",
1971:                        it.businesslogic.ireport.util.I18n.getString(
1972:                                "gui.elementpropertiessheet.positionType",
1973:                                "Position type"), SheetProperty.COMBOBOX);
1974:                spPositionType
1975:                        .setTags(new Tag[] {
1976:                                new Tag(
1977:                                        "FixRelativeToTop",
1978:                                        it.businesslogic.ireport.util.I18n
1979:                                                .getString(
1980:                                                        "gui.elementpropertiessheet.positionType.FixRelativeToTop",
1981:                                                        "Fix relative to top")),
1982:                                new Tag(
1983:                                        "Float",
1984:                                        it.businesslogic.ireport.util.I18n
1985:                                                .getString(
1986:                                                        "gui.elementpropertiessheet.positionType.Float",
1987:                                                        "Float")),
1988:                                new Tag(
1989:                                        "FixRelativeToBottom",
1990:                                        it.businesslogic.ireport.util.I18n
1991:                                                .getString(
1992:                                                        "gui.elementpropertiessheet.positionType.FixRelativeToBottom",
1993:                                                        "Fix relative to bottom")) });
1994:                spPositionType.setDefaultValue("FixRelativeToTop");
1995:                spPositionType.setShowResetButton(false);
1996:
1997:                spGroups = new ComboBoxSheetProperty(
1998:                        "printWhenGroupChanges",
1999:                        it.businesslogic.ireport.util.I18n
2000:                                .getString(
2001:                                        "gui.elementpropertiessheet.printWhenGroupChanges",
2002:                                        "Print when group changes"));
2003:                spGroups.setShowResetButton(false);
2004:                spElementKey = new SheetProperty("elementKey",
2005:                        it.businesslogic.ireport.util.I18n.getString(
2006:                                "gui.elementpropertiessheet.elementKey",
2007:                                "Element key"), SheetProperty.STRING);
2008:                spElementKey.setShowResetButton(false);
2009:
2010:                spStretchType = new SheetProperty("stretchType",
2011:                        it.businesslogic.ireport.util.I18n.getString(
2012:                                "gui.elementpropertiessheet.stretchType",
2013:                                "Stretch type"), SheetProperty.COMBOBOX);
2014:                spStretchType
2015:                        .setTags(new Tag[] {
2016:                                new Tag(
2017:                                        "NoStretch",
2018:                                        it.businesslogic.ireport.util.I18n
2019:                                                .getString(
2020:                                                        "gui.elementpropertiessheet.stretchType.NoStretch",
2021:                                                        "Fix relative to top")),
2022:                                new Tag(
2023:                                        "RelativeToTallestObject",
2024:                                        it.businesslogic.ireport.util.I18n
2025:                                                .getString(
2026:                                                        "gui.elementpropertiessheet.stretchType.RelativeToTallestObject",
2027:                                                        "Float")),
2028:                                new Tag(
2029:                                        "RelativeToBandHeight",
2030:                                        it.businesslogic.ireport.util.I18n
2031:                                                .getString(
2032:                                                        "gui.elementpropertiessheet.stretchType.RelativeToBandHeight",
2033:                                                        "Fix relative to bottom")) });
2034:                spStretchType.setDefaultValue("NoStretch");
2035:                spStretchType.setShowResetButton(false);
2036:
2037:                spStyle = new ComboBoxSheetProperty("style",
2038:                        it.businesslogic.ireport.util.I18n.getString(
2039:                                "gui.elementpropertiessheet.style", "Style"));
2040:                spStyle.setShowResetButton(false);
2041:                ((JComboBox) spStyle.getEditor()).setEditable(true);
2042:                spStyle.setDefaultValue("");
2043:
2044:                spPrintWhenExpression = new ExpressionSheetProperty(
2045:                        "printWhenExpression",
2046:                        it.businesslogic.ireport.util.I18n
2047:                                .getString(
2048:                                        "gui.elementpropertiessheet.printWhenExpression",
2049:                                        "Print When Expression"));
2050:                spPrintWhenExpression.setShowResetButton(false);
2051:
2052:                spLineWidth = new SheetProperty("lineWidth",
2053:                        it.businesslogic.ireport.util.I18n.getString(
2054:                                "gui.elementpropertiessheet.lineWidth",
2055:                                "Line Width"), SheetProperty.NUMBER);
2056:                spLineWidth.setDefaultValue("0");
2057:                spLineStyle = new LineComboBoxSheetProperty("lineStyle",
2058:                        it.businesslogic.ireport.util.I18n.getString(
2059:                                "gui.elementpropertiessheet.lineStyle",
2060:                                "Line Style"));
2061:
2062:                spPen = new SheetProperty(
2063:                        "pen",
2064:                        "<html><s></b><font color=\"#888888\">"
2065:                                + it.businesslogic.ireport.util.I18n
2066:                                        .getString(
2067:                                                "gui.elementpropertiessheet.pen",
2068:                                                "Pen"), SheetProperty.COMBOBOX);
2069:                spPen
2070:                        .setTags(new Tag[] {
2071:                                new Tag(
2072:                                        "",
2073:                                        it.businesslogic.ireport.util.I18n
2074:                                                .getString(
2075:                                                        "gui.elementpropertiessheet.default",
2076:                                                        "Default")),
2077:                                new Tag(
2078:                                        "None",
2079:                                        it.businesslogic.ireport.util.I18n
2080:                                                .getString(
2081:                                                        "gui.elementpropertiessheet.pen.None",
2082:                                                        "None")),
2083:                                new Tag(
2084:                                        "Thin",
2085:                                        it.businesslogic.ireport.util.I18n
2086:                                                .getString(
2087:                                                        "gui.elementpropertiessheet.pen.Thin",
2088:                                                        "Thin")),
2089:                                new Tag(
2090:                                        "1Point",
2091:                                        it.businesslogic.ireport.util.I18n
2092:                                                .getString(
2093:                                                        "gui.elementpropertiessheet.pen.1Point",
2094:                                                        "1Point")),
2095:                                new Tag(
2096:                                        "2Point",
2097:                                        it.businesslogic.ireport.util.I18n
2098:                                                .getString(
2099:                                                        "gui.elementpropertiessheet.pen.2Point",
2100:                                                        "2Point")),
2101:                                new Tag(
2102:                                        "4Point",
2103:                                        it.businesslogic.ireport.util.I18n
2104:                                                .getString(
2105:                                                        "gui.elementpropertiessheet.pen.4Point",
2106:                                                        "4Point")),
2107:                                new Tag(
2108:                                        "Dotted",
2109:                                        it.businesslogic.ireport.util.I18n
2110:                                                .getString(
2111:                                                        "gui.elementpropertiessheet.pen.Dotted",
2112:                                                        "Dotted")) });
2113:                spPen.setDefaultValue("");
2114:
2115:                spFill = new SheetProperty("fill",
2116:                        it.businesslogic.ireport.util.I18n.getString(
2117:                                "gui.elementpropertiessheet.fill", "Fill"),
2118:                        SheetProperty.COMBOBOX);
2119:                spFill
2120:                        .setTags(new Tag[] {
2121:                                new Tag(
2122:                                        "",
2123:                                        it.businesslogic.ireport.util.I18n
2124:                                                .getString(
2125:                                                        "gui.elementpropertiessheet.default",
2126:                                                        "Default")),
2127:                                new Tag(
2128:                                        "Solid",
2129:                                        it.businesslogic.ireport.util.I18n
2130:                                                .getString(
2131:                                                        "gui.elementpropertiessheet.fill.Solid",
2132:                                                        "Solid")) });
2133:                spFill.setDefaultValue("");
2134:
2135:                spRadius = new SheetProperty("radius",
2136:                        it.businesslogic.ireport.util.I18n.getString(
2137:                                "gui.elementpropertiessheet.radius", "Radius"),
2138:                        SheetProperty.NUMBER);
2139:                try {
2140:                    ((JNumberField) (spRadius.getEditor())).setDecimals(0);
2141:                } catch (Exception ex) {
2142:                }
2143:                ;
2144:
2145:                spDirection = new SheetProperty("direction",
2146:                        it.businesslogic.ireport.util.I18n.getString(
2147:                                "gui.elementpropertiessheet.direction",
2148:                                "Direction"), SheetProperty.COMBOBOX);
2149:                spDirection
2150:                        .setTags(new Tag[] {
2151:                                new Tag(
2152:                                        "TopDown",
2153:                                        it.businesslogic.ireport.util.I18n
2154:                                                .getString(
2155:                                                        "gui.elementpropertiessheet.direction.TopDown",
2156:                                                        "Top-down (\\)")),
2157:                                new Tag(
2158:                                        "BottomUp",
2159:                                        it.businesslogic.ireport.util.I18n
2160:                                                .getString(
2161:                                                        "gui.elementpropertiessheet.direction.BottomUp",
2162:                                                        "Bottom-up (/)")) });
2163:                spDirection.setShowResetButton(false);
2164:
2165:                spBreakType = new SheetProperty(
2166:                        "breakType",
2167:                        it.businesslogic.ireport.util.I18n.getString(
2168:                                "gui.elementpropertiessheet.breakType", "Type"),
2169:                        SheetProperty.COMBOBOX);
2170:                spBreakType
2171:                        .setTags(new Tag[] {
2172:                                new Tag(
2173:                                        "Page",
2174:                                        it.businesslogic.ireport.util.I18n
2175:                                                .getString(
2176:                                                        "gui.elementpropertiessheet.breakType.page",
2177:                                                        "Page")),
2178:                                new Tag(
2179:                                        "Column",
2180:                                        it.businesslogic.ireport.util.I18n
2181:                                                .getString(
2182:                                                        "gui.elementpropertiessheet.breakType.column",
2183:                                                        "Column")) });
2184:                spBreakType.setShowResetButton(false);
2185:
2186:                spTextHAlign = new SheetProperty("hAlign",
2187:                        it.businesslogic.ireport.util.I18n.getString(
2188:                                "gui.elementpropertiessheet.halign", "Align"),
2189:                        SheetProperty.COMBOBOX);
2190:                spTextHAlign
2191:                        .setTags(new Tag[] {
2192:                                new Tag(
2193:                                        "Left",
2194:                                        it.businesslogic.ireport.util.I18n
2195:                                                .getString(
2196:                                                        "gui.elementpropertiessheet.halign.Left",
2197:                                                        "Left")),
2198:                                new Tag(
2199:                                        "Center",
2200:                                        it.businesslogic.ireport.util.I18n
2201:                                                .getString(
2202:                                                        "gui.elementpropertiessheet.halign.Center",
2203:                                                        "Center")),
2204:                                new Tag(
2205:                                        "Right",
2206:                                        it.businesslogic.ireport.util.I18n
2207:                                                .getString(
2208:                                                        "gui.elementpropertiessheet.halign.Right",
2209:                                                        "Right")),
2210:                                new Tag(
2211:                                        "Justified",
2212:                                        it.businesslogic.ireport.util.I18n
2213:                                                .getString(
2214:                                                        "gui.elementpropertiessheet.halign.Justified",
2215:                                                        "Justified")) });
2216:                spTextHAlign.setDefaultValue("Left");
2217:
2218:                spTextVAlign = new SheetProperty("vAlign",
2219:                        it.businesslogic.ireport.util.I18n.getString(
2220:                                "gui.elementpropertiessheet.valign",
2221:                                "Vertical align"), SheetProperty.COMBOBOX);
2222:                spTextVAlign
2223:                        .setTags(new Tag[] {
2224:                                new Tag(
2225:                                        "Top",
2226:                                        it.businesslogic.ireport.util.I18n
2227:                                                .getString(
2228:                                                        "gui.elementpropertiessheet.valign.Top",
2229:                                                        "Top")),
2230:                                new Tag(
2231:                                        "Middle",
2232:                                        it.businesslogic.ireport.util.I18n
2233:                                                .getString(
2234:                                                        "gui.elementpropertiessheet.valign.Middle",
2235:                                                        "Middle")),
2236:                                new Tag(
2237:                                        "Bottom",
2238:                                        it.businesslogic.ireport.util.I18n
2239:                                                .getString(
2240:                                                        "gui.elementpropertiessheet.valign.Bottom",
2241:                                                        "Bottom")) });
2242:                spTextVAlign.setDefaultValue("Top");
2243:
2244:                spStyledText = new SheetProperty("styledText",
2245:                        it.businesslogic.ireport.util.I18n.getString(
2246:                                "gui.elementpropertiessheet.styledText",
2247:                                "Styled text"), SheetProperty.BOOLEAN);
2248:
2249:                spLineSpacing = new SheetProperty("lineSpacing",
2250:                        it.businesslogic.ireport.util.I18n.getString(
2251:                                "gui.elementpropertiessheet.lineSpacing",
2252:                                "Line spacing"), SheetProperty.COMBOBOX);
2253:                spLineSpacing
2254:                        .setTags(new Tag[] {
2255:                                new Tag(
2256:                                        "Single",
2257:                                        it.businesslogic.ireport.util.I18n
2258:                                                .getString(
2259:                                                        "gui.elementpropertiessheet.lineSpacing.Single",
2260:                                                        "Single")),
2261:                                new Tag(
2262:                                        "1_1_2",
2263:                                        it.businesslogic.ireport.util.I18n
2264:                                                .getString(
2265:                                                        "gui.elementpropertiessheet.lineSpacing.1_1_2",
2266:                                                        "1_1_2")),
2267:                                new Tag(
2268:                                        "Double",
2269:                                        it.businesslogic.ireport.util.I18n
2270:                                                .getString(
2271:                                                        "gui.elementpropertiessheet.lineSpacing.Double",
2272:                                                        "Double")) });
2273:                spLineSpacing.setDefaultValue("Single");
2274:
2275:                spRotate = new SheetProperty("rotate",
2276:                        it.businesslogic.ireport.util.I18n
2277:                                .getString("gui.elementpropertiessheet.rotate",
2278:                                        "Ratation"), SheetProperty.COMBOBOX);
2279:                spRotate
2280:                        .setTags(new Tag[] {
2281:                                new Tag(
2282:                                        "None",
2283:                                        it.businesslogic.ireport.util.I18n
2284:                                                .getString(
2285:                                                        "gui.elementpropertiessheet.rotate.None",
2286:                                                        "None")),
2287:                                new Tag(
2288:                                        "Left",
2289:                                        it.businesslogic.ireport.util.I18n
2290:                                                .getString(
2291:                                                        "gui.elementpropertiessheet.rotate.Left",
2292:                                                        "Left")),
2293:                                new Tag(
2294:                                        "Right",
2295:                                        it.businesslogic.ireport.util.I18n
2296:                                                .getString(
2297:                                                        "gui.elementpropertiessheet.rotate.Right",
2298:                                                        "Right")),
2299:                                new Tag(
2300:                                        "UpsideDown",
2301:                                        it.businesslogic.ireport.util.I18n
2302:                                                .getString(
2303:                                                        "gui.elementpropertiessheet.rotate.UpsideDown",
2304:                                                        "Upside down")) });
2305:                spRotate.setDefaultValue("None");
2306:
2307:                spMarkup = new SheetProperty("markup",
2308:                        it.businesslogic.ireport.util.I18n.getString(
2309:                                "styleDialog.sheetProperty.markup", "Markup"),
2310:                        SheetProperty.COMBOBOX);
2311:                spMarkup
2312:                        .setTags(new Tag[] {
2313:                                new Tag(
2314:                                        null,
2315:                                        it.businesslogic.ireport.util.I18n
2316:                                                .getString(
2317:                                                        "styleDialog.sheetProperty.markup.default",
2318:                                                        "Default")),
2319:                                new Tag(
2320:                                        "html",
2321:                                        it.businesslogic.ireport.util.I18n
2322:                                                .getString(
2323:                                                        "styleDialog.sheetProperty.markup.html",
2324:                                                        "HTML")),
2325:                                new Tag(
2326:                                        "rtf",
2327:                                        it.businesslogic.ireport.util.I18n
2328:                                                .getString(
2329:                                                        "styleDialog.sheetProperty.markup.rtf",
2330:                                                        "RTF")) });
2331:                spMarkup.setDefaultValue(null);
2332:
2333:                spFontName = new SheetProperty("fontName",
2334:                        it.businesslogic.ireport.util.I18n.getString(
2335:                                "gui.elementpropertiessheet.fontName", "Font"),
2336:                        SheetProperty.COMBOBOX);
2337:                Vector fontsVec = new Vector();
2338:                String[] fontFamilies = java.awt.GraphicsEnvironment
2339:                        .getLocalGraphicsEnvironment()
2340:                        .getAvailableFontFamilyNames();
2341:                for (int i = 0; i < fontFamilies.length; ++i) {
2342:                    fontsVec.add(new Tag(fontFamilies[i]));
2343:                }
2344:                spFontName.setTags(fontsVec);
2345:                spFontName.setDefaultValue("SansSerif");
2346:
2347:                spFontSize = new NumberComboBoxSheetProperty("fontSize",
2348:                        it.businesslogic.ireport.util.I18n.getString(
2349:                                "gui.elementpropertiessheet.fontSize",
2350:                                "Font size"));
2351:                spFontSize.addEntry("3", 3);
2352:                spFontSize.addEntry("5", 5);
2353:                spFontSize.addEntry("8", 8);
2354:                spFontSize.addEntry("10", 10);
2355:                spFontSize.addEntry("12", 12);
2356:                spFontSize.addEntry("14", 14);
2357:                spFontSize.addEntry("18", 18);
2358:                spFontSize.addEntry("24", 24);
2359:                spFontSize.addEntry("36", 36);
2360:                spFontSize.addEntry("48", 48);
2361:
2362:                //spPdfFontName;
2363:                spPdfFontName = new SheetProperty("pdfFontName",
2364:                        it.businesslogic.ireport.util.I18n.getString(
2365:                                "gui.elementpropertiessheet.pdfFontName",
2366:                                "PDF Font"), SheetProperty.COMBOBOX);
2367:                fontsVec = new Vector();
2368:                fontsVec.addElement(new Tag("Helvetica"));
2369:                fontsVec.addElement(new Tag("Helvetica-Bold"));
2370:                fontsVec.addElement(new Tag("Helvetica-BoldOblique"));
2371:                fontsVec.addElement(new Tag("Helvetica-Oblique"));
2372:                fontsVec.addElement(new Tag("Courier"));
2373:                fontsVec.addElement(new Tag("Courier-Bold"));
2374:                fontsVec.addElement(new Tag("Courier-BoldOblique"));
2375:                fontsVec.addElement(new Tag("Courier-Oblique"));
2376:                fontsVec.addElement(new Tag("Symbol"));
2377:                fontsVec.addElement(new Tag("Times-Roman"));
2378:                fontsVec.addElement(new Tag("Times-Bold"));
2379:                fontsVec.addElement(new Tag("Times-BoldItalic"));
2380:                fontsVec.addElement(new Tag("Times-Italic"));
2381:                fontsVec.addElement(new Tag("ZapfDingbats"));
2382:                fontsVec.addElement(new Tag("STSong-Light"));
2383:                fontsVec.addElement(new Tag("MHei-Medium"));
2384:                fontsVec.addElement(new Tag("MSung-Light"));
2385:                fontsVec.addElement(new Tag("HeiseiKakuGo-W5"));
2386:                fontsVec.addElement(new Tag("HeiseiMin-W3"));
2387:                fontsVec.addElement(new Tag("HYGoThic-Medium"));
2388:                fontsVec.addElement(new Tag("HYSMyeongJo-Medium"));
2389:                Vector iRfonts = MainFrame.getMainInstance().getTtfFonts();
2390:                for (int i_f = 0; i_f < iRfonts.size(); ++i_f) {
2391:                    fontsVec.addElement(new Tag(((IRFont) iRfonts
2392:                            .elementAt(i_f)).getFile(), iRfonts.elementAt(i_f)
2393:                            + ""));
2394:                }
2395:
2396:                spPdfFontName.setTags(fontsVec);
2397:                spPdfFontName.setDefaultValue("Helvetica");
2398:                ((JComboBox) (spPdfFontName.getEditor())).setEditable(true);
2399:
2400:                spBold = new SheetProperty("bold",
2401:                        it.businesslogic.ireport.util.I18n.getString(
2402:                                "gui.elementpropertiessheet.Bold", "Bold"),
2403:                        SheetProperty.BOOLEAN);
2404:                spItalic = new SheetProperty("italic",
2405:                        it.businesslogic.ireport.util.I18n.getString(
2406:                                "gui.elementpropertiessheet.Italic", "Italic"),
2407:                        SheetProperty.BOOLEAN);
2408:                spUnderline = new SheetProperty("underline",
2409:                        it.businesslogic.ireport.util.I18n.getString(
2410:                                "gui.elementpropertiessheet.Underline",
2411:                                "Underline"), SheetProperty.BOOLEAN);
2412:                spStriketrough = new SheetProperty("strikethrough",
2413:                        it.businesslogic.ireport.util.I18n.getString(
2414:                                "gui.elementpropertiessheet.Strikethrough",
2415:                                "Strike through"), SheetProperty.BOOLEAN);
2416:                spPdfEmbedded = new SheetProperty("pdfEmbedded",
2417:                        it.businesslogic.ireport.util.I18n.getString(
2418:                                "gui.elementpropertiessheet.PdfEmbedded",
2419:                                "PDF embedded"), SheetProperty.BOOLEAN);
2420:                //spPdfEncoding;
2421:
2422:                spPdfEncoding = new SheetProperty("pdfEncoding",
2423:                        it.businesslogic.ireport.util.I18n.getString(
2424:                                "gui.elementpropertiessheet.pdfEncoding",
2425:                                "PDF Encoding"), SheetProperty.COMBOBOX);
2426:                fontsVec = new Vector();
2427:                fontsVec.addElement(new Tag("Cp1250",
2428:                        "CP1250 (Central European)"));
2429:                fontsVec.addElement(new Tag("Cp1251", "CP1251 (Cyrillic)"));
2430:                fontsVec.addElement(new Tag("Cp1252",
2431:                        "CP1252 (Western European ANSI aka WinAnsi)"));
2432:                fontsVec.addElement(new Tag("Cp1253", "CP1253 (Greek)"));
2433:                fontsVec.addElement(new Tag("Cp1254", "CP1254 (Turkish)"));
2434:                fontsVec.addElement(new Tag("Cp1255", "CP1255 (Hebrew)"));
2435:                fontsVec.addElement(new Tag("Cp1256", "CP1256 (Arabic)"));
2436:                fontsVec.addElement(new Tag("Cp1257", "CP1257 (Baltic)"));
2437:                fontsVec.addElement(new Tag("Cp1258", "CP1258 (Vietnamese)"));
2438:                fontsVec.addElement(new Tag("UniGB-UCS2-H",
2439:                        "UniGB-UCS2-H (Chinese Simplified)"));
2440:                fontsVec.addElement(new Tag("UniGB-UCS2-V",
2441:                        "UniGB-UCS2-V (Chinese Simplified)"));
2442:                fontsVec.addElement(new Tag("UniCNS-UCS2-H",
2443:                        "UniCNS-UCS2-H (Chinese traditional)"));
2444:                fontsVec.addElement(new Tag("UniCNS-UCS2-V",
2445:                        "UniCNS-UCS2-V (Chinese traditional)"));
2446:                fontsVec.addElement(new Tag("UniJIS-UCS2-H",
2447:                        "UniJIS-UCS2-H (Japanese)"));
2448:                fontsVec.addElement(new Tag("UniJIS-UCS2-V",
2449:                        "UniJIS-UCS2-V (Japanese)"));
2450:                fontsVec.addElement(new Tag("UniJIS-UCS2-HW-H",
2451:                        "UniJIS-UCS2-HW-H (Japanese)"));
2452:                fontsVec.addElement(new Tag("UniJIS-UCS2-HW-V",
2453:                        "UniJIS-UCS2-HW-V (Japanese)"));
2454:                fontsVec.addElement(new Tag("UniKS-UCS2-H",
2455:                        "UniKS-UCS2-H (Korean)"));
2456:                fontsVec.addElement(new Tag("UniKS-UCS2-V",
2457:                        "UniKS-UCS2-V (Korean)"));
2458:                fontsVec.addElement(new Tag("Identity-H",
2459:                        "Identity-H (Unicode with horizontal writing)"));
2460:                fontsVec.addElement(new Tag("Identity-V",
2461:                        "Identity-V (Unicode with vertical writing)"));
2462:
2463:                spPdfEncoding.setTags(fontsVec);
2464:                ((JComboBox) spPdfEncoding.getEditor()).setEditable(true);
2465:                spPdfEncoding.setDefaultValue("Cp1250");
2466:
2467:                spStaticText = new ExpressionSheetProperty("text",
2468:                        it.businesslogic.ireport.util.I18n.getString(
2469:                                "gui.elementpropertiessheet.text", "Text"));
2470:                spStaticText.setPlainTextEditor(true);
2471:                spStaticText.setShowResetButton(false);
2472:                spTextfieldExpression = new ExpressionSheetProperty(
2473:                        "textfieldExpression",
2474:                        it.businesslogic.ireport.util.I18n
2475:                                .getString(
2476:                                        "gui.elementpropertiessheet.textfieldExpression",
2477:                                        "Expression"));
2478:                spTextfieldExpression.setShowResetButton(false);
2479:                spTextfieldExpressionClass = new SheetProperty(
2480:                        "textfieldExpressionClass",
2481:                        it.businesslogic.ireport.util.I18n
2482:                                .getString(
2483:                                        "gui.elementpropertiessheet.textfieldExpressionClass",
2484:                                        "Exp. class"), SheetProperty.COMBOBOX);
2485:                fontsVec = new Vector();
2486:                fontsVec.addElement(new Tag("java.lang.Boolean"));
2487:                fontsVec.addElement(new Tag("java.lang.Byte"));
2488:                fontsVec.addElement(new Tag("java.util.Date"));
2489:                fontsVec.addElement(new Tag("java.sql.Timestamp"));
2490:                fontsVec.addElement(new Tag("java.sql.Time"));
2491:                fontsVec.addElement(new Tag("java.lang.Double"));
2492:                fontsVec.addElement(new Tag("java.lang.Float"));
2493:                fontsVec.addElement(new Tag("java.lang.Integer"));
2494:                fontsVec.addElement(new Tag("java.lang.Long"));
2495:                fontsVec.addElement(new Tag("java.lang.Short"));
2496:                fontsVec.addElement(new Tag("java.math.BigDecimal"));
2497:                fontsVec.addElement(new Tag("java.lang.String"));
2498:                fontsVec.addElement(new Tag("java.lang.Number"));
2499:                spTextfieldExpressionClass.setTags(fontsVec);
2500:                spTextfieldExpressionClass.setDefaultValue("java.lang.String");
2501:                spTextfieldExpressionClass.setShowResetButton(false);
2502:
2503:                spTextfieldEvaluationTime = new SheetProperty(
2504:                        "textfieldEvaluationTime",
2505:                        it.businesslogic.ireport.util.I18n
2506:                                .getString(
2507:                                        "gui.elementpropertiessheet.textfieldEvaluationTime",
2508:                                        "Eval. time"), SheetProperty.COMBOBOX);
2509:                // Text field Evaluation Time...
2510:                fontsVec = new Vector();
2511:                fontsVec
2512:                        .addElement(new Tag(
2513:                                "Now",
2514:                                it.businesslogic.ireport.util.I18n
2515:                                        .getString(
2516:                                                "gui.elementpropertiessheet.textfieldEvaluationTime.Now",
2517:                                                "Now")));
2518:                fontsVec
2519:                        .addElement(new Tag(
2520:                                "Report",
2521:                                it.businesslogic.ireport.util.I18n
2522:                                        .getString(
2523:                                                "gui.elementpropertiessheet.textfieldEvaluationTime.Report",
2524:                                                "Report")));
2525:                fontsVec
2526:                        .addElement(new Tag(
2527:                                "Page",
2528:                                it.businesslogic.ireport.util.I18n
2529:                                        .getString(
2530:                                                "gui.elementpropertiessheet.textfieldEvaluationTime.Page",
2531:                                                "Page")));
2532:                fontsVec
2533:                        .addElement(new Tag(
2534:                                "Column",
2535:                                it.businesslogic.ireport.util.I18n
2536:                                        .getString(
2537:                                                "gui.elementpropertiessheet.textfieldEvaluationTime.Column",
2538:                                                "Column")));
2539:                fontsVec
2540:                        .addElement(new Tag(
2541:                                "Group",
2542:                                it.businesslogic.ireport.util.I18n
2543:                                        .getString(
2544:                                                "gui.elementpropertiessheet.textfieldEvaluationTime.Group",
2545:                                                "Group")));
2546:                fontsVec
2547:                        .addElement(new Tag(
2548:                                "Band",
2549:                                it.businesslogic.ireport.util.I18n
2550:                                        .getString(
2551:                                                "gui.elementpropertiessheet.textfieldEvaluationTime.Band",
2552:                                                "Bans")));
2553:                fontsVec
2554:                        .addElement(new Tag(
2555:                                "Auto",
2556:                                it.businesslogic.ireport.util.I18n
2557:                                        .getString(
2558:                                                "gui.elementpropertiessheet.textfieldEvaluationTime.Auto",
2559:                                                "Auto")));
2560:                spTextfieldEvaluationTime.setTags(fontsVec);
2561:                spTextfieldEvaluationTime.setDefaultValue("Now");
2562:                spTextfieldEvaluationTime.setShowResetButton(false);
2563:
2564:                spTextfieldEvaluationGroup = new ComboBoxSheetProperty(
2565:                        "textfieldEvaluationGroup",
2566:                        it.businesslogic.ireport.util.I18n
2567:                                .getString(
2568:                                        "gui.elementpropertiessheet.textfieldEvaluationGroup",
2569:                                        "Eval. group"));
2570:                spTextfieldEvaluationGroup.setShowResetButton(false);
2571:
2572:                spStretchWithOverflow = new SheetProperty(
2573:                        "stretchWithOverflow",
2574:                        it.businesslogic.ireport.util.I18n
2575:                                .getString(
2576:                                        "gui.elementpropertiessheet.stretchWithOverflow",
2577:                                        "Stretch with overflow"),
2578:                        SheetProperty.BOOLEAN);
2579:                spStretchWithOverflow.setShowResetButton(false);
2580:                spTextfieldBlankWhenNull = new SheetProperty("blankWhenNull",
2581:                        it.businesslogic.ireport.util.I18n.getString(
2582:                                "gui.elementpropertiessheet.blankWehnNull",
2583:                                "Blank when null"), SheetProperty.BOOLEAN);
2584:                spTextfieldBlankWhenNull.setShowResetButton(false);
2585:                spPattern = new PatternSheetProperty("pattern",
2586:                        it.businesslogic.ireport.util.I18n
2587:                                .getString(
2588:                                        "gui.elementpropertiessheet.Pattern",
2589:                                        "Pattern"));
2590:                spPattern.setDefaultValue("");
2591:
2592:                spImageExpression = new ExpressionSheetProperty(
2593:                        "imageExpression",
2594:                        it.businesslogic.ireport.util.I18n.getString(
2595:                                "gui.elementpropertiessheet.imageExpression",
2596:                                "Image expression"));
2597:                spImageExpression.setShowResetButton(false);
2598:                spImageExpressionClass = new SheetProperty(
2599:                        "imageExpressionClass",
2600:                        it.businesslogic.ireport.util.I18n
2601:                                .getString(
2602:                                        "gui.elementpropertiessheet.textfieldExpressionClass",
2603:                                        "Exp. class"), SheetProperty.COMBOBOX);
2604:                fontsVec = new Vector();
2605:                fontsVec.addElement(new Tag("java.lang.String"));
2606:                fontsVec.addElement(new Tag("java.io.File"));
2607:                fontsVec.addElement(new Tag("java.net.URL"));
2608:                fontsVec.addElement(new Tag("java.io.InputStream"));
2609:                fontsVec.addElement(new Tag("java.awt.Image"));
2610:                fontsVec.addElement(new Tag(
2611:                        "net.sf.jasperreports.engine.JRRenderable"));
2612:                spImageExpressionClass.setTags(fontsVec);
2613:                //spImageExpressionClass.setDefaultValue("java.lang.String");
2614:                spImageExpressionClass.setShowResetButton(false);
2615:
2616:                spImageEvaluationTime = new SheetProperty(
2617:                        "imageEvaluationTime",
2618:                        it.businesslogic.ireport.util.I18n
2619:                                .getString(
2620:                                        "gui.elementpropertiessheet.textfieldEvaluationTime",
2621:                                        "Eval. time"), SheetProperty.COMBOBOX);
2622:                // Text field Evaluation Time...
2623:                fontsVec = new Vector();
2624:                fontsVec
2625:                        .addElement(new Tag(
2626:                                "Now",
2627:                                it.businesslogic.ireport.util.I18n
2628:                                        .getString(
2629:                                                "gui.elementpropertiessheet.textfieldEvaluationTime.Now",
2630:                                                "Now")));
2631:                fontsVec
2632:                        .addElement(new Tag(
2633:                                "Report",
2634:                                it.businesslogic.ireport.util.I18n
2635:                                        .getString(
2636:                                                "gui.elementpropertiessheet.textfieldEvaluationTime.Report",
2637:                                                "Report")));
2638:                fontsVec
2639:                        .addElement(new Tag(
2640:                                "Page",
2641:                                it.businesslogic.ireport.util.I18n
2642:                                        .getString(
2643:                                                "gui.elementpropertiessheet.textfieldEvaluationTime.Page",
2644:                                                "Page")));
2645:                fontsVec
2646:                        .addElement(new Tag(
2647:                                "Column",
2648:                                it.businesslogic.ireport.util.I18n
2649:                                        .getString(
2650:                                                "gui.elementpropertiessheet.textfieldEvaluationTime.Column",
2651:                                                "Column")));
2652:                fontsVec
2653:                        .addElement(new Tag(
2654:                                "Group",
2655:                                it.businesslogic.ireport.util.I18n
2656:                                        .getString(
2657:                                                "gui.elementpropertiessheet.textfieldEvaluationTime.Group",
2658:                                                "Group")));
2659:                fontsVec
2660:                        .addElement(new Tag(
2661:                                "Band",
2662:                                it.businesslogic.ireport.util.I18n
2663:                                        .getString(
2664:                                                "gui.elementpropertiessheet.textfieldEvaluationTime.Band",
2665:                                                "Bans")));
2666:                fontsVec
2667:                        .addElement(new Tag(
2668:                                "Auto",
2669:                                it.businesslogic.ireport.util.I18n
2670:                                        .getString(
2671:                                                "gui.elementpropertiessheet.textfieldEvaluationTime.Auto",
2672:                                                "Auto")));
2673:                spImageEvaluationTime.setTags(fontsVec);
2674:                spImageEvaluationTime.setDefaultValue("Now");
2675:                spImageEvaluationTime.setShowResetButton(false);
2676:
2677:                spImageEvaluationGroup = new ComboBoxSheetProperty(
2678:                        "imageEvaluationGroup",
2679:                        it.businesslogic.ireport.util.I18n
2680:                                .getString(
2681:                                        "gui.elementpropertiessheet.textfieldEvaluationGroup",
2682:                                        "Eval. group"));
2683:                spImageEvaluationGroup.setShowResetButton(false);
2684:                spImageScale = new SheetProperty("imageScale",
2685:                        it.businesslogic.ireport.util.I18n.getString(
2686:                                "gui.elementpropertiessheet.imageScale",
2687:                                "Image scale"), SheetProperty.COMBOBOX);
2688:                fontsVec = new Vector();
2689:                fontsVec.addElement(new Tag("Clip",
2690:                        it.businesslogic.ireport.util.I18n.getString(
2691:                                "gui.elementpropertiessheet.imageScale.Clip",
2692:                                "Clip")));
2693:                fontsVec
2694:                        .addElement(new Tag(
2695:                                "FillFrame",
2696:                                it.businesslogic.ireport.util.I18n
2697:                                        .getString(
2698:                                                "gui.elementpropertiessheet.imageScale.FillFrame",
2699:                                                "Fill frame")));
2700:                fontsVec
2701:                        .addElement(new Tag(
2702:                                "RetainShape",
2703:                                it.businesslogic.ireport.util.I18n
2704:                                        .getString(
2705:                                                "gui.elementpropertiessheet.imageScale.RetainShape",
2706:                                                "Retain shape")));
2707:                spImageScale.setTags(fontsVec);
2708:                spImageScale.setDefaultValue("FillFrame");
2709:
2710:                spImageError = new SheetProperty("imageError",
2711:                        it.businesslogic.ireport.util.I18n.getString(
2712:                                "gui.elementpropertiessheet.imageError",
2713:                                "On error type"), SheetProperty.COMBOBOX);
2714:                fontsVec = new Vector();
2715:                fontsVec.addElement(new Tag("Error",
2716:                        it.businesslogic.ireport.util.I18n.getString(
2717:                                "gui.elementpropertiessheet.imageScale.Error",
2718:                                "Error")));
2719:                fontsVec.addElement(new Tag("Blank",
2720:                        it.businesslogic.ireport.util.I18n.getString(
2721:                                "gui.elementpropertiessheet.imageScale.Blank",
2722:                                "Blank")));
2723:                fontsVec.addElement(new Tag("Icon",
2724:                        it.businesslogic.ireport.util.I18n.getString(
2725:                                "gui.elementpropertiessheet.imageScale.Icon",
2726:                                "Icon")));
2727:                spImageError.setTags(fontsVec);
2728:                spImageError.setDefaultValue("Error");
2729:                spImageError.setShowResetButton(false);
2730:
2731:                spImageHAlign = new SheetProperty("imageHAlign",
2732:                        it.businesslogic.ireport.util.I18n.getString(
2733:                                "gui.elementpropertiessheet.halign", "Align"),
2734:                        SheetProperty.COMBOBOX);
2735:                spImageHAlign
2736:                        .setTags(new Tag[] {
2737:                                new Tag(
2738:                                        "Left",
2739:                                        it.businesslogic.ireport.util.I18n
2740:                                                .getString(
2741:                                                        "gui.elementpropertiessheet.halign.Left",
2742:                                                        "Left")),
2743:                                new Tag(
2744:                                        "Center",
2745:                                        it.businesslogic.ireport.util.I18n
2746:                                                .getString(
2747:                                                        "gui.elementpropertiessheet.halign.Center",
2748:                                                        "Center")),
2749:                                new Tag(
2750:                                        "Right",
2751:                                        it.businesslogic.ireport.util.I18n
2752:                                                .getString(
2753:                                                        "gui.elementpropertiessheet.halign.Right",
2754:                                                        "Right")) });
2755:                spImageHAlign.setDefaultValue("Left");
2756:
2757:                spImageVAlign = new SheetProperty("imageVAlign",
2758:                        it.businesslogic.ireport.util.I18n.getString(
2759:                                "gui.elementpropertiessheet.valign",
2760:                                "Vertical align"), SheetProperty.COMBOBOX);
2761:                spImageVAlign
2762:                        .setTags(new Tag[] {
2763:                                new Tag(
2764:                                        "Top",
2765:                                        it.businesslogic.ireport.util.I18n
2766:                                                .getString(
2767:                                                        "gui.elementpropertiessheet.valign.Top",
2768:                                                        "Top")),
2769:                                new Tag(
2770:                                        "Middle",
2771:                                        it.businesslogic.ireport.util.I18n
2772:                                                .getString(
2773:                                                        "gui.elementpropertiessheet.valign.Middle",
2774:                                                        "Middle")),
2775:                                new Tag(
2776:                                        "Bottom",
2777:                                        it.businesslogic.ireport.util.I18n
2778:                                                .getString(
2779:                                                        "gui.elementpropertiessheet.valign.Bottom",
2780:                                                        "Bottom")) });
2781:                spImageVAlign.setDefaultValue("Top");
2782:
2783:                spImageLazy = new SheetProperty("imageLazy",
2784:                        it.businesslogic.ireport.util.I18n.getString(
2785:                                "gui.elementpropertiessheet.imageLazy",
2786:                                "Is lazy"), SheetProperty.BOOLEAN);
2787:                spImageLazy.setShowResetButton(false);
2788:
2789:                spImageCache = new SheetProperty("imageCache",
2790:                        it.businesslogic.ireport.util.I18n.getString(
2791:                                "gui.elementpropertiessheet.imageCache",
2792:                                "Using cache"), SheetProperty.BOOLEAN);
2793:
2794:                spRenderType = new SheetProperty(
2795:                        "renderType",
2796:                        it.businesslogic.ireport.util.I18n
2797:                                .getString(
2798:                                        "gui.elementpropertiessheet.sheetProperty.renderType",
2799:                                        "Render type"), SheetProperty.COMBOBOX);
2800:                spRenderType
2801:                        .setTags(new Tag[] {
2802:                                new Tag(
2803:                                        null,
2804:                                        it.businesslogic.ireport.util.I18n
2805:                                                .getString(
2806:                                                        "gui.elementpropertiessheet.sheetProperty.renderType.default",
2807:                                                        "Default")),
2808:                                new Tag(
2809:                                        "draw",
2810:                                        it.businesslogic.ireport.util.I18n
2811:                                                .getString(
2812:                                                        "gui.elementpropertiessheet.sheetProperty.renderType.draw",
2813:                                                        "Draw")),
2814:                                new Tag(
2815:                                        "image",
2816:                                        it.businesslogic.ireport.util.I18n
2817:                                                .getString(
2818:                                                        "gui.elementpropertiessheet.sheetProperty.renderType.image",
2819:                                                        "Image")),
2820:                                new Tag(
2821:                                        "svg",
2822:                                        it.businesslogic.ireport.util.I18n
2823:                                                .getString(
2824:                                                        "gui.elementpropertiessheet.sheetProperty.renderType.svg",
2825:                                                        "SVG")) });
2826:                spRenderType.setDefaultValue(null);
2827:                //spBarcodeGroup = new ComboBoxSheetProperty("barcode_group","Evaluation group");
2828:
2829:                spBCExpression = new ExpressionSheetProperty(
2830:                        "barcodeExpression",
2831:                        it.businesslogic.ireport.util.I18n.getString(
2832:                                "gui.elementpropertiessheet.barcodeExpression",
2833:                                "Barcode expression"));
2834:                spBCExpression.setShowResetButton(false);
2835:
2836:                spBCApplicationIdentifier = new ExpressionSheetProperty(
2837:                        "barcodeAppIdentifierExpression",
2838:                        it.businesslogic.ireport.util.I18n
2839:                                .getString(
2840:                                        "gui.elementpropertiessheet.barcodeApplicationIdentifier",
2841:                                        "Applic. identifier"));
2842:                spBCApplicationIdentifier.setShowResetButton(false);
2843:
2844:                spBCBarWidth = new SheetProperty("barcodeBarWidth",
2845:                        it.businesslogic.ireport.util.I18n.getString(
2846:                                "gui.elementpropertiessheet.barcodeBarWidth",
2847:                                "Bar width"), SheetProperty.INTEGER);
2848:                spBCBarWidth.setShowResetButton(false);
2849:
2850:                spBCBarHeight = new SheetProperty("barcodeBarHeight",
2851:                        it.businesslogic.ireport.util.I18n.getString(
2852:                                "gui.elementpropertiessheet.barcodeBarHeight",
2853:                                "Bar height"), SheetProperty.INTEGER);
2854:                spBCBarHeight.setShowResetButton(false);
2855:
2856:                spBCType = new SheetProperty("barcodeType",
2857:                        it.businesslogic.ireport.util.I18n.getString(
2858:                                "gui.elementpropertiessheet.barcodeType",
2859:                                "Type"), SheetProperty.COMBOBOX);
2860:                fontsVec = new Vector();
2861:                fontsVec.add(new Tag("1", "2of7"));
2862:                fontsVec.add(new Tag("2", "3of9"));
2863:                fontsVec.add(new Tag("3", "Bookland"));
2864:                fontsVec.add(new Tag("4", "Codabar"));
2865:                fontsVec.add(new Tag("5", "Code128"));
2866:                fontsVec.add(new Tag("6", "Code128A"));
2867:                fontsVec.add(new Tag("7", "Code128B"));
2868:                fontsVec.add(new Tag("8", "Code128C"));
2869:                fontsVec.add(new Tag("9", "Code39"));
2870:                fontsVec.add(new Tag("26", "Code39 (Extended)"));
2871:                fontsVec.add(new Tag("10", "EAN128"));
2872:                fontsVec.add(new Tag("11", "EAN13"));
2873:                fontsVec.add(new Tag("12", "GlobalTradeItemNumber"));
2874:                fontsVec.add(new Tag("13", "Int2of5"));
2875:                fontsVec.add(new Tag("14", "Monarch"));
2876:                fontsVec.add(new Tag("15", "NW7"));
2877:                fontsVec.add(new Tag("16", "PDF417"));
2878:                fontsVec.add(new Tag("17", "SCC14ShippingCode"));
2879:                fontsVec.add(new Tag("18", "ShipmentIdentificationNumber"));
2880:                fontsVec.add(new Tag("19", "SSCC18"));
2881:                fontsVec.add(new Tag("20", "Std2of5"));
2882:                fontsVec.add(new Tag("21", "UCC128"));
2883:                fontsVec.add(new Tag("22", "UPCA"));
2884:                fontsVec.add(new Tag("23", "USD3"));
2885:                fontsVec.add(new Tag("24", "USD4"));
2886:                fontsVec.add(new Tag("25", "USPS"));
2887:                spBCType.setTags(fontsVec);
2888:                //spImageExpressionClass.setDefaultValue("java.lang.String");
2889:                spBCType.setShowResetButton(false);
2890:
2891:                spBCEvaluationTime = new SheetProperty(
2892:                        "barcodeEvaluationTime",
2893:                        it.businesslogic.ireport.util.I18n
2894:                                .getString(
2895:                                        "gui.elementpropertiessheet.textfieldEvaluationTime",
2896:                                        "Eval. time"), SheetProperty.COMBOBOX);
2897:                // Text field Evaluation Time...
2898:                fontsVec = new Vector();
2899:                fontsVec
2900:                        .addElement(new Tag(
2901:                                "Now",
2902:                                it.businesslogic.ireport.util.I18n
2903:                                        .getString(
2904:                                                "gui.elementpropertiessheet.textfieldEvaluationTime.Now",
2905:                                                "Now")));
2906:                fontsVec
2907:                        .addElement(new Tag(
2908:                                "Report",
2909:                                it.businesslogic.ireport.util.I18n
2910:                                        .getString(
2911:                                                "gui.elementpropertiessheet.textfieldEvaluationTime.Report",
2912:                                                "Report")));
2913:                fontsVec
2914:                        .addElement(new Tag(
2915:                                "Page",
2916:                                it.businesslogic.ireport.util.I18n
2917:                                        .getString(
2918:                                                "gui.elementpropertiessheet.textfieldEvaluationTime.Page",
2919:                                                "Page")));
2920:                fontsVec
2921:                        .addElement(new Tag(
2922:                                "Column",
2923:                                it.businesslogic.ireport.util.I18n
2924:                                        .getString(
2925:                                                "gui.elementpropertiessheet.textfieldEvaluationTime.Column",
2926:                                                "Column")));
2927:                fontsVec
2928:                        .addElement(new Tag(
2929:                                "Group",
2930:                                it.businesslogic.ireport.util.I18n
2931:                                        .getString(
2932:                                                "gui.elementpropertiessheet.textfieldEvaluationTime.Group",
2933:                                                "Group")));
2934:                fontsVec
2935:                        .addElement(new Tag(
2936:                                "Band",
2937:                                it.businesslogic.ireport.util.I18n
2938:                                        .getString(
2939:                                                "gui.elementpropertiessheet.textfieldEvaluationTime.Band",
2940:                                                "Bans")));
2941:                fontsVec
2942:                        .addElement(new Tag(
2943:                                "Auto",
2944:                                it.businesslogic.ireport.util.I18n
2945:                                        .getString(
2946:                                                "gui.elementpropertiessheet.textfieldEvaluationTime.Auto",
2947:                                                "Auto")));
2948:                spBCEvaluationTime.setTags(fontsVec);
2949:                spBCEvaluationTime.setDefaultValue("Now");
2950:                spBCEvaluationTime.setShowResetButton(false);
2951:
2952:                spBCEvaluationGroup = new ComboBoxSheetProperty(
2953:                        "barcodeEvaluationGroup",
2954:                        it.businesslogic.ireport.util.I18n
2955:                                .getString(
2956:                                        "gui.elementpropertiessheet.textfieldEvaluationGroup",
2957:                                        "Eval. group"));
2958:                spBCEvaluationGroup.setShowResetButton(false);
2959:                spBCScale = new SheetProperty("barcodeScale",
2960:                        it.businesslogic.ireport.util.I18n.getString(
2961:                                "gui.elementpropertiessheet.imageScale",
2962:                                "Image scale"), SheetProperty.COMBOBOX);
2963:                fontsVec = new Vector();
2964:                fontsVec.addElement(new Tag("Clip",
2965:                        it.businesslogic.ireport.util.I18n.getString(
2966:                                "gui.elementpropertiessheet.imageScale.Clip",
2967:                                "Clip")));
2968:                fontsVec
2969:                        .addElement(new Tag(
2970:                                "FillFrame",
2971:                                it.businesslogic.ireport.util.I18n
2972:                                        .getString(
2973:                                                "gui.elementpropertiessheet.imageScale.FillFrame",
2974:                                                "Fill frame")));
2975:                fontsVec
2976:                        .addElement(new Tag(
2977:                                "RetainShape",
2978:                                it.businesslogic.ireport.util.I18n
2979:                                        .getString(
2980:                                                "gui.elementpropertiessheet.imageScale.RetainShape",
2981:                                                "Retain shape")));
2982:                spBCScale.setTags(fontsVec);
2983:                spBCScale.setDefaultValue("FillFrame");
2984:
2985:                spBCError = new SheetProperty("barcodeError",
2986:                        it.businesslogic.ireport.util.I18n.getString(
2987:                                "gui.elementpropertiessheet.imageError",
2988:                                "On error type"), SheetProperty.COMBOBOX);
2989:                fontsVec = new Vector();
2990:                fontsVec.addElement(new Tag("Error",
2991:                        it.businesslogic.ireport.util.I18n.getString(
2992:                                "gui.elementpropertiessheet.imageScale.Error",
2993:                                "Error")));
2994:                fontsVec.addElement(new Tag("Blank",
2995:                        it.businesslogic.ireport.util.I18n.getString(
2996:                                "gui.elementpropertiessheet.imageScale.Blank",
2997:                                "Blank")));
2998:                fontsVec.addElement(new Tag("Icon",
2999:                        it.businesslogic.ireport.util.I18n.getString(
3000:                                "gui.elementpropertiessheet.imageScale.Icon",
3001:                                "Icon")));
3002:                spBCError.setTags(fontsVec);
3003:                spBCError.setDefaultValue("Error");
3004:                spBCError.setShowResetButton(false);
3005:
3006:                spBCHAlign = new SheetProperty("barcodeHAlign",
3007:                        it.businesslogic.ireport.util.I18n.getString(
3008:                                "gui.elementpropertiessheet.halign", "Align"),
3009:                        SheetProperty.COMBOBOX);
3010:                spBCHAlign
3011:                        .setTags(new Tag[] {
3012:                                new Tag(
3013:                                        "Left",
3014:                                        it.businesslogic.ireport.util.I18n
3015:                                                .getString(
3016:                                                        "gui.elementpropertiessheet.halign.Left",
3017:                                                        "Left")),
3018:                                new Tag(
3019:                                        "Center",
3020:                                        it.businesslogic.ireport.util.I18n
3021:                                                .getString(
3022:                                                        "gui.elementpropertiessheet.halign.Center",
3023:                                                        "Center")),
3024:                                new Tag(
3025:                                        "Right",
3026:                                        it.businesslogic.ireport.util.I18n
3027:                                                .getString(
3028:                                                        "gui.elementpropertiessheet.halign.Right",
3029:                                                        "Right")) });
3030:                spBCHAlign.setDefaultValue("Left");
3031:
3032:                spBCVAlign = new SheetProperty("barcodeVAlign",
3033:                        it.businesslogic.ireport.util.I18n.getString(
3034:                                "gui.elementpropertiessheet.valign",
3035:                                "Vertical align"), SheetProperty.COMBOBOX);
3036:                spBCVAlign
3037:                        .setTags(new Tag[] {
3038:                                new Tag(
3039:                                        "Top",
3040:                                        it.businesslogic.ireport.util.I18n
3041:                                                .getString(
3042:                                                        "gui.elementpropertiessheet.valign.Top",
3043:                                                        "Top")),
3044:                                new Tag(
3045:                                        "Middle",
3046:                                        it.businesslogic.ireport.util.I18n
3047:                                                .getString(
3048:                                                        "gui.elementpropertiessheet.valign.Middle",
3049:                                                        "Middle")),
3050:                                new Tag(
3051:                                        "Bottom",
3052:                                        it.businesslogic.ireport.util.I18n
3053:                                                .getString(
3054:                                                        "gui.elementpropertiessheet.valign.Bottom",
3055:                                                        "Bottom")) });
3056:                spBCVAlign.setDefaultValue("Top");
3057:
3058:                spBCChecksum = new SheetProperty("barcodeChecksum",
3059:                        it.businesslogic.ireport.util.I18n.getString(
3060:                                "gui.elementpropertiessheet.barcodeChecksum",
3061:                                "Checksum"), SheetProperty.BOOLEAN);
3062:                spBCChecksum.setShowResetButton(false);
3063:
3064:                spBCShowText = new SheetProperty("barcodeShowText",
3065:                        it.businesslogic.ireport.util.I18n.getString(
3066:                                "gui.elementpropertiessheet.barcodeShowText",
3067:                                "Show Text"), SheetProperty.BOOLEAN);
3068:                spBCShowText.setShowResetButton(false);
3069:
3070:                spChartEvaluationTime = new SheetProperty(
3071:                        "chartEvaluationTime",
3072:                        it.businesslogic.ireport.util.I18n
3073:                                .getString(
3074:                                        "gui.elementpropertiessheet.textfieldEvaluationTime",
3075:                                        "Eval. time"), SheetProperty.COMBOBOX);
3076:                // Text field Evaluation Time...
3077:                fontsVec = new Vector();
3078:                fontsVec
3079:                        .addElement(new Tag(
3080:                                "Now",
3081:                                it.businesslogic.ireport.util.I18n
3082:                                        .getString(
3083:                                                "gui.elementpropertiessheet.textfieldEvaluationTime.Now",
3084:                                                "Now")));
3085:                fontsVec
3086:                        .addElement(new Tag(
3087:                                "Report",
3088:                                it.businesslogic.ireport.util.I18n
3089:                                        .getString(
3090:                                                "gui.elementpropertiessheet.textfieldEvaluationTime.Report",
3091:                                                "Report")));
3092:                fontsVec
3093:                        .addElement(new Tag(
3094:                                "Page",
3095:                                it.businesslogic.ireport.util.I18n
3096:                                        .getString(
3097:                                                "gui.elementpropertiessheet.textfieldEvaluationTime.Page",
3098:                                                "Page")));
3099:                fontsVec
3100:                        .addElement(new Tag(
3101:                                "Column",
3102:                                it.businesslogic.ireport.util.I18n
3103:                                        .getString(
3104:                                                "gui.elementpropertiessheet.textfieldEvaluationTime.Column",
3105:                                                "Column")));
3106:                fontsVec
3107:                        .addElement(new Tag(
3108:                                "Group",
3109:                                it.businesslogic.ireport.util.I18n
3110:                                        .getString(
3111:                                                "gui.elementpropertiessheet.textfieldEvaluationTime.Group",
3112:                                                "Group")));
3113:                fontsVec
3114:                        .addElement(new Tag(
3115:                                "Band",
3116:                                it.businesslogic.ireport.util.I18n
3117:                                        .getString(
3118:                                                "gui.elementpropertiessheet.textfieldEvaluationTime.Band",
3119:                                                "Bans")));
3120:                fontsVec
3121:                        .addElement(new Tag(
3122:                                "Auto",
3123:                                it.businesslogic.ireport.util.I18n
3124:                                        .getString(
3125:                                                "gui.elementpropertiessheet.textfieldEvaluationTime.Auto",
3126:                                                "Auto")));
3127:                spChartEvaluationTime.setTags(fontsVec);
3128:                spChartEvaluationTime.setDefaultValue("Now");
3129:                spChartEvaluationTime.setShowResetButton(false);
3130:
3131:                spChartEvaluationGroup = new ComboBoxSheetProperty(
3132:                        "chartEvaluationGroup",
3133:                        it.businesslogic.ireport.util.I18n
3134:                                .getString(
3135:                                        "gui.elementpropertiessheet.textfieldEvaluationGroup",
3136:                                        "Eval. group"));
3137:                spChartEvaluationGroup.setShowResetButton(false);
3138:            }
3139:
3140:            /**
3141:             * Update groups
3142:             */
3143:            protected void updateAllComboBoxes() {
3144:                if (jrf == null)
3145:                    return;
3146:                // Use the name of the group and not the group object....
3147:                Vector group_names = new Vector();
3148:                Enumeration e = jrf.getReport().getGroups().elements();
3149:                while (e.hasMoreElements()) {
3150:                    group_names.addElement("" + e.nextElement());
3151:                }
3152:
3153:                spTextfieldEvaluationGroup.updateValues(group_names, false);
3154:                spImageEvaluationGroup.updateValues(group_names, false);
3155:                spBCEvaluationGroup.updateValues(group_names, false);
3156:                spChartEvaluationGroup.updateValues(group_names, false);
3157:
3158:                group_names.insertElementAt("", 0);
3159:                spGroups.updateValues(group_names, false);
3160:
3161:                Vector styles = new Vector();
3162:                e = jrf.getReport().getStyles().elements();
3163:                while (e.hasMoreElements()) {
3164:                    styles.addElement(e.nextElement());
3165:                }
3166:                styles.insertElementAt("", 0);
3167:                spStyle.updateValues(styles, true);
3168:
3169:                updateBandsCell();
3170:
3171:            }
3172:
3173:            protected void updateBandsCell() {
3174:                // Put all the bands in a tag...
3175:                this .setInit(true);
3176:
3177:                if (jrf.getSelectedCrosstabEditorPanel() == null) {
3178:                    spBands.setName(it.businesslogic.ireport.util.I18n
3179:                            .getString("gui.elementpropertiessheet.band",
3180:                                    "Band"));
3181:                    Misc.updateComboBox((JComboBox) spBands.getEditor(), jrf
3182:                            .getReport().getBands(), false);
3183:                } else {
3184:                    spBands.setName(it.businesslogic.ireport.util.I18n
3185:                            .getString("gui.elementpropertiessheet.cell",
3186:                                    "Cell"));
3187:                    Misc.updateComboBox((JComboBox) spBands.getEditor(), jrf
3188:                            .getSelectedCrosstabEditorPanel()
3189:                            .getCrosstabElement().getCells(), false);
3190:                }
3191:
3192:                this .setInit(false);
3193:            }
3194:
3195:            public boolean isInit() {
3196:                return init;
3197:            }
3198:
3199:            public void setInit(boolean init) {
3200:                this .init = init;
3201:            }
3202:
3203:            public ComboBoxSheetProperty getSpBands() {
3204:                return spBands;
3205:            }
3206:
3207:            public void setSpBands(ComboBoxSheetProperty spBands) {
3208:                this .spBands = spBands;
3209:            }
3210:
3211:            public SheetProperty getSpTop() {
3212:                return spTop;
3213:            }
3214:
3215:            public void setSpTop(SheetProperty spTop) {
3216:                this .spTop = spTop;
3217:            }
3218:
3219:            public SheetProperty getSpLeft() {
3220:                return spLeft;
3221:            }
3222:
3223:            public void setSpLeft(SheetProperty spLeft) {
3224:                this .spLeft = spLeft;
3225:            }
3226:
3227:            public SheetProperty getSpHeight() {
3228:                return spHeight;
3229:            }
3230:
3231:            public void setSpHeight(SheetProperty spHeight) {
3232:                this .spHeight = spHeight;
3233:            }
3234:
3235:            public SheetProperty getSpWidth() {
3236:                return spWidth;
3237:            }
3238:
3239:            public void setSpWidth(SheetProperty spWidth) {
3240:                this .spWidth = spWidth;
3241:            }
3242:
3243:            public ComboBoxSheetProperty getSpGroups() {
3244:                return spGroups;
3245:            }
3246:
3247:            public void setSpGroups(ComboBoxSheetProperty spGroups) {
3248:                this .spGroups = spGroups;
3249:            }
3250:
3251:            public JReportFrame getJrf() {
3252:                return jrf;
3253:            }
3254:
3255:            public void setJrf(JReportFrame jrf) {
3256:                this .jrf = jrf;
3257:            }
3258:
3259:            /**
3260:             * Redraw the correct editor panel (JReportPanel or the active CrosstabPanel)
3261:             *
3262:             */
3263:            public void repaintEditor() {
3264:                if (jrf == null)
3265:                    return;
3266:                if (jrf.getSelectedCrosstabEditorPanel() == null) {
3267:                    jrf.getJPanelReport().repaint();
3268:                } else {
3269:                    jrf.getSelectedCrosstabEditorPanel().repaint();
3270:                }
3271:            }
3272:
3273:            public Vector getElementSelection() {
3274:                return elementSelection;
3275:
3276:            }
3277:
3278:            public void setElementSelection(Vector newElementSelection) {
3279:
3280:                this .elementSelection.removeAllElements();
3281:                if (newElementSelection == null)
3282:                    return;
3283:                this .elementSelection.addAll(newElementSelection);
3284:            }
3285:
3286:            protected void updateReportFonts() {
3287:                Object value = spPdfFontName.getValue();
3288:
3289:                Vector fontsVec = new Vector();
3290:                fontsVec.addElement(new Tag("Helvetica"));
3291:                fontsVec.addElement(new Tag("Helvetica-Bold"));
3292:                fontsVec.addElement(new Tag("Helvetica-BoldOblique"));
3293:                fontsVec.addElement(new Tag("Helvetica-Oblique"));
3294:                fontsVec.addElement(new Tag("Courier"));
3295:                fontsVec.addElement(new Tag("Courier-Bold"));
3296:                fontsVec.addElement(new Tag("Courier-BoldOblique"));
3297:                fontsVec.addElement(new Tag("Courier-Oblique"));
3298:                fontsVec.addElement(new Tag("Symbol"));
3299:                fontsVec.addElement(new Tag("Times-Roman"));
3300:                fontsVec.addElement(new Tag("Times-Bold"));
3301:                fontsVec.addElement(new Tag("Times-BoldItalic"));
3302:                fontsVec.addElement(new Tag("Times-Italic"));
3303:                fontsVec.addElement(new Tag("ZapfDingbats"));
3304:                fontsVec.addElement(new Tag("STSong-Light"));
3305:                fontsVec.addElement(new Tag("MHei-Medium"));
3306:                fontsVec.addElement(new Tag("MSung-Light"));
3307:                fontsVec.addElement(new Tag("HeiseiKakuGo-W5"));
3308:                fontsVec.addElement(new Tag("HeiseiMin-W3"));
3309:                fontsVec.addElement(new Tag("HYGoThic-Medium"));
3310:                fontsVec.addElement(new Tag("HYSMyeongJo-Medium"));
3311:                Vector iRfonts = MainFrame.getMainInstance().getTtfFonts();
3312:                for (int i_f = 0; i_f < iRfonts.size(); ++i_f) {
3313:                    fontsVec.addElement(new Tag(((IRFont) iRfonts
3314:                            .elementAt(i_f)).getFile(), iRfonts.elementAt(i_f)
3315:                            + ""));
3316:                }
3317:
3318:                Misc.updateComboBox((JComboBox) spPdfFontName.getEditor(),
3319:                        fontsVec);
3320:                spPdfFontName.setEditorValue(spPdfFontName.getEditor(), value);
3321:            }
3322:
3323:            public void reportBandsSelectionChanged(
3324:                    ReportBandsSelectionEvent evt) {
3325:            }
3326:
3327:            public void reportObjectsSelectionChanged(
3328:                    ReportObjectsSelectionEvent evt) {
3329:            }
3330:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.