Package org.pepstock.charba.client.items
Class ChartElementFactories
- java.lang.Object
-
- org.pepstock.charba.client.items.ChartElementFactories
-
public final class ChartElementFactories extends Object
Utility which is registering allChartElementFactory
for element type.- Author:
- Andrea "Stock" Stocchero
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ChartElementFactories
get()
Returns the singleton instance.ChartElementFactory
getFactory(String type)
Returns the factory related to the element type.ChartElementFactory
getFactory(DatasetItem item)
Returns the factory related to the dataset item.boolean
register(ChartElementFactory factory)
Registers the factory.
-
-
-
Method Detail
-
get
public static ChartElementFactories get()
Returns the singleton instance.- Returns:
- the singleton instance
-
register
public boolean register(ChartElementFactory factory)
Registers the factory. It ignores if the factory is already registered.- Parameters:
factory
- factory instance to register- Returns:
true
if the factory has been registered otherwisefalse
-
getFactory
public ChartElementFactory getFactory(DatasetItem item)
Returns the factory related to the dataset item.- Parameters:
item
- the dataset item to use for searching the related factory- Returns:
- the factory related to the dataset item
-
getFactory
public ChartElementFactory getFactory(String type)
Returns the factory related to the element type.- Parameters:
type
- the element type to use for searching the related factory- Returns:
- the factory related to the element type
-
-