ca.sqlpower.architect.swingui
Class CompareDMPanel.SourceOrTargetStuff.SchemaPopulator

java.lang.Object
  extended by ca.sqlpower.swingui.SPSwingWorker
      extended by ca.sqlpower.swingui.MonitorableWorker
          extended by ca.sqlpower.architect.swingui.CompareDMPanel.SourceOrTargetStuff.SchemaPopulator
All Implemented Interfaces:
ca.sqlpower.util.Monitorable, java.awt.event.ActionListener, java.lang.Runnable, java.util.EventListener
Enclosing class:
CompareDMPanel.SourceOrTargetStuff

public class CompareDMPanel.SourceOrTargetStuff.SchemaPopulator
extends ca.sqlpower.swingui.MonitorableWorker
implements java.awt.event.ActionListener

Finds all the children of a catalog and puts them in the GUI.


Constructor Summary
CompareDMPanel.SourceOrTargetStuff.SchemaPopulator(ArchitectSwingSession session)
           
 
Method Summary
 void actionPerformed(java.awt.event.ActionEvent e)
          Clears the schema dropdown, and starts a worker thread to repopulate it (if possible).
 void cleanup()
          Examines the newly-populated catalog and adds its schemas to the GUI.
 void doStuff()
           
 void setDefaultSelect(java.lang.String select)
          If select is a valid schema of the catalog this sets a string that will be used as a default item to select for the schema next time the list will be redrawn, (this will happen only once).
 
Methods inherited from class ca.sqlpower.swingui.SPSwingWorker
addTaskTerminationListener, getCleanupExceptionMessage, getDoStuffException, getNextProcess, isCanceled, isCancelled, kill, removeTaskTerminationListener, run, setCancelled, setCleanupExceptionMessage, setDoStuffException, setNextProcess
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface ca.sqlpower.util.Monitorable
isCancelled, setCancelled
 

Constructor Detail

CompareDMPanel.SourceOrTargetStuff.SchemaPopulator

public CompareDMPanel.SourceOrTargetStuff.SchemaPopulator(ArchitectSwingSession session)
Method Detail

setDefaultSelect

public void setDefaultSelect(java.lang.String select)
If select is a valid schema of the catalog this sets a string that will be used as a default item to select for the schema next time the list will be redrawn, (this will happen only once). Else does nothing

Parameters:
select - The name of the item to select

actionPerformed

public void actionPerformed(java.awt.event.ActionEvent e)
Clears the schema dropdown, and starts a worker thread to repopulate it (if possible).

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

doStuff

public void doStuff()
             throws ArchitectException
Specified by:
doStuff in class ca.sqlpower.swingui.SPSwingWorker
Throws:
ArchitectException

cleanup

public void cleanup()
             throws ArchitectException
Examines the newly-populated catalog and adds its schemas to the GUI. If the catalog doesn't contain schemas, cleanup just checks if the comparison action is startable.

Specified by:
cleanup in class ca.sqlpower.swingui.SPSwingWorker
Throws:
ArchitectException


Copyright © 2003-2007 SQL Power Group Inc. www.sqlpower.ca