Source Code Cross Referenced for JRFillTextElement.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.awt.font.TextAttribute;
0032:        import java.text.AttributedString;
0033:        import java.util.HashMap;
0034:        import java.util.Map;
0035:
0036:        import net.sf.jasperreports.engine.JRBox;
0037:        import net.sf.jasperreports.engine.JRElement;
0038:        import net.sf.jasperreports.engine.JRFont;
0039:        import net.sf.jasperreports.engine.JRPrintText;
0040:        import net.sf.jasperreports.engine.JRReportFont;
0041:        import net.sf.jasperreports.engine.JRStyle;
0042:        import net.sf.jasperreports.engine.JRTextElement;
0043:        import net.sf.jasperreports.engine.util.JRFontUtil;
0044:        import net.sf.jasperreports.engine.util.JRStyleResolver;
0045:        import net.sf.jasperreports.engine.util.JRStyledText;
0046:
0047:        import org.apache.commons.logging.Log;
0048:        import org.apache.commons.logging.LogFactory;
0049:        import org.xml.sax.SAXException;
0050:
0051:        /**
0052:         * @author Teodor Danciu (teodord@users.sourceforge.net)
0053:         * @version $Id: JRFillTextElement.java 1768 2007-06-22 13:35:43Z lucianc $
0054:         */
0055:        public abstract class JRFillTextElement extends JRFillElement implements 
0056:                JRTextElement {
0057:
0058:            /**
0059:             *
0060:             */
0061:            private static final Log log = LogFactory
0062:                    .getLog(JRFillTextElement.class);
0063:
0064:            /**
0065:             *
0066:             */
0067:            private boolean isLeftToRight = true;
0068:            private TextMeasurer textMeasurer = null;
0069:            private float lineSpacingFactor = 0;
0070:            private float leadingOffset = 0;
0071:            private float textHeight = 0;
0072:            private int textStart = 0;
0073:            private int textEnd = 0;
0074:            private String rawText = null;
0075:            private JRStyledText styledText = null;
0076:            private Map styledTextAttributesMap = new HashMap();
0077:
0078:            protected TextChopper textChopper = null;
0079:
0080:            protected final JRReportFont reportFont;
0081:
0082:            /**
0083:             *
0084:             */
0085:            protected JRFillTextElement(JRBaseFiller filler,
0086:                    JRTextElement textElement, JRFillObjectFactory factory) {
0087:                super (filler, textElement, factory);
0088:
0089:                reportFont = factory.getReportFont(textElement.getReportFont());
0090:
0091:                /*   */
0092:                createTextChopper();
0093:            }
0094:
0095:            protected JRFillTextElement(JRFillTextElement textElement,
0096:                    JRFillCloneFactory factory) {
0097:                super (textElement, factory);
0098:
0099:                reportFont = textElement.reportFont;
0100:
0101:                createTextChopper();
0102:            }
0103:
0104:            private void createTextMeasurer() {
0105:                textMeasurer = new TextMeasurer(this );
0106:            }
0107:
0108:            protected void ensureTextMeasurer() {
0109:                if (textMeasurer == null) {
0110:                    createTextMeasurer();
0111:                }
0112:            }
0113:
0114:            private void createTextChopper() {
0115:                textChopper = isStyledText() ? styledTextChopper
0116:                        : simpleTextChopper;
0117:            }
0118:
0119:            /**
0120:             *
0121:             */
0122:            public byte getMode() {
0123:                return JRStyleResolver
0124:                        .getMode(this , JRElement.MODE_TRANSPARENT);
0125:            }
0126:
0127:            /**
0128:             * @deprecated Replaced by {@link #getHorizontalAlignment()}.
0129:             */
0130:            public byte getTextAlignment() {
0131:                return JRStyleResolver.getHorizontalAlignment(this );
0132:            }
0133:
0134:            /**
0135:             * @deprecated Replaced by {@link #setHorizontalAlignment(byte)}.
0136:             */
0137:            public void setTextAlignment(byte horizontalAlignment) {
0138:            }
0139:
0140:            /**
0141:             *
0142:             */
0143:            public byte getHorizontalAlignment() {
0144:                return JRStyleResolver.getHorizontalAlignment(this );
0145:            }
0146:
0147:            public Byte getOwnHorizontalAlignment() {
0148:                return ((JRTextElement) parent).getOwnHorizontalAlignment();
0149:            }
0150:
0151:            /**
0152:             *
0153:             */
0154:            public void setHorizontalAlignment(byte horizontalAlignment) {
0155:            }
0156:
0157:            /**
0158:             *
0159:             */
0160:            public void setHorizontalAlignment(Byte horizontalAlignment) {
0161:            }
0162:
0163:            /**
0164:             *
0165:             */
0166:            public byte getVerticalAlignment() {
0167:                return JRStyleResolver.getVerticalAlignment(this );
0168:            }
0169:
0170:            public Byte getOwnVerticalAlignment() {
0171:                return ((JRTextElement) parent).getOwnVerticalAlignment();
0172:            }
0173:
0174:            /**
0175:             *
0176:             */
0177:            public void setVerticalAlignment(byte verticalAlignment) {
0178:            }
0179:
0180:            /**
0181:             *
0182:             */
0183:            public void setVerticalAlignment(Byte verticalAlignment) {
0184:            }
0185:
0186:            /**
0187:             *
0188:             */
0189:            public byte getRotation() {
0190:                return JRStyleResolver.getRotation(this );
0191:            }
0192:
0193:            public Byte getOwnRotation() {
0194:                return ((JRTextElement) parent).getOwnRotation();
0195:            }
0196:
0197:            /**
0198:             *
0199:             */
0200:            public void setRotation(byte rotation) {
0201:            }
0202:
0203:            /**
0204:             *
0205:             */
0206:            public void setRotation(Byte rotation) {
0207:            }
0208:
0209:            /**
0210:             *
0211:             */
0212:            public byte getLineSpacing() {
0213:                return JRStyleResolver.getLineSpacing(this );
0214:            }
0215:
0216:            public Byte getOwnLineSpacing() {
0217:                return ((JRTextElement) parent).getOwnLineSpacing();
0218:            }
0219:
0220:            /**
0221:             *
0222:             */
0223:            public void setLineSpacing(byte lineSpacing) {
0224:            }
0225:
0226:            /**
0227:             *
0228:             */
0229:            public void setLineSpacing(Byte lineSpacing) {
0230:            }
0231:
0232:            /**
0233:             *
0234:             */
0235:            public boolean isStyledText() {
0236:                return JRStyleResolver.isStyledText(this );
0237:            }
0238:
0239:            public Boolean isOwnStyledText() {
0240:                return ((JRTextElement) parent).isOwnStyledText();
0241:            }
0242:
0243:            /**
0244:             *
0245:             */
0246:            public void setStyledText(boolean isStyledText) {
0247:            }
0248:
0249:            /**
0250:             *
0251:             */
0252:            public void setStyledText(Boolean isStyledText) {
0253:            }
0254:
0255:            /**
0256:             * @deprecated
0257:             */
0258:            public JRBox getBox() {
0259:                return this ;
0260:            }
0261:
0262:            /**
0263:             * @deprecated
0264:             */
0265:            public JRFont getFont() {
0266:                return this ;
0267:            }
0268:
0269:            /**
0270:             *
0271:             */
0272:            protected Map getStyledTextAttributes() {
0273:                JRStyle style = getStyle();
0274:                Map styledTextAttributes = (Map) styledTextAttributesMap
0275:                        .get(style);
0276:                if (styledTextAttributes == null) {
0277:                    styledTextAttributes = new HashMap();
0278:                    JRFontUtil.setAttributes(styledTextAttributes, this );
0279:                    styledTextAttributes.put(TextAttribute.FOREGROUND,
0280:                            getForecolor());
0281:                    if (getMode() == JRElement.MODE_OPAQUE) {
0282:                        styledTextAttributes.put(TextAttribute.BACKGROUND,
0283:                                getBackcolor());
0284:                    }
0285:                    styledTextAttributesMap.put(style, styledTextAttributes);
0286:                }
0287:
0288:                return styledTextAttributes;
0289:            }
0290:
0291:            /**
0292:             *
0293:             */
0294:            protected float getLineSpacingFactor() {
0295:                return lineSpacingFactor;
0296:            }
0297:
0298:            /**
0299:             *
0300:             */
0301:            protected void setLineSpacingFactor(float lineSpacingFactor) {
0302:                this .lineSpacingFactor = lineSpacingFactor;
0303:            }
0304:
0305:            /**
0306:             *
0307:             */
0308:            protected float getLeadingOffset() {
0309:                return leadingOffset;
0310:            }
0311:
0312:            /**
0313:             *
0314:             */
0315:            protected void setLeadingOffset(float leadingOffset) {
0316:                this .leadingOffset = leadingOffset;
0317:            }
0318:
0319:            /**
0320:             *
0321:             */
0322:            protected byte getRunDirection() {
0323:                return isLeftToRight ? JRPrintText.RUN_DIRECTION_LTR
0324:                        : JRPrintText.RUN_DIRECTION_RTL;
0325:            }
0326:
0327:            /**
0328:             *
0329:             */
0330:            protected float getTextHeight() {
0331:                return textHeight;
0332:            }
0333:
0334:            /**
0335:             *
0336:             */
0337:            protected void setTextHeight(float textHeight) {
0338:                this .textHeight = textHeight;
0339:            }
0340:
0341:            /**
0342:             *
0343:             */
0344:            protected int getTextStart() {
0345:                return textStart;
0346:            }
0347:
0348:            /**
0349:             *
0350:             */
0351:            protected void setTextStart(int textStart) {
0352:                this .textStart = textStart;
0353:            }
0354:
0355:            /**
0356:             *
0357:             */
0358:            protected int getTextEnd() {
0359:                return textEnd;
0360:            }
0361:
0362:            /**
0363:             *
0364:             */
0365:            protected void setTextEnd(int textEnd) {
0366:                this .textEnd = textEnd;
0367:            }
0368:
0369:            /**
0370:             *
0371:             */
0372:            protected String getRawText() {
0373:                return rawText;
0374:            }
0375:
0376:            /**
0377:             *
0378:             */
0379:            protected void setRawText(String rawText) {
0380:                this .rawText = rawText;
0381:                styledText = null;
0382:            }
0383:
0384:            /**
0385:             *
0386:             */
0387:            protected void reset() {
0388:                super .reset();
0389:
0390:                isLeftToRight = true;
0391:                lineSpacingFactor = 0;
0392:                leadingOffset = 0;
0393:                textHeight = 0;
0394:            }
0395:
0396:            /**
0397:             *
0398:             */
0399:            protected void rewind() {
0400:                textStart = 0;
0401:                textEnd = 0;
0402:            }
0403:
0404:            /**
0405:             *
0406:             */
0407:            protected JRStyledText getStyledText() {
0408:                if (styledText == null) {
0409:                    String text = getRawText();
0410:                    if (text != null) {
0411:                        if (isStyledText()) {
0412:                            try {
0413:                                styledText = filler.getStyledTextParser()
0414:                                        .parse(getStyledTextAttributes(), text);
0415:                            } catch (SAXException e) {
0416:                                if (log.isWarnEnabled())
0417:                                    log.warn("Invalid styled text.", e);
0418:                            }
0419:                        }
0420:
0421:                        if (styledText == null) {
0422:                            styledText = new JRStyledText();
0423:                            styledText.append(text);
0424:                            styledText
0425:                                    .addRun(new JRStyledText.Run(
0426:                                            getStyledTextAttributes(), 0, text
0427:                                                    .length()));
0428:                        }
0429:                    }
0430:                }
0431:
0432:                return styledText;
0433:            }
0434:
0435:            /**
0436:             *
0437:             */
0438:            public String getText() {
0439:                JRStyledText tmpStyledText = getStyledText();
0440:
0441:                if (tmpStyledText == null) {
0442:                    return null;
0443:                }
0444:
0445:                return tmpStyledText.getText();
0446:            }
0447:
0448:            /**
0449:             *
0450:             */
0451:            protected void chopTextElement(int availableStretchHeight) {
0452:                ensureTextMeasurer();
0453:
0454:                JRStyledText tmpStyledText = getStyledText();
0455:
0456:                if (tmpStyledText == null) {
0457:                    return;
0458:                }
0459:
0460:                String remainingText = getText().substring(getTextEnd());
0461:
0462:                if (remainingText.length() == 0) {
0463:                    return;
0464:                }
0465:
0466:                /*   */
0467:                textMeasurer.measure(tmpStyledText, remainingText,
0468:                        getTextEnd(), availableStretchHeight);
0469:
0470:                isLeftToRight = textMeasurer.isLeftToRight();
0471:                setTextHeight(textMeasurer.getTextHeight());
0472:                if (getRotation() == ROTATION_NONE) {
0473:                    setStretchHeight((int) getTextHeight() + getTopPadding()
0474:                            + getBottomPadding());
0475:                } else {
0476:                    setStretchHeight(getHeight());
0477:                }
0478:                setTextStart(getTextEnd());
0479:                setTextEnd(textMeasurer.getTextOffset());
0480:                setLineSpacingFactor(textMeasurer.getLineSpacingFactor());
0481:                setLeadingOffset(textMeasurer.getLeadingOffset());
0482:            }
0483:
0484:            /**
0485:             *
0486:             */
0487:            protected static interface TextChopper {
0488:                /**
0489:                 *
0490:                 */
0491:                public String chop(JRFillTextElement textElement,
0492:                        int startIndex, int endIndex);
0493:            }
0494:
0495:            /**
0496:             *
0497:             */
0498:            private static TextChopper simpleTextChopper = new TextChopper() {
0499:                public String chop(JRFillTextElement textElement,
0500:                        int startIndex, int endIndex) {
0501:                    return textElement.getStyledText().getText().substring(
0502:                            startIndex, endIndex);
0503:                }
0504:            };
0505:
0506:            /**
0507:             *
0508:             */
0509:            private static TextChopper styledTextChopper = new TextChopper() {
0510:                public String chop(JRFillTextElement textElement,
0511:                        int startIndex, int endIndex) {
0512:                    return textElement.filler.getStyledTextParser().write(
0513:                            textElement.getStyledTextAttributes(),
0514:                            new AttributedString(textElement.getStyledText()
0515:                                    .getAttributedString().getIterator(),
0516:                                    startIndex, endIndex).getIterator(),
0517:                            textElement.getText().substring(startIndex,
0518:                                    endIndex));
0519:                }
0520:            };
0521:
0522:            /**
0523:             *
0524:             */
0525:            public byte getBorder() {
0526:                return JRStyleResolver.getBorder(this );
0527:            }
0528:
0529:            public Byte getOwnBorder() {
0530:                return ((JRBox) parent).getOwnBorder();
0531:            }
0532:
0533:            /**
0534:             *
0535:             */
0536:            public void setBorder(byte border) {
0537:            }
0538:
0539:            /**
0540:             *
0541:             */
0542:            public Color getBorderColor() {
0543:                return JRStyleResolver.getBorderColor(this , getForecolor());
0544:            }
0545:
0546:            public Color getOwnBorderColor() {
0547:                return ((JRBox) parent).getOwnBorderColor();
0548:            }
0549:
0550:            /**
0551:             *
0552:             */
0553:            public void setBorderColor(Color borderColor) {
0554:            }
0555:
0556:            /**
0557:             *
0558:             */
0559:            public int getPadding() {
0560:                return JRStyleResolver.getPadding(this );
0561:            }
0562:
0563:            public Integer getOwnPadding() {
0564:                return ((JRBox) parent).getOwnPadding();
0565:            }
0566:
0567:            /**
0568:             *
0569:             */
0570:            public void setPadding(int padding) {
0571:            }
0572:
0573:            /**
0574:             *
0575:             */
0576:            public byte getTopBorder() {
0577:                return JRStyleResolver.getTopBorder(this );
0578:            }
0579:
0580:            /**
0581:             *
0582:             */
0583:            public Byte getOwnTopBorder() {
0584:                return ((JRBox) parent).getOwnTopBorder();
0585:            }
0586:
0587:            /**
0588:             *
0589:             */
0590:            public void setTopBorder(byte topBorder) {
0591:            }
0592:
0593:            /**
0594:             *
0595:             */
0596:            public Color getTopBorderColor() {
0597:                return JRStyleResolver.getTopBorderColor(this , getForecolor());
0598:            }
0599:
0600:            /**
0601:             *
0602:             */
0603:            public Color getOwnTopBorderColor() {
0604:                return ((JRBox) parent).getOwnTopBorderColor();
0605:            }
0606:
0607:            /**
0608:             *
0609:             */
0610:            public void setTopBorderColor(Color topBorderColor) {
0611:            }
0612:
0613:            /**
0614:             *
0615:             */
0616:            public int getTopPadding() {
0617:                return JRStyleResolver.getTopPadding(this );
0618:            }
0619:
0620:            /**
0621:             *
0622:             */
0623:            public Integer getOwnTopPadding() {
0624:                return ((JRBox) parent).getOwnTopPadding();
0625:            }
0626:
0627:            /**
0628:             *
0629:             */
0630:            public void setTopPadding(int topPadding) {
0631:            }
0632:
0633:            /**
0634:             *
0635:             */
0636:            public byte getLeftBorder() {
0637:                return JRStyleResolver.getLeftBorder(this );
0638:            }
0639:
0640:            /**
0641:             *
0642:             */
0643:            public Byte getOwnLeftBorder() {
0644:                return ((JRBox) parent).getOwnLeftBorder();
0645:            }
0646:
0647:            /**
0648:             *
0649:             */
0650:            public void setLeftBorder(byte leftBorder) {
0651:            }
0652:
0653:            /**
0654:             *
0655:             */
0656:            public Color getLeftBorderColor() {
0657:                return JRStyleResolver.getLeftBorderColor(this , getForecolor());
0658:            }
0659:
0660:            /**
0661:             *
0662:             */
0663:            public Color getOwnLeftBorderColor() {
0664:                return ((JRBox) parent).getOwnLeftBorderColor();
0665:            }
0666:
0667:            /**
0668:             *
0669:             */
0670:            public void setLeftBorderColor(Color leftBorderColor) {
0671:            }
0672:
0673:            /**
0674:             *
0675:             */
0676:            public int getLeftPadding() {
0677:                return JRStyleResolver.getLeftPadding(this );
0678:            }
0679:
0680:            /**
0681:             *
0682:             */
0683:            public Integer getOwnLeftPadding() {
0684:                return ((JRBox) parent).getOwnLeftPadding();
0685:            }
0686:
0687:            /**
0688:             *
0689:             */
0690:            public void setLeftPadding(int leftPadding) {
0691:            }
0692:
0693:            /**
0694:             *
0695:             */
0696:            public byte getBottomBorder() {
0697:                return JRStyleResolver.getBottomBorder(this );
0698:            }
0699:
0700:            /**
0701:             *
0702:             */
0703:            public Byte getOwnBottomBorder() {
0704:                return ((JRBox) parent).getOwnBottomBorder();
0705:            }
0706:
0707:            /**
0708:             *
0709:             */
0710:            public void setBottomBorder(byte bottomBorder) {
0711:            }
0712:
0713:            /**
0714:             *
0715:             */
0716:            public Color getBottomBorderColor() {
0717:                return JRStyleResolver.getBottomBorderColor(this ,
0718:                        getForecolor());
0719:            }
0720:
0721:            /**
0722:             *
0723:             */
0724:            public Color getOwnBottomBorderColor() {
0725:                return ((JRBox) parent).getOwnBottomBorderColor();
0726:            }
0727:
0728:            /**
0729:             *
0730:             */
0731:            public void setBottomBorderColor(Color bottomBorderColor) {
0732:            }
0733:
0734:            /**
0735:             *
0736:             */
0737:            public int getBottomPadding() {
0738:                return JRStyleResolver.getBottomPadding(this );
0739:            }
0740:
0741:            /**
0742:             *
0743:             */
0744:            public Integer getOwnBottomPadding() {
0745:                return ((JRBox) parent).getOwnBottomPadding();
0746:            }
0747:
0748:            /**
0749:             *
0750:             */
0751:            public void setBottomPadding(int bottomPadding) {
0752:            }
0753:
0754:            /**
0755:             *
0756:             */
0757:            public byte getRightBorder() {
0758:                return JRStyleResolver.getRightBorder(this );
0759:            }
0760:
0761:            /**
0762:             *
0763:             */
0764:            public Byte getOwnRightBorder() {
0765:                return ((JRBox) parent).getOwnRightBorder();
0766:            }
0767:
0768:            /**
0769:             *
0770:             */
0771:            public void setRightBorder(byte rightBorder) {
0772:            }
0773:
0774:            /**
0775:             *
0776:             */
0777:            public Color getRightBorderColor() {
0778:                return JRStyleResolver
0779:                        .getRightBorderColor(this , getForecolor());
0780:            }
0781:
0782:            /**
0783:             *
0784:             */
0785:            public Color getOwnRightBorderColor() {
0786:                return ((JRBox) parent).getOwnRightBorderColor();
0787:            }
0788:
0789:            /**
0790:             *
0791:             */
0792:            public void setRightBorderColor(Color rightBorderColor) {
0793:            }
0794:
0795:            /**
0796:             *
0797:             */
0798:            public int getRightPadding() {
0799:                return JRStyleResolver.getRightPadding(this );
0800:            }
0801:
0802:            /**
0803:             *
0804:             */
0805:            public Integer getOwnRightPadding() {
0806:                return ((JRBox) parent).getOwnRightPadding();
0807:            }
0808:
0809:            /**
0810:             *
0811:             */
0812:            public void setRightPadding(int rightPadding) {
0813:            }
0814:
0815:            /**
0816:             *
0817:             */
0818:            public JRReportFont getReportFont() {
0819:                return reportFont;
0820:            }
0821:
0822:            public void setReportFont(JRReportFont reportFont) {
0823:            }
0824:
0825:            /**
0826:             *
0827:             */
0828:            public String getFontName() {
0829:                return JRStyleResolver.getFontName(this );
0830:            }
0831:
0832:            /**
0833:             *
0834:             */
0835:            public String getOwnFontName() {
0836:                return ((JRFont) parent).getOwnFontName();
0837:            }
0838:
0839:            /**
0840:             *
0841:             */
0842:            public void setFontName(String fontName) {
0843:            }
0844:
0845:            /**
0846:             *
0847:             */
0848:            public boolean isBold() {
0849:                return JRStyleResolver.isBold(this );
0850:            }
0851:
0852:            /**
0853:             *
0854:             */
0855:            public Boolean isOwnBold() {
0856:                return ((JRFont) parent).isOwnBold();
0857:            }
0858:
0859:            /**
0860:             *
0861:             */
0862:            public void setBold(boolean isBold) {
0863:            }
0864:
0865:            /**
0866:             * Alternative setBold method which allows also to reset
0867:             * the "own" isBold property.
0868:             */
0869:            public void setBold(Boolean 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 ((JRFont) parent).isOwnItalic();
0884:            }
0885:
0886:            /**
0887:             *
0888:             */
0889:            public void setItalic(boolean isItalic) {
0890:            }
0891:
0892:            /**
0893:             * Alternative setItalic method which allows also to reset
0894:             * the "own" isItalic property.
0895:             */
0896:            public void setItalic(Boolean isItalic) {
0897:            }
0898:
0899:            /**
0900:             *
0901:             */
0902:            public boolean isUnderline() {
0903:                return JRStyleResolver.isUnderline(this );
0904:            }
0905:
0906:            /**
0907:             *
0908:             */
0909:            public Boolean isOwnUnderline() {
0910:                return ((JRFont) parent).isOwnUnderline();
0911:            }
0912:
0913:            /**
0914:             *
0915:             */
0916:            public void setUnderline(boolean isUnderline) {
0917:            }
0918:
0919:            /**
0920:             * Alternative setUnderline method which allows also to reset
0921:             * the "own" isUnderline property.
0922:             */
0923:            public void setUnderline(Boolean isUnderline) {
0924:            }
0925:
0926:            /**
0927:             *
0928:             */
0929:            public boolean isStrikeThrough() {
0930:                return JRStyleResolver.isStrikeThrough(this );
0931:            }
0932:
0933:            /**
0934:             *
0935:             */
0936:            public Boolean isOwnStrikeThrough() {
0937:                return ((JRFont) parent).isOwnStrikeThrough();
0938:            }
0939:
0940:            /**
0941:             *
0942:             */
0943:            public void setStrikeThrough(boolean isStrikeThrough) {
0944:            }
0945:
0946:            /**
0947:             * Alternative setStrikeThrough method which allows also to reset
0948:             * the "own" isStrikeThrough property.
0949:             */
0950:            public void setStrikeThrough(Boolean isStrikeThrough) {
0951:            }
0952:
0953:            /**
0954:             *
0955:             */
0956:            public int getFontSize() {
0957:                return JRStyleResolver.getFontSize(this );
0958:            }
0959:
0960:            /**
0961:             *
0962:             */
0963:            public Integer getOwnFontSize() {
0964:                return ((JRFont) parent).getOwnFontSize();
0965:            }
0966:
0967:            /**
0968:             *
0969:             */
0970:            public void setFontSize(int size) {
0971:            }
0972:
0973:            /**
0974:             * Alternative setSize method which allows also to reset
0975:             * the "own" size property.
0976:             */
0977:            public void setFontSize(Integer size) {
0978:            }
0979:
0980:            /**
0981:             * @deprecated Replaced by {@link #getFontSize()}.
0982:             */
0983:            public int getSize() {
0984:                return getFontSize();
0985:            }
0986:
0987:            /**
0988:             * @deprecated Replaced by {@link #getOwnFontSize()}.
0989:             */
0990:            public Integer getOwnSize() {
0991:                return getOwnFontSize();
0992:            }
0993:
0994:            /**
0995:             * @deprecated Replaced by {@link #setFontSize(int)}.
0996:             */
0997:            public void setSize(int size) {
0998:            }
0999:
1000:            /**
1001:             * @deprecated Replaced by {@link #setFontSize(Integer)}.
1002:             */
1003:            public void setSize(Integer size) {
1004:            }
1005:
1006:            /**
1007:             *
1008:             */
1009:            public String getPdfFontName() {
1010:                return JRStyleResolver.getPdfFontName(this );
1011:            }
1012:
1013:            /**
1014:             *
1015:             */
1016:            public String getOwnPdfFontName() {
1017:                return ((JRFont) parent).getOwnPdfFontName();
1018:            }
1019:
1020:            /**
1021:             *
1022:             */
1023:            public void setPdfFontName(String pdfFontName) {
1024:            }
1025:
1026:            /**
1027:             *
1028:             */
1029:            public String getPdfEncoding() {
1030:                return JRStyleResolver.getPdfEncoding(this );
1031:            }
1032:
1033:            /**
1034:             *
1035:             */
1036:            public String getOwnPdfEncoding() {
1037:                return ((JRFont) parent).getOwnPdfEncoding();
1038:            }
1039:
1040:            /**
1041:             *
1042:             */
1043:            public void setPdfEncoding(String pdfEncoding) {
1044:            }
1045:
1046:            /**
1047:             *
1048:             */
1049:            public boolean isPdfEmbedded() {
1050:                return JRStyleResolver.isPdfEmbedded(this );
1051:            }
1052:
1053:            /**
1054:             *
1055:             */
1056:            public Boolean isOwnPdfEmbedded() {
1057:                return ((JRFont) parent).isOwnPdfEmbedded();
1058:            }
1059:
1060:            /**
1061:             *
1062:             */
1063:            public void setPdfEmbedded(boolean isPdfEmbedded) {
1064:                setPdfEmbedded(isPdfEmbedded ? Boolean.TRUE : Boolean.FALSE);
1065:            }
1066:
1067:            /**
1068:             * Alternative setPdfEmbedded method which allows also to reset
1069:             * the "own" isPdfEmbedded property.
1070:             */
1071:            public void setPdfEmbedded(Boolean isPdfEmbedded) {
1072:            }
1073:
1074:            /**
1075:             *
1076:             */
1077:            public void setBorder(Byte border) {
1078:            }
1079:
1080:            /**
1081:             *
1082:             */
1083:            public void setPadding(Integer padding) {
1084:            }
1085:
1086:            /**
1087:             *
1088:             */
1089:            public void setTopBorder(Byte topBorder) {
1090:            }
1091:
1092:            /**
1093:             *
1094:             */
1095:            public void setTopPadding(Integer topPadding) {
1096:            }
1097:
1098:            /**
1099:             *
1100:             */
1101:            public void setLeftBorder(Byte leftBorder) {
1102:            }
1103:
1104:            /**
1105:             *
1106:             */
1107:            public void setLeftPadding(Integer leftPadding) {
1108:            }
1109:
1110:            /**
1111:             *
1112:             */
1113:            public void setBottomBorder(Byte bottomBorder) {
1114:            }
1115:
1116:            /**
1117:             *
1118:             */
1119:            public void setBottomPadding(Integer bottomPadding) {
1120:            }
1121:
1122:            /**
1123:             *
1124:             */
1125:            public void setRightBorder(Byte rightBorder) {
1126:            }
1127:
1128:            /**
1129:             *
1130:             */
1131:            public void setRightPadding(Integer rightPadding) {
1132:            }
1133:
1134:            /**
1135:             *
1136:             */
1137:            public void setHeight(int height) {
1138:                super .setHeight(height);
1139:
1140:                createTextMeasurer();
1141:            }
1142:
1143:            public void setWidth(int width) {
1144:                super.setWidth(width);
1145:
1146:                createTextMeasurer();
1147:            }
1148:
1149:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.