public class DrawStrategyLoader extends JsonLoader<DrawStrategy>
DrawStrategys are easy
to define and if not, no override will be set.
In fact to not specify a DrawStrategy in the Figure is
the most common approach!
In the DrawStrategy Declaration should only be one field.
Either '@', 'name' or '@E'.
If two are specified at the same time, the last one
will get used.
The values for the three types of keys can be in the following
format:
@ specifies a classname. The classname should be fully qualified Class name.
name specifies the key, which will be used in to retrieve a stored DrawStrategy
from the DrawStrategyFactory.
The method DrawStrategyFactory.get(String) will
be used.
@E specifies the name of one of the DrawStrategyFactory.Common
keys to use.
This should just be the name in uppercase letters (e.g. SOLID)jsonObject| Constructor and Description |
|---|
DrawStrategyLoader() |
| Modifier and Type | Method and Description |
|---|---|
DrawStrategy |
get()
This should used the information, generated during
loading and construct an Object.
|
getColor, getJsonObject, getTexture, load, setJsonObject, toObjectArraygetObject, getPreProcessorpublic DrawStrategy get() throws Exception
ExceptionCopyright © 2014. All rights reserved.