equal
deleted
inserted
replaced
30 package sun.font; |
30 package sun.font; |
31 |
31 |
32 import java.awt.Font; |
32 import java.awt.Font; |
33 |
33 |
34 import java.awt.font.FontRenderContext; |
34 import java.awt.font.FontRenderContext; |
35 import java.awt.font.LineMetrics; |
|
36 import java.text.Bidi; |
35 import java.text.Bidi; |
37 |
36 |
38 /** |
37 /** |
39 * A factory for text labels. Basically this just holds onto the stuff that |
38 * A factory for text labels. Basically this just holds onto the stuff that |
40 * doesn't change-- the render context, context, and bidi info for the context-- and gets |
39 * doesn't change-- the render context, context, and bidi info for the context-- and gets |
68 public TextLabelFactory(FontRenderContext frc, |
67 public TextLabelFactory(FontRenderContext frc, |
69 char[] text, |
68 char[] text, |
70 Bidi bidi, |
69 Bidi bidi, |
71 int flags) { |
70 int flags) { |
72 this.frc = frc; |
71 this.frc = frc; |
73 this.text = text; |
72 this.text = text.clone(); |
74 this.bidi = bidi; |
73 this.bidi = bidi; |
75 this.flags = flags; |
74 this.flags = flags; |
76 this.lineBidi = bidi; |
75 this.lineBidi = bidi; |
77 this.lineStart = 0; |
76 this.lineStart = 0; |
78 this.lineLimit = text.length; |
77 this.lineLimit = text.length; |
80 |
79 |
81 public FontRenderContext getFontRenderContext() { |
80 public FontRenderContext getFontRenderContext() { |
82 return frc; |
81 return frc; |
83 } |
82 } |
84 |
83 |
85 public char[] getText() { |
|
86 return text; |
|
87 } |
|
88 |
|
89 public Bidi getParagraphBidi() { |
|
90 return bidi; |
|
91 } |
|
92 |
|
93 public Bidi getLineBidi() { |
84 public Bidi getLineBidi() { |
94 return lineBidi; |
85 return lineBidi; |
95 } |
|
96 |
|
97 public int getLayoutFlags() { |
|
98 return flags; |
|
99 } |
|
100 |
|
101 public int getLineStart() { |
|
102 return lineStart; |
|
103 } |
|
104 |
|
105 public int getLineLimit() { |
|
106 return lineLimit; |
|
107 } |
86 } |
108 |
87 |
109 /** |
88 /** |
110 * Set a line context for the factory. Shaping only occurs on this line. |
89 * Set a line context for the factory. Shaping only occurs on this line. |
111 * Characters are ordered as they would appear on this line. |
90 * Characters are ordered as they would appear on this line. |