Source Code Cross Referenced for JRTemplateText.java in  » Report » jasperreports-2.0.1 » net » sf » jasperreports » engine » fill » 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 » jasperreports 2.0.1 » net.sf.jasperreports.engine.fill 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


0001:        /*
0002:         * ============================================================================
0003:         * GNU Lesser General Public License
0004:         * ============================================================================
0005:         *
0006:         * JasperReports - Free Java report-generating library.
0007:         * Copyright (C) 2001-2006 JasperSoft Corporation http://www.jaspersoft.com
0008:         * 
0009:         * This library is free software; you can redistribute it and/or
0010:         * modify it under the terms of the GNU Lesser General Public
0011:         * License as published by the Free Software Foundation; either
0012:         * version 2.1 of the License, or (at your option) any later version.
0013:         * 
0014:         * This library is distributed in the hope that it will be useful,
0015:         * but WITHOUT ANY WARRANTY; without even the implied warranty of
0016:         * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
0017:         * Lesser General Public License for more details.
0018:         * 
0019:         * You should have received a copy of the GNU Lesser General Public
0020:         * License along with this library; if not, write to the Free Software
0021:         * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307, USA.
0022:         * 
0023:         * JasperSoft Corporation
0024:         * 303 Second Street, Suite 450 North
0025:         * San Francisco, CA 94107
0026:         * http://www.jaspersoft.com
0027:         */
0028:        package net.sf.jasperreports.engine.fill;
0029:
0030:        import java.awt.Color;
0031:        import java.io.IOException;
0032:        import java.io.ObjectInputStream;
0033:
0034:        import net.sf.jasperreports.engine.JRAlignment;
0035:        import net.sf.jasperreports.engine.JRBox;
0036:        import net.sf.jasperreports.engine.JRConstants;
0037:        import net.sf.jasperreports.engine.JRDefaultStyleProvider;
0038:        import net.sf.jasperreports.engine.JRElement;
0039:        import net.sf.jasperreports.engine.JRFont;
0040:        import net.sf.jasperreports.engine.JRHyperlink;
0041:        import net.sf.jasperreports.engine.JRHyperlinkHelper;
0042:        import net.sf.jasperreports.engine.JRReportFont;
0043:        import net.sf.jasperreports.engine.JRStaticText;
0044:        import net.sf.jasperreports.engine.JRStyle;
0045:        import net.sf.jasperreports.engine.JRTextElement;
0046:        import net.sf.jasperreports.engine.JRTextField;
0047:        import net.sf.jasperreports.engine.util.JRStyleResolver;
0048:
0049:        /**
0050:         * @author Teodor Danciu (teodord@users.sourceforge.net)
0051:         * @version $Id: JRTemplateText.java 1485 2006-11-14 18:23:17Z teodord $
0052:         */
0053:        public class JRTemplateText extends JRTemplateElement implements 
0054:                JRAlignment, JRBox, JRFont {
0055:
0056:            /**
0057:             *
0058:             */
0059:            private static final long serialVersionUID = JRConstants.SERIAL_VERSION_UID;
0060:
0061:            /**
0062:             *
0063:             */
0064:            private Byte horizontalAlignment = null;
0065:            private Byte verticalAlignment = null;
0066:            private Byte rotation = null;
0067:            private Byte lineSpacing = null;
0068:            private Boolean isStyledText = null;
0069:            private byte hyperlinkType = JRHyperlink.HYPERLINK_TYPE_NULL;
0070:            private String linkType;
0071:            private byte hyperlinkTarget = JRHyperlink.HYPERLINK_TARGET_SELF;
0072:
0073:            /**
0074:             *
0075:             */
0076:            protected Byte border;
0077:            protected Byte topBorder = null;
0078:            protected Byte leftBorder = null;
0079:            protected Byte bottomBorder = null;
0080:            protected Byte rightBorder = null;
0081:            protected Color borderColor = null;
0082:            protected Color topBorderColor = null;
0083:            protected Color leftBorderColor = null;
0084:            protected Color bottomBorderColor = null;
0085:            protected Color rightBorderColor = null;
0086:            protected Integer padding;
0087:            protected Integer topPadding = null;
0088:            protected Integer leftPadding = null;
0089:            protected Integer bottomPadding = null;
0090:            protected Integer rightPadding = null;
0091:
0092:            protected JRReportFont reportFont = null;
0093:            protected String fontName = null;
0094:            protected Boolean isBold = null;
0095:            protected Boolean isItalic = null;
0096:            protected Boolean isUnderline = null;
0097:            protected Boolean isStrikeThrough = null;
0098:            protected Integer fontSize = null;
0099:            protected String pdfFontName = null;
0100:            protected String pdfEncoding = null;
0101:            protected Boolean isPdfEmbedded = null;
0102:            protected String valueClassName;
0103:            protected String pattern;
0104:            protected String formatFactoryClass;
0105:            protected String localeCode;
0106:            protected String timeZoneId;
0107:
0108:            /**
0109:             *
0110:             */
0111:            protected JRTemplateText(
0112:                    JRDefaultStyleProvider defaultStyleProvider,
0113:                    JRStaticText staticText) {
0114:                super (defaultStyleProvider);
0115:
0116:                setStaticText(staticText);
0117:            }
0118:
0119:            /**
0120:             *
0121:             */
0122:            protected JRTemplateText(
0123:                    JRDefaultStyleProvider defaultStyleProvider,
0124:                    JRTextField textField) {
0125:                super (defaultStyleProvider);
0126:
0127:                setTextField(textField);
0128:            }
0129:
0130:            /**
0131:             *
0132:             */
0133:            protected void setStaticText(JRStaticText staticText) {
0134:                setTextElement(staticText);
0135:            }
0136:
0137:            /**
0138:             *
0139:             */
0140:            protected void setTextField(JRTextField textField) {
0141:                setTextElement(textField);
0142:
0143:                setLinkType(textField.getLinkType());
0144:                hyperlinkTarget = textField.getHyperlinkTarget();
0145:            }
0146:
0147:            /**
0148:             *
0149:             */
0150:            protected void setTextElement(JRTextElement textElement) {
0151:                super .setElement(textElement);
0152:
0153:                border = textElement.getOwnBorder();
0154:                topBorder = textElement.getOwnTopBorder();
0155:                leftBorder = textElement.getOwnLeftBorder();
0156:                bottomBorder = textElement.getOwnBottomBorder();
0157:                rightBorder = textElement.getOwnRightBorder();
0158:                borderColor = textElement.getOwnBorderColor();
0159:                topBorderColor = textElement.getOwnTopBorderColor();
0160:                leftBorderColor = textElement.getOwnLeftBorderColor();
0161:                bottomBorderColor = textElement.getOwnBottomBorderColor();
0162:                rightBorderColor = textElement.getOwnRightBorderColor();
0163:                padding = textElement.getOwnPadding();
0164:                topPadding = textElement.getOwnTopPadding();
0165:                leftPadding = textElement.getOwnLeftPadding();
0166:                bottomPadding = textElement.getOwnBottomPadding();
0167:                rightPadding = textElement.getOwnRightPadding();
0168:
0169:                reportFont = textElement.getReportFont();
0170:
0171:                fontName = textElement.getOwnFontName();
0172:                isBold = textElement.isOwnBold();
0173:                isItalic = textElement.isOwnItalic();
0174:                isUnderline = textElement.isOwnUnderline();
0175:                isStrikeThrough = textElement.isOwnStrikeThrough();
0176:                fontSize = textElement.getOwnFontSize();
0177:                pdfFontName = textElement.getOwnPdfFontName();
0178:                pdfEncoding = textElement.getOwnPdfEncoding();
0179:                isPdfEmbedded = textElement.isOwnPdfEmbedded();
0180:
0181:                horizontalAlignment = textElement.getOwnHorizontalAlignment();
0182:                verticalAlignment = textElement.getOwnVerticalAlignment();
0183:                rotation = textElement.getOwnRotation();
0184:                lineSpacing = textElement.getOwnLineSpacing();
0185:                isStyledText = textElement.isOwnStyledText();
0186:            }
0187:
0188:            /**
0189:             * 
0190:             */
0191:            protected JRFont getBaseFont() {
0192:                if (reportFont != null)
0193:                    return reportFont;
0194:                if (defaultStyleProvider != null)
0195:                    return defaultStyleProvider.getDefaultFont();
0196:                return null;
0197:            }
0198:
0199:            /**
0200:             *
0201:             */
0202:            public byte getMode() {
0203:                return JRStyleResolver
0204:                        .getMode(this , JRElement.MODE_TRANSPARENT);
0205:            }
0206:
0207:            /**
0208:             * @deprecated Replaced by {@link #getHorizontalAlignment()}.
0209:             */
0210:            public byte getTextAlignment() {
0211:                return getHorizontalAlignment();
0212:            }
0213:
0214:            /**
0215:             *
0216:             */
0217:            public byte getHorizontalAlignment() {
0218:                return JRStyleResolver.getHorizontalAlignment(this );
0219:            }
0220:
0221:            /**
0222:             *
0223:             */
0224:            public Byte getOwnHorizontalAlignment() {
0225:                return horizontalAlignment;
0226:            }
0227:
0228:            /**
0229:             *
0230:             */
0231:            public void setHorizontalAlignment(byte horizontalAlignment) {
0232:                this .horizontalAlignment = new Byte(horizontalAlignment);
0233:            }
0234:
0235:            /**
0236:             *
0237:             */
0238:            public void setHorizontalAlignment(Byte horizontalAlignment) {
0239:                this .horizontalAlignment = horizontalAlignment;
0240:            }
0241:
0242:            /**
0243:             *
0244:             */
0245:            public byte getVerticalAlignment() {
0246:                return JRStyleResolver.getVerticalAlignment(this );
0247:            }
0248:
0249:            /**
0250:             *
0251:             */
0252:            public Byte getOwnVerticalAlignment() {
0253:                return verticalAlignment;
0254:            }
0255:
0256:            /**
0257:             *
0258:             */
0259:            public void setVerticalAlignment(byte verticalAlignment) {
0260:                this .verticalAlignment = new Byte(verticalAlignment);
0261:            }
0262:
0263:            /**
0264:             *
0265:             */
0266:            public void setVerticalAlignment(Byte verticalAlignment) {
0267:                this .verticalAlignment = verticalAlignment;
0268:            }
0269:
0270:            /**
0271:             *
0272:             */
0273:            public byte getRotation() {
0274:                return JRStyleResolver.getRotation(this );
0275:            }
0276:
0277:            /**
0278:             *
0279:             */
0280:            public Byte getOwnRotation() {
0281:                return rotation;
0282:            }
0283:
0284:            /**
0285:             *
0286:             */
0287:            public byte getLineSpacing() {
0288:                return JRStyleResolver.getLineSpacing(this );
0289:            }
0290:
0291:            /**
0292:             *
0293:             */
0294:            public Byte getOwnLineSpacing() {
0295:                return lineSpacing;
0296:            }
0297:
0298:            /**
0299:             *
0300:             */
0301:            public boolean isStyledText() {
0302:                return JRStyleResolver.isStyledText(this );
0303:            }
0304:
0305:            /**
0306:             *
0307:             */
0308:            public Boolean isOwnStyledText() {
0309:                return isStyledText;
0310:            }
0311:
0312:            /**
0313:             * @deprecated
0314:             */
0315:            public JRBox getBox() {
0316:                return this ;
0317:            }
0318:
0319:            /**
0320:             * @deprecated
0321:             */
0322:            public JRFont getFont() {
0323:                return this ;
0324:            }
0325:
0326:            /**
0327:             * Retrieves the hyperlink type for the element.
0328:             * <p>
0329:             * The actual hyperlink type is determined by {@link #getLinkType() getLinkType()}.
0330:             * This method can is used to determine whether the hyperlink type is one of the
0331:             * built-in types or a custom type. 
0332:             * When hyperlink is of custom type, {@link JRHyperlink#HYPERLINK_TYPE_CUSTOM HYPERLINK_TYPE_CUSTOM} is returned.
0333:             * </p>
0334:             * @return one of the hyperlink type constants
0335:             * @see #getLinkType()
0336:             */
0337:            public byte getHyperlinkType() {
0338:                return JRHyperlinkHelper.getHyperlinkType(getLinkType());
0339:            }
0340:
0341:            /**
0342:             *
0343:             */
0344:            public byte getHyperlinkTarget() {
0345:                return hyperlinkTarget;
0346:            }
0347:
0348:            /**
0349:             *
0350:             */
0351:            public byte getBorder() {
0352:                return JRStyleResolver.getBorder(this );
0353:            }
0354:
0355:            public Byte getOwnBorder() {
0356:                return border;
0357:            }
0358:
0359:            /**
0360:             *
0361:             */
0362:            public void setBorder(byte border) {
0363:                this .border = new Byte(border);
0364:            }
0365:
0366:            /**
0367:             *
0368:             */
0369:            public Color getBorderColor() {
0370:                return JRStyleResolver.getBorderColor(this , getForecolor());
0371:            }
0372:
0373:            public Color getOwnBorderColor() {
0374:                return borderColor;
0375:            }
0376:
0377:            /**
0378:             *
0379:             */
0380:            public void setBorderColor(Color borderColor) {
0381:                this .borderColor = borderColor;
0382:            }
0383:
0384:            /**
0385:             *
0386:             */
0387:            public int getPadding() {
0388:                return JRStyleResolver.getPadding(this );
0389:            }
0390:
0391:            public Integer getOwnPadding() {
0392:                return padding;
0393:            }
0394:
0395:            /**
0396:             *
0397:             */
0398:            public void setPadding(int padding) {
0399:                this .padding = new Integer(padding);
0400:            }
0401:
0402:            /**
0403:             *
0404:             */
0405:            public byte getTopBorder() {
0406:                return JRStyleResolver.getTopBorder(this );
0407:            }
0408:
0409:            /**
0410:             *
0411:             */
0412:            public Byte getOwnTopBorder() {
0413:                return topBorder;
0414:            }
0415:
0416:            /**
0417:             *
0418:             */
0419:            public void setTopBorder(byte topBorder) {
0420:                this .topBorder = new Byte(topBorder);
0421:            }
0422:
0423:            /**
0424:             *
0425:             */
0426:            public Color getTopBorderColor() {
0427:                return JRStyleResolver.getTopBorderColor(this , getForecolor());
0428:            }
0429:
0430:            /**
0431:             *
0432:             */
0433:            public Color getOwnTopBorderColor() {
0434:                return topBorderColor;
0435:            }
0436:
0437:            /**
0438:             *
0439:             */
0440:            public void setTopBorderColor(Color topBorderColor) {
0441:                this .topBorderColor = topBorderColor;
0442:            }
0443:
0444:            /**
0445:             *
0446:             */
0447:            public int getTopPadding() {
0448:                return JRStyleResolver.getTopPadding(this );
0449:            }
0450:
0451:            /**
0452:             *
0453:             */
0454:            public Integer getOwnTopPadding() {
0455:                return topPadding;
0456:            }
0457:
0458:            /**
0459:             *
0460:             */
0461:            public void setTopPadding(int topPadding) {
0462:                this .topPadding = new Integer(topPadding);
0463:            }
0464:
0465:            /**
0466:             *
0467:             */
0468:            public byte getLeftBorder() {
0469:                return JRStyleResolver.getLeftBorder(this );
0470:            }
0471:
0472:            /**
0473:             *
0474:             */
0475:            public Byte getOwnLeftBorder() {
0476:                return leftBorder;
0477:            }
0478:
0479:            /**
0480:             *
0481:             */
0482:            public void setLeftBorder(byte leftBorder) {
0483:                this .leftBorder = new Byte(leftBorder);
0484:            }
0485:
0486:            /**
0487:             *
0488:             */
0489:            public Color getLeftBorderColor() {
0490:                return JRStyleResolver.getLeftBorderColor(this , getForecolor());
0491:            }
0492:
0493:            /**
0494:             *
0495:             */
0496:            public Color getOwnLeftBorderColor() {
0497:                return leftBorderColor;
0498:            }
0499:
0500:            /**
0501:             *
0502:             */
0503:            public void setLeftBorderColor(Color leftBorderColor) {
0504:                this .leftBorderColor = leftBorderColor;
0505:            }
0506:
0507:            /**
0508:             *
0509:             */
0510:            public int getLeftPadding() {
0511:                return JRStyleResolver.getLeftPadding(this );
0512:            }
0513:
0514:            /**
0515:             *
0516:             */
0517:            public Integer getOwnLeftPadding() {
0518:                return leftPadding;
0519:            }
0520:
0521:            /**
0522:             *
0523:             */
0524:            public void setLeftPadding(int leftPadding) {
0525:                this .leftPadding = new Integer(leftPadding);
0526:            }
0527:
0528:            /**
0529:             *
0530:             */
0531:            public byte getBottomBorder() {
0532:                return JRStyleResolver.getBottomBorder(this );
0533:            }
0534:
0535:            /**
0536:             *
0537:             */
0538:            public Byte getOwnBottomBorder() {
0539:                return bottomBorder;
0540:            }
0541:
0542:            /**
0543:             *
0544:             */
0545:            public void setBottomBorder(byte bottomBorder) {
0546:                this .bottomBorder = new Byte(bottomBorder);
0547:            }
0548:
0549:            /**
0550:             *
0551:             */
0552:            public Color getBottomBorderColor() {
0553:                return JRStyleResolver.getBottomBorderColor(this ,
0554:                        getForecolor());
0555:            }
0556:
0557:            /**
0558:             *
0559:             */
0560:            public Color getOwnBottomBorderColor() {
0561:                return bottomBorderColor;
0562:            }
0563:
0564:            /**
0565:             *
0566:             */
0567:            public void setBottomBorderColor(Color bottomBorderColor) {
0568:                this .bottomBorderColor = bottomBorderColor;
0569:            }
0570:
0571:            /**
0572:             *
0573:             */
0574:            public int getBottomPadding() {
0575:                return JRStyleResolver.getBottomPadding(this );
0576:            }
0577:
0578:            /**
0579:             *
0580:             */
0581:            public Integer getOwnBottomPadding() {
0582:                return bottomPadding;
0583:            }
0584:
0585:            /**
0586:             *
0587:             */
0588:            public void setBottomPadding(int bottomPadding) {
0589:                this .bottomPadding = new Integer(bottomPadding);
0590:            }
0591:
0592:            /**
0593:             *
0594:             */
0595:            public byte getRightBorder() {
0596:                return JRStyleResolver.getRightBorder(this );
0597:            }
0598:
0599:            /**
0600:             *
0601:             */
0602:            public Byte getOwnRightBorder() {
0603:                return rightBorder;
0604:            }
0605:
0606:            /**
0607:             *
0608:             */
0609:            public void setRightBorder(byte rightBorder) {
0610:                this .rightBorder = new Byte(rightBorder);
0611:            }
0612:
0613:            /**
0614:             *
0615:             */
0616:            public Color getRightBorderColor() {
0617:                return JRStyleResolver
0618:                        .getRightBorderColor(this , getForecolor());
0619:            }
0620:
0621:            /**
0622:             *
0623:             */
0624:            public Color getOwnRightBorderColor() {
0625:                return rightBorderColor;
0626:            }
0627:
0628:            /**
0629:             *
0630:             */
0631:            public void setRightBorderColor(Color rightBorderColor) {
0632:                this .rightBorderColor = rightBorderColor;
0633:            }
0634:
0635:            /**
0636:             *
0637:             */
0638:            public int getRightPadding() {
0639:                return JRStyleResolver.getRightPadding(this );
0640:            }
0641:
0642:            /**
0643:             *
0644:             */
0645:            public Integer getOwnRightPadding() {
0646:                return rightPadding;
0647:            }
0648:
0649:            /**
0650:             *
0651:             */
0652:            public void setRightPadding(int rightPadding) {
0653:                this .rightPadding = new Integer(rightPadding);
0654:            }
0655:
0656:            /**
0657:             *
0658:             */
0659:            public JRReportFont getReportFont() {
0660:                return reportFont;
0661:            }
0662:
0663:            /**
0664:             *
0665:             */
0666:            public void setReportFont(JRReportFont reportFont) {
0667:                this .reportFont = reportFont;
0668:            }
0669:
0670:            /**
0671:             *
0672:             */
0673:            public String getFontName() {
0674:                return JRStyleResolver.getFontName(this );
0675:            }
0676:
0677:            /**
0678:             *
0679:             */
0680:            public String getOwnFontName() {
0681:                return fontName;
0682:            }
0683:
0684:            /**
0685:             *
0686:             */
0687:            public void setFontName(String fontName) {
0688:                this .fontName = fontName;
0689:            }
0690:
0691:            /**
0692:             *
0693:             */
0694:            public boolean isBold() {
0695:                return JRStyleResolver.isBold(this );
0696:            }
0697:
0698:            /**
0699:             *
0700:             */
0701:            public Boolean isOwnBold() {
0702:                return isBold;
0703:            }
0704:
0705:            /**
0706:             *
0707:             */
0708:            public void setBold(boolean isBold) {
0709:                setBold(isBold ? Boolean.TRUE : Boolean.FALSE);
0710:            }
0711:
0712:            /**
0713:             * Alternative setBold method which allows also to reset
0714:             * the "own" isBold property.
0715:             */
0716:            public void setBold(Boolean isBold) {
0717:                this .isBold = isBold;
0718:            }
0719:
0720:            /**
0721:             *
0722:             */
0723:            public boolean isItalic() {
0724:                return JRStyleResolver.isItalic(this );
0725:            }
0726:
0727:            /**
0728:             *
0729:             */
0730:            public Boolean isOwnItalic() {
0731:                return isItalic;
0732:            }
0733:
0734:            /**
0735:             *
0736:             */
0737:            public void setItalic(boolean isItalic) {
0738:                setItalic(isItalic ? Boolean.TRUE : Boolean.FALSE);
0739:            }
0740:
0741:            /**
0742:             * Alternative setItalic method which allows also to reset
0743:             * the "own" isItalic property.
0744:             */
0745:            public void setItalic(Boolean isItalic) {
0746:                this .isItalic = isItalic;
0747:            }
0748:
0749:            /**
0750:             *
0751:             */
0752:            public boolean isUnderline() {
0753:                return JRStyleResolver.isUnderline(this );
0754:            }
0755:
0756:            /**
0757:             *
0758:             */
0759:            public Boolean isOwnUnderline() {
0760:                return isUnderline;
0761:            }
0762:
0763:            /**
0764:             *
0765:             */
0766:            public void setUnderline(boolean isUnderline) {
0767:                setUnderline(isUnderline ? Boolean.TRUE : Boolean.FALSE);
0768:            }
0769:
0770:            /**
0771:             * Alternative setUnderline method which allows also to reset
0772:             * the "own" isUnderline property.
0773:             */
0774:            public void setUnderline(Boolean isUnderline) {
0775:                this .isUnderline = isUnderline;
0776:            }
0777:
0778:            /**
0779:             *
0780:             */
0781:            public boolean isStrikeThrough() {
0782:                return JRStyleResolver.isStrikeThrough(this );
0783:            }
0784:
0785:            /**
0786:             *
0787:             */
0788:            public Boolean isOwnStrikeThrough() {
0789:                return isStrikeThrough;
0790:            }
0791:
0792:            /**
0793:             *
0794:             */
0795:            public void setStrikeThrough(boolean isStrikeThrough) {
0796:                setStrikeThrough(isStrikeThrough ? Boolean.TRUE : Boolean.FALSE);
0797:            }
0798:
0799:            /**
0800:             * Alternative setStrikeThrough method which allows also to reset
0801:             * the "own" isStrikeThrough property.
0802:             */
0803:            public void setStrikeThrough(Boolean isStrikeThrough) {
0804:                this .isStrikeThrough = isStrikeThrough;
0805:            }
0806:
0807:            /**
0808:             *
0809:             */
0810:            public int getFontSize() {
0811:                return JRStyleResolver.getFontSize(this );
0812:            }
0813:
0814:            /**
0815:             *
0816:             */
0817:            public Integer getOwnFontSize() {
0818:                return fontSize;
0819:            }
0820:
0821:            /**
0822:             *
0823:             */
0824:            public void setFontSize(int fontSize) {
0825:                setFontSize(new Integer(fontSize));
0826:            }
0827:
0828:            /**
0829:             * Alternative setSize method which allows also to reset
0830:             * the "own" size property.
0831:             */
0832:            public void setFontSize(Integer fontSize) {
0833:                this .fontSize = fontSize;
0834:            }
0835:
0836:            /**
0837:             * @deprecated Replaced by {@link #getFontSize()}.
0838:             */
0839:            public int getSize() {
0840:                return getFontSize();
0841:            }
0842:
0843:            /**
0844:             * @deprecated Replaced by {@link #getOwnFontSize()}.
0845:             */
0846:            public Integer getOwnSize() {
0847:                return getOwnFontSize();
0848:            }
0849:
0850:            /**
0851:             * @deprecated Replaced by {@link #setFontSize(int)}.
0852:             */
0853:            public void setSize(int size) {
0854:                setFontSize(size);
0855:            }
0856:
0857:            /**
0858:             * @deprecated Replaced by {@link #setFontSize(Integer)}.
0859:             */
0860:            public void setSize(Integer size) {
0861:                setFontSize(size);
0862:            }
0863:
0864:            /**
0865:             *
0866:             */
0867:            public String getPdfFontName() {
0868:                return JRStyleResolver.getPdfFontName(this );
0869:            }
0870:
0871:            /**
0872:             *
0873:             */
0874:            public String getOwnPdfFontName() {
0875:                return pdfFontName;
0876:            }
0877:
0878:            /**
0879:             *
0880:             */
0881:            public void setPdfFontName(String pdfFontName) {
0882:                this .pdfFontName = pdfFontName;
0883:            }
0884:
0885:            /**
0886:             *
0887:             */
0888:            public String getPdfEncoding() {
0889:                return JRStyleResolver.getPdfEncoding(this );
0890:            }
0891:
0892:            /**
0893:             *
0894:             */
0895:            public String getOwnPdfEncoding() {
0896:                return pdfEncoding;
0897:            }
0898:
0899:            /**
0900:             *
0901:             */
0902:            public void setPdfEncoding(String pdfEncoding) {
0903:                this .pdfEncoding = pdfEncoding;
0904:            }
0905:
0906:            /**
0907:             *
0908:             */
0909:            public boolean isPdfEmbedded() {
0910:                return JRStyleResolver.isPdfEmbedded(this );
0911:            }
0912:
0913:            /**
0914:             *
0915:             */
0916:            public Boolean isOwnPdfEmbedded() {
0917:                return isPdfEmbedded;
0918:            }
0919:
0920:            /**
0921:             *
0922:             */
0923:            public void setPdfEmbedded(boolean isPdfEmbedded) {
0924:                setPdfEmbedded(isPdfEmbedded ? Boolean.TRUE : Boolean.FALSE);
0925:            }
0926:
0927:            /**
0928:             * Alternative setPdfEmbedded method which allows also to reset
0929:             * the "own" isPdfEmbedded property.
0930:             */
0931:            public void setPdfEmbedded(Boolean isPdfEmbedded) {
0932:                this .isPdfEmbedded = isPdfEmbedded;
0933:            }
0934:
0935:            /**
0936:             *
0937:             */
0938:            public void setBorder(Byte border) {
0939:                this .border = border;
0940:            }
0941:
0942:            /**
0943:             *
0944:             */
0945:            public void setPadding(Integer padding) {
0946:                this .padding = padding;
0947:            }
0948:
0949:            /**
0950:             *
0951:             */
0952:            public void setTopBorder(Byte topBorder) {
0953:                this .topBorder = topBorder;
0954:            }
0955:
0956:            /**
0957:             *
0958:             */
0959:            public void setTopPadding(Integer topPadding) {
0960:                this .topPadding = topPadding;
0961:            }
0962:
0963:            /**
0964:             *
0965:             */
0966:            public void setLeftBorder(Byte leftBorder) {
0967:                this .leftBorder = leftBorder;
0968:            }
0969:
0970:            /**
0971:             *
0972:             */
0973:            public void setLeftPadding(Integer leftPadding) {
0974:                this .leftPadding = leftPadding;
0975:            }
0976:
0977:            /**
0978:             *
0979:             */
0980:            public void setBottomBorder(Byte bottomBorder) {
0981:                this .bottomBorder = bottomBorder;
0982:            }
0983:
0984:            /**
0985:             *
0986:             */
0987:            public void setBottomPadding(Integer bottomPadding) {
0988:                this .bottomPadding = bottomPadding;
0989:            }
0990:
0991:            /**
0992:             *
0993:             */
0994:            public void setRightBorder(Byte rightBorder) {
0995:                this .rightBorder = rightBorder;
0996:            }
0997:
0998:            /**
0999:             *
1000:             */
1001:            public void setRightPadding(Integer rightPadding) {
1002:                this .rightPadding = rightPadding;
1003:            }
1004:
1005:            /**
1006:             *
1007:             */
1008:            public JRStyle getStyle() {
1009:                return parentStyle;
1010:            }
1011:
1012:            public String getPattern() {
1013:                return pattern;
1014:            }
1015:
1016:            public void setPattern(String pattern) {
1017:                this .pattern = pattern;
1018:            }
1019:
1020:            public String getValueClassName() {
1021:                return valueClassName;
1022:            }
1023:
1024:            public void setValueClassName(String valueClassName) {
1025:                this .valueClassName = valueClassName;
1026:            }
1027:
1028:            public String getFormatFactoryClass() {
1029:                return formatFactoryClass;
1030:            }
1031:
1032:            public void setFormatFactoryClass(String formatFactoryClass) {
1033:                this .formatFactoryClass = formatFactoryClass;
1034:            }
1035:
1036:            public String getLocaleCode() {
1037:                return localeCode;
1038:            }
1039:
1040:            public void setLocaleCode(String localeCode) {
1041:                this .localeCode = localeCode;
1042:            }
1043:
1044:            public String getTimeZoneId() {
1045:                return timeZoneId;
1046:            }
1047:
1048:            public void setTimeZoneId(String timeZoneId) {
1049:                this .timeZoneId = timeZoneId;
1050:            }
1051:
1052:            /**
1053:             * Returns the hyperlink type.
1054:             * <p>
1055:             * The type can be one of the built-in types
1056:             * (Reference, LocalAnchor, LocalPage, RemoteAnchor, RemotePage),
1057:             * or can be an arbitrary type.
1058:             * </p>
1059:             * @return the hyperlink type
1060:             */
1061:            public String getLinkType() {
1062:                return linkType;
1063:            }
1064:
1065:            /**
1066:             * Sets the hyperlink type.
1067:             * <p>
1068:             * The type can be one of the built-in types
1069:             * (Reference, LocalAnchor, LocalPage, RemoteAnchor, RemotePage),
1070:             * or can be an arbitrary type.
1071:             * </p>
1072:             * @param linkType the hyperlink type
1073:             */
1074:            public void setLinkType(String linkType) {
1075:                this .linkType = linkType;
1076:            }
1077:
1078:            private void readObject(ObjectInputStream in) throws IOException,
1079:                    ClassNotFoundException {
1080:                in.defaultReadObject();
1081:                normalizeLinkType();
1082:            }
1083:
1084:            protected void normalizeLinkType() {
1085:                if (linkType == null) {
1086:                    linkType = JRHyperlinkHelper.getLinkType(hyperlinkType);
1087:                }
1088:                hyperlinkType = JRHyperlink.HYPERLINK_TYPE_NULL;
1089:            }
1090:
1091:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.