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;
029:
030: import java.awt.Color;
031:
032: /**
033: * @author Ionut Nedelcu (ionutned@users.sourceforge.net)
034: * @version $Id: JRStyle.java 1229 2006-04-19 10:27:35Z teodord $
035: */
036: public interface JRStyle extends JRStyleContainer {
037: /**
038: * Gets the style unique name.
039: */
040: public String getName();
041:
042: /**
043: * Gets a flag that specifies if this is the default report style.
044: */
045: public boolean isDefault();
046:
047: /**
048: * Returns the element transparency mode.
049: * The default value depends on the type of the report element. Graphic elements like rectangles and lines are
050: * opaque by default, but the images are transparent. Both static texts and text fields are transparent
051: * by default, and so are the subreport elements.
052: * @return MODE_OPAQUE or MODE_TRANSPARENT
053: */
054: public Byte getMode();
055:
056: public Byte getOwnMode();
057:
058: public Color getForecolor();
059:
060: public Color getOwnForecolor();
061:
062: public Color getBackcolor();
063:
064: public Color getOwnBackcolor();
065:
066: /**
067: * Indicates the pen type used for this element.
068: * @return one of the pen constants in this class
069: */
070: public Byte getPen();
071:
072: public Byte getOwnPen();
073:
074: /**
075: * Indicates the fill type used for this element.
076: * @return one of the pen constants in this class
077: */
078: public Byte getFill();
079:
080: public Byte getOwnFill();
081:
082: /**
083: * Indicates the corner radius for rectangles with round corners. The default is 0.
084: */
085: public Integer getRadius();
086:
087: public Integer getOwnRadius();
088:
089: /**
090: * Gets the image scale type.
091: * @return one of the scale constants in this class
092: */
093: public Byte getScaleImage();
094:
095: public Byte getOwnScaleImage();
096:
097: /**
098: * Gets the horizontal alignment of the element.
099: * @return one of the alignment values defined in {@link JRAlignment}
100: */
101: public Byte getHorizontalAlignment();
102:
103: public Byte getOwnHorizontalAlignment();
104:
105: /**
106: * Gets the vertical alignment of the element.
107: * @return one of the alignment values defined in {@link JRAlignment}
108: */
109: public Byte getVerticalAlignment();
110:
111: public Byte getOwnVerticalAlignment();
112:
113: /**
114: * Gets the default border pen size (can be overwritten by individual settings).
115: */
116: public Byte getBorder();
117:
118: public Byte getOwnBorder();
119:
120: /**
121: * Gets the default border color (can be overwritten by individual settings).
122: */
123: public Color getBorderColor();
124:
125: public Color getOwnBorderColor();
126:
127: /**
128: * Gets the default padding in pixels (can be overwritten by individual settings).
129: */
130: public Integer getPadding();
131:
132: public Integer getOwnPadding();
133:
134: /**
135: * Gets the top border pen size.
136: */
137: public Byte getTopBorder();
138:
139: /**
140: * Gets the top border pen size (if the default value was overwritten).
141: */
142: public Byte getOwnTopBorder();
143:
144: /**
145: * Gets the top border color.
146: */
147: public Color getTopBorderColor();
148:
149: /**
150: * Gets the top border color (if the default value was overwritten).
151: */
152: public Color getOwnTopBorderColor();
153:
154: /**
155: *
156: */
157: public Integer getTopPadding();
158:
159: /**
160: *
161: */
162: public Integer getOwnTopPadding();
163:
164: /**
165: *
166: */
167: public Byte getLeftBorder();
168:
169: /**
170: *
171: */
172: public Byte getOwnLeftBorder();
173:
174: /**
175: *
176: */
177: public Color getLeftBorderColor();
178:
179: /**
180: *
181: */
182: public Color getOwnLeftBorderColor();
183:
184: /**
185: *
186: */
187: public Integer getLeftPadding();
188:
189: /**
190: *
191: */
192: public Integer getOwnLeftPadding();
193:
194: /**
195: *
196: */
197: public Byte getBottomBorder();
198:
199: /**
200: *
201: */
202: public Byte getOwnBottomBorder();
203:
204: /**
205: *
206: */
207: public Color getBottomBorderColor();
208:
209: /**
210: *
211: */
212: public Color getOwnBottomBorderColor();
213:
214: /**
215: *
216: */
217: public Integer getBottomPadding();
218:
219: /**
220: *
221: */
222: public Integer getOwnBottomPadding();
223:
224: /**
225: *
226: */
227: public Byte getRightBorder();
228:
229: /**
230: *
231: */
232: public Byte getOwnRightBorder();
233:
234: /**
235: *
236: */
237: public Color getRightBorderColor();
238:
239: /**
240: *
241: */
242: public Color getOwnRightBorderColor();
243:
244: /**
245: *
246: */
247: public Integer getRightPadding();
248:
249: /**
250: *
251: */
252: public Integer getOwnRightPadding();
253:
254: /**
255: * Gets the text rotation.
256: * @return a value representing one of the rotation constants in this class
257: */
258: public Byte getRotation();
259:
260: public Byte getOwnRotation();
261:
262: /**
263: * Gets the line spacing.
264: * @return a value representing one of the line spacing constants in this class
265: */
266: public Byte getLineSpacing();
267:
268: public Byte getOwnLineSpacing();
269:
270: /**
271: * Returns true if the text can contain style tags.
272: */
273: public Boolean isStyledText();
274:
275: public Boolean isOwnStyledText();
276:
277: /**
278: *
279: */
280: public String getFontName();
281:
282: /**
283: *
284: */
285: public String getOwnFontName();
286:
287: /**
288: *
289: */
290: public Boolean isBold();
291:
292: /**
293: *
294: */
295: public Boolean isOwnBold();
296:
297: /**
298: *
299: */
300: public Boolean isItalic();
301:
302: /**
303: *
304: */
305: public Boolean isOwnItalic();
306:
307: /**
308: *
309: */
310: public Boolean isUnderline();
311:
312: /**
313: *
314: */
315: public Boolean isOwnUnderline();
316:
317: /**
318: *
319: */
320: public Boolean isStrikeThrough();
321:
322: /**
323: *
324: */
325: public Boolean isOwnStrikeThrough();
326:
327: /**
328: *
329: */
330: public Integer getFontSize();
331:
332: /**
333: *
334: */
335: public Integer getOwnFontSize();
336:
337: /**
338: *
339: */
340: public String getPdfFontName();
341:
342: /**
343: *
344: */
345: public String getOwnPdfFontName();
346:
347: /**
348: *
349: */
350: public String getPdfEncoding();
351:
352: /**
353: *
354: */
355: public String getOwnPdfEncoding();
356:
357: /**
358: *
359: */
360: public Boolean isPdfEmbedded();
361:
362: /**
363: *
364: */
365: public Boolean isOwnPdfEmbedded();
366:
367: /**
368: * Gets the pattern used for this text field. The pattern will be used in a <tt>SimpleDateFormat</tt> for dates
369: * and a <tt>DecimalFormat</tt> for numeric text fields. The pattern format must follow one of these two classes
370: * formatting rules, as specified in the JDK API docs.
371: * @return a string containing the pattern.
372: */
373: public String getPattern();
374:
375: public String getOwnPattern();
376:
377: /**
378: *
379: */
380: public Boolean isBlankWhenNull();
381:
382: /**
383: *
384: */
385: public Boolean isOwnBlankWhenNull();
386:
387: /**
388: *
389: */
390: public void setForecolor(Color forecolor);
391:
392: /**
393: *
394: */
395: public void setBackcolor(Color backcolor);
396:
397: /**
398: *
399: */
400: public void setMode(byte mode);
401:
402: /**
403: *
404: */
405: public void setMode(Byte mode);
406:
407: /**
408: *
409: */
410: public void setPen(byte pen);
411:
412: /**
413: *
414: */
415: public void setPen(Byte pen);
416:
417: /**
418: *
419: */
420: public void setFill(byte fill);
421:
422: /**
423: *
424: */
425: public void setFill(Byte fill);
426:
427: /**
428: *
429: */
430: public void setRadius(int radius);
431:
432: /**
433: *
434: */
435: public void setRadius(Integer radius);
436:
437: /**
438: *
439: */
440: public void setScaleImage(byte scaleImage);
441:
442: /**
443: *
444: */
445: public void setScaleImage(Byte scaleImage);
446:
447: /**
448: *
449: */
450: public void setHorizontalAlignment(byte horizontalAlignment);
451:
452: /**
453: *
454: */
455: public void setHorizontalAlignment(Byte horizontalAlignment);
456:
457: /**
458: *
459: */
460: public void setVerticalAlignment(byte verticalAlignment);
461:
462: /**
463: *
464: */
465: public void setVerticalAlignment(Byte verticalAlignment);
466:
467: /**
468: *
469: */
470: public void setBorder(byte border);
471:
472: /**
473: *
474: */
475: public void setBorder(Byte border);
476:
477: /**
478: *
479: */
480: public void setBorderColor(Color borderColor);
481:
482: /**
483: *
484: */
485: public void setPadding(int padding);
486:
487: /**
488: *
489: */
490: public void setPadding(Integer padding);
491:
492: /**
493: *
494: */
495: public void setTopBorder(byte topBorder);
496:
497: /**
498: *
499: */
500: public void setTopBorder(Byte topBorder);
501:
502: /**
503: *
504: */
505: public void setTopBorderColor(Color topBorderColor);
506:
507: /**
508: *
509: */
510: public void setTopPadding(int topPadding);
511:
512: /**
513: *
514: */
515: public void setTopPadding(Integer topPadding);
516:
517: /**
518: *
519: */
520: public void setLeftBorder(byte leftBorder);
521:
522: /**
523: *
524: */
525: public void setLeftBorder(Byte leftBorder);
526:
527: /**
528: *
529: */
530: public void setLeftBorderColor(Color leftBorderColor);
531:
532: /**
533: *
534: */
535: public void setLeftPadding(int leftPadding);
536:
537: /**
538: *
539: */
540: public void setLeftPadding(Integer leftPadding);
541:
542: /**
543: *
544: */
545: public void setBottomBorder(byte bottomBorder);
546:
547: /**
548: *
549: */
550: public void setBottomBorder(Byte bottomBorder);
551:
552: /**
553: *
554: */
555: public void setBottomBorderColor(Color bottomBorderColor);
556:
557: /**
558: *
559: */
560: public void setBottomPadding(int bottomPadding);
561:
562: /**
563: *
564: */
565: public void setBottomPadding(Integer bottomPadding);
566:
567: /**
568: *
569: */
570: public void setRightBorder(byte rightBorder);
571:
572: /**
573: *
574: */
575: public void setRightBorder(Byte rightBorder);
576:
577: /**
578: *
579: */
580: public void setRightBorderColor(Color rightBorderColor);
581:
582: /**
583: *
584: */
585: public void setRightPadding(int rightPadding);
586:
587: /**
588: *
589: */
590: public void setRightPadding(Integer rightPadding);
591:
592: /**
593: *
594: */
595: public void setRotation(byte rotation);
596:
597: /**
598: *
599: */
600: public void setRotation(Byte rotation);
601:
602: /**
603: *
604: */
605: public void setFontName(String fontName);
606:
607: /**
608: *
609: */
610: public void setBold(boolean bold);
611:
612: /**
613: *
614: */
615: public void setBold(Boolean bold);
616:
617: /**
618: *
619: */
620: public void setItalic(boolean italic);
621:
622: /**
623: *
624: */
625: public void setItalic(Boolean italic);
626:
627: /**
628: *
629: */
630: public void setPdfEmbedded(boolean pdfEmbedded);
631:
632: /**
633: *
634: */
635: public void setPdfEmbedded(Boolean pdfEmbedded);
636:
637: /**
638: *
639: */
640: public void setStrikeThrough(boolean strikeThrough);
641:
642: /**
643: *
644: */
645: public void setStrikeThrough(Boolean strikeThrough);
646:
647: /**
648: *
649: */
650: public void setStyledText(boolean styledText);
651:
652: /**
653: *
654: */
655: public void setStyledText(Boolean styledText);
656:
657: /**
658: *
659: */
660: public void setUnderline(boolean underline);
661:
662: /**
663: *
664: */
665: public void setUnderline(Boolean underline);
666:
667: /**
668: *
669: */
670: public void setLineSpacing(byte lineSpacing);
671:
672: /**
673: *
674: */
675: public void setLineSpacing(Byte lineSpacing);
676:
677: /**
678: *
679: */
680: public void setPattern(String pattern);
681:
682: /**
683: *
684: */
685: public void setBlankWhenNull(boolean isBlankWhenNull);
686:
687: /**
688: *
689: */
690: public void setBlankWhenNull(Boolean isBlankWhenNull);
691:
692: /**
693: *
694: */
695: public void setPdfEncoding(String pdfEncoding);
696:
697: /**
698: *
699: */
700: public void setPdfFontName(String pdfFontName);
701:
702: /**
703: *
704: */
705: public void setFontSize(int fontSize);
706:
707: /**
708: *
709: */
710: public void setFontSize(Integer fontSize);
711:
712: /**
713: *
714: */
715: public JRConditionalStyle[] getConditionalStyles();
716: }
|