1 21 package org.lobobrowser.html.style; 22 23 import java.awt.Color ; 24 import java.awt.Font ; 25 import java.awt.FontMetrics ; 26 import java.awt.Insets ; 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 getColor() { 54 return prevRenderState.getColor(); 55 } 56 57 public Font getFont() { 58 return prevRenderState.getFont(); 59 } 60 61 public int getFontBase() { 62 return prevRenderState.getFontBase(); 63 } 64 65 public FontMetrics getFontMetrics() { 66 return prevRenderState.getFontMetrics(); 67 } 68 69 public Color getOverlayColor() { 70 return prevRenderState.getOverlayColor(); 71 } 72 73 public Color getBackgroundColor() { 74 return prevRenderState.getBackgroundColor(); 75 } 76 77 public int getTextDecorationMask() { 78 return prevRenderState.getTextDecorationMask(); 79 } 80 81 public WordInfo getWordInfo(String 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 counter, int nesting) { 98 return this.prevRenderState.getCount(counter, nesting); 99 } 100 101 public void resetCount(String counter, int nesting, int value) { 102 this.prevRenderState.resetCount(counter, nesting, value); 103 } 104 105 public int incrementCount(String 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 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 getTextIndentText() { 126 return this.prevRenderState.getTextIndentText(); 127 } 128 129 public int getWhiteSpace() { 130 return this.prevRenderState.getWhiteSpace(); 131 } 132 133 public Insets getMarginInsets() { 134 return this.prevRenderState.getMarginInsets(); 135 } 136 137 public Insets getPaddingInsets() { 138 return this.prevRenderState.getPaddingInsets(); 139 } 140 } 141 | Popular Tags |