C
- the (generic) type parameter for the interface representing the type of ProgramNodeContribution
created by this SwingProgramNodeServiceV
- the (generic) type parameter for the interface representing the type of the view used by all the
ProgramNodeContribution
created by this servicepublic interface SwingProgramNodeService<C extends ProgramNodeContribution,V extends SwingProgramNodeView<C>> extends URCapProgramNodeService
Modifier and Type | Method and Description |
---|---|
void |
configureContribution(ContributionConfiguration configuration)
This method is called once after the SwingProgramNodeService is registered.
|
C |
createNode(ProgramAPIProvider apiProvider,
V view,
DataModel model,
CreationContext context)
Creates a new program node instance.
|
V |
createView(ViewAPIProvider apiProvider)
Creates a new View instance which implements the UI for your program node screen.
|
String |
getId()
Get the unique identifier for this kind of program node.
|
String |
getTitle(Locale locale) |
String getId()
Get the unique identifier for this kind of program node. The identifier will be used when storing programs that use the program node.
void configureContribution(ContributionConfiguration configuration)
The values of the ContributionConfiguration object will be read once immediately after this method call. Changing values at a later stage will have no effect, so do not store a reference to the configuration object.
If the default values are appropriate, leave this method empty.configuration
- a modifiable ContributionConfiguration with default valuesString getTitle(Locale locale)
locale
- The current locale of PolyScope. Can be used for supporting titles in several languages.V createView(ViewAPIProvider apiProvider)
apiProvider
- Provides access to functionality and services available from within PolyScope related to user
interface and user interactionC createNode(ProgramAPIProvider apiProvider, V view, DataModel model, CreationContext context)
Creates a new program node instance. This happens when the user clicks the button on the Structure tab or when an existing program node is loaded
The returned node must use the supplied data model object to retrieve and store the data contained in it.
apiProvider
- Provides access to functionality and services available from within PolyScope relevant for the
program nodeview
- the View created by createView(ViewAPIProvider)
model
- object where all configuration data of the new program node instance is to be stored in and
retrieved fromcontext
- the context in which this node is createdCopyright © 2018. All rights reserved.