Package dataPlotsFX.overlaymark
Class TDMarkerFX
java.lang.Object
PamView.paneloverlay.overlaymark.ExtMouseAdapter
PamView.paneloverlay.overlaymark.OverlayMarker
dataPlotsFX.overlaymark.StandardOverlayMarker
dataPlotsFX.overlaymark.TDMarkerFX
- All Implemented Interfaces:
 MarkManager
Handle mouse events from an FX display and send them off into the 
 main panel marking thingamagig. This has the advantage over the TDMarkerStandard
 because it allows users to select individual data units as well as selecting groups.
- Author:
 - Doug Gillespie
 
- 
Field Summary
FieldsModifier and TypeFieldDescriptionThe detection groups.Fields inherited from class dataPlotsFX.overlaymark.StandardOverlayMarker
markPainter, tdGraphFX, tdGraphProjector - 
Constructor Summary
Constructors - 
Method Summary
Modifier and TypeMethodDescriptionvoidaddDetectionGroupListener(DetectionGroupListener detectionGroupListener) Add the detection group listener.protected booleancompleteMark(javafx.scene.input.MouseEvent e) Complete the mark.voiddestroyCurrentMark(javafx.scene.input.MouseEvent e) Destroy the current mark.findClosestUnit(Point pt) Find the closest data unit to a point on the graph.Get the currently selected detectionsgetDataUnitPoint(TDDataInfoFX dataInfo, PamDataUnit dataUnit) Get the pixel location of a data unit on the graph.getSelectedMarkedDataUnits(OverlayMark overlayMark, MarkDataSelector markDataSelector) Get a list of marked and selected data units.booleanisCanMark(javafx.scene.input.MouseEvent e) booleanisMouseContained(javafx.scene.input.MouseEvent e) Check whether a mouse event is contained within the current mark shapebooleanmousePressed(javafx.scene.input.MouseEvent e) Override to allow a highlighting of selected data units.booleanshowObserverPopups(javafx.scene.input.MouseEvent e) Show any popup menus form the mark observers in response to the mouse going down with a right click.voidUpdate the marked display.Methods inherited from class dataPlotsFX.overlaymark.StandardOverlayMarker
drawMark, getMarkerName, getTdGraphFX, notifyObservers, subscribePanelMethods inherited from class PamView.paneloverlay.overlaymark.OverlayMarker
addObserver, canDestroyMark, canMark, createJPopMenu, findClosestData, findExtraInfo, getCoordinate, getCurrentMark, getMarkChannels, getMarkSource, getMarkWarning, getObserverCount, getObservers, getPopupMenuItems, getProjector, getSelectedMarkedDataUnits, isAllowPolygons, isAllowRectangles, isMarkComplete, isNowMarking, mouseClicked, mouseDragged, mouseMoved, mouseReleased, needPaused, removeObserver, setAllowPolygons, setAllowRectangles, setCurrentMark, setMarkChannels, setMarkSource, setMarkSTartXY, setNowMarking, setProjector, showNoObserverPopup, updateObserversMethods inherited from class PamView.paneloverlay.overlaymark.ExtMouseAdapter
fxMouse, mouseClicked, mouseDragged, mouseEntered, mouseEntered, mouseExited, mouseExited, mouseMoved, mousePressed, mouseReleased, mouseWheelMoved, mouseWheelMoved, swingMouse 
- 
Field Details
- 
detectionGroupListeners
The detection groups. 
 - 
 - 
Constructor Details
- 
TDMarkerFX
 
 - 
 - 
Method Details
- 
isCanMark
public boolean isCanMark(javafx.scene.input.MouseEvent e) - Overrides:
 isCanMarkin classStandardOverlayMarker
 - 
addDetectionGroupListener
Add the detection group listener.- Parameters:
 detectionGroupListener- - the detection group listener
 - 
mousePressed
public boolean mousePressed(javafx.scene.input.MouseEvent e) Override to allow a highlighting of selected data units.- Overrides:
 mousePressedin classOverlayMarker
 - 
isMouseContained
public boolean isMouseContained(javafx.scene.input.MouseEvent e) Check whether a mouse event is contained within the current mark shape- Overrides:
 isMouseContainedin classOverlayMarker- Parameters:
 e- - the mouse event- Returns:
 - true if the mouse event is contained within the shape.
 
 - 
completeMark
protected boolean completeMark(javafx.scene.input.MouseEvent e) Description copied from class:OverlayMarkerComplete the mark.- Overrides:
 completeMarkin classOverlayMarker- Parameters:
 e- - mouse event
 - 
destroyCurrentMark
public void destroyCurrentMark(javafx.scene.input.MouseEvent e) Destroy the current mark.- Overrides:
 destroyCurrentMarkin classOverlayMarker
 - 
findClosestUnit
Find the closest data unit to a point on the graph.- Parameters:
 pt- - point on the graph panel.- Returns:
 - the closest data unit.
 
 - 
getDataUnitPoint
Get the pixel location of a data unit on the graph.- Parameters:
 dataInfo-dataUnit-- Returns:
 - point of the data unit in pixels- pixels represent pixels on the tdGraph, not the entire screen.
 
 - 
getSelectedMarkedDataUnits
public List<PamDataUnit> getSelectedMarkedDataUnits(OverlayMark overlayMark, MarkDataSelector markDataSelector) Description copied from class:OverlayMarkerGet a list of marked and selected data units. For now, work off the hover data within the projector, but feel free to override or use a totally different system of working out what's in the mark - that's the responsibility of whatever display has the mark. The MarkDataSelector comes from the Mark Observer, i.e. the thing that uses the data.- Overrides:
 getSelectedMarkedDataUnitsin classOverlayMarker- Parameters:
 overlayMark-markDataSelector-- Returns:
 
 - 
getCurrentDetectionGroup
Get the currently selected detections- Overrides:
 getCurrentDetectionGroupin classStandardOverlayMarker- Returns:
 - a class containing info on selected detections
 
 - 
showObserverPopups
public boolean showObserverPopups(javafx.scene.input.MouseEvent e) Description copied from class:OverlayMarkerShow any popup menus form the mark observers in response to the mouse going down with a right click.If a mark has been made, and is in existence, then
- Overrides:
 showObserverPopupsin classOverlayMarker- Parameters:
 e- Mouse event- Returns:
 - true if a menu was shown.
 
 - 
updateMarkedDisplay
public void updateMarkedDisplay()Description copied from class:OverlayMarkerUpdate the marked display. This can be called after the mark has been used to repaint the owner display. Forcing a repaint will generally make the mark disappear and may also recolour any changed dataunits.- Overrides:
 updateMarkedDisplayin classOverlayMarker
 
 -