Source Code Cross Referenced for JRBasePrintText.java in  » Report » jasperreports-2.0.1 » net » sf » jasperreports » engine » base » 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.base 
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.base;
0029:
0030:        import java.awt.Color;
0031:        import java.io.IOException;
0032:        import java.io.ObjectInputStream;
0033:
0034:        import net.sf.jasperreports.engine.JRAnchor;
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.JRPrintHyperlinkParameter;
0043:        import net.sf.jasperreports.engine.JRPrintHyperlinkParameters;
0044:        import net.sf.jasperreports.engine.JRPrintText;
0045:        import net.sf.jasperreports.engine.JRReportFont;
0046:        import net.sf.jasperreports.engine.util.JRStyleResolver;
0047:
0048:        /**
0049:         * @author Teodor Danciu (teodord@users.sourceforge.net)
0050:         * @version $Id: JRBasePrintText.java 1485 2006-11-14 18:23:17Z teodord $
0051:         */
0052:        public class JRBasePrintText extends JRBasePrintElement implements 
0053:                JRPrintText {
0054:
0055:            /**
0056:             *
0057:             */
0058:            private static final long serialVersionUID = JRConstants.SERIAL_VERSION_UID;
0059:
0060:            /**
0061:             *
0062:             */
0063:            protected String text = "";
0064:            protected float lineSpacingFactor = 0;
0065:            protected float leadingOffset = 0;
0066:            protected Byte horizontalAlignment = null;
0067:            protected Byte verticalAlignment = null;
0068:            protected Byte rotation = null;
0069:            protected byte runDirection = RUN_DIRECTION_LTR;
0070:            protected float textHeight = 0;
0071:            protected Byte lineSpacing = null;
0072:            protected Boolean isStyledText = null;
0073:            protected String anchorName = null;
0074:            protected byte hyperlinkType = JRHyperlink.HYPERLINK_TYPE_NULL;
0075:            private String linkType;
0076:            protected byte hyperlinkTarget = JRHyperlink.HYPERLINK_TARGET_SELF;
0077:            protected String hyperlinkReference = null;
0078:            protected String hyperlinkAnchor = null;
0079:            protected Integer hyperlinkPage = null;
0080:            protected String hyperlinkTooltip;
0081:            protected JRPrintHyperlinkParameters hyperlinkParameters;
0082:
0083:            /**
0084:             * The bookmark level for the anchor associated with this field.
0085:             * @see JRAnchor#getBookmarkLevel()
0086:             */
0087:            protected int bookmarkLevel = JRAnchor.NO_BOOKMARK;
0088:
0089:            /**
0090:             *
0091:             */
0092:            protected Byte border;
0093:            protected Byte topBorder = null;
0094:            protected Byte leftBorder = null;
0095:            protected Byte bottomBorder = null;
0096:            protected Byte rightBorder = null;
0097:            protected Color borderColor = null;
0098:            protected Color topBorderColor = null;
0099:            protected Color leftBorderColor = null;
0100:            protected Color bottomBorderColor = null;
0101:            protected Color rightBorderColor = null;
0102:            protected Integer padding;
0103:            protected Integer topPadding = null;
0104:            protected Integer leftPadding = null;
0105:            protected Integer bottomPadding = null;
0106:            protected Integer rightPadding = null;
0107:
0108:            protected JRReportFont reportFont = null;
0109:            protected String fontName = null;
0110:            protected Boolean isBold = null;
0111:            protected Boolean isItalic = null;
0112:            protected Boolean isUnderline = null;
0113:            protected Boolean isStrikeThrough = null;
0114:            protected Integer fontSize = null;
0115:            protected String pdfFontName = null;
0116:            protected String pdfEncoding = null;
0117:            protected Boolean isPdfEmbedded = null;
0118:
0119:            protected String valueClassName;
0120:            protected String pattern;
0121:            protected String formatFactoryClass;
0122:            protected String localeCode;
0123:            protected String timeZoneId;
0124:
0125:            /**
0126:             *
0127:             */
0128:            public JRBasePrintText(JRDefaultStyleProvider defaultStyleProvider) {
0129:                super (defaultStyleProvider);
0130:            }
0131:
0132:            /**
0133:             *
0134:             */
0135:            public byte getMode() {
0136:                return JRStyleResolver
0137:                        .getMode(this , JRElement.MODE_TRANSPARENT);
0138:            }
0139:
0140:            /**
0141:             *
0142:             */
0143:            public String getText() {
0144:                return text;
0145:            }
0146:
0147:            /**
0148:             *
0149:             */
0150:            public void setText(String text) {
0151:                this .text = text;
0152:            }
0153:
0154:            /**
0155:             *
0156:             */
0157:            public float getLineSpacingFactor() {
0158:                return lineSpacingFactor;
0159:            }
0160:
0161:            /**
0162:             *
0163:             */
0164:            public void setLineSpacingFactor(float lineSpacingFactor) {
0165:                this .lineSpacingFactor = lineSpacingFactor;
0166:            }
0167:
0168:            /**
0169:             *
0170:             */
0171:            public float getLeadingOffset() {
0172:                return leadingOffset;
0173:            }
0174:
0175:            /**
0176:             *
0177:             */
0178:            public void setLeadingOffset(float leadingOffset) {
0179:                this .leadingOffset = leadingOffset;
0180:            }
0181:
0182:            /**
0183:             * @deprecated Replaced by {@link #getHorizontalAlignment()}.
0184:             */
0185:            public byte getTextAlignment() {
0186:                return getHorizontalAlignment();
0187:            }
0188:
0189:            /**
0190:             * @deprecated Replaced by {@link #setHorizontalAlignment(byte)}.
0191:             */
0192:            public void setTextAlignment(byte horizontalAlignment) {
0193:                setHorizontalAlignment(horizontalAlignment);
0194:            }
0195:
0196:            /**
0197:             *
0198:             */
0199:            public byte getHorizontalAlignment() {
0200:                return JRStyleResolver.getHorizontalAlignment(this );
0201:            }
0202:
0203:            public Byte getOwnHorizontalAlignment() {
0204:                return horizontalAlignment;
0205:            }
0206:
0207:            /**
0208:             *
0209:             */
0210:            public void setHorizontalAlignment(byte horizontalAlignment) {
0211:                this .horizontalAlignment = new Byte(horizontalAlignment);
0212:            }
0213:
0214:            /**
0215:             *
0216:             */
0217:            public void setHorizontalAlignment(Byte horizontalAlignment) {
0218:                this .horizontalAlignment = horizontalAlignment;
0219:            }
0220:
0221:            /**
0222:             *
0223:             */
0224:            public byte getVerticalAlignment() {
0225:                return JRStyleResolver.getVerticalAlignment(this );
0226:            }
0227:
0228:            public Byte getOwnVerticalAlignment() {
0229:                return verticalAlignment;
0230:            }
0231:
0232:            /**
0233:             *
0234:             */
0235:            public void setVerticalAlignment(byte verticalAlignment) {
0236:                this .verticalAlignment = new Byte(verticalAlignment);
0237:            }
0238:
0239:            /**
0240:             *
0241:             */
0242:            public void setVerticalAlignment(Byte verticalAlignment) {
0243:                this .verticalAlignment = verticalAlignment;
0244:            }
0245:
0246:            /**
0247:             *
0248:             */
0249:            public byte getRotation() {
0250:                return JRStyleResolver.getRotation(this );
0251:            }
0252:
0253:            public Byte getOwnRotation() {
0254:                return rotation;
0255:            }
0256:
0257:            /**
0258:             *
0259:             */
0260:            public void setRotation(byte rotation) {
0261:                this .rotation = new Byte(rotation);
0262:            }
0263:
0264:            /**
0265:             *
0266:             */
0267:            public void setRotation(Byte rotation) {
0268:                this .rotation = rotation;
0269:            }
0270:
0271:            /**
0272:             *
0273:             */
0274:            public byte getRunDirection() {
0275:                return runDirection;
0276:            }
0277:
0278:            /**
0279:             *
0280:             */
0281:            public void setRunDirection(byte runDirection) {
0282:                this .runDirection = runDirection;
0283:            }
0284:
0285:            /**
0286:             *
0287:             */
0288:            public float getTextHeight() {
0289:                return textHeight;
0290:            }
0291:
0292:            /**
0293:             *
0294:             */
0295:            public void setTextHeight(float textHeight) {
0296:                this .textHeight = textHeight;
0297:            }
0298:
0299:            /**
0300:             *
0301:             */
0302:            public byte getLineSpacing() {
0303:                return JRStyleResolver.getLineSpacing(this );
0304:            }
0305:
0306:            public Byte getOwnLineSpacing() {
0307:                return lineSpacing;
0308:            }
0309:
0310:            /**
0311:             *
0312:             */
0313:            public void setLineSpacing(byte lineSpacing) {
0314:                this .lineSpacing = new Byte(lineSpacing);
0315:            }
0316:
0317:            /**
0318:             *
0319:             */
0320:            public void setLineSpacing(Byte lineSpacing) {
0321:                this .lineSpacing = lineSpacing;
0322:            }
0323:
0324:            /**
0325:             *
0326:             */
0327:            public boolean isStyledText() {
0328:                return JRStyleResolver.isStyledText(this );
0329:            }
0330:
0331:            public Boolean isOwnStyledText() {
0332:                return isStyledText;
0333:            }
0334:
0335:            /**
0336:             *
0337:             */
0338:            public void setStyledText(boolean isStyledText) {
0339:                setStyledText(isStyledText ? Boolean.TRUE : Boolean.FALSE);
0340:            }
0341:
0342:            /**
0343:             *
0344:             */
0345:            public void setStyledText(Boolean isStyledText) {
0346:                this .isStyledText = isStyledText;
0347:            }
0348:
0349:            /**
0350:             * @deprecated
0351:             */
0352:            public JRBox getBox() {
0353:                return this ;
0354:            }
0355:
0356:            /**
0357:             * @deprecated
0358:             */
0359:            public void setBox(JRBox box) {
0360:                border = box.getOwnBorder();
0361:                topBorder = box.getOwnTopBorder();
0362:                leftBorder = box.getOwnLeftBorder();
0363:                bottomBorder = box.getOwnBottomBorder();
0364:                rightBorder = box.getOwnRightBorder();
0365:                borderColor = box.getOwnBorderColor();
0366:                topBorderColor = box.getOwnTopBorderColor();
0367:                leftBorderColor = box.getOwnLeftBorderColor();
0368:                bottomBorderColor = box.getOwnBottomBorderColor();
0369:                rightBorderColor = box.getOwnRightBorderColor();
0370:                padding = box.getOwnPadding();
0371:                topPadding = box.getOwnTopPadding();
0372:                leftPadding = box.getOwnLeftPadding();
0373:                bottomPadding = box.getOwnBottomPadding();
0374:                rightPadding = box.getOwnRightPadding();
0375:            }
0376:
0377:            /**
0378:             * @deprecated
0379:             */
0380:            public JRFont getFont() {
0381:                return this ;
0382:            }
0383:
0384:            /**
0385:             * @deprecated
0386:             */
0387:            public void setFont(JRFont font) {
0388:                reportFont = font.getReportFont();
0389:
0390:                fontName = font.getOwnFontName();
0391:                isBold = font.isOwnBold();
0392:                isItalic = font.isOwnItalic();
0393:                isUnderline = font.isOwnUnderline();
0394:                isStrikeThrough = font.isOwnStrikeThrough();
0395:                fontSize = font.getOwnSize();
0396:                pdfFontName = font.getOwnPdfFontName();
0397:                pdfEncoding = font.getOwnPdfEncoding();
0398:                isPdfEmbedded = font.isOwnPdfEmbedded();
0399:            }
0400:
0401:            /**
0402:             *
0403:             */
0404:            public String getAnchorName() {
0405:                return anchorName;
0406:            }
0407:
0408:            /**
0409:             *
0410:             */
0411:            public void setAnchorName(String anchorName) {
0412:                this .anchorName = anchorName;
0413:            }
0414:
0415:            /**
0416:             *
0417:             */
0418:            public byte getHyperlinkType() {
0419:                return JRHyperlinkHelper.getHyperlinkType(getLinkType());
0420:            }
0421:
0422:            /**
0423:             *
0424:             */
0425:            public void setHyperlinkType(byte hyperlinkType) {
0426:                setLinkType(JRHyperlinkHelper.getLinkType(hyperlinkType));
0427:            }
0428:
0429:            /**
0430:             *
0431:             */
0432:            public byte getHyperlinkTarget() {
0433:                return hyperlinkTarget;
0434:            }
0435:
0436:            /**
0437:             *
0438:             */
0439:            public void setHyperlinkTarget(byte hyperlinkTarget) {
0440:                this .hyperlinkTarget = hyperlinkTarget;
0441:            }
0442:
0443:            /**
0444:             *
0445:             */
0446:            public String getHyperlinkReference() {
0447:                return hyperlinkReference;
0448:            }
0449:
0450:            /**
0451:             *
0452:             */
0453:            public void setHyperlinkReference(String hyperlinkReference) {
0454:                this .hyperlinkReference = hyperlinkReference;
0455:            }
0456:
0457:            /**
0458:             *
0459:             */
0460:            public String getHyperlinkAnchor() {
0461:                return hyperlinkAnchor;
0462:            }
0463:
0464:            /**
0465:             *
0466:             */
0467:            public void setHyperlinkAnchor(String hyperlinkAnchor) {
0468:                this .hyperlinkAnchor = hyperlinkAnchor;
0469:            }
0470:
0471:            /**
0472:             *
0473:             */
0474:            public Integer getHyperlinkPage() {
0475:                return hyperlinkPage;
0476:            }
0477:
0478:            /**
0479:             *
0480:             */
0481:            public void setHyperlinkPage(Integer hyperlinkPage) {
0482:                this .hyperlinkPage = hyperlinkPage;
0483:            }
0484:
0485:            /**
0486:             *
0487:             */
0488:            public void setHyperlinkPage(String hyperlinkPage) {
0489:                this .hyperlinkPage = new Integer(hyperlinkPage);
0490:            }
0491:
0492:            public int getBookmarkLevel() {
0493:                return bookmarkLevel;
0494:            }
0495:
0496:            public void setBookmarkLevel(int bookmarkLevel) {
0497:                this .bookmarkLevel = bookmarkLevel;
0498:            }
0499:
0500:            /**
0501:             *
0502:             */
0503:            public byte getBorder() {
0504:                return JRStyleResolver.getBorder(this );
0505:            }
0506:
0507:            public Byte getOwnBorder() {
0508:                return border;
0509:            }
0510:
0511:            /**
0512:             *
0513:             */
0514:            public void setBorder(byte border) {
0515:                this .border = new Byte(border);
0516:            }
0517:
0518:            /**
0519:             *
0520:             */
0521:            public Color getBorderColor() {
0522:                return JRStyleResolver.getBorderColor(this , getForecolor());
0523:            }
0524:
0525:            public Color getOwnBorderColor() {
0526:                return borderColor;
0527:            }
0528:
0529:            /**
0530:             *
0531:             */
0532:            public void setBorderColor(Color borderColor) {
0533:                this .borderColor = borderColor;
0534:            }
0535:
0536:            /**
0537:             *
0538:             */
0539:            public int getPadding() {
0540:                return JRStyleResolver.getPadding(this );
0541:            }
0542:
0543:            public Integer getOwnPadding() {
0544:                return padding;
0545:            }
0546:
0547:            /**
0548:             *
0549:             */
0550:            public void setPadding(int padding) {
0551:                this .padding = new Integer(padding);
0552:            }
0553:
0554:            /**
0555:             *
0556:             */
0557:            public byte getTopBorder() {
0558:                return JRStyleResolver.getTopBorder(this );
0559:            }
0560:
0561:            /**
0562:             *
0563:             */
0564:            public Byte getOwnTopBorder() {
0565:                return topBorder;
0566:            }
0567:
0568:            /**
0569:             *
0570:             */
0571:            public void setTopBorder(byte topBorder) {
0572:                this .topBorder = new Byte(topBorder);
0573:            }
0574:
0575:            /**
0576:             *
0577:             */
0578:            public Color getTopBorderColor() {
0579:                return JRStyleResolver.getTopBorderColor(this , getForecolor());
0580:            }
0581:
0582:            /**
0583:             *
0584:             */
0585:            public Color getOwnTopBorderColor() {
0586:                return topBorderColor;
0587:            }
0588:
0589:            /**
0590:             *
0591:             */
0592:            public void setTopBorderColor(Color topBorderColor) {
0593:                this .topBorderColor = topBorderColor;
0594:            }
0595:
0596:            /**
0597:             *
0598:             */
0599:            public int getTopPadding() {
0600:                return JRStyleResolver.getTopPadding(this );
0601:            }
0602:
0603:            /**
0604:             *
0605:             */
0606:            public Integer getOwnTopPadding() {
0607:                return topPadding;
0608:            }
0609:
0610:            /**
0611:             *
0612:             */
0613:            public void setTopPadding(int topPadding) {
0614:                this .topPadding = new Integer(topPadding);
0615:            }
0616:
0617:            /**
0618:             *
0619:             */
0620:            public byte getLeftBorder() {
0621:                return JRStyleResolver.getLeftBorder(this );
0622:            }
0623:
0624:            /**
0625:             *
0626:             */
0627:            public Byte getOwnLeftBorder() {
0628:                return leftBorder;
0629:            }
0630:
0631:            /**
0632:             *
0633:             */
0634:            public void setLeftBorder(byte leftBorder) {
0635:                this .leftBorder = new Byte(leftBorder);
0636:            }
0637:
0638:            /**
0639:             *
0640:             */
0641:            public Color getLeftBorderColor() {
0642:                return JRStyleResolver.getLeftBorderColor(this , getForecolor());
0643:            }
0644:
0645:            /**
0646:             *
0647:             */
0648:            public Color getOwnLeftBorderColor() {
0649:                return leftBorderColor;
0650:            }
0651:
0652:            /**
0653:             *
0654:             */
0655:            public void setLeftBorderColor(Color leftBorderColor) {
0656:                this .leftBorderColor = leftBorderColor;
0657:            }
0658:
0659:            /**
0660:             *
0661:             */
0662:            public int getLeftPadding() {
0663:                return JRStyleResolver.getLeftPadding(this );
0664:            }
0665:
0666:            /**
0667:             *
0668:             */
0669:            public Integer getOwnLeftPadding() {
0670:                return leftPadding;
0671:            }
0672:
0673:            /**
0674:             *
0675:             */
0676:            public void setLeftPadding(int leftPadding) {
0677:                this .leftPadding = new Integer(leftPadding);
0678:            }
0679:
0680:            /**
0681:             *
0682:             */
0683:            public byte getBottomBorder() {
0684:                return JRStyleResolver.getBottomBorder(this );
0685:            }
0686:
0687:            /**
0688:             *
0689:             */
0690:            public Byte getOwnBottomBorder() {
0691:                return bottomBorder;
0692:            }
0693:
0694:            /**
0695:             *
0696:             */
0697:            public void setBottomBorder(byte bottomBorder) {
0698:                this .bottomBorder = new Byte(bottomBorder);
0699:            }
0700:
0701:            /**
0702:             *
0703:             */
0704:            public Color getBottomBorderColor() {
0705:                return JRStyleResolver.getBottomBorderColor(this ,
0706:                        getForecolor());
0707:            }
0708:
0709:            /**
0710:             *
0711:             */
0712:            public Color getOwnBottomBorderColor() {
0713:                return bottomBorderColor;
0714:            }
0715:
0716:            /**
0717:             *
0718:             */
0719:            public void setBottomBorderColor(Color bottomBorderColor) {
0720:                this .bottomBorderColor = bottomBorderColor;
0721:            }
0722:
0723:            /**
0724:             *
0725:             */
0726:            public int getBottomPadding() {
0727:                return JRStyleResolver.getBottomPadding(this );
0728:            }
0729:
0730:            /**
0731:             *
0732:             */
0733:            public Integer getOwnBottomPadding() {
0734:                return bottomPadding;
0735:            }
0736:
0737:            /**
0738:             *
0739:             */
0740:            public void setBottomPadding(int bottomPadding) {
0741:                this .bottomPadding = new Integer(bottomPadding);
0742:            }
0743:
0744:            /**
0745:             *
0746:             */
0747:            public byte getRightBorder() {
0748:                return JRStyleResolver.getRightBorder(this );
0749:            }
0750:
0751:            /**
0752:             *
0753:             */
0754:            public Byte getOwnRightBorder() {
0755:                return rightBorder;
0756:            }
0757:
0758:            /**
0759:             *
0760:             */
0761:            public void setRightBorder(byte rightBorder) {
0762:                this .rightBorder = new Byte(rightBorder);
0763:            }
0764:
0765:            /**
0766:             *
0767:             */
0768:            public Color getRightBorderColor() {
0769:                return JRStyleResolver
0770:                        .getRightBorderColor(this , getForecolor());
0771:            }
0772:
0773:            /**
0774:             *
0775:             */
0776:            public Color getOwnRightBorderColor() {
0777:                return rightBorderColor;
0778:            }
0779:
0780:            /**
0781:             *
0782:             */
0783:            public void setRightBorderColor(Color rightBorderColor) {
0784:                this .rightBorderColor = rightBorderColor;
0785:            }
0786:
0787:            /**
0788:             *
0789:             */
0790:            public int getRightPadding() {
0791:                return JRStyleResolver.getRightPadding(this );
0792:            }
0793:
0794:            /**
0795:             *
0796:             */
0797:            public Integer getOwnRightPadding() {
0798:                return rightPadding;
0799:            }
0800:
0801:            /**
0802:             *
0803:             */
0804:            public void setRightPadding(int rightPadding) {
0805:                this .rightPadding = new Integer(rightPadding);
0806:            }
0807:
0808:            /**
0809:             *
0810:             */
0811:            public JRReportFont getReportFont() {
0812:                return reportFont;
0813:            }
0814:
0815:            /**
0816:             *
0817:             */
0818:            public void setReportFont(JRReportFont reportFont) {
0819:                this .reportFont = reportFont;
0820:            }
0821:
0822:            /**
0823:             *
0824:             */
0825:            public String getFontName() {
0826:                return JRStyleResolver.getFontName(this );
0827:            }
0828:
0829:            /**
0830:             *
0831:             */
0832:            public String getOwnFontName() {
0833:                return fontName;
0834:            }
0835:
0836:            /**
0837:             *
0838:             */
0839:            public void setFontName(String fontName) {
0840:                this .fontName = fontName;
0841:            }
0842:
0843:            /**
0844:             *
0845:             */
0846:            public boolean isBold() {
0847:                return JRStyleResolver.isBold(this );
0848:            }
0849:
0850:            /**
0851:             *
0852:             */
0853:            public Boolean isOwnBold() {
0854:                return isBold;
0855:            }
0856:
0857:            /**
0858:             *
0859:             */
0860:            public void setBold(boolean isBold) {
0861:                setBold(isBold ? Boolean.TRUE : Boolean.FALSE);
0862:            }
0863:
0864:            /**
0865:             * Alternative setBold method which allows also to reset
0866:             * the "own" isBold property.
0867:             */
0868:            public void setBold(Boolean isBold) {
0869:                this .isBold = isBold;
0870:            }
0871:
0872:            /**
0873:             *
0874:             */
0875:            public boolean isItalic() {
0876:                return JRStyleResolver.isItalic(this );
0877:            }
0878:
0879:            /**
0880:             *
0881:             */
0882:            public Boolean isOwnItalic() {
0883:                return isItalic;
0884:            }
0885:
0886:            /**
0887:             *
0888:             */
0889:            public void setItalic(boolean isItalic) {
0890:                setItalic(isItalic ? Boolean.TRUE : Boolean.FALSE);
0891:            }
0892:
0893:            /**
0894:             * Alternative setItalic method which allows also to reset
0895:             * the "own" isItalic property.
0896:             */
0897:            public void setItalic(Boolean isItalic) {
0898:                this .isItalic = isItalic;
0899:            }
0900:
0901:            /**
0902:             *
0903:             */
0904:            public boolean isUnderline() {
0905:                return JRStyleResolver.isUnderline(this );
0906:            }
0907:
0908:            /**
0909:             *
0910:             */
0911:            public Boolean isOwnUnderline() {
0912:                return isUnderline;
0913:            }
0914:
0915:            /**
0916:             *
0917:             */
0918:            public void setUnderline(boolean isUnderline) {
0919:                setUnderline(isUnderline ? Boolean.TRUE : Boolean.FALSE);
0920:            }
0921:
0922:            /**
0923:             * Alternative setUnderline method which allows also to reset
0924:             * the "own" isUnderline property.
0925:             */
0926:            public void setUnderline(Boolean isUnderline) {
0927:                this .isUnderline = isUnderline;
0928:            }
0929:
0930:            /**
0931:             *
0932:             */
0933:            public boolean isStrikeThrough() {
0934:                return JRStyleResolver.isStrikeThrough(this );
0935:            }
0936:
0937:            /**
0938:             *
0939:             */
0940:            public Boolean isOwnStrikeThrough() {
0941:                return isStrikeThrough;
0942:            }
0943:
0944:            /**
0945:             *
0946:             */
0947:            public void setStrikeThrough(boolean isStrikeThrough) {
0948:                setStrikeThrough(isStrikeThrough ? Boolean.TRUE : Boolean.FALSE);
0949:            }
0950:
0951:            /**
0952:             * Alternative setStrikeThrough method which allows also to reset
0953:             * the "own" isStrikeThrough property.
0954:             */
0955:            public void setStrikeThrough(Boolean isStrikeThrough) {
0956:                this .isStrikeThrough = isStrikeThrough;
0957:            }
0958:
0959:            /**
0960:             *
0961:             */
0962:            public int getFontSize() {
0963:                return JRStyleResolver.getFontSize(this );
0964:            }
0965:
0966:            /**
0967:             *
0968:             */
0969:            public Integer getOwnFontSize() {
0970:                return fontSize;
0971:            }
0972:
0973:            /**
0974:             *
0975:             */
0976:            public void setFontSize(int fontSize) {
0977:                setFontSize(new Integer(fontSize));
0978:            }
0979:
0980:            /**
0981:             * Alternative setSize method which allows also to reset
0982:             * the "own" size property.
0983:             */
0984:            public void setFontSize(Integer fontSize) {
0985:                this .fontSize = fontSize;
0986:            }
0987:
0988:            /**
0989:             * @deprecated Replaced by {@link #getFontSize()}.
0990:             */
0991:            public int getSize() {
0992:                return getFontSize();
0993:            }
0994:
0995:            /**
0996:             * @deprecated Replaced by {@link #getOwnFontSize()}.
0997:             */
0998:            public Integer getOwnSize() {
0999:                return getOwnFontSize();
1000:            }
1001:
1002:            /**
1003:             * @deprecated Replaced by {@link #setFontSize(int)}.
1004:             */
1005:            public void setSize(int size) {
1006:                setFontSize(size);
1007:            }
1008:
1009:            /**
1010:             * @deprecated Replaced by {@link #setFontSize(Integer)}.
1011:             */
1012:            public void setSize(Integer size) {
1013:                setFontSize(size);
1014:            }
1015:
1016:            /**
1017:             *
1018:             */
1019:            public String getPdfFontName() {
1020:                return JRStyleResolver.getPdfFontName(this );
1021:            }
1022:
1023:            /**
1024:             *
1025:             */
1026:            public String getOwnPdfFontName() {
1027:                return pdfFontName;
1028:            }
1029:
1030:            /**
1031:             *
1032:             */
1033:            public void setPdfFontName(String pdfFontName) {
1034:                this .pdfFontName = pdfFontName;
1035:            }
1036:
1037:            /**
1038:             *
1039:             */
1040:            public String getPdfEncoding() {
1041:                return JRStyleResolver.getPdfEncoding(this );
1042:            }
1043:
1044:            /**
1045:             *
1046:             */
1047:            public String getOwnPdfEncoding() {
1048:                return pdfEncoding;
1049:            }
1050:
1051:            /**
1052:             *
1053:             */
1054:            public void setPdfEncoding(String pdfEncoding) {
1055:                this .pdfEncoding = pdfEncoding;
1056:            }
1057:
1058:            /**
1059:             *
1060:             */
1061:            public boolean isPdfEmbedded() {
1062:                return JRStyleResolver.isPdfEmbedded(this );
1063:            }
1064:
1065:            /**
1066:             *
1067:             */
1068:            public Boolean isOwnPdfEmbedded() {
1069:                return isPdfEmbedded;
1070:            }
1071:
1072:            /**
1073:             *
1074:             */
1075:            public void setPdfEmbedded(boolean isPdfEmbedded) {
1076:                setPdfEmbedded(isPdfEmbedded ? Boolean.TRUE : Boolean.FALSE);
1077:            }
1078:
1079:            /**
1080:             * Alternative setPdfEmbedded method which allows also to reset
1081:             * the "own" isPdfEmbedded property.
1082:             */
1083:            public void setPdfEmbedded(Boolean isPdfEmbedded) {
1084:                this .isPdfEmbedded = isPdfEmbedded;
1085:            }
1086:
1087:            /**
1088:             *
1089:             */
1090:            public void setBorder(Byte border) {
1091:                this .border = border;
1092:            }
1093:
1094:            /**
1095:             *
1096:             */
1097:            public void setPadding(Integer padding) {
1098:                this .padding = padding;
1099:            }
1100:
1101:            /**
1102:             *
1103:             */
1104:            public void setTopBorder(Byte topBorder) {
1105:                this .topBorder = topBorder;
1106:            }
1107:
1108:            /**
1109:             *
1110:             */
1111:            public void setTopPadding(Integer topPadding) {
1112:                this .topPadding = topPadding;
1113:            }
1114:
1115:            /**
1116:             *
1117:             */
1118:            public void setLeftBorder(Byte leftBorder) {
1119:                this .leftBorder = leftBorder;
1120:            }
1121:
1122:            /**
1123:             *
1124:             */
1125:            public void setLeftPadding(Integer leftPadding) {
1126:                this .leftPadding = leftPadding;
1127:            }
1128:
1129:            /**
1130:             *
1131:             */
1132:            public void setBottomBorder(Byte bottomBorder) {
1133:                this .bottomBorder = bottomBorder;
1134:            }
1135:
1136:            /**
1137:             *
1138:             */
1139:            public void setBottomPadding(Integer bottomPadding) {
1140:                this .bottomPadding = bottomPadding;
1141:            }
1142:
1143:            /**
1144:             *
1145:             */
1146:            public void setRightBorder(Byte rightBorder) {
1147:                this .rightBorder = rightBorder;
1148:            }
1149:
1150:            /**
1151:             *
1152:             */
1153:            public void setRightPadding(Integer rightPadding) {
1154:                this .rightPadding = rightPadding;
1155:            }
1156:
1157:            public String getPattern() {
1158:                return pattern;
1159:            }
1160:
1161:            public void setPattern(String pattern) {
1162:                this .pattern = pattern;
1163:            }
1164:
1165:            public String getValueClassName() {
1166:                return valueClassName;
1167:            }
1168:
1169:            public void setValueClassName(String valueClassName) {
1170:                this .valueClassName = valueClassName;
1171:            }
1172:
1173:            public String getFormatFactoryClass() {
1174:                return formatFactoryClass;
1175:            }
1176:
1177:            public void setFormatFactoryClass(String formatFactoryClass) {
1178:                this .formatFactoryClass = formatFactoryClass;
1179:            }
1180:
1181:            public String getLocaleCode() {
1182:                return localeCode;
1183:            }
1184:
1185:            public void setLocaleCode(String localeCode) {
1186:                this .localeCode = localeCode;
1187:            }
1188:
1189:            public String getTimeZoneId() {
1190:                return timeZoneId;
1191:            }
1192:
1193:            public void setTimeZoneId(String timeZoneId) {
1194:                this .timeZoneId = timeZoneId;
1195:            }
1196:
1197:            public JRPrintHyperlinkParameters getHyperlinkParameters() {
1198:                return hyperlinkParameters;
1199:            }
1200:
1201:            public void setHyperlinkParameters(
1202:                    JRPrintHyperlinkParameters hyperlinkParameters) {
1203:                this .hyperlinkParameters = hyperlinkParameters;
1204:            }
1205:
1206:            /**
1207:             * Adds a custom hyperlink parameter.
1208:             * 
1209:             * @param parameter the parameter to add
1210:             * @see #getHyperlinkParameters()
1211:             * @see JRPrintHyperlinkParameters#addParameter(JRPrintHyperlinkParameter)
1212:             */
1213:            public void addHyperlinkParameter(
1214:                    JRPrintHyperlinkParameter parameter) {
1215:                if (hyperlinkParameters == null) {
1216:                    hyperlinkParameters = new JRPrintHyperlinkParameters();
1217:                }
1218:                hyperlinkParameters.addParameter(parameter);
1219:            }
1220:
1221:            public String getLinkType() {
1222:                return linkType;
1223:            }
1224:
1225:            public void setLinkType(String linkType) {
1226:                this .linkType = linkType;
1227:            }
1228:
1229:            private void readObject(ObjectInputStream in) throws IOException,
1230:                    ClassNotFoundException {
1231:                in.defaultReadObject();
1232:                normalizeLinkType();
1233:            }
1234:
1235:            protected void normalizeLinkType() {
1236:                if (linkType == null) {
1237:                    linkType = JRHyperlinkHelper.getLinkType(hyperlinkType);
1238:                }
1239:                hyperlinkType = JRHyperlink.HYPERLINK_TYPE_NULL;
1240:            }
1241:
1242:            public String getHyperlinkTooltip() {
1243:                return hyperlinkTooltip;
1244:            }
1245:
1246:            public void setHyperlinkTooltip(String hyperlinkTooltip) {
1247:                this.hyperlinkTooltip = hyperlinkTooltip;
1248:            }
1249:
1250:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.