43 |
|
|
44 |
/** |
/** |
45 |
* A {@link View} implementation that is able to render arbitrary |
* A {@link View} implementation that is able to render arbitrary |
46 |
* {@link Components}. This uses the attribute |
* {@link Component}s. This uses the attribute |
47 |
* {@link StyleConstants#ComponentAttribute} to determine the |
* {@link StyleConstants#ComponentAttribute} to determine the |
48 |
* <code>Component</code> that should be rendered. This <code>Component</code> |
* <code>Component</code> that should be rendered. This <code>Component</code> |
49 |
* becomes a direct child of the <code>JTextComponent</code> that contains |
* becomes a direct child of the <code>JTextComponent</code> that contains |
53 |
* @author original author unknown |
* @author original author unknown |
54 |
* @author Roman Kennke (roman@kennke.org) |
* @author Roman Kennke (roman@kennke.org) |
55 |
*/ |
*/ |
56 |
|
// FIXME: This class is a complete stub and needs to be implemented properly. |
57 |
public class ComponentView extends View |
public class ComponentView extends View |
58 |
{ |
{ |
59 |
/** |
/** |
119 |
return 0; |
return 0; |
120 |
} |
} |
121 |
|
|
122 |
public float getMinimumSpan(int axis) |
public float getMinimumSpan(int axis) |
123 |
{ |
{ |
124 |
return 0; |
// TODO: Implement this properly. |
125 |
} |
return 0; |
126 |
|
} |
127 |
public float getPreferredSpan(int axis) |
|
128 |
{ |
public float getPreferredSpan(int axis) |
129 |
return 0; |
{ |
130 |
} |
// TODO: Implement this properly. |
131 |
|
return 0; |
132 |
public Shape modelToView(int pos, Shape a, Position.Bias b) |
} |
133 |
throws BadLocationException |
|
134 |
{ |
public Shape modelToView(int pos, Shape a, Position.Bias b) |
135 |
return null; |
throws BadLocationException |
136 |
} |
{ |
137 |
|
// TODO: Implement this properly. |
138 |
public void paint(Graphics g, Shape a) |
return null; |
139 |
{ |
} |
|
} |
|
140 |
|
|
141 |
public void setParent(View p) |
public void paint(Graphics g, Shape a) |
142 |
{ |
{ |
143 |
} |
// TODO: Implement this properly. |
144 |
|
} |
145 |
|
|
146 |
|
public void setParent(View p) |
147 |
|
{ |
148 |
|
// TODO: Implement this properly. |
149 |
|
} |
150 |
|
|
151 |
public void setSize(float width, float height) |
public void setSize(float width, float height) |
152 |
{ |
{ |
153 |
} |
// TODO: Implement this properly. |
154 |
|
} |
155 |
|
|
156 |
public int viewToModel(float x, float y, Shape a, Position.Bias[] bias) |
public int viewToModel(float x, float y, Shape a, Position.Bias[] bias) |
157 |
{ |
{ |
158 |
return 0; |
// TODO: Implement this properly. |
159 |
} |
return 0; |
160 |
|
} |
161 |
|
|
162 |
/** |
/** |
163 |
* Maps coordinates from the <code>View</code>'s space into a position |
* Maps coordinates from the <code>View</code>'s space into a position |