anl.aida.client.gui
Class AIDAGui

java.lang.Object
  extended by anl.aida.client.gui.AIDAGui

public class AIDAGui
extends java.lang.Object

Mediates interactions between GUI components and non-GUI components with GUI components.


Nested Class Summary
(package private)  class AIDAGui.SearchWorker
          SwingWorker that does the lucence search in a background thread
 
Field Summary
private  saf.core.ui.GUIBarManager barManager
           
private  Cache cache
           
private  saf.core.ui.dock.DockableFrame cacheFrame
           
private  CachePanel cachePanel
           
private  CacheElement cElement
           
private static simphony.util.messages.MessageCenter center
           
private  Dashboard dashboard
           
private  anl.aida.data.DataManager dataManager
           
private  java.util.List<saf.core.ui.dock.DockableFrame> displayFrames
           
private  AIDADockableHelper dockableHelper
           
private  saf.core.ui.dock.DockingManager dockingManager
           
private static java.lang.String DOCS_ICON
           
private  saf.core.ui.dock.DockableFrame docsFrame
           
private  DocsTabPanel docTabs
           
private  javax.swing.JFrame frame
           
private static java.lang.String STATUS_BAR_ID
           
private  saf.core.ui.dock.DockableFrame structFrame
           
private  StructuredDataPanel structPanel
           
private  boolean textOutput
           
private  boolean triggerListener
           
private  int vizCount
           
 
Constructor Summary
AIDAGui(saf.core.ui.dock.DockingManager dockingManager)
           
 
Method Summary
 java.lang.String add3DGISPlotDisplay(anl.aida.data.DataFrame frame)
           
 java.lang.String add3DPlot(anl.aida.data.DataFrame frame)
          Adds a 3D plot using the data in the data frame.
 void addBarManager(saf.core.ui.GUIBarManager guiBarManager)
           
 java.lang.String addBubblePlot(BubbleConfigBean bean)
           
 void addClusterDisplay(DocSetID id, Clusters<anl.aida.core.DocumentID> clusters, java.lang.String title)
          Adds a cluster display to the gui.
 java.lang.String addDataTable(anl.aida.data.DataFrame frame)
           
 CacheDocumentSet addDocumentSet(java.lang.String name, CacheDocumentSet set)
          Adds a documents set to the cache tree.
 java.lang.String addGISPlotDisplay(anl.aida.data.DataFrame frame)
          Adds the specified panel as a plot.
 void addNetworkDisplay(VizPropertyBean bean)
          Adds a newtwork display (2D or 3D) using the bean properties.
 java.lang.String addScatterPlot(anl.aida.data.DataFrame xFrame, anl.aida.data.DataFrame yFrame)
           
 void addStatusMessage(java.lang.String msg, java.awt.Color color)
           
 java.lang.String addTimeSeries(java.util.List<anl.aida.data.DataFrame> frames)
          Adds a time series plot from the data in the frame.
 java.lang.String addTimeSeries(java.util.List<anl.aida.data.DataFrame> frames, int... indices)
          Adds a time series plot from the data in the frame.
 void addTimeSeriesDisplay(VizPropertyBean bean)
          Adds a time series display using the bean properties.
 void cacheElementSelected(CacheElement element)
          Called when a cache element is selected.
 void clearStatusMessage()
           
private  java.lang.String createDockableID()
           
private  javax.swing.JPanel createVizDockable(java.lang.String title, java.lang.String id)
           
 saf.core.ui.dock.DockableFrame getDockable(java.lang.String id)
           
 javax.swing.JFrame getFrame()
           
 void loadDocs(java.lang.String title, CacheDocumentSet docSet)
          Loads a CacheDocumentSet into the documents view.
 void performSearch(java.lang.String query, DocumentsModel model, ProgressLayer pLayer)
          Searches the cache index using the specified query and places the results, if any in the documents panel.
 void produceOutput(Cache cache, VizPropertyBean bean, TSConceptGraphs graphs)
           
 void resetCache(Cache cache)
           
 void setFrame(javax.swing.JFrame frame)
          Sets the main application frame.
 void showDocumentList(DocSetNode docSetNode)
          Displays the documents associated with docSetNode in the documents view.
 void showVizDialog(VizPropertyBean bean)
           
 void visualizationAdded(java.lang.String id, GISDisplay display)
          Notifies the gui that a visualization has been added.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

center

private static final simphony.util.messages.MessageCenter center

DOCS_ICON

private static final java.lang.String DOCS_ICON
See Also:
Constant Field Values

STATUS_BAR_ID

private static final java.lang.String STATUS_BAR_ID
See Also:
Constant Field Values

dockingManager

private saf.core.ui.dock.DockingManager dockingManager

cachePanel

private CachePanel cachePanel

structPanel

private StructuredDataPanel structPanel

docTabs

private DocsTabPanel docTabs

cElement

private CacheElement cElement

cache

private Cache cache

vizCount

private int vizCount

frame

private javax.swing.JFrame frame

docsFrame

private saf.core.ui.dock.DockableFrame docsFrame

cacheFrame

private saf.core.ui.dock.DockableFrame cacheFrame

structFrame

private saf.core.ui.dock.DockableFrame structFrame

displayFrames

private java.util.List<saf.core.ui.dock.DockableFrame> displayFrames

triggerListener

private boolean triggerListener

dashboard

private Dashboard dashboard

barManager

private saf.core.ui.GUIBarManager barManager

dataManager

private anl.aida.data.DataManager dataManager

dockableHelper

private AIDADockableHelper dockableHelper

textOutput

private boolean textOutput
Constructor Detail

AIDAGui

public AIDAGui(saf.core.ui.dock.DockingManager dockingManager)
Method Detail

visualizationAdded

public void visualizationAdded(java.lang.String id,
                               GISDisplay display)
Notifies the gui that a visualization has been added.

Parameters:
id - the id of the dockable that was added
display - the gis display that was added.

getFrame

public javax.swing.JFrame getFrame()

resetCache

public void resetCache(Cache cache)

loadDocs

public void loadDocs(java.lang.String title,
                     CacheDocumentSet docSet)
Loads a CacheDocumentSet into the documents view.

Parameters:
title - the title to display in the view
docSet - the docs set to display

getDockable

public saf.core.ui.dock.DockableFrame getDockable(java.lang.String id)

showVizDialog

public void showVizDialog(VizPropertyBean bean)

add3DGISPlotDisplay

public java.lang.String add3DGISPlotDisplay(anl.aida.data.DataFrame frame)

addGISPlotDisplay

public java.lang.String addGISPlotDisplay(anl.aida.data.DataFrame frame)
Adds the specified panel as a plot.

Parameters:
panel -

addDataTable

public java.lang.String addDataTable(anl.aida.data.DataFrame frame)

addScatterPlot

public java.lang.String addScatterPlot(anl.aida.data.DataFrame xFrame,
                                       anl.aida.data.DataFrame yFrame)

addBubblePlot

public java.lang.String addBubblePlot(BubbleConfigBean bean)

add3DPlot

public java.lang.String add3DPlot(anl.aida.data.DataFrame frame)
Adds a 3D plot using the data in the data frame.

Parameters:
frame - the frame to create the data from

createDockableID

private java.lang.String createDockableID()

addTimeSeries

public java.lang.String addTimeSeries(java.util.List<anl.aida.data.DataFrame> frames)
Adds a time series plot from the data in the frame.

Parameters:
frame - the frame holding the data to plot

addTimeSeries

public java.lang.String addTimeSeries(java.util.List<anl.aida.data.DataFrame> frames,
                                      int... indices)
Adds a time series plot from the data in the frame.

Parameters:
frame - the frame holding the data to plot
indices - the indices in the frame whose values we want to plot. If this is an empty array then all the indices are plotted.

addClusterDisplay

public void addClusterDisplay(DocSetID id,
                              Clusters<anl.aida.core.DocumentID> clusters,
                              java.lang.String title)
Adds a cluster display to the gui.

Parameters:
id - the id of the documents set we are visualizing
clusters - the clusters to visualize
title - a title for the display

createVizDockable

private javax.swing.JPanel createVizDockable(java.lang.String title,
                                             java.lang.String id)

addTimeSeriesDisplay

public void addTimeSeriesDisplay(VizPropertyBean bean)
Adds a time series display using the bean properties.

Parameters:
bean - a bean that holds the display properties.

produceOutput

public void produceOutput(Cache cache,
                          VizPropertyBean bean,
                          TSConceptGraphs graphs)

addNetworkDisplay

public void addNetworkDisplay(VizPropertyBean bean)
Adds a newtwork display (2D or 3D) using the bean properties.

Parameters:
bean - a bean that holds the display properties.

cacheElementSelected

public void cacheElementSelected(CacheElement element)
Called when a cache element is selected.

Parameters:
element - the selected cache element

showDocumentList

public void showDocumentList(DocSetNode docSetNode)
Displays the documents associated with docSetNode in the documents view.

Parameters:
docSetNode - the node whose docs should be displayed

addDocumentSet

public CacheDocumentSet addDocumentSet(java.lang.String name,
                                       CacheDocumentSet set)
Adds a documents set to the cache tree. This will return a new added set or null if the user has canceled the operation.

Parameters:
name - the name of the set to add. This becomes the tree node label.
set - the set to add
Returns:
the added CacheDoumentSet or null if the user has canceled the operation.

setFrame

public void setFrame(javax.swing.JFrame frame)
Sets the main application frame.

Parameters:
frame - the main application frame

addStatusMessage

public void addStatusMessage(java.lang.String msg,
                             java.awt.Color color)

clearStatusMessage

public void clearStatusMessage()

performSearch

public void performSearch(java.lang.String query,
                          DocumentsModel model,
                          ProgressLayer pLayer)
Searches the cache index using the specified query and places the results, if any in the documents panel.

Parameters:
query - the query string
model - the Documents model to perform the search over
pLayer - a progress layer used to indicate progress while the search is proceeding.

addBarManager

public void addBarManager(saf.core.ui.GUIBarManager guiBarManager)