uk.ac.man.bioinf.apps.cinema.core
Class CinemaCoreView

java.lang.Object
  |
  +--uk.ac.man.bioinf.module.Module
        |
        +--uk.ac.man.bioinf.apps.xml.XMLModule
              |
              +--uk.ac.man.bioinf.apps.cinema.CinemaModule
                    |
                    +--uk.ac.man.bioinf.apps.cinema.CinemaGuiModule
                          |
                          +--uk.ac.man.bioinf.apps.cinema.core.CinemaCoreView
All Implemented Interfaces:
AlignmentEventProvider, AlignmentListener, EventListener

public class CinemaCoreView
extends CinemaGuiModule
implements AlignmentEventProvider, AlignmentListener

CinemaCoreView.java This class provides an easy interface to many of the display functions of Cinema. (PENDING:- PL) In time this should actually be turned into an interface. The idea is that all modules should use this class rather than the CinemaCoreGui class, because there is nothing here which refers to swing which means that we could replace the gui implementation with an entirely different gui, and still reuse many of the modules. Created: Wed Apr 19 22:00:36 2000

Version:
$Id: CinemaCoreView.java,v 1.13 2001/04/11 17:04:41 lord Exp $
Author:
Phillip Lord

Constructor Summary
CinemaCoreView()
           
 
Method Summary
 void addAlignmentListener(AlignmentListener listener)
          Add a listener specifically interested in events connected with the MSA.
 void addVetoableAlignmentListener(VetoableAlignmentListener listener)
          Adds a listener interested in vetoing multiple sequence alignment specific events.
 void changeOccurred(AlignmentEvent event)
          method signalled after a change has occured to a multiple alignment
 void clearSequenceTitleColor(GappedSequence seq)
           
 void destroy()
          The method called, from an external source, to remove this module and prepare it for garbage collection.
 AlignmentSelectionModel getAlignmentSelectionModel()
           
 ColorMap getColorMap()
           
 ModuleIdentifierList getRequiredIdentifiers()
          Returns the module identifiers for the required modules.
 SequenceAlignment getSequenceAlignment()
           
 String getVersion()
          Returns the version of this module.
 void removeAlignmentListener(AlignmentListener listener)
          Removes a multiple sequence alignment listener.
 void removeVetoableAlignmentListener(VetoableAlignmentListener listener)
          Removes a vetoable multiple sequence alignment listener.
 void sendStatusMessage(String message)
          Send a message to the status bar.
 void setAlignmentSelectionModel(AlignmentSelectionModel model)
           
 void setColorMap(ColorMap map)
           
 void setSequenceAlignment(SequenceAlignment alignment)
          Set the Sequence Alignment.
 void setSequenceTitleColor(GappedSequence seq, Color colour)
          This sets the colour that is used to display the sequence title.
 void start()
          The method called externally to initiate the modules function.
 
Methods inherited from class uk.ac.man.bioinf.apps.cinema.CinemaGuiModule
getAlignmentFrame, getFrame, getJMenuBar, getRowHeaders, getRuler, getRulerPanel, getScrollPane, getStatusBar, getViewer, setFrameTitle
 
Methods inherited from class uk.ac.man.bioinf.apps.cinema.CinemaModule
addCinemaPropertyChangeListener, addCinemaPropertyChangeListener, fireCinemaPropertyChange, removeCinemaPropertyChangeListener, removeCinemaPropertyChangeListener
 
Methods inherited from class uk.ac.man.bioinf.apps.xml.XMLModule
getConfigProperties, getConfigTree
 
Methods inherited from class uk.ac.man.bioinf.module.Module
addPropertyChangeListener, addPropertyChangeListener, finalize, firePropertyChange, firePropertyChange, firePropertyChange, getContext, getIdentifier, getRequiredModule, getRequiredModules, hasListeners, isDestroyed, isStarted, load, removePropertyChangeListener, removePropertyChangeListener, runStart, setContext
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CinemaCoreView

public CinemaCoreView()
Method Detail

start

public void start()
Description copied from class: Module
The method called externally to initiate the modules function.

Overrides:
start in class Module

destroy

public void destroy()
Description copied from class: Module
The method called, from an external source, to remove this module and prepare it for garbage collection.

Overrides:
destroy in class CinemaGuiModule

setSequenceAlignment

public void setSequenceAlignment(SequenceAlignment alignment)
Description copied from class: CinemaModule
Set the Sequence Alignment. Signals a property change event.

Overrides:
setSequenceAlignment in class CinemaModule
Parameters:
alignment -

getSequenceAlignment

public SequenceAlignment getSequenceAlignment()
Overrides:
getSequenceAlignment in class CinemaModule

setAlignmentSelectionModel

public void setAlignmentSelectionModel(AlignmentSelectionModel model)
Overrides:
setAlignmentSelectionModel in class CinemaModule

getAlignmentSelectionModel

public AlignmentSelectionModel getAlignmentSelectionModel()
Overrides:
getAlignmentSelectionModel in class CinemaModule

setColorMap

public void setColorMap(ColorMap map)
Overrides:
setColorMap in class CinemaModule

getColorMap

public ColorMap getColorMap()
Overrides:
getColorMap in class CinemaModule

setSequenceTitleColor

public void setSequenceTitleColor(GappedSequence seq,
                                  Color colour)
Description copied from class: CinemaModule
This sets the colour that is used to display the sequence title. NOT the colour of the elements! This is usually done to display some linkage between sequences of the same colour.

Overrides:
setSequenceTitleColor in class CinemaModule
Parameters:
seq -
colour -

clearSequenceTitleColor

public void clearSequenceTitleColor(GappedSequence seq)
Overrides:
clearSequenceTitleColor in class CinemaModule

sendStatusMessage

public void sendStatusMessage(String message)
Send a message to the status bar. This message should be for minor information only as it can get overrun at any stage.

Overrides:
sendStatusMessage in class CinemaModule
Parameters:
message -

changeOccurred

public void changeOccurred(AlignmentEvent event)
Description copied from interface: AlignmentListener
method signalled after a change has occured to a multiple alignment

Specified by:
changeOccurred in interface AlignmentListener
Parameters:
event - the event type

addAlignmentListener

public void addAlignmentListener(AlignmentListener listener)
Description copied from interface: AlignmentEventProvider
Add a listener specifically interested in events connected with the MSA.

Specified by:
addAlignmentListener in interface AlignmentEventProvider
Overrides:
addAlignmentListener in class CinemaModule
Parameters:
listener - a multiple sequence alignment listener

removeAlignmentListener

public void removeAlignmentListener(AlignmentListener listener)
Description copied from interface: AlignmentEventProvider
Removes a multiple sequence alignment listener.

Specified by:
removeAlignmentListener in interface AlignmentEventProvider
Overrides:
removeAlignmentListener in class CinemaModule
Parameters:
listener - the listener to be removed

addVetoableAlignmentListener

public void addVetoableAlignmentListener(VetoableAlignmentListener listener)
Description copied from interface: AlignmentEventProvider
Adds a listener interested in vetoing multiple sequence alignment specific events.

Specified by:
addVetoableAlignmentListener in interface AlignmentEventProvider
Overrides:
addVetoableAlignmentListener in class CinemaModule
Parameters:
listener - a vetoable multiple sequence alignment listener

removeVetoableAlignmentListener

public void removeVetoableAlignmentListener(VetoableAlignmentListener listener)
Description copied from interface: AlignmentEventProvider
Removes a vetoable multiple sequence alignment listener.

Specified by:
removeVetoableAlignmentListener in interface AlignmentEventProvider
Overrides:
removeVetoableAlignmentListener in class CinemaModule
Parameters:
listener - the listener to be removed

getRequiredIdentifiers

public ModuleIdentifierList getRequiredIdentifiers()
Description copied from class: Module
Returns the module identifiers for the required modules. This places a call on getRequiredModules, which is delegated to the module context. It may require over-riding inorder to improve the efficiency of the method.

Overrides:
getRequiredIdentifiers in class CinemaGuiModule
Returns:
the required module identifiers

getVersion

public String getVersion()
Description copied from class: Module
Returns the version of this module.

Specified by:
getVersion in class Module
Returns:
the version