Package org.gephi.io.processor.spi
Interface ProcessorUI
-
public interface ProcessorUIDefine processor settings user interface.Declared in the system as services (i.e. singleton), the role of UI classes is to provide user interface to configure processors and remember last used settings if needed. User interface for processors are shown when the import report is closed and can access the container before the process started.
To be recognized by the system, implementations must just add the following annotation:
@ServiceProvider(service=ProcessorUI.class)
- Author:
- Mathieu Bastian
- See Also:
Processor
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description JPanelgetPanel()Returns the processor settings panel.booleanisUIFoProcessor(Processor processor)Returnstrueif this UI belongs to the given processor.booleanisValid(Container[] containers)Returnstrueif the processor this UI represents is valid forcontainers.voidsetup(Processor processor)Link the UI to the processor and therefore to settings values.voidunsetup()Notify UI the settings panel has been closed and that new values can be written.
-
-
-
Method Detail
-
setup
void setup(Processor processor)
Link the UI to the processor and therefore to settings values. This method is called aftergetPanel()to push settings.- Parameters:
processor- the processor that settings is to be set
-
getPanel
JPanel getPanel()
Returns the processor settings panel.- Returns:
- a settings panel, or
null
-
unsetup
void unsetup()
Notify UI the settings panel has been closed and that new values can be written.
-
isUIFoProcessor
boolean isUIFoProcessor(Processor processor)
Returnstrueif this UI belongs to the given processor.- Parameters:
processor- the processor that has to be tested- Returns:
trueif the UI is matching withprocessor,falseotherwise.
-
isValid
boolean isValid(Container[] containers)
Returnstrueif the processor this UI represents is valid forcontainers. Processors could be specific to some type of data and this method can provide this information.- Parameters:
containers- containers that are to be processed- Returns:
trueif the processor this UI represents is valid forcontainers.
-
-