Package org.gephi.perspective.spi
Interfaces for creating new perspectives and perspective members.
Create a new Perspective
-
Create a new module and set
Perspective API, andLookup APIas dependencies. - Create a new implementation of perspective and fill methods.
-
Add
@ServiceProviderannotation to your class to be found by the system, like @ServiceProvider(service = Perspective.class, position = 500). - Set the position to define the order of appearance, Overview is 100, Preview is 300.
HowTo attach a TopComponent to a perspective
-
Create a new class which implements the
PerspectiveMemberinterface -
Implement the
isMemberOf()method. Simply test if the given perspective is the one you want to attach the component. For default perspectives, first add a dependency to theDesktopPerspectivemodule and then for instance with preview:public boolean isMemberOf(Perspective perspective) { return perspective instanceof PreviewPerspective; } -
Return the unique
TopComponentidentifier for thegetTopComponentId()method. The identifier is defined in theTopComponentannotations. -
Add
@ServiceProviderannotation to your class to be found by the system, like @ServiceProvider(service = PerspectiveMember.class).
-
Interface Summary Interface Description Perspective Define a group of components which are showed in the banner.