public interface PreviewUI
Implementations of this interface provide a JPanel
component
which will be placed in a separated tab in the Preview Settings. When a workspace is
selected this class receives the current PreviewModel
so the panel
can access the central PreviewProperties
and can read/write settings
values.
PreviewUI are singleton services and implementations need to add the following annotation to be recognized by the system:
@ServiceProvider(service=PreviewUI.class)
Modifier and Type | Method and Description |
---|---|
Icon |
getIcon()
Returns the icon of the tab or
null if none |
JPanel |
getPanel()
Returns the
JPanel component to be displayed. |
String |
getPanelTitle()
Returns the title of the tab
|
void |
setup(PreviewModel previewModel)
Initialization method called when a workspace is selected and a panel is
about to be requested.
|
void |
unsetup()
Method called when the UI is unloaded and the panel to be destroyed.
|
void setup(PreviewModel previewModel)
getPanel()
.previewModel
- the model associated to the current workspaceJPanel getPanel()
JPanel
component to be displayed.
This method
is always called after setup()
so the implementation
can initialize the panel with the model. Note that the panel is destroyed
after unsetup()
is called. In other words, a new panel is
requested at each workspace selection.
void unsetup()
PreviewModel
is passed through setup()
.Icon getIcon()
null
if nonenull
String getPanelTitle()
Copyright © 2007–2017 Gephi Consortium. All rights reserved.