1 /* |
1 /* |
2 * Copyright (c) 2004 Nokia Corporation and/or its subsidiary(-ies). |
2 * Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies). |
3 * All rights reserved. |
3 * All rights reserved. |
4 * This component and the accompanying materials are made available |
4 * This component and the accompanying materials are made available |
5 * under the terms of "Eclipse Public License v1.0" |
5 * under the terms of "Eclipse Public License v1.0" |
6 * which accompanies this distribution, and is available |
6 * which accompanies this distribution, and is available |
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
140 * |
140 * |
141 * @param svgImage the <code>SVGImage</code> this animator should render. |
141 * @param svgImage the <code>SVGImage</code> this animator should render. |
142 * @return a new <code>SVGAnimator</code> instance. |
142 * @return a new <code>SVGAnimator</code> instance. |
143 * @throws NullPointerException if <code>svgImage</code> is null. |
143 * @throws NullPointerException if <code>svgImage</code> is null. |
144 */ |
144 */ |
145 |
145 |
146 public static SVGAnimator createAnimator(SVGImage svgImage) |
146 public static SVGAnimator createAnimator(SVGImage svgImage) |
147 { |
|
148 SVGAnimator tempAnimator = null; |
|
149 |
|
150 |
|
151 |
|
152 tempAnimator=M2GSVGAnimator.buildAnimator(svgImage); |
|
153 |
|
154 |
|
155 |
|
156 return tempAnimator; |
|
157 } |
|
158 |
|
159 |
|
160 |
|
161 public static SVGAnimator createAnimator(SVGImage svgImage,java.lang.String componentBaseClass) |
|
162 { |
|
163 SVGAnimator tempAnimator = null; |
|
164 |
|
165 if (componentBaseClass == "org.eclipse.swt.widgets.Control") |
|
166 { |
|
167 |
|
168 tempAnimator=M2GSVGeSWTAnimator.buildAnimator(svgImage); |
|
169 |
|
170 } |
|
171 else |
|
172 { |
|
173 |
|
174 tempAnimator=M2GSVGAnimator.buildAnimator(svgImage); |
|
175 |
|
176 } |
|
177 return tempAnimator; |
|
178 } |
|
179 |
|
180 /* public static SVGAnimator createAnimator(SVGImage svgImage) |
|
181 { |
147 { |
182 SVGAnimator tempAnimator = null; |
148 SVGAnimator tempAnimator = null; |
183 |
149 |
184 |
150 tempAnimator=M2GSVGAnimator.buildAnimator(svgImage); |
185 |
151 |
186 tempAnimator=M2GSVGeSWTAnimator.buildAnimator(svgImage); |
|
187 |
|
188 |
|
189 |
|
190 //tempAnimator=M2GSVGAnimator.buildAnimator(svgImage); |
|
191 |
|
192 return tempAnimator; |
152 return tempAnimator; |
193 }*/ |
153 } |
|
154 |
194 |
155 |
195 /** |
156 /** |
196 * This method creates a new <code>SVGAnimator</code> for the specified SVGImage. |
157 * This method creates a new <code>SVGAnimator</code> for the specified SVGImage. |
197 * |
158 * |
198 * The following components types must be supported: |
159 * The following components types must be supported: |
215 * @throws NullPointerException if <code>svgImage</code> is null. |
176 * @throws NullPointerException if <code>svgImage</code> is null. |
216 * @throws IllegalArgumentException if the requested |
177 * @throws IllegalArgumentException if the requested |
217 * <code>componentBaseClass</code> is not supported by the |
178 * <code>componentBaseClass</code> is not supported by the |
218 * implementation. |
179 * implementation. |
219 */ |
180 */ |
220 // |
181 |
221 // public static SVGAnimator createAnimator(SVGImage svgImage, String componentBaseClass) |
182 public static SVGAnimator createAnimator(SVGImage svgImage,java.lang.String componentBaseClass) |
222 // { |
|
223 // SVGAnimator tempAnimator = null; |
|
224 // |
|
225 // tempAnimator=M2GSVGAnimator.buildAnimator(svgImage, componentBaseClass); |
|
226 // |
|
227 // return tempAnimator; |
|
228 // |
|
229 // } |
|
230 |
|
231 |
|
232 |
|
233 /* public static SVGAnimator createAnimator( |
|
234 SVGImage svgImage, String componentBaseClass) |
|
235 { |
183 { |
236 |
|
237 |
|
238 SVGAnimator tempAnimator = null; |
184 SVGAnimator tempAnimator = null; |
|
185 |
|
186 if (componentBaseClass == null) |
|
187 { |
|
188 tempAnimator = createAnimator(svgImage); |
|
189 return tempAnimator; |
|
190 } |
|
191 |
|
192 else if (componentBaseClass == "org.eclipse.swt.widgets.Control") |
|
193 { |
239 tempAnimator=M2GSVGeSWTAnimator.buildAnimator(svgImage); |
194 tempAnimator=M2GSVGeSWTAnimator.buildAnimator(svgImage); |
240 // TODO Check for the toolkit?? tempAnimator=M2GSVGAnimator.buildAnimator(svgImage, componentBaseClass); |
195 } |
|
196 |
|
197 else if (componentBaseClass == "javax.microedition.lcdui.Canvas") |
|
198 { |
|
199 tempAnimator=M2GSVGAnimator.buildAnimator(svgImage); |
|
200 return tempAnimator; |
|
201 } |
|
202 |
|
203 else |
|
204 { |
|
205 throw new IllegalArgumentException(); |
|
206 } |
241 return tempAnimator; |
207 return tempAnimator; |
242 }*/ |
208 } |
243 |
209 |
244 /** |
210 /** |
245 * The type of target component associated with the animator depends on the |
211 * The type of target component associated with the animator depends on the |
246 * Java profile this specification is implemented on: |
212 * Java profile this specification is implemented on: |
247 * |
213 * |