org.pfsw.joi
Class InspectionWindowController

java.lang.Object
  extended by org.pfsw.joi.InspectionWindowController
All Implemented Interfaces:
java.awt.event.ActionListener, java.awt.event.WindowListener, java.util.EventListener

public class InspectionWindowController
extends java.lang.Object
implements java.awt.event.ActionListener, java.awt.event.WindowListener

Controls one inspection window with one ore more inspectors inside.


Field Summary
protected static java.lang.String actAbout
           
protected static java.lang.String actBasicInspectHere
           
protected static java.lang.String actBasicInspectTab
           
protected static java.lang.String actBasicInspectWindow
           
protected static java.lang.String actCloseAll
           
protected static java.lang.String actCloseTab
           
protected static java.lang.String actCloseWindow
           
protected static java.lang.String actContinue
           
protected static java.lang.String actInspectHere
           
protected static java.lang.String actInspectTab
           
protected static java.lang.String actInspectWindow
           
protected static java.lang.String actShowExporterMapping
           
protected static java.lang.String actShowInspectorMapping
           
protected static java.lang.String actShowLicenseText
           
protected static java.lang.String actShowRendererMapping
           
protected static java.lang.String actShowSystemProperties
           
protected static java.lang.String actSort
           
protected static java.lang.String actToggleFinal
           
protected static java.lang.String actTogglePackage
           
protected static java.lang.String actTogglePrivate
           
protected static java.lang.String actToggleProtected
           
protected static java.lang.String actTogglePublic
           
protected static java.lang.String actToggleStatic
           
protected static java.lang.String actToggleTransient
           
static int INSPECT_IN_CURRENT_PLACE
          The action code that tells an inspector to open the inspection view in the current window or tab.
static int INSPECT_IN_NEW_TAB
          The action code that tells an inspector to open the inspection view in a new tab.
static int INSPECT_IN_NEW_WINDOW
          The action code that tells an inspector to open the inspection view in a new window.
protected static int PLUGIN_EXPORTER
           
protected static int PLUGIN_INSPECTOR
           
protected static int PLUGIN_RENDERER
           
protected static java.lang.String TXT_ACTIONS
           
protected static java.lang.String TXT_BASIC_INSPECT_HERE
           
protected static java.lang.String TXT_BASIC_INSPECT_IN_NEW_TAB
           
protected static java.lang.String TXT_BASIC_INSPECT_IN_NEW_WINDOW
           
protected static java.lang.String TXT_CONTINUE_THREAD
           
protected static java.lang.String TXT_INSPECT_HERE
           
protected static java.lang.String TXT_INSPECT_IN_NEW_TAB
           
protected static java.lang.String TXT_INSPECT_IN_NEW_WINDOW
           
protected static java.lang.String TXT_SORT
           
 
Constructor Summary
InspectionWindowController()
          Initialize the new instance.
 
Method Summary
 void actionPerformed(java.awt.event.ActionEvent e)
          Is called whenever a user action event occured.
protected  void addInspector(BasicInspector inspector)
           
protected  void buildUI()
           
protected  void close()
          Close the controller.
protected  void closeAllControllers()
           
protected  void closeInspectionTab(java.awt.event.ActionEvent event)
           
protected  void continueProcess()
          Ends the wait loop to let the calling process continue its work.
protected  javax.swing.JMenu createMenu(java.lang.String text)
           
protected  javax.swing.JMenuBar createMenuBar()
           
protected  javax.swing.JMenuItem createMenuItem(java.lang.String text, java.lang.String command)
           
protected  javax.swing.JMenu createSubmenuActions()
           
protected  javax.swing.JMenu createSubmenuHelp()
           
protected  javax.swing.JMenu createSubmenuPlugins()
           
protected  javax.swing.JMenu createSubmenuShow()
           
protected  javax.swing.JMenu createSubmenuWindow()
           
protected  BasicInspector currentInspector()
          Returns the currently selected inspector
protected  void displayAboutInfo()
          Display information about JOI.
protected  void exportObject(java.lang.String exportName)
           
protected  org.pfsw.file.FileUtil fileUtil()
           
protected  BasicInspector getCurrentInspector()
           
protected  ElementFilter getElementFilter()
           
protected  ElementFilterMenu getFilterMenu()
           
protected  AbstractObjectSpy getInspectedObject()
           
protected  java.lang.String getInspectedObjectTypeString()
           
protected  java.lang.String getInspectorId()
           
protected  InspectionFrame getMainFrame()
           
protected  void openNewInspector(BasicInspector inspector, int where)
           
protected  void openUI()
           
protected  void removeInspector(BasicInspector inspector)
           
protected  void replaceCurrentInspector(BasicInspector inspector)
           
protected  void setCurrentInspector(BasicInspector newValue)
           
protected  void setFilterMenu(ElementFilterMenu newValue)
           
protected  void setMainFrame(InspectionFrame newValue)
           
protected  void showLicenseText()
           
protected  void showPluginMapping(int pluginType)
           
protected  void showSystemProperties()
           
protected  void start(BasicInspector inspector)
           
protected  void terminate()
          This method terminates execution of the inspector.
protected  void toggleFilter(int filterFlag)
          Toggle the filter flag specified by the given value
protected  void viewSelected(InspectionView view)
          Must be called, if another view was selected
 void windowActivated(java.awt.event.WindowEvent e)
          Noop implementation to be compliant to WindowListener interface.
 void windowClosed(java.awt.event.WindowEvent e)
          Noop implementation to be compliant to WindowListener interface.
 void windowClosing(java.awt.event.WindowEvent e)
          Check if it's ok to close the window and if yes then do it.
 void windowDeactivated(java.awt.event.WindowEvent e)
          Noop implementation to be compliant to WindowListener interface.
 void windowDeiconified(java.awt.event.WindowEvent e)
          Noop implementation to be compliant to WindowListener interface.
 void windowIconified(java.awt.event.WindowEvent e)
          Noop implementation to be compliant to WindowListener interface.
 void windowOpened(java.awt.event.WindowEvent e)
          Noop implementation to be compliant to WindowListener interface.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

INSPECT_IN_CURRENT_PLACE

public static final int INSPECT_IN_CURRENT_PLACE
The action code that tells an inspector to open the inspection view in the current window or tab.

See Also:
Constant Field Values

INSPECT_IN_NEW_TAB

public static final int INSPECT_IN_NEW_TAB
The action code that tells an inspector to open the inspection view in a new tab.

See Also:
Constant Field Values

INSPECT_IN_NEW_WINDOW

public static final int INSPECT_IN_NEW_WINDOW
The action code that tells an inspector to open the inspection view in a new window.

See Also:
Constant Field Values

TXT_ACTIONS

protected static final java.lang.String TXT_ACTIONS
See Also:
Constant Field Values

TXT_CONTINUE_THREAD

protected static final java.lang.String TXT_CONTINUE_THREAD
See Also:
Constant Field Values

TXT_SORT

protected static final java.lang.String TXT_SORT
See Also:
Constant Field Values

TXT_BASIC_INSPECT_IN_NEW_WINDOW

protected static final java.lang.String TXT_BASIC_INSPECT_IN_NEW_WINDOW
See Also:
Constant Field Values

TXT_BASIC_INSPECT_IN_NEW_TAB

protected static final java.lang.String TXT_BASIC_INSPECT_IN_NEW_TAB
See Also:
Constant Field Values

TXT_BASIC_INSPECT_HERE

protected static final java.lang.String TXT_BASIC_INSPECT_HERE
See Also:
Constant Field Values

TXT_INSPECT_IN_NEW_WINDOW

protected static final java.lang.String TXT_INSPECT_IN_NEW_WINDOW
See Also:
Constant Field Values

TXT_INSPECT_IN_NEW_TAB

protected static final java.lang.String TXT_INSPECT_IN_NEW_TAB
See Also:
Constant Field Values

TXT_INSPECT_HERE

protected static final java.lang.String TXT_INSPECT_HERE
See Also:
Constant Field Values

actCloseWindow

protected static final java.lang.String actCloseWindow
See Also:
Constant Field Values

actCloseAll

protected static final java.lang.String actCloseAll
See Also:
Constant Field Values

actCloseTab

protected static final java.lang.String actCloseTab
See Also:
Constant Field Values

actInspectWindow

protected static final java.lang.String actInspectWindow
See Also:
Constant Field Values

actInspectTab

protected static final java.lang.String actInspectTab
See Also:
Constant Field Values

actInspectHere

protected static final java.lang.String actInspectHere
See Also:
Constant Field Values

actBasicInspectWindow

protected static final java.lang.String actBasicInspectWindow
See Also:
Constant Field Values

actBasicInspectTab

protected static final java.lang.String actBasicInspectTab
See Also:
Constant Field Values

actBasicInspectHere

protected static final java.lang.String actBasicInspectHere
See Also:
Constant Field Values

actSort

protected static final java.lang.String actSort
See Also:
Constant Field Values

actContinue

protected static final java.lang.String actContinue
See Also:
Constant Field Values

actAbout

protected static final java.lang.String actAbout
See Also:
Constant Field Values

actToggleStatic

protected static final java.lang.String actToggleStatic
See Also:
Constant Field Values

actToggleFinal

protected static final java.lang.String actToggleFinal
See Also:
Constant Field Values

actToggleTransient

protected static final java.lang.String actToggleTransient
See Also:
Constant Field Values

actTogglePackage

protected static final java.lang.String actTogglePackage
See Also:
Constant Field Values

actTogglePrivate

protected static final java.lang.String actTogglePrivate
See Also:
Constant Field Values

actToggleProtected

protected static final java.lang.String actToggleProtected
See Also:
Constant Field Values

actTogglePublic

protected static final java.lang.String actTogglePublic
See Also:
Constant Field Values

actShowInspectorMapping

protected static final java.lang.String actShowInspectorMapping
See Also:
Constant Field Values

actShowRendererMapping

protected static final java.lang.String actShowRendererMapping
See Also:
Constant Field Values

actShowExporterMapping

protected static final java.lang.String actShowExporterMapping
See Also:
Constant Field Values

actShowSystemProperties

protected static final java.lang.String actShowSystemProperties
See Also:
Constant Field Values

actShowLicenseText

protected static final java.lang.String actShowLicenseText
See Also:
Constant Field Values

PLUGIN_INSPECTOR

protected static final int PLUGIN_INSPECTOR
See Also:
Constant Field Values

PLUGIN_RENDERER

protected static final int PLUGIN_RENDERER
See Also:
Constant Field Values

PLUGIN_EXPORTER

protected static final int PLUGIN_EXPORTER
See Also:
Constant Field Values
Constructor Detail

InspectionWindowController

public InspectionWindowController()
Initialize the new instance.

Method Detail

getMainFrame

protected InspectionFrame getMainFrame()

setMainFrame

protected void setMainFrame(InspectionFrame newValue)

getCurrentInspector

protected BasicInspector getCurrentInspector()

setCurrentInspector

protected void setCurrentInspector(BasicInspector newValue)

getFilterMenu

protected ElementFilterMenu getFilterMenu()

setFilterMenu

protected void setFilterMenu(ElementFilterMenu newValue)

actionPerformed

public void actionPerformed(java.awt.event.ActionEvent e)
Is called whenever a user action event occured.
This method is actually performing all actions, triggered by buttons, keystrokes or menu items.

Specified by:
actionPerformed in interface java.awt.event.ActionListener
Parameters:
e - The action event holding further information on what happened.

windowOpened

public void windowOpened(java.awt.event.WindowEvent e)
Noop implementation to be compliant to WindowListener interface.

Specified by:
windowOpened in interface java.awt.event.WindowListener
See Also:
WindowListener.windowOpened(WindowEvent)

windowClosed

public void windowClosed(java.awt.event.WindowEvent e)
Noop implementation to be compliant to WindowListener interface.

Specified by:
windowClosed in interface java.awt.event.WindowListener
See Also:
WindowListener.windowClosed(WindowEvent)

windowClosing

public void windowClosing(java.awt.event.WindowEvent e)
Check if it's ok to close the window and if yes then do it.

Specified by:
windowClosing in interface java.awt.event.WindowListener
See Also:
WindowListener.windowClosing(WindowEvent)

windowDeactivated

public void windowDeactivated(java.awt.event.WindowEvent e)
Noop implementation to be compliant to WindowListener interface.

Specified by:
windowDeactivated in interface java.awt.event.WindowListener
See Also:
WindowListener.windowDeactivated(WindowEvent)

windowDeiconified

public void windowDeiconified(java.awt.event.WindowEvent e)
Noop implementation to be compliant to WindowListener interface.

Specified by:
windowDeiconified in interface java.awt.event.WindowListener
See Also:
WindowListener.windowDeiconified(WindowEvent)

windowIconified

public void windowIconified(java.awt.event.WindowEvent e)
Noop implementation to be compliant to WindowListener interface.

Specified by:
windowIconified in interface java.awt.event.WindowListener
See Also:
WindowListener.windowIconified(WindowEvent)

windowActivated

public void windowActivated(java.awt.event.WindowEvent e)
Noop implementation to be compliant to WindowListener interface.

Specified by:
windowActivated in interface java.awt.event.WindowListener
See Also:
WindowListener.windowActivated(WindowEvent)

currentInspector

protected BasicInspector currentInspector()
Returns the currently selected inspector


replaceCurrentInspector

protected void replaceCurrentInspector(BasicInspector inspector)

viewSelected

protected void viewSelected(InspectionView view)
Must be called, if another view was selected


terminate

protected void terminate()
This method terminates execution of the inspector. It also removes the inspector from the inspector registry. Subclasses normally override this method. They must call super.terminate() !


continueProcess

protected void continueProcess()
Ends the wait loop to let the calling process continue its work.


start

protected void start(BasicInspector inspector)

close

protected void close()
Close the controller.


closeAllControllers

protected void closeAllControllers()

toggleFilter

protected void toggleFilter(int filterFlag)
Toggle the filter flag specified by the given value


showPluginMapping

protected void showPluginMapping(int pluginType)

exportObject

protected void exportObject(java.lang.String exportName)

closeInspectionTab

protected void closeInspectionTab(java.awt.event.ActionEvent event)

displayAboutInfo

protected void displayAboutInfo()
Display information about JOI.


showSystemProperties

protected void showSystemProperties()

showLicenseText

protected void showLicenseText()

addInspector

protected void addInspector(BasicInspector inspector)

removeInspector

protected void removeInspector(BasicInspector inspector)

getInspectorId

protected java.lang.String getInspectorId()

getInspectedObject

protected AbstractObjectSpy getInspectedObject()

getInspectedObjectTypeString

protected java.lang.String getInspectedObjectTypeString()

getElementFilter

protected ElementFilter getElementFilter()

openUI

protected void openUI()

openNewInspector

protected void openNewInspector(BasicInspector inspector,
                                int where)

buildUI

protected void buildUI()

createMenu

protected javax.swing.JMenu createMenu(java.lang.String text)

createMenuBar

protected javax.swing.JMenuBar createMenuBar()

createSubmenuActions

protected javax.swing.JMenu createSubmenuActions()

createSubmenuWindow

protected javax.swing.JMenu createSubmenuWindow()

createSubmenuShow

protected javax.swing.JMenu createSubmenuShow()

createSubmenuPlugins

protected javax.swing.JMenu createSubmenuPlugins()

createSubmenuHelp

protected javax.swing.JMenu createSubmenuHelp()

createMenuItem

protected javax.swing.JMenuItem createMenuItem(java.lang.String text,
                                               java.lang.String command)

fileUtil

protected org.pfsw.file.FileUtil fileUtil()