24 |
{ |
{ |
25 |
Rectangle r = s.getBounds(); |
Rectangle r = s.getBounds(); |
26 |
|
|
27 |
view.setSize(r.width, |
view.setSize((int)r.getWidth(), |
28 |
r.height); |
(int)r.getHeight()); |
29 |
view.paint(g, s); |
view.paint(g, s); |
30 |
} |
} |
31 |
} |
} |
32 |
} |
} |
33 |
|
|
34 |
BasicTextUI() |
public BasicTextUI() |
35 |
{ |
{ |
36 |
} |
} |
37 |
|
|
59 |
float w = v.getPreferredSpan(View.X_AXIS); |
float w = v.getPreferredSpan(View.X_AXIS); |
60 |
float h = v.getPreferredSpan(View.Y_AXIS); |
float h = v.getPreferredSpan(View.Y_AXIS); |
61 |
|
|
62 |
return new Dimension(w, h); |
return new Dimension((int)w, (int) h); |
63 |
} |
} |
64 |
|
|
65 |
|
|
66 |
void paint(Graphics g, JComponent c) |
public void paint(Graphics g, JComponent c) |
67 |
{ |
{ |
68 |
// view.paint( |
// view.paint( |
69 |
} |
} |
70 |
|
|
71 |
void damageRange(JTextComponent t, int p0, int p1) |
public void damageRange(JTextComponent t, int p0, int p1) |
72 |
{ |
{ |
73 |
damageRange(t, p0, p1, null, null); |
damageRange(t, p0, p1, null, null); |
74 |
} |
} |
75 |
|
|
76 |
void damageRange(JTextComponent t, |
public void damageRange(JTextComponent t, |
77 |
int p0, int p1, |
int p0, int p1, |
78 |
Position.Bias firstBias, |
Position.Bias firstBias, |
79 |
Position.Bias secondBias) |
Position.Bias secondBias) |
80 |
{ |
{ |
81 |
} |
} |
82 |
|
|
83 |
EditorKit getEditorKit(JTextComponent t) |
public EditorKit getEditorKit(JTextComponent t) |
84 |
{ |
{ |
85 |
return kit; |
return kit; |
86 |
} |
} |
87 |
|
|
88 |
int getNextVisualPositionFrom(JTextComponent t, |
public int getNextVisualPositionFrom(JTextComponent t, |
89 |
int pos, |
int pos, |
90 |
Position.Bias b, |
Position.Bias b, |
91 |
int direction, |
int direction, |
94 |
return 0; |
return 0; |
95 |
} |
} |
96 |
|
|
97 |
View getRootView(JTextComponent t) |
public View getRootView(JTextComponent t) |
98 |
{ |
{ |
99 |
return view; |
return view; |
100 |
} |
} |
101 |
|
|
102 |
Rectangle modelToView(JTextComponent t, int pos) |
public Rectangle modelToView(JTextComponent t, int pos) |
103 |
{ |
{ |
104 |
return modelToView(t, pos, null); |
return modelToView(t, pos, null); |
105 |
} |
} |
106 |
|
|
107 |
Rectangle modelToView(JTextComponent t, int pos, Position.Bias bias) |
public Rectangle modelToView(JTextComponent t, int pos, Position.Bias bias) |
108 |
{ |
{ |
109 |
return null; |
return null; |
110 |
} |
} |
111 |
|
|
112 |
int viewToModel(JTextComponent t, Point pt) |
public int viewToModel(JTextComponent t, Point pt) |
113 |
{ |
{ |
114 |
return viewToModel(t, pt, null); |
return viewToModel(t, pt, null); |
115 |
} |
} |
116 |
|
|
117 |
int viewToModel(JTextComponent t, Point pt, Position.Bias[] biasReturn) |
public int viewToModel(JTextComponent t, Point pt, Position.Bias[] biasReturn) |
118 |
{ |
{ |
119 |
return 0; |
return 0; |
120 |
} |
} |