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
Modifier and TypeFieldDescriptionThe detection groups. -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addDetectionGroupListener
(DetectionGroupListener detectionGroupListener) Add the detection group listener.void
destroyCurrentMark
(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.boolean
isCanMark
(javafx.scene.input.MouseEvent e) boolean
isMouseContained
(javafx.scene.input.MouseEvent e) Check whether a mouse event is contained within the current mark shapeboolean
mousePressed
(javafx.scene.input.MouseEvent e) Override to allow a highlighting of selected data units.boolean
showObserverPopups
(javafx.scene.input.MouseEvent e) Show any popup menus form the mark observers in response to the mouse going down with a right click.void
Update the marked display.Methods inherited from class dataPlotsFX.overlaymark.StandardOverlayMarker
drawMark, getMarkerName, getTdGraphFX, notifyObservers, subscribePanel
Methods inherited from class PamView.paneloverlay.overlaymark.OverlayMarker
addObserver, canDestroyMark, canMark, createJPopMenu, findClosestData, getCurrentMark, getMarkWarning, getObserverCount, getObservers, getPopupMenuItems, getProjector, getSelectedMarkedDataUnits, isMarkComplete, isNowMarking, mouseClicked, mouseDragged, mouseMoved, mouseReleased, needPaused, removeObserver, setCurrentMark, setNowMarking, setProjector, showNoObserverPopup
Methods 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:
isCanMark
in 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:
mousePressed
in classOverlayMarker
-
isMouseContained
public boolean isMouseContained(javafx.scene.input.MouseEvent e) Check whether a mouse event is contained within the current mark shape- Overrides:
isMouseContained
in classOverlayMarker
- Parameters:
e
- - the mouse event- Returns:
- true if the mouse event is contained within the shape.
-
destroyCurrentMark
public void destroyCurrentMark(javafx.scene.input.MouseEvent e) Destroy the current mark.- Overrides:
destroyCurrentMark
in 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:OverlayMarker
Get 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:
getSelectedMarkedDataUnits
in classOverlayMarker
- Returns:
-
getCurrentDetectionGroup
Get the currently selected detections- Overrides:
getCurrentDetectionGroup
in classStandardOverlayMarker
- Returns:
- a class containing info on selected detections
-
showObserverPopups
public boolean showObserverPopups(javafx.scene.input.MouseEvent e) Description copied from class:OverlayMarker
Show 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:
showObserverPopups
in classOverlayMarker
- Parameters:
e
- Mouse event- Returns:
- true if a menu was shown.
-
updateMarkedDisplay
public void updateMarkedDisplay()Description copied from class:OverlayMarker
Update 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:
updateMarkedDisplay
in classOverlayMarker
-