Class Inspector
java.lang.Object
org.graffiti.plugin.GenericPluginAdapter
org.graffiti.plugin.EditorPluginAdapter
org.graffiti.plugins.inspectors.defaults.Inspector
- All Implemented Interfaces:
NeedEditComponents
,EditorPlugin
,GenericPlugin
,InspectorPlugin
,ViewListener
,SelectionListener
,SessionListener
public class Inspector extends EditorPluginAdapter implements InspectorPlugin, SessionListener, SelectionListener, NeedEditComponents, ViewListener
Represents the main class of the inspector plugin.
- Version:
- $Revision: 1.23 $
-
Field Summary
Fields Modifier and Type Field Description static int
DEFAULT_WIDTH
The default width of the inspector components.Fields inherited from class org.graffiti.plugin.EditorPluginAdapter
tools
-
Constructor Summary
Constructors Constructor Description Inspector()
Constructs a new inspector instance. -
Method Summary
Modifier and Type Method Description void
addTab(InspectorTab tab)
Adds anotherInspectorTab
to the currentInspectorPlugin
.InspectorContainer
getInspectorContainer()
Returns theInspectorContainer
.InspectorTab
getSelectedTab()
InspectorTab[]
getTabs()
Returns an array containing all theInspectorTab
s of theInspectorPlugin
.boolean
isSelectionListener()
States whether this class wants to be registered as aSelectionListener
.boolean
isSessionListener()
States whether this class wants to be registered as aSessionListener
.boolean
isViewListener()
States whether this class wants to be registered as aViewListener
, i.e.boolean
needsEditComponents()
Inspector relies on the edit components to be up-to-date.void
selectionChanged(SelectionEvent e)
Is called, if something in the selection model changed.void
selectionListChanged(SelectionEvent e)
Is called, if a named selection is added or removed.void
sessionChanged(Session s)
This method is called when the session changes.void
sessionDataChanged(Session s)
This method is called when the session data (but not the session's graph data) changed.void
setEditComponentMap(Map<Class<? extends Displayable>,Class<? extends ValueEditComponent>> ecMap)
Set the map that connects attributes and parameters with editcomponents.void
setSelectedTab(InspectorTab tab)
void
viewChanged(View newView)
This method is called when the view changes.Methods inherited from class org.graffiti.plugin.EditorPluginAdapter
getAttributeComponents, getGUIComponents, getInspectorTabs, getModes, getShapes, getTools, getValueEditComponents
Methods inherited from class org.graffiti.plugin.GenericPluginAdapter
configure, doBeforeExit, getAddonIcon, getAlgorithms, getAttributeDescriptions, getAttributes, getDefaultView, getDependencies, getExtensions, getGraphPostProcessors, getIcon, getInputSerializers, getOutputSerializers, getURLattributeActions, getViews, interrupt, setIsAddon, stop
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.graffiti.plugin.EditorPlugin
getAttributeComponents, getGUIComponents, getInspectorTabs, getModes, getShapes, getTools, getValueEditComponents
Methods inherited from interface org.graffiti.plugin.GenericPlugin
configure, doBeforeExit, getAlgorithms, getAttributeDescriptions, getAttributes, getDefaultView, getDependencies, getExtensions, getIcon, getInputSerializers, getOutputSerializers, getURLattributeActions, getViews, interrupt, stop
-
Field Details
-
DEFAULT_WIDTH
public static final int DEFAULT_WIDTHThe default width of the inspector components.- See Also:
- Constant Field Values
-
-
Constructor Details
-
Inspector
public Inspector()Constructs a new inspector instance.
-
-
Method Details
-
setEditComponentMap
public void setEditComponentMap(Map<Class<? extends Displayable>,Class<? extends ValueEditComponent>> ecMap)Description copied from interface:NeedEditComponents
Set the map that connects attributes and parameters with editcomponents.- Specified by:
setEditComponentMap
in interfaceNeedEditComponents
- See Also:
NeedEditComponents.setEditComponentMap(Map)
-
getInspectorContainer
Returns theInspectorContainer
.- Returns:
- DOCUMENT ME!
-
isSelectionListener
public boolean isSelectionListener()Description copied from class:GenericPluginAdapter
States whether this class wants to be registered as aSelectionListener
.- Specified by:
isSelectionListener
in interfaceGenericPlugin
- Overrides:
isSelectionListener
in classGenericPluginAdapter
- Returns:
- DOCUMENT ME!
- See Also:
GenericPlugin.isSelectionListener()
-
isSessionListener
public boolean isSessionListener()States whether this class wants to be registered as aSessionListener
.- Specified by:
isSessionListener
in interfaceGenericPlugin
- Overrides:
isSessionListener
in classGenericPluginAdapter
- Returns:
- DOCUMENT ME!
-
isViewListener
public boolean isViewListener()Description copied from interface:GenericPlugin
States whether this class wants to be registered as aViewListener
, i.e. if it wants to get informed when another view in the same session becomes active. This method is not called when another session is activated. ImplementSessionListener
if you are interested in session changed events.- Specified by:
isViewListener
in interfaceGenericPlugin
- Overrides:
isViewListener
in classGenericPluginAdapter
- Returns:
- DOCUMENT ME!
- See Also:
GenericPlugin.isViewListener()
-
getTabs
Returns an array containing all theInspectorTab
s of theInspectorPlugin
.- Specified by:
getTabs
in interfaceInspectorPlugin
- Returns:
- an array containing all the
InspectorTab
s of theInspectorPlugin
.
-
addTab
Adds anotherInspectorTab
to the currentInspectorPlugin
.- Specified by:
addTab
in interfaceInspectorPlugin
- Parameters:
tab
- theInspectorTab
to be added to theInspectorPlugin
.- Throws:
RuntimeException
- DOCUMENT ME!
-
needsEditComponents
public boolean needsEditComponents()Inspector relies on the edit components to be up-to-date.- Specified by:
needsEditComponents
in interfaceGenericPlugin
- Overrides:
needsEditComponents
in classGenericPluginAdapter
- Returns:
- DOCUMENT ME!
-
selectionChanged
Is called, if something in the selection model changed.- Specified by:
selectionChanged
in interfaceSelectionListener
- Parameters:
e
- DOCUMENT ME!
-
selectionListChanged
Description copied from interface:SelectionListener
Is called, if a named selection is added or removed.- Specified by:
selectionListChanged
in interfaceSelectionListener
-
sessionChanged
This method is called when the session changes.- Specified by:
sessionChanged
in interfaceSessionListener
- Parameters:
s
- the new Session.- Throws:
RuntimeException
- DOCUMENT ME!
-
sessionDataChanged
This method is called when the session data (but not the session's graph data) changed.- Specified by:
sessionDataChanged
in interfaceSessionListener
- Parameters:
s
- Session
-
viewChanged
Description copied from interface:ViewListener
This method is called when the view changes. This method is not called when another session is activated. ImplementSessionListener
if you are interested in session changed events.- Specified by:
viewChanged
in interfaceViewListener
- Parameters:
newView
- the new View.
-
setSelectedTab
- Specified by:
setSelectedTab
in interfaceInspectorPlugin
-
getSelectedTab
-