|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjava.awt.event.MouseAdapter
org.fhcrc.cpl.toolbox.gui.chart.ChartMouseAndMotionListener
org.fhcrc.cpl.viewer.quant.gui.LogRatioHistMouseListener
public class LogRatioHistMouseListener
| Nested Class Summary | |
|---|---|
protected class |
LogRatioHistMouseListener.SelectedRegionOverlay
A ChartPanel overlay that draws in the selected region |
| Field Summary | |
|---|---|
protected static org.apache.log4j.Logger |
_log
|
protected java.awt.Color |
fillColor
|
protected double |
lastMousedRatio
|
protected java.util.List<java.awt.event.ActionListener> |
rangeUpdateListeners
|
protected float |
selectedRealXMaxValue
|
protected float |
selectedRealXMinValue
|
protected java.awt.geom.Rectangle2D |
selectedRegion
|
protected LogRatioHistMouseListener.SelectedRegionOverlay |
selectionOverlay
|
protected java.awt.Stroke |
stroke
|
| Fields inherited from class org.fhcrc.cpl.toolbox.gui.chart.ChartMouseAndMotionListener |
|---|
_chartPanel, domainAxis, rangeAxis |
| Constructor Summary | |
|---|---|
LogRatioHistMouseListener(PanelWithChart panelWithChart)
|
|
LogRatioHistMouseListener(PanelWithChart panelWithChart,
java.awt.event.ActionListener actionListener)
Convenience constructor for adding a single actionlistener |
|
| Method Summary | |
|---|---|
void |
addRangeUpdateListener(java.awt.event.ActionListener actionListener)
These get updated when the selection changes |
protected void |
drawBoxForRatio(java.awt.Graphics2D g)
Draw the box to contain the ratio |
protected void |
drawOrUndrawRegion()
Draw or undraw the selected region. |
protected void |
drawRatioInBox(java.awt.Graphics2D g)
Draw the ratio in its box. |
float |
getSelectedRealXMaxValue()
|
float |
getSelectedRealXMinValue()
|
void |
mouseDragged(java.awt.event.MouseEvent e)
Undraw the previous selected region (if it was drawn), calculate the new regions, draw again, save the points, and draw the numeric ratio in its little box |
void |
mouseExited(java.awt.event.MouseEvent e)
When mouse leaves chart, paint over the ratio so it doesn't hang out there |
void |
mouseMoved(java.awt.event.MouseEvent e)
When mouse moved, draw the ratio under the mouse pointer |
void |
mousePressed(java.awt.event.MouseEvent e)
Save the initial selection point |
void |
mouseReleased(java.awt.event.MouseEvent e)
When the mouse is let go, save the range and signal the range update listeners |
void |
setSelectedRealXMaxValue(float selectedRealXMaxValue)
|
void |
setSelectedRealXMinValue(float selectedRealXMinValue)
|
void |
setSelectedRegionWithChartValues(float minValue,
float maxValue)
Set the axis-scale coordinates |
protected void |
transformAndSaveSelectedRegion()
Transform the region into values in units of the chart X axis |
| Methods inherited from class org.fhcrc.cpl.toolbox.gui.chart.ChartMouseAndMotionListener |
|---|
drawAllButSelectedRegionHoriz, drawSelectedRegion, getChartPanel, getChartPanelGraphics, getPointInRectangle, setChartPanel, transformMouseXValue, transformXValueToMouse |
| Methods inherited from class java.awt.event.MouseAdapter |
|---|
mouseClicked, mouseEntered, mouseWheelMoved |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected static org.apache.log4j.Logger _log
protected float selectedRealXMinValue
protected float selectedRealXMaxValue
protected java.util.List<java.awt.event.ActionListener> rangeUpdateListeners
protected java.awt.Color fillColor
protected java.awt.Stroke stroke
protected LogRatioHistMouseListener.SelectedRegionOverlay selectionOverlay
protected java.awt.geom.Rectangle2D selectedRegion
protected double lastMousedRatio
| Constructor Detail |
|---|
public LogRatioHistMouseListener(PanelWithChart panelWithChart)
public LogRatioHistMouseListener(PanelWithChart panelWithChart,
java.awt.event.ActionListener actionListener)
panelWithChart - actionListener - | Method Detail |
|---|
public void mouseMoved(java.awt.event.MouseEvent e)
mouseMoved in interface java.awt.event.MouseMotionListenermouseMoved in class java.awt.event.MouseAdaptere - public void mouseExited(java.awt.event.MouseEvent e)
mouseExited in interface java.awt.event.MouseListenermouseExited in class java.awt.event.MouseAdaptere - protected void drawBoxForRatio(java.awt.Graphics2D g)
protected void drawRatioInBox(java.awt.Graphics2D g)
g - public void mousePressed(java.awt.event.MouseEvent e)
mousePressed in interface java.awt.event.MouseListenermousePressed in class java.awt.event.MouseAdaptere - public void addRangeUpdateListener(java.awt.event.ActionListener actionListener)
actionListener - public void mouseReleased(java.awt.event.MouseEvent e)
mouseReleased in interface java.awt.event.MouseListenermouseReleased in class java.awt.event.MouseAdaptere - protected void transformAndSaveSelectedRegion()
public void setSelectedRegionWithChartValues(float minValue,
float maxValue)
minValue - maxValue - public void mouseDragged(java.awt.event.MouseEvent e)
mouseDragged in interface java.awt.event.MouseMotionListenermouseDragged in class java.awt.event.MouseAdaptere - protected void drawOrUndrawRegion()
public float getSelectedRealXMinValue()
public void setSelectedRealXMinValue(float selectedRealXMinValue)
public float getSelectedRealXMaxValue()
public void setSelectedRealXMaxValue(float selectedRealXMaxValue)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||