public class AngleJHotDrawAdapter extends AbstractJHotDrawAdapter<AngleOverlay,AngleJHotDrawAdapter.AngleFigure>
SwingAngleTool
Modifier and Type | Class and Description |
---|---|
protected class |
AngleJHotDrawAdapter.AngleFigure |
DASH_LINE_STYLE, DOT_DASH_LINE_STYLE, DOT_LINE_STYLE, SOLID_LINE_STYLE
Constructor and Description |
---|
AngleJHotDrawAdapter() |
Modifier and Type | Method and Description |
---|---|
Figure |
createDefaultFigure()
Creates a default figure of the type handled by this adapter.
|
AngleOverlay |
createNewOverlay()
Creates a new overlay.
|
JHotDrawTool |
getCreationTool(ImageDisplay display) |
boolean |
supports(Overlay overlay,
Figure figure)
Determines whether the adapter can handle a particular overlay, or overlay
/ figure combination.
|
boolean |
supports(Tool tool)
Determines whether the adapter is designed to work with the given tool.
|
Shape |
toShape(AngleJHotDrawAdapter.AngleFigure figure)
Converts a figure into an AWT Shape.
|
void |
updateFigure(OverlayView overlayView,
AngleJHotDrawAdapter.AngleFigure figure)
Update the appearance of the figure to match the overlay
|
void |
updateOverlay(AngleJHotDrawAdapter.AngleFigure figure,
OverlayView overlayView)
Update the overlay to match the appearance of the figure
|
initDefaultSettings, mouseDown, mouseDrag, report
getInfo, getPriority, setInfo, setPriority, toString
context, getContext
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getIdentifier, log
context, getContext, setContext
compareTo, getPriority, setPriority
getInfo, setInfo
getLocation
getVersion
public boolean supports(Tool tool)
JHotDrawAdapter
tool
- The tool in question.public boolean supports(Overlay overlay, Figure figure)
JHotDrawAdapter
overlay
- - an overlay that might be editablefigure
- - a figure that will be either updated by the overlay or will
update the overlay. The figure can be null: this indicates that
the adapter is capable of creating the figure associated with the
overlay/public AngleOverlay createNewOverlay()
JHotDrawAdapter
public Figure createDefaultFigure()
JHotDrawAdapter
public void updateFigure(OverlayView overlayView, AngleJHotDrawAdapter.AngleFigure figure)
JHotDrawAdapter
updateFigure
in interface JHotDrawAdapter<AngleJHotDrawAdapter.AngleFigure>
updateFigure
in class AbstractJHotDrawAdapter<AngleOverlay,AngleJHotDrawAdapter.AngleFigure>
overlayView
- view of the overlay to be represented by the figurefigure
- the figure that is to be made to look like the overlaypublic void updateOverlay(AngleJHotDrawAdapter.AngleFigure figure, OverlayView overlayView)
JHotDrawAdapter
updateOverlay
in interface JHotDrawAdapter<AngleJHotDrawAdapter.AngleFigure>
updateOverlay
in class AbstractJHotDrawAdapter<AngleOverlay,AngleJHotDrawAdapter.AngleFigure>
figure
- the figure that holds the current correct appearanceoverlayView
- view of the overlay that needs to be changed to bring it
in-sync with the figure.public JHotDrawTool getCreationTool(ImageDisplay display)
public Shape toShape(AngleJHotDrawAdapter.AngleFigure figure)
AbstractJHotDrawAdapter
toShape
in class AbstractJHotDrawAdapter<AngleOverlay,AngleJHotDrawAdapter.AngleFigure>
Copyright © 2014–2022 ImageJ. All rights reserved.