|
|||||||||
Home >> All >> edu >> stanford >> genetics >> treeview >> [ dendroview overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: ![]() ![]() ![]() |
DETAIL: FIELD | CONSTR | METHOD |
edu.stanford.genetics.treeview.dendroview
Class DendroView

java.lang.Objectjava.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.JPanel
edu.stanford.genetics.treeview.DragGridPanel
edu.stanford.genetics.treeview.dendroview.DendroView
- All Implemented Interfaces:
- javax.accessibility.Accessible, java.awt.event.ComponentListener, edu.stanford.genetics.treeview.ConfigNodePersistent, java.awt.event.ContainerListener, java.util.EventListener, java.awt.event.FocusListener, java.awt.image.ImageObserver, edu.stanford.genetics.treeview.MainPanel, java.awt.MenuContainer, java.awt.event.MouseListener, java.awt.event.MouseMotionListener, java.util.Observer, java.io.Serializable
- Direct Known Subclasses:
- KnnDendroView
- public class DendroView
- extends edu.stanford.genetics.treeview.DragGridPanel
- implements edu.stanford.genetics.treeview.ConfigNodePersistent, edu.stanford.genetics.treeview.MainPanel, java.util.Observer
- extends edu.stanford.genetics.treeview.DragGridPanel
This class encapsulates a dendrogram view, which is the classic Eisen treeview. It uses a drag grid panel to lay out a bunch of linked visualizations of the data, a la Eisen. In addition to laying out components, it also manages the GlobalZoomMap. This is necessary since both the GTRView (gene tree) and GlobalView need to know where to lay out genes using the same map. The zoom map is managed by the ViewFrame- it represents the selected genes, and potentially forms a link between different views, only one of which is the DendroView. The intention here is that you create this from a model, and never replace that model. If you want to show another file, make another dendroview. All views should of course still listen to the model, since that can still be changed ad libitum.
- Version:
- $Revision: 1.27 $ $Date: 2003/10/12 01:29:15 $
Nested Class Summary | |
(package private) class |
DendroView.ButtonPanel
|
(package private) class |
DendroView.GlobalGifExportWizard
|
Nested classes inherited from class javax.swing.JPanel |
javax.swing.JPanel.AccessibleJPanel |
Nested classes inherited from class javax.swing.JComponent |
javax.swing.JComponent.AccessibleJComponent |
Nested classes inherited from class java.awt.Container |
java.awt.Container.AccessibleAWTContainer |
Nested classes inherited from class java.awt.Component |
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy |
Fields inherited from class edu.stanford.genetics.treeview.DragGridPanel |
|
Fields inherited from class javax.swing.JComponent |
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW |
Fields inherited from class java.awt.Container |
|
Fields inherited from class java.awt.Component |
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT |
Fields inherited from interface java.awt.image.ImageObserver |
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
Constructor Summary | |
DendroView(edu.stanford.genetics.treeview.DataModel tVModel,
edu.stanford.genetics.treeview.ConfigNode root,
edu.stanford.genetics.treeview.ViewFrame vFrame)
Constructor for the DendroView object which binds to an explicit confignode |
|
DendroView(edu.stanford.genetics.treeview.DataModel tVModel,
edu.stanford.genetics.treeview.ViewFrame vFrame)
Constructor for the DendroView object |
Method Summary | |
private void |
addSimpleExportOptions(java.awt.Menu menu)
|
void |
addView(edu.stanford.genetics.treeview.ModelView modelView,
java.awt.Rectangle rectangle)
Adds a ModelView to the DendroView |
void |
bindConfig(edu.stanford.genetics.treeview.ConfigNode configNode)
binds this dendroView to a particular confignode, resizing the panel sizes appropriately. |
protected void |
bindTrees()
this is meant to be called from setupViews. |
private void |
doDoubleLayout()
|
private void |
doSingleLayout()
|
void |
exportGif()
|
edu.stanford.genetics.treeview.CdtSelection |
getCdtSelection()
|
edu.stanford.genetics.treeview.ConfigNode |
getConfigNode()
Setter for root - may not work properly public void setConfigNode(ConfigNode root) { this.root = root; } /** Getter for root |
double |
getContrast()
Gets the contrast attribute of the DendroView object |
edu.stanford.genetics.treeview.DataModel |
getDataModel()
Getter for dataModel |
private java.lang.String |
getFilePath()
prompts and returns file path, or null if cancelled. |
private edu.stanford.genetics.treeview.ConfigNode |
getFirst(java.lang.String name)
always returns an instance of the node, even if it has to create it. |
MapContainer |
getGlobalXmap()
Gets the globalXmap attribute of the DendroView object |
MapContainer |
getGlobalYmap()
Gets the globalYmap attribute of the DendroView object |
edu.stanford.genetics.treeview.DataModel |
getModel()
gets the model this dendroview is based on |
edu.stanford.genetics.treeview.ViewFrame |
getViewFrame()
Getter for viewFrame |
MapContainer |
getZoomXmap()
Gets the zoomXmap attribute of the DendroView object |
MapContainer |
getZoomYmap()
Gets the zoomYmap attribute of the DendroView object |
void |
populateAnalysisMenu(java.awt.Menu menu)
adds DendroView stuff to Analysis menu |
void |
populateExportMenu(java.awt.Menu menu)
Add items which allow for export, if any. |
void |
populateSettingsMenu(java.awt.Menu menu)
adds DendroView stuff to Document menu |
void |
scrollToIndex(int i)
ensure a particular index is visible. |
void |
setCdtSelection(edu.stanford.genetics.treeview.CdtSelection cdtSelection)
|
void |
setDataModel(edu.stanford.genetics.treeview.DataModel dataModel)
Setter for dataModel |
private void |
setupSettingsPanel()
this style has been deemed too slow. |
private void |
setupView(edu.stanford.genetics.treeview.ModelView modelView)
|
protected void |
setupViews()
This method should be called only during initial setup of the modelview It sets up the views and binds them all to config nodes. |
void |
setViewFrame(edu.stanford.genetics.treeview.ViewFrame viewFrame)
Setter for viewFrame |
private void |
setWindowActive(boolean flag)
Sets the windowActive attribute of the DendroView object |
private void |
showSummaryWindow(int[] indexes)
|
void |
showSummaryWindow(int[] indexes,
java.lang.String title)
show summary of the specified indexes, with specified title, using settings stolen from zoomview. |
void |
syncConfig()
this function changes the info in the confignode to match the current panel sizes. |
void |
update(java.util.Observable o,
java.lang.Object arg)
This method is called whenever the observable object changes, and has called notifyObservers . |
boolean |
windowActive()
Determines if window is currently active |
Methods inherited from class edu.stanford.genetics.treeview.DragGridPanel |
addComponent, addComponent, componentAdded, componentHidden, componentMoved, componentRemoved, componentResized, componentShown, doLayout, focusGained, focusLost, getBorderHeight, getBorderWidth, getFocusHeight, getFocusWidth, getHeights, getMinimumHeight, getMinimumWidth, getPreferredSize, getWidths, isAdjustable, mouseClicked, mouseDragged, mouseEntered, mouseExited, mouseMoved, mousePressed, mouseReleased, paintComponent, removeComponent, setAdjustable, setBorderHeight, setBorderWidth, setFocusHeight, setFocusWidth, setHeights, setMinimumHeight, setMinimumWidth, setWidths, toString |
Methods inherited from class javax.swing.JPanel |
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
viewFrame
protected edu.stanford.genetics.treeview.ViewFrame viewFrame
panes
protected java.awt.ScrollPane[] panes
loaded
protected boolean loaded
windowActive
protected boolean windowActive
dataModel
protected edu.stanford.genetics.treeview.DataModel dataModel
globalXscrollbar
protected javax.swing.JScrollBar globalXscrollbar
globalYscrollbar
protected javax.swing.JScrollBar globalYscrollbar
globalview
protected GlobalView globalview
zoomXscrollbar
protected javax.swing.JScrollBar zoomXscrollbar
zoomYscrollbar
protected javax.swing.JScrollBar zoomYscrollbar
zoomview
protected ZoomView zoomview
textview
protected TextView textview
arraynameview
protected ArrayNameView arraynameview
gtrview
protected GTRView gtrview
atrview
protected ATRView atrview
atrzview
protected ATRZoomView atrzview
invertedTreeDrawer
protected InvertedTreeDrawer invertedTreeDrawer
leftTreeDrawer
protected LeftTreeDrawer leftTreeDrawer
cdtSelection
protected edu.stanford.genetics.treeview.CdtSelection cdtSelection
globalXmap
protected MapContainer globalXmap
globalYmap
protected MapContainer globalYmap
zoomXmap
protected MapContainer zoomXmap
zoomYmap
protected MapContainer zoomYmap
hintpanel
protected edu.stanford.genetics.treeview.MessagePanel hintpanel
statuspanel
protected edu.stanford.genetics.treeview.MessagePanel statuspanel
browserControl
protected edu.stanford.genetics.treeview.BrowserControl browserControl
arrayDrawer
protected ArrayDrawer arrayDrawer
root
protected edu.stanford.genetics.treeview.ConfigNode root
fileMru
protected edu.stanford.genetics.treeview.FileMru fileMru
settingsFrame
protected javax.swing.JDialog settingsFrame
settingsPanel
protected edu.stanford.genetics.treeview.TabbedSettingsPanel settingsPanel
colorExtractor
protected ColorExtractor colorExtractor
Constructor Detail |
DendroView
public DendroView(edu.stanford.genetics.treeview.DataModel tVModel, edu.stanford.genetics.treeview.ViewFrame vFrame)
- Constructor for the DendroView object
DendroView
public DendroView(edu.stanford.genetics.treeview.DataModel tVModel, edu.stanford.genetics.treeview.ConfigNode root, edu.stanford.genetics.treeview.ViewFrame vFrame)
- Constructor for the DendroView object which binds to an explicit confignode
Method Detail |
getFirst
private edu.stanford.genetics.treeview.ConfigNode getFirst(java.lang.String name)
- always returns an instance of the node, even if it has to create it.
getCdtSelection
public edu.stanford.genetics.treeview.CdtSelection getCdtSelection()
setCdtSelection
public void setCdtSelection(edu.stanford.genetics.treeview.CdtSelection cdtSelection)
getContrast
public double getContrast()
- Gets the contrast attribute of the DendroView object
getModel
public edu.stanford.genetics.treeview.DataModel getModel()
- gets the model this dendroview is based on
setWindowActive
private void setWindowActive(boolean flag)
- Sets the windowActive attribute of the DendroView object
getGlobalXmap
public MapContainer getGlobalXmap()
- Gets the globalXmap attribute of the DendroView object
getGlobalYmap
public MapContainer getGlobalYmap()
- Gets the globalYmap attribute of the DendroView object
getZoomXmap
public MapContainer getZoomXmap()
- Gets the zoomXmap attribute of the DendroView object
getZoomYmap
public MapContainer getZoomYmap()
- Gets the zoomYmap attribute of the DendroView object
exportGif
public void exportGif()
scrollToIndex
public void scrollToIndex(int i)
- Description copied from interface:
edu.stanford.genetics.treeview.MainPanel
- ensure a particular index is visible. Used by Find.
- Specified by:
scrollToIndex
in interfaceedu.stanford.genetics.treeview.MainPanel
update
public void update(java.util.Observable o, java.lang.Object arg)
- Description copied from interface:
java.util.Observer
- This method is called whenever the observable object changes, and has
called
notifyObservers
. The Observable object can pass arbitrary information in the second parameter.- Specified by:
update
in interfacejava.util.Observer
setupViews
protected void setupViews()
- This method should be called only during initial setup of the modelview
It sets up the views and binds them all to config nodes.
bindTrees
protected void bindTrees()
- this is meant to be called from setupViews.
It make sure that the trees are generated from the current model,
and enables/disables them as required.
I factored it out because it is common betwen DendroView and KnnDendroView.
doSingleLayout
private void doSingleLayout()
setupView
private void setupView(edu.stanford.genetics.treeview.ModelView modelView)
doDoubleLayout
private void doDoubleLayout()
addView
public void addView(edu.stanford.genetics.treeview.ModelView modelView, java.awt.Rectangle rectangle)
- Adds a ModelView to the DendroView
windowActive
public boolean windowActive()
- Determines if window is currently active
populateExportMenu
public void populateExportMenu(java.awt.Menu menu)
- Description copied from interface:
edu.stanford.genetics.treeview.MainPanel
- Add items which allow for export, if any.
- Specified by:
populateExportMenu
in interfaceedu.stanford.genetics.treeview.MainPanel
getFilePath
private java.lang.String getFilePath()
- prompts and returns file path, or null if cancelled.
addSimpleExportOptions
private void addSimpleExportOptions(java.awt.Menu menu)
showSummaryWindow
private void showSummaryWindow(int[] indexes)
showSummaryWindow
public void showSummaryWindow(int[] indexes, java.lang.String title)
- show summary of the specified indexes, with specified title, using settings stolen from zoomview.
populateAnalysisMenu
public void populateAnalysisMenu(java.awt.Menu menu)
- adds DendroView stuff to Analysis menu
- Specified by:
populateAnalysisMenu
in interfaceedu.stanford.genetics.treeview.MainPanel
setupSettingsPanel
private void setupSettingsPanel()
- this style has been deemed too slow.
populateSettingsMenu
public void populateSettingsMenu(java.awt.Menu menu)
- adds DendroView stuff to Document menu
- Specified by:
populateSettingsMenu
in interfaceedu.stanford.genetics.treeview.MainPanel
syncConfig
public void syncConfig()
- this function changes the info in the confignode to match the current panel sizes.
this is a hack, since I don't know how to intercept panel resizing.
Actually, in the current layout this isn't even used.
- Specified by:
syncConfig
in interfaceedu.stanford.genetics.treeview.MainPanel
bindConfig
public void bindConfig(edu.stanford.genetics.treeview.ConfigNode configNode)
- binds this dendroView to a particular confignode, resizing the panel sizes
appropriately.
- Specified by:
bindConfig
in interfaceedu.stanford.genetics.treeview.ConfigNodePersistent
setViewFrame
public void setViewFrame(edu.stanford.genetics.treeview.ViewFrame viewFrame)
- Setter for viewFrame
getViewFrame
public edu.stanford.genetics.treeview.ViewFrame getViewFrame()
- Getter for viewFrame
setDataModel
public void setDataModel(edu.stanford.genetics.treeview.DataModel dataModel)
- Setter for dataModel
getDataModel
public edu.stanford.genetics.treeview.DataModel getDataModel()
- Getter for dataModel
getConfigNode
public edu.stanford.genetics.treeview.ConfigNode getConfigNode()
- Setter for root - may not work properly
public void setConfigNode(ConfigNode root) {
this.root = root;
}
/** Getter for root
- Specified by:
getConfigNode
in interfaceedu.stanford.genetics.treeview.MainPanel
|
|||||||||
Home >> All >> edu >> stanford >> genetics >> treeview >> [ dendroview overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: ![]() ![]() ![]() |
DETAIL: FIELD | CONSTR | METHOD |