KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > lobobrowser > html > style > RenderStateDelegator


1 /*
2     GNU LESSER GENERAL PUBLIC LICENSE
3     Copyright (C) 2006 The Lobo Project
4
5     This library is free software; you can redistribute it and/or
6     modify it under the terms of the GNU Lesser General Public
7     License as published by the Free Software Foundation; either
8     version 2.1 of the License, or (at your option) any later version.
9
10     This library is distributed in the hope that it will be useful,
11     but WITHOUT ANY WARRANTY; without even the implied warranty of
12     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13     Lesser General Public License for more details.
14
15     You should have received a copy of the GNU Lesser General Public
16     License along with this library; if not, write to the Free Software
17     Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
18
19     Contact info: xamjadmin@users.sourceforge.net
20 */

21 package org.lobobrowser.html.style;
22
23 import java.awt.Color JavaDoc;
24 import java.awt.Font JavaDoc;
25 import java.awt.FontMetrics JavaDoc;
26 import java.awt.Insets JavaDoc;
27
28
29 public abstract class RenderStateDelegator implements RenderState {
30     protected final RenderState prevRenderState;
31
32     public RenderStateDelegator(final RenderState prevRenderState) {
33         super();
34         this.prevRenderState = prevRenderState;
35     }
36
37     public RenderState getPreviousRenderState() {
38         return this.prevRenderState;
39     }
40
41     public int getAlignXPercent() {
42         return prevRenderState.getAlignXPercent();
43     }
44
45     public int getAlignYPercent() {
46         return prevRenderState.getAlignYPercent();
47     }
48
49     public int getBlankWidth() {
50         return prevRenderState.getBlankWidth();
51     }
52
53     public Color JavaDoc getColor() {
54         return prevRenderState.getColor();
55     }
56
57     public Font JavaDoc getFont() {
58         return prevRenderState.getFont();
59     }
60
61     public int getFontBase() {
62         return prevRenderState.getFontBase();
63     }
64
65     public FontMetrics JavaDoc getFontMetrics() {
66         return prevRenderState.getFontMetrics();
67     }
68
69     public Color JavaDoc getOverlayColor() {
70         return prevRenderState.getOverlayColor();
71     }
72
73     public Color JavaDoc getBackgroundColor() {
74         return prevRenderState.getBackgroundColor();
75     }
76
77     public int getTextDecorationMask() {
78         return prevRenderState.getTextDecorationMask();
79     }
80
81     public WordInfo getWordInfo(String JavaDoc word) {
82         return prevRenderState.getWordInfo(word);
83     }
84
85     public void invalidate() {
86         prevRenderState.invalidate();
87     }
88
89     public boolean isHighlight() {
90         return prevRenderState.isHighlight();
91     }
92
93     public void setHighlight(boolean highlight) {
94         prevRenderState.setHighlight(highlight);
95     }
96
97     public int getCount(String JavaDoc counter, int nesting) {
98         return this.prevRenderState.getCount(counter, nesting);
99     }
100
101     public void resetCount(String JavaDoc counter, int nesting, int value) {
102         this.prevRenderState.resetCount(counter, nesting, value);
103     }
104
105     public int incrementCount(String JavaDoc counter, int nesting) {
106         return this.prevRenderState.incrementCount(counter, nesting);
107     }
108
109     public BackgroundInfo getBackgroundInfo() {
110         return this.prevRenderState.getBackgroundInfo();
111     }
112
113     public int getDisplay() {
114         return this.prevRenderState.getDisplay();
115     }
116
117     public Color JavaDoc getTextBackgroundColor() {
118         return this.prevRenderState.getTextBackgroundColor();
119     }
120
121     public int getTextIndent(int availWidth) {
122         return this.prevRenderState.getTextIndent(availWidth);
123     }
124
125     public String JavaDoc getTextIndentText() {
126         return this.prevRenderState.getTextIndentText();
127     }
128
129     public int getWhiteSpace() {
130         return this.prevRenderState.getWhiteSpace();
131     }
132
133     public Insets JavaDoc getMarginInsets() {
134         return this.prevRenderState.getMarginInsets();
135     }
136
137     public Insets JavaDoc getPaddingInsets() {
138         return this.prevRenderState.getPaddingInsets();
139     }
140 }
141
Popular Tags