|
Cytoscape 3.0.1 API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface CyCustomGraphicsFactory<T extends CustomGraphicLayer>
This interface provides the factory to create CyCustomGraphics objects.
CyCustomGraphicsFactory objects should be registered as services in
OSGi and will be used by Renderers to create the actual custom graphics
implementations. Note that the type of a CyCustomGraphicsFactory is
the type of the underlying CustomGraphicLayer
not the type
of the resulting CyCustomGraphic
object this creates. In general,
the pattern is to add to your CyActivator class:
CyCustomGraphicsFactory myCustomGraphicsFactory = new MyCustomGraphicsFactory(); registerService(bundleContext, myCustomGraphicsFactory, CyCustomGraphicsFactory.class, new Properites());
Method Summary | |
---|---|
CyCustomGraphics<T> |
getInstance(String input)
Get a new instance of the CyCustomGraphics. |
CyCustomGraphics<T> |
getInstance(URL url)
Get a new instance of the CyCustomGraphics based on pulling the data from a URL. |
String |
getPrefix()
Return the prefix to identify this custom graphics factory. |
Class<? extends CyCustomGraphics> |
getSupportedClass()
Return the class that this factory creates. |
CyCustomGraphics<T> |
parseSerializableString(String string)
Create a new CyCustomGraphics object by parsing the string resulting from the toSerializableString() method. |
boolean |
supportsMime(String mimeType)
Given a mime type, return true if this CyCustomGraphicsFactory can utilize this type of data. |
Method Detail |
---|
String getPrefix()
boolean supportsMime(String mimeType)
mimeType
- the mime type string
CyCustomGraphics<T> getInstance(URL url)
CyCustomGraphics
type doesn't support
URLs, this should always return null.
url
- the url that points to the CyCustomGraphics data
CyCustomGraphics<T> getInstance(String input)
CyCustomGraphics
instance. Note that the prefix defined
above will get removed from the string before this method is called.
input
- a possible input string that may be used to create the
instance. Not all implementations will use this.
CyCustomGraphics<T> parseSerializableString(String string)
Class<? extends CyCustomGraphics> getSupportedClass()
|
Cytoscape 3.0.1 API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |