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 intDEFAULT_WIDTHThe 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 voidaddTab(InspectorTab tab)Adds anotherInspectorTabto the currentInspectorPlugin.InspectorContainergetInspectorContainer()Returns theInspectorContainer.InspectorTabgetSelectedTab()InspectorTab[]getTabs()Returns an array containing all theInspectorTabs of theInspectorPlugin.booleanisSelectionListener()States whether this class wants to be registered as aSelectionListener.booleanisSessionListener()States whether this class wants to be registered as aSessionListener.booleanisViewListener()States whether this class wants to be registered as aViewListener, i.e.booleanneedsEditComponents()Inspector relies on the edit components to be up-to-date.voidselectionChanged(SelectionEvent e)Is called, if something in the selection model changed.voidselectionListChanged(SelectionEvent e)Is called, if a named selection is added or removed.voidsessionChanged(Session s)This method is called when the session changes.voidsessionDataChanged(Session s)This method is called when the session data (but not the session's graph data) changed.voidsetEditComponentMap(Map<Class<? extends Displayable>,Class<? extends ValueEditComponent>> ecMap)Set the map that connects attributes and parameters with editcomponents.voidsetSelectedTab(InspectorTab tab)voidviewChanged(View newView)This method is called when the view changes.Methods inherited from class org.graffiti.plugin.EditorPluginAdapter
getAttributeComponents, getGUIComponents, getInspectorTabs, getModes, getShapes, getTools, getValueEditComponentsMethods inherited from class org.graffiti.plugin.GenericPluginAdapter
configure, doBeforeExit, getAddonIcon, getAlgorithms, getAttributeDescriptions, getAttributes, getDefaultView, getDependencies, getExtensions, getGraphPostProcessors, getIcon, getInputSerializers, getOutputSerializers, getURLattributeActions, getViews, interrupt, setIsAddon, stopMethods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.graffiti.plugin.EditorPlugin
getAttributeComponents, getGUIComponents, getInspectorTabs, getModes, getShapes, getTools, getValueEditComponentsMethods 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:NeedEditComponentsSet the map that connects attributes and parameters with editcomponents.- Specified by:
setEditComponentMapin interfaceNeedEditComponents- See Also:
NeedEditComponents.setEditComponentMap(Map)
-
getInspectorContainer
Returns theInspectorContainer.- Returns:
- DOCUMENT ME!
-
isSelectionListener
public boolean isSelectionListener()Description copied from class:GenericPluginAdapterStates whether this class wants to be registered as aSelectionListener.- Specified by:
isSelectionListenerin interfaceGenericPlugin- Overrides:
isSelectionListenerin classGenericPluginAdapter- Returns:
- DOCUMENT ME!
- See Also:
GenericPlugin.isSelectionListener()
-
isSessionListener
public boolean isSessionListener()States whether this class wants to be registered as aSessionListener.- Specified by:
isSessionListenerin interfaceGenericPlugin- Overrides:
isSessionListenerin classGenericPluginAdapter- Returns:
- DOCUMENT ME!
-
isViewListener
public boolean isViewListener()Description copied from interface:GenericPluginStates 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. ImplementSessionListenerif you are interested in session changed events.- Specified by:
isViewListenerin interfaceGenericPlugin- Overrides:
isViewListenerin classGenericPluginAdapter- Returns:
- DOCUMENT ME!
- See Also:
GenericPlugin.isViewListener()
-
getTabs
Returns an array containing all theInspectorTabs of theInspectorPlugin.- Specified by:
getTabsin interfaceInspectorPlugin- Returns:
- an array containing all the
InspectorTabs of theInspectorPlugin.
-
addTab
Adds anotherInspectorTabto the currentInspectorPlugin.- Specified by:
addTabin interfaceInspectorPlugin- Parameters:
tab- theInspectorTabto 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:
needsEditComponentsin interfaceGenericPlugin- Overrides:
needsEditComponentsin classGenericPluginAdapter- Returns:
- DOCUMENT ME!
-
selectionChanged
Is called, if something in the selection model changed.- Specified by:
selectionChangedin interfaceSelectionListener- Parameters:
e- DOCUMENT ME!
-
selectionListChanged
Description copied from interface:SelectionListenerIs called, if a named selection is added or removed.- Specified by:
selectionListChangedin interfaceSelectionListener
-
sessionChanged
This method is called when the session changes.- Specified by:
sessionChangedin 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:
sessionDataChangedin interfaceSessionListener- Parameters:
s- Session
-
viewChanged
Description copied from interface:ViewListenerThis method is called when the view changes. This method is not called when another session is activated. ImplementSessionListenerif you are interested in session changed events.- Specified by:
viewChangedin interfaceViewListener- Parameters:
newView- the new View.
-
setSelectedTab
- Specified by:
setSelectedTabin interfaceInspectorPlugin
-
getSelectedTab
-