story.dbcore.gui
Class CoreBrowser

java.lang.Object
  extended by story.dbcore.gui.CoreBrowser
All Implemented Interfaces:
java.awt.event.ActionListener, java.util.EventListener
Direct Known Subclasses:
FlashbackGUI

public class CoreBrowser
extends java.lang.Object
implements java.awt.event.ActionListener


Constructor Summary
CoreBrowser(DBCoreInterface dbci)
          Constructor that takes a DBCoreInterface.
 
Method Summary
 void actionPerformed(java.awt.event.ActionEvent e)
          Switchboard for processing GUI action events
static void centerJFrame(javax.swing.JFrame frame)
          Sets a JFrame to the center of the screen horizontally, a little higher than center vertically.
 void executeShell(java.lang.String command)
           
 boolean getShowAllRepTab()
          Return whether the CoreBrowser is set to show an "All Repositories" tab with the combined nodes from all repositories.
 TreeView getTreeView()
          Returns the TreeView in use.
 void launchBrowser(boolean showAllRepTab, TreeView treeView)
          Create the GUI and show it.
 void link(LinkDirection direction)
           
 void setShowAllRepTab(boolean showAllRepTab)
          Set whether the CoreBrowser should show an "All Repositories" tab with the combined nodes from all repositories.
 void unlink(NodeAddress fromNode, LinkType linkType, NodeAddress toNode)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CoreBrowser

public CoreBrowser(DBCoreInterface dbci)
            throws Scheherexception
Constructor that takes a DBCoreInterface. Hence the CoreBrowser is not meant to be run from the command line, but from classes that already have db-cores initialized.

Throws:
Scheherexception
Method Detail

launchBrowser

public void launchBrowser(boolean showAllRepTab,
                          TreeView treeView)
                   throws Scheherexception
Create the GUI and show it. Normally, For thread safety, this method should be invoked from the event-dispatching thread, but DB-Core is not thread-safe, so best to not use this GUI in a multi-threaded environment.

Throws:
Scheherexception

getShowAllRepTab

public boolean getShowAllRepTab()
Return whether the CoreBrowser is set to show an "All Repositories" tab with the combined nodes from all repositories.


getTreeView

public TreeView getTreeView()
Returns the TreeView in use.


executeShell

public void executeShell(java.lang.String command)

setShowAllRepTab

public void setShowAllRepTab(boolean showAllRepTab)
Set whether the CoreBrowser should show an "All Repositories" tab with the combined nodes from all repositories.


link

public void link(LinkDirection direction)

unlink

public void unlink(NodeAddress fromNode,
                   LinkType linkType,
                   NodeAddress toNode)

actionPerformed

public void actionPerformed(java.awt.event.ActionEvent e)
Switchboard for processing GUI action events

Specified by:
actionPerformed in interface java.awt.event.ActionListener

centerJFrame

public static void centerJFrame(javax.swing.JFrame frame)
Sets a JFrame to the center of the screen horizontally, a little higher than center vertically. Typically call this after pack(). Borrowed from a Java thread on Sun's site.



Copyright © 2011 David K. Elson. All Rights Reserved.