Source Code Cross Referenced for JRBaseChart.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) 


001:        /*
002:         * ============================================================================
003:         * GNU Lesser General Public License
004:         * ============================================================================
005:         *
006:         * JasperReports - Free Java report-generating library.
007:         * Copyright (C) 2001-2006 JasperSoft Corporation http://www.jaspersoft.com
008:         * 
009:         * This library is free software; you can redistribute it and/or
010:         * modify it under the terms of the GNU Lesser General Public
011:         * License as published by the Free Software Foundation; either
012:         * version 2.1 of the License, or (at your option) any later version.
013:         * 
014:         * This library is distributed in the hope that it will be useful,
015:         * but WITHOUT ANY WARRANTY; without even the implied warranty of
016:         * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
017:         * Lesser General Public License for more details.
018:         * 
019:         * You should have received a copy of the GNU Lesser General Public
020:         * License along with this library; if not, write to the Free Software
021:         * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307, USA.
022:         * 
023:         * JasperSoft Corporation
024:         * 303 Second Street, Suite 450 North
025:         * San Francisco, CA 94107
026:         * http://www.jaspersoft.com
027:         */
028:        package net.sf.jasperreports.engine.base;
029:
030:        import java.awt.Color;
031:        import java.io.IOException;
032:        import java.io.ObjectInputStream;
033:
034:        import net.sf.jasperreports.charts.JRAreaPlot;
035:        import net.sf.jasperreports.charts.JRBar3DPlot;
036:        import net.sf.jasperreports.charts.JRBarPlot;
037:        import net.sf.jasperreports.charts.JRBubblePlot;
038:        import net.sf.jasperreports.charts.JRCandlestickPlot;
039:        import net.sf.jasperreports.charts.JRCategoryDataset;
040:        import net.sf.jasperreports.charts.JRHighLowDataset;
041:        import net.sf.jasperreports.charts.JRHighLowPlot;
042:        import net.sf.jasperreports.charts.JRLinePlot;
043:        import net.sf.jasperreports.charts.JRMeterPlot;
044:        import net.sf.jasperreports.charts.JRMultiAxisPlot;
045:        import net.sf.jasperreports.charts.JRPie3DPlot;
046:        import net.sf.jasperreports.charts.JRPieDataset;
047:        import net.sf.jasperreports.charts.JRPiePlot;
048:        import net.sf.jasperreports.charts.JRScatterPlot;
049:        import net.sf.jasperreports.charts.JRThermometerPlot;
050:        import net.sf.jasperreports.charts.JRTimePeriodDataset;
051:        import net.sf.jasperreports.charts.JRTimeSeriesDataset;
052:        import net.sf.jasperreports.charts.JRTimeSeriesPlot;
053:        import net.sf.jasperreports.charts.JRValueDataset;
054:        import net.sf.jasperreports.charts.JRXyDataset;
055:        import net.sf.jasperreports.charts.JRXyzDataset;
056:        import net.sf.jasperreports.engine.JRAbstractObjectFactory;
057:        import net.sf.jasperreports.engine.JRAnchor;
058:        import net.sf.jasperreports.engine.JRBox;
059:        import net.sf.jasperreports.engine.JRChart;
060:        import net.sf.jasperreports.engine.JRChartDataset;
061:        import net.sf.jasperreports.engine.JRChartPlot;
062:        import net.sf.jasperreports.engine.JRChild;
063:        import net.sf.jasperreports.engine.JRConstants;
064:        import net.sf.jasperreports.engine.JRExpression;
065:        import net.sf.jasperreports.engine.JRExpressionCollector;
066:        import net.sf.jasperreports.engine.JRFont;
067:        import net.sf.jasperreports.engine.JRGroup;
068:        import net.sf.jasperreports.engine.JRHyperlink;
069:        import net.sf.jasperreports.engine.JRHyperlinkHelper;
070:        import net.sf.jasperreports.engine.JRHyperlinkParameter;
071:        import net.sf.jasperreports.engine.JRRuntimeException;
072:        import net.sf.jasperreports.engine.util.JRStyleResolver;
073:        import net.sf.jasperreports.engine.xml.JRXmlWriter;
074:
075:        /**
076:         * @author Teodor Danciu (teodord@users.sourceforge.net)
077:         * @version $Id: JRBaseChart.java 1577 2007-02-09 11:25:48Z teodord $
078:         */
079:        public class JRBaseChart extends JRBaseElement implements  JRChart {
080:
081:            /**
082:             *
083:             */
084:            private static final long serialVersionUID = JRConstants.SERIAL_VERSION_UID;
085:
086:            /**
087:             *
088:             */
089:            protected byte chartType = 0;
090:
091:            /**
092:             *
093:             */
094:            protected boolean isShowLegend = false;
095:            protected byte evaluationTime = JRExpression.EVALUATION_TIME_NOW;
096:            protected byte hyperlinkType = JRHyperlink.HYPERLINK_TYPE_NULL;
097:            protected String linkType;
098:            protected byte hyperlinkTarget = JRHyperlink.HYPERLINK_TARGET_SELF;
099:            private JRHyperlinkParameter[] hyperlinkParameters;
100:
101:            protected byte titlePosition = JRChart.TITLE_POSITION_TOP;
102:            protected Color titleColor = null;
103:            protected Color subtitleColor = null;
104:            protected Color legendColor = null;
105:            protected Color legendBackgroundColor = null;
106:
107:            /**
108:             *
109:             */
110:            protected JRBox box = null;
111:            protected JRFont titleFont = null;
112:            protected JRFont subtitleFont = null;
113:            protected JRFont legendFont = null;
114:
115:            protected String customizerClass;
116:
117:            /**
118:             *
119:             */
120:            protected JRGroup evaluationGroup = null;
121:            protected JRExpression titleExpression = null;
122:            protected JRExpression subtitleExpression = null;
123:            protected JRExpression anchorNameExpression = null;
124:            protected JRExpression hyperlinkReferenceExpression = null;
125:            protected JRExpression hyperlinkAnchorExpression = null;
126:            protected JRExpression hyperlinkPageExpression = null;
127:            private JRExpression hyperlinkTooltipExpression;
128:
129:            protected JRChartDataset dataset = null;
130:            protected JRChartPlot plot = null;
131:
132:            /**
133:             *
134:             */
135:            protected Byte border;
136:            protected Byte topBorder = null;
137:            protected Byte leftBorder = null;
138:            protected Byte bottomBorder = null;
139:            protected Byte rightBorder = null;
140:            protected Color borderColor = null;
141:            protected Color topBorderColor = null;
142:            protected Color leftBorderColor = null;
143:            protected Color bottomBorderColor = null;
144:            protected Color rightBorderColor = null;
145:            protected Integer padding;
146:            protected Integer topPadding = null;
147:            protected Integer leftPadding = null;
148:            protected Integer bottomPadding = null;
149:            protected Integer rightPadding = null;
150:
151:            /**
152:             * The bookmark level for the anchor associated with this chart.
153:             * @see JRAnchor#getBookmarkLevel()
154:             */
155:            protected int bookmarkLevel = JRAnchor.NO_BOOKMARK;
156:
157:            /**
158:             *
159:             */
160:            protected JRBaseChart(JRChart chart, JRBaseObjectFactory factory) {
161:                super (chart, factory);
162:
163:                chartType = chart.getChartType();
164:
165:                switch (chartType) {
166:                case CHART_TYPE_AREA:
167:                    dataset = factory
168:                            .getCategoryDataset((JRCategoryDataset) chart
169:                                    .getDataset());
170:                    plot = factory.getAreaPlot((JRAreaPlot) chart.getPlot());
171:                    break;
172:                case CHART_TYPE_BAR:
173:                    dataset = factory
174:                            .getCategoryDataset((JRCategoryDataset) chart
175:                                    .getDataset());
176:                    plot = factory.getBarPlot((JRBarPlot) chart.getPlot());
177:                    break;
178:                case CHART_TYPE_BAR3D:
179:                    dataset = factory
180:                            .getCategoryDataset((JRCategoryDataset) chart
181:                                    .getDataset());
182:                    plot = factory.getBar3DPlot((JRBar3DPlot) chart.getPlot());
183:                    break;
184:                case CHART_TYPE_BUBBLE:
185:                    dataset = factory.getXyzDataset((JRXyzDataset) chart
186:                            .getDataset());
187:                    plot = factory
188:                            .getBubblePlot((JRBubblePlot) chart.getPlot());
189:                    break;
190:                case CHART_TYPE_CANDLESTICK:
191:                    dataset = factory
192:                            .getHighLowDataset((JRHighLowDataset) chart
193:                                    .getDataset());
194:                    plot = factory.getCandlestickPlot((JRCandlestickPlot) chart
195:                            .getPlot());
196:                    break;
197:                case CHART_TYPE_HIGHLOW:
198:                    dataset = factory
199:                            .getHighLowDataset((JRHighLowDataset) chart
200:                                    .getDataset());
201:                    plot = factory.getHighLowPlot((JRHighLowPlot) chart
202:                            .getPlot());
203:                    break;
204:                case CHART_TYPE_LINE:
205:                    dataset = factory
206:                            .getCategoryDataset((JRCategoryDataset) chart
207:                                    .getDataset());
208:                    plot = factory.getLinePlot((JRLinePlot) chart.getPlot());
209:                    break;
210:                case CHART_TYPE_METER:
211:                    dataset = factory.getValueDataset((JRValueDataset) chart
212:                            .getDataset());
213:                    plot = factory.getMeterPlot((JRMeterPlot) chart.getPlot());
214:                    break;
215:                case CHART_TYPE_MULTI_AXIS:
216:                    dataset = null;
217:                    plot = factory.getMultiAxisPlot((JRMultiAxisPlot) chart
218:                            .getPlot());
219:                    break;
220:                case CHART_TYPE_PIE:
221:                    dataset = factory.getPieDataset((JRPieDataset) chart
222:                            .getDataset());
223:                    plot = factory.getPiePlot((JRPiePlot) chart.getPlot());
224:                    break;
225:                case CHART_TYPE_PIE3D:
226:                    dataset = factory.getPieDataset((JRPieDataset) chart
227:                            .getDataset());
228:                    plot = factory.getPie3DPlot((JRPie3DPlot) chart.getPlot());
229:                    break;
230:                case CHART_TYPE_SCATTER:
231:                    dataset = factory.getXyDataset((JRXyDataset) chart
232:                            .getDataset());
233:                    plot = factory.getScatterPlot((JRScatterPlot) chart
234:                            .getPlot());
235:                    break;
236:                case CHART_TYPE_STACKEDBAR:
237:                    dataset = factory
238:                            .getCategoryDataset((JRCategoryDataset) chart
239:                                    .getDataset());
240:                    plot = factory.getBarPlot((JRBarPlot) chart.getPlot());
241:                    break;
242:                case CHART_TYPE_STACKEDBAR3D:
243:                    dataset = factory
244:                            .getCategoryDataset((JRCategoryDataset) chart
245:                                    .getDataset());
246:                    plot = factory.getBar3DPlot((JRBar3DPlot) chart.getPlot());
247:                    break;
248:                case CHART_TYPE_THERMOMETER:
249:                    dataset = factory.getValueDataset((JRValueDataset) chart
250:                            .getDataset());
251:                    plot = factory.getThermometerPlot((JRThermometerPlot) chart
252:                            .getPlot());
253:                    break;
254:                case CHART_TYPE_TIMESERIES:
255:                    dataset = factory
256:                            .getTimeSeriesDataset((JRTimeSeriesDataset) chart
257:                                    .getDataset());
258:                    plot = factory.getTimeSeriesPlot((JRTimeSeriesPlot) chart
259:                            .getPlot());
260:                    break;
261:                case CHART_TYPE_XYAREA:
262:                    dataset = factory.getXyDataset((JRXyDataset) chart
263:                            .getDataset());
264:                    plot = factory.getAreaPlot((JRAreaPlot) chart.getPlot());
265:                    break;
266:                case CHART_TYPE_XYBAR:
267:
268:                    switch (chart.getDataset().getDatasetType()) {
269:                    case JRChartDataset.TIMESERIES_DATASET:
270:                        dataset = factory
271:                                .getTimeSeriesDataset((JRTimeSeriesDataset) chart
272:                                        .getDataset());
273:                        break;
274:                    case JRChartDataset.TIMEPERIOD_DATASET:
275:                        dataset = factory
276:                                .getTimePeriodDataset((JRTimePeriodDataset) chart
277:                                        .getDataset());
278:                        break;
279:                    case JRChartDataset.XY_DATASET:
280:                        dataset = factory.getXyDataset((JRXyDataset) chart
281:                                .getDataset());
282:                        break;
283:                    }
284:                    plot = factory.getBarPlot((JRBarPlot) chart.getPlot());
285:                    break;
286:                case CHART_TYPE_XYLINE:
287:                    dataset = factory.getXyDataset((JRXyDataset) chart
288:                            .getDataset());
289:                    plot = factory.getLinePlot((JRLinePlot) chart.getPlot());
290:                    break;
291:                case CHART_TYPE_STACKEDAREA:
292:                    dataset = factory
293:                            .getCategoryDataset((JRCategoryDataset) chart
294:                                    .getDataset());
295:                    plot = factory.getAreaPlot((JRAreaPlot) chart.getPlot());
296:                    break;
297:                default:
298:                    throw new JRRuntimeException("Chart type not supported.");
299:                }
300:
301:                isShowLegend = chart.isShowLegend();
302:                evaluationTime = chart.getEvaluationTime();
303:                linkType = chart.getLinkType();
304:                hyperlinkTarget = chart.getHyperlinkTarget();
305:                titlePosition = chart.getTitlePosition();
306:                titleColor = chart.getOwnTitleColor();
307:                subtitleColor = chart.getOwnSubtitleColor();
308:                legendColor = chart.getOwnLegendColor();
309:                legendBackgroundColor = chart.getOwnLegendBackgroundColor();
310:
311:                titleFont = new JRBaseFont(null, null, this , chart
312:                        .getTitleFont());
313:                subtitleFont = new JRBaseFont(null, null, this , chart
314:                        .getSubtitleFont());
315:                legendFont = new JRBaseFont(null, null, this , chart
316:                        .getLegendFont());
317:
318:                evaluationGroup = factory.getGroup(chart.getEvaluationGroup());
319:                titleExpression = factory.getExpression(chart
320:                        .getTitleExpression());
321:                subtitleExpression = factory.getExpression(chart
322:                        .getSubtitleExpression());
323:                anchorNameExpression = factory.getExpression(chart
324:                        .getAnchorNameExpression());
325:                hyperlinkReferenceExpression = factory.getExpression(chart
326:                        .getHyperlinkReferenceExpression());
327:                hyperlinkAnchorExpression = factory.getExpression(chart
328:                        .getHyperlinkAnchorExpression());
329:                hyperlinkPageExpression = factory.getExpression(chart
330:                        .getHyperlinkPageExpression());
331:                hyperlinkTooltipExpression = factory.getExpression(chart
332:                        .getHyperlinkTooltipExpression());
333:                bookmarkLevel = chart.getBookmarkLevel();
334:                hyperlinkParameters = JRBaseHyperlink.copyHyperlinkParameters(
335:                        chart, factory);
336:
337:                customizerClass = chart.getCustomizerClass();
338:
339:                border = chart.getOwnBorder();
340:                topBorder = chart.getOwnTopBorder();
341:                leftBorder = chart.getOwnLeftBorder();
342:                bottomBorder = chart.getOwnBottomBorder();
343:                rightBorder = chart.getOwnRightBorder();
344:                borderColor = chart.getOwnBorderColor();
345:                topBorderColor = chart.getOwnTopBorderColor();
346:                leftBorderColor = chart.getOwnLeftBorderColor();
347:                bottomBorderColor = chart.getOwnBottomBorderColor();
348:                rightBorderColor = chart.getOwnRightBorderColor();
349:                padding = chart.getOwnPadding();
350:                topPadding = chart.getOwnTopPadding();
351:                leftPadding = chart.getOwnLeftPadding();
352:                bottomPadding = chart.getOwnBottomPadding();
353:                rightPadding = chart.getOwnRightPadding();
354:
355:            }
356:
357:            /**
358:             *
359:             */
360:            public boolean isShowLegend() {
361:                return this .isShowLegend;
362:            }
363:
364:            /**
365:             *
366:             */
367:            public void setShowLegend(boolean isShowLegend) {
368:                this .isShowLegend = isShowLegend;
369:            }
370:
371:            /**
372:             *
373:             */
374:            public byte getEvaluationTime() {
375:                return evaluationTime;
376:            }
377:
378:            /**
379:             *
380:             */
381:            public JRGroup getEvaluationGroup() {
382:                return evaluationGroup;
383:            }
384:
385:            /**
386:             * @deprecated
387:             */
388:            public JRBox getBox() {
389:                return this ;
390:            }
391:
392:            /**
393:             *
394:             */
395:            public JRFont getTitleFont() {
396:                return titleFont;
397:            }
398:
399:            /**
400:             *
401:             */
402:            public byte getTitlePosition() {
403:                return titlePosition;
404:            }
405:
406:            /**
407:             *
408:             */
409:            public void setTitlePosition(byte titlePosition) {
410:                this .titlePosition = titlePosition;
411:            }
412:
413:            /**
414:             *
415:             */
416:            public Color getTitleColor() {
417:                return JRStyleResolver.getTitleColor(this );
418:            }
419:
420:            /**
421:             *
422:             */
423:            public Color getOwnTitleColor() {
424:                return titleColor;
425:            }
426:
427:            /**
428:             *
429:             */
430:            public void setTitleColor(Color titleColor) {
431:                this .titleColor = titleColor;
432:            }
433:
434:            /**
435:             *
436:             */
437:            public JRFont getSubtitleFont() {
438:                return subtitleFont;
439:            }
440:
441:            /**
442:             *
443:             */
444:            public Color getOwnSubtitleColor() {
445:                return subtitleColor;
446:            }
447:
448:            /**
449:             *
450:             */
451:            public Color getSubtitleColor() {
452:                return JRStyleResolver.getSubtitleColor(this );
453:            }
454:
455:            /**
456:             *
457:             */
458:            public void setSubtitleColor(Color subtitleColor) {
459:                this .subtitleColor = subtitleColor;
460:            }
461:
462:            public Color getLegendBackgroundColor() {
463:                return JRStyleResolver.getLegendBackgroundColor(this );
464:            }
465:
466:            public Color getOwnLegendBackgroundColor() {
467:                return legendBackgroundColor;
468:            }
469:
470:            public Color getOwnLegendColor() {
471:                return legendColor;
472:            }
473:
474:            public Color getLegendColor() {
475:                return JRStyleResolver.getLegendColor(this );
476:            }
477:
478:            public JRFont getLegendFont() {
479:                return legendFont;
480:            }
481:
482:            public void setLegendBackgroundColor(Color legendBackgroundColor) {
483:                this .legendBackgroundColor = legendBackgroundColor;
484:            }
485:
486:            public void setLegendColor(Color legendColor) {
487:                this .legendColor = legendColor;
488:            }
489:
490:            /**
491:             *
492:             */
493:            public byte getHyperlinkType() {
494:                return JRHyperlinkHelper.getHyperlinkType(this );
495:            }
496:
497:            /**
498:             *
499:             */
500:            public byte getHyperlinkTarget() {
501:                return hyperlinkTarget;
502:            }
503:
504:            /**
505:             *
506:             */
507:            public JRExpression getTitleExpression() {
508:                return titleExpression;
509:            }
510:
511:            /**
512:             *
513:             */
514:            public JRExpression getSubtitleExpression() {
515:                return subtitleExpression;
516:            }
517:
518:            /**
519:             *
520:             */
521:            public JRExpression getAnchorNameExpression() {
522:                return anchorNameExpression;
523:            }
524:
525:            /**
526:             *
527:             */
528:            public JRExpression getHyperlinkReferenceExpression() {
529:                return hyperlinkReferenceExpression;
530:            }
531:
532:            /**
533:             *
534:             */
535:            public JRExpression getHyperlinkAnchorExpression() {
536:                return hyperlinkAnchorExpression;
537:            }
538:
539:            /**
540:             *
541:             */
542:            public JRExpression getHyperlinkPageExpression() {
543:                return hyperlinkPageExpression;
544:            }
545:
546:            /**
547:             *
548:             */
549:            public JRChartDataset getDataset() {
550:                return dataset;
551:            }
552:
553:            /**
554:             *
555:             */
556:            public JRChartPlot getPlot() {
557:                return plot;
558:            }
559:
560:            public byte getChartType() {
561:                return chartType;
562:            }
563:
564:            public JRChild getCopy(JRAbstractObjectFactory factory) {
565:                return factory.getChart(this );
566:            }
567:
568:            public void collectExpressions(JRExpressionCollector collector) {
569:                collector.collect(this );
570:            }
571:
572:            public void writeXml(JRXmlWriter xmlWriter) throws IOException {
573:                xmlWriter.writeChartTag(this );
574:            }
575:
576:            public int getBookmarkLevel() {
577:                return bookmarkLevel;
578:            }
579:
580:            /**
581:             *
582:             */
583:            public String getCustomizerClass() {
584:                return customizerClass;
585:            }
586:
587:            /**
588:             *
589:             */
590:            public byte getMode() {
591:                return JRStyleResolver.getMode(this , MODE_TRANSPARENT);
592:            }
593:
594:            /**
595:             *
596:             */
597:            public byte getBorder() {
598:                return JRStyleResolver.getBorder(this );
599:            }
600:
601:            public Byte getOwnBorder() {
602:                return border;
603:            }
604:
605:            /**
606:             *
607:             */
608:            public void setBorder(byte border) {
609:                this .border = new Byte(border);
610:            }
611:
612:            /**
613:             *
614:             */
615:            public void setBorder(Byte border) {
616:                this .border = border;
617:            }
618:
619:            /**
620:             *
621:             */
622:            public Color getBorderColor() {
623:                return JRStyleResolver.getBorderColor(this , getForecolor());
624:            }
625:
626:            public Color getOwnBorderColor() {
627:                return borderColor;
628:            }
629:
630:            /**
631:             *
632:             */
633:            public void setBorderColor(Color borderColor) {
634:                this .borderColor = borderColor;
635:            }
636:
637:            /**
638:             *
639:             */
640:            public int getPadding() {
641:                return JRStyleResolver.getPadding(this );
642:            }
643:
644:            public Integer getOwnPadding() {
645:                return padding;
646:            }
647:
648:            /**
649:             *
650:             */
651:            public void setPadding(int padding) {
652:                this .padding = new Integer(padding);
653:            }
654:
655:            /**
656:             *
657:             */
658:            public void setPadding(Integer padding) {
659:                this .padding = padding;
660:            }
661:
662:            /**
663:             *
664:             */
665:            public byte getTopBorder() {
666:                return JRStyleResolver.getTopBorder(this );
667:            }
668:
669:            /**
670:             *
671:             */
672:            public Byte getOwnTopBorder() {
673:                return topBorder;
674:            }
675:
676:            /**
677:             *
678:             */
679:            public void setTopBorder(byte topBorder) {
680:                this .topBorder = new Byte(topBorder);
681:            }
682:
683:            /**
684:             *
685:             */
686:            public void setTopBorder(Byte topBorder) {
687:                this .topBorder = topBorder;
688:            }
689:
690:            /**
691:             *
692:             */
693:            public Color getTopBorderColor() {
694:                return JRStyleResolver.getTopBorderColor(this , getForecolor());
695:            }
696:
697:            /**
698:             *
699:             */
700:            public Color getOwnTopBorderColor() {
701:                return topBorderColor;
702:            }
703:
704:            /**
705:             *
706:             */
707:            public void setTopBorderColor(Color topBorderColor) {
708:                this .topBorderColor = topBorderColor;
709:            }
710:
711:            /**
712:             *
713:             */
714:            public int getTopPadding() {
715:                return JRStyleResolver.getTopPadding(this );
716:            }
717:
718:            /**
719:             *
720:             */
721:            public Integer getOwnTopPadding() {
722:                return topPadding;
723:            }
724:
725:            /**
726:             *
727:             */
728:            public void setTopPadding(int topPadding) {
729:                this .topPadding = new Integer(topPadding);
730:            }
731:
732:            /**
733:             *
734:             */
735:            public void setTopPadding(Integer topPadding) {
736:                this .topPadding = topPadding;
737:            }
738:
739:            /**
740:             *
741:             */
742:            public byte getLeftBorder() {
743:                return JRStyleResolver.getLeftBorder(this );
744:            }
745:
746:            /**
747:             *
748:             */
749:            public Byte getOwnLeftBorder() {
750:                return leftBorder;
751:            }
752:
753:            /**
754:             *
755:             */
756:            public void setLeftBorder(byte leftBorder) {
757:                this .leftBorder = new Byte(leftBorder);
758:            }
759:
760:            /**
761:             *
762:             */
763:            public void setLeftBorder(Byte leftBorder) {
764:                this .leftBorder = leftBorder;
765:            }
766:
767:            /**
768:             *
769:             */
770:            public Color getLeftBorderColor() {
771:                return JRStyleResolver.getLeftBorderColor(this , getForecolor());
772:            }
773:
774:            /**
775:             *
776:             */
777:            public Color getOwnLeftBorderColor() {
778:                return leftBorderColor;
779:            }
780:
781:            /**
782:             *
783:             */
784:            public void setLeftBorderColor(Color leftBorderColor) {
785:                this .leftBorderColor = leftBorderColor;
786:            }
787:
788:            /**
789:             *
790:             */
791:            public int getLeftPadding() {
792:                return JRStyleResolver.getLeftPadding(this );
793:            }
794:
795:            /**
796:             *
797:             */
798:            public Integer getOwnLeftPadding() {
799:                return leftPadding;
800:            }
801:
802:            /**
803:             *
804:             */
805:            public void setLeftPadding(int leftPadding) {
806:                this .leftPadding = new Integer(leftPadding);
807:            }
808:
809:            /**
810:             *
811:             */
812:            public void setLeftPadding(Integer leftPadding) {
813:                this .leftPadding = leftPadding;
814:            }
815:
816:            /**
817:             *
818:             */
819:            public byte getBottomBorder() {
820:                return JRStyleResolver.getBottomBorder(this );
821:            }
822:
823:            /**
824:             *
825:             */
826:            public Byte getOwnBottomBorder() {
827:                return bottomBorder;
828:            }
829:
830:            /**
831:             *
832:             */
833:            public void setBottomBorder(byte bottomBorder) {
834:                this .bottomBorder = new Byte(bottomBorder);
835:            }
836:
837:            /**
838:             *
839:             */
840:            public void setBottomBorder(Byte bottomBorder) {
841:                this .bottomBorder = bottomBorder;
842:            }
843:
844:            /**
845:             *
846:             */
847:            public Color getBottomBorderColor() {
848:                return JRStyleResolver.getBottomBorderColor(this ,
849:                        getForecolor());
850:            }
851:
852:            /**
853:             *
854:             */
855:            public Color getOwnBottomBorderColor() {
856:                return bottomBorderColor;
857:            }
858:
859:            /**
860:             *
861:             */
862:            public void setBottomBorderColor(Color bottomBorderColor) {
863:                this .bottomBorderColor = bottomBorderColor;
864:            }
865:
866:            /**
867:             *
868:             */
869:            public int getBottomPadding() {
870:                return JRStyleResolver.getBottomPadding(this );
871:            }
872:
873:            /**
874:             *
875:             */
876:            public Integer getOwnBottomPadding() {
877:                return bottomPadding;
878:            }
879:
880:            /**
881:             *
882:             */
883:            public void setBottomPadding(int bottomPadding) {
884:                this .bottomPadding = new Integer(bottomPadding);
885:            }
886:
887:            /**
888:             *
889:             */
890:            public void setBottomPadding(Integer bottomPadding) {
891:                this .bottomPadding = bottomPadding;
892:            }
893:
894:            /**
895:             *
896:             */
897:            public byte getRightBorder() {
898:                return JRStyleResolver.getRightBorder(this );
899:            }
900:
901:            /**
902:             *
903:             */
904:            public Byte getOwnRightBorder() {
905:                return rightBorder;
906:            }
907:
908:            /**
909:             *
910:             */
911:            public void setRightBorder(byte rightBorder) {
912:                this .rightBorder = new Byte(rightBorder);
913:            }
914:
915:            /**
916:             *
917:             */
918:            public void setRightBorder(Byte rightBorder) {
919:                this .rightBorder = rightBorder;
920:            }
921:
922:            /**
923:             *
924:             */
925:            public Color getRightBorderColor() {
926:                return JRStyleResolver
927:                        .getRightBorderColor(this , getForecolor());
928:            }
929:
930:            /**
931:             *
932:             */
933:            public Color getOwnRightBorderColor() {
934:                return rightBorderColor;
935:            }
936:
937:            /**
938:             *
939:             */
940:            public void setRightBorderColor(Color rightBorderColor) {
941:                this .rightBorderColor = rightBorderColor;
942:            }
943:
944:            /**
945:             *
946:             */
947:            public int getRightPadding() {
948:                return JRStyleResolver.getRightPadding(this );
949:            }
950:
951:            /**
952:             *
953:             */
954:            public Integer getOwnRightPadding() {
955:                return rightPadding;
956:            }
957:
958:            /**
959:             *
960:             */
961:            public void setRightPadding(int rightPadding) {
962:                this .rightPadding = new Integer(rightPadding);
963:            }
964:
965:            /**
966:             *
967:             */
968:            public void setRightPadding(Integer rightPadding) {
969:                this .rightPadding = rightPadding;
970:            }
971:
972:            public String getLinkType() {
973:                return linkType;
974:            }
975:
976:            public JRHyperlinkParameter[] getHyperlinkParameters() {
977:                return hyperlinkParameters;
978:            }
979:
980:            private void readObject(ObjectInputStream in) throws IOException,
981:                    ClassNotFoundException {
982:                in.defaultReadObject();
983:                normalizeLinkType();
984:            }
985:
986:            protected void normalizeLinkType() {
987:                if (linkType == null) {
988:                    linkType = JRHyperlinkHelper.getLinkType(hyperlinkType);
989:                }
990:                hyperlinkType = JRHyperlink.HYPERLINK_TYPE_NULL;
991:            }
992:
993:            public JRExpression getHyperlinkTooltipExpression() {
994:                return hyperlinkTooltipExpression;
995:            }
996:
997:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.