|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjavax.swing.ImageIcon
br.usp.ime.klava.segmentit.gui.ZoomableImageIcon
br.usp.ime.klava.segmentit.gui.MarkersEditor
public class MarkersEditor
Implements a canvas where markers can be edited.
Constructor Summary | |
---|---|
MarkersEditor(int width,
int height)
Constructs a MarkersEditor that stores a markers image of
the given dimensions. |
Method Summary | |
---|---|
void |
clean()
Cleans the existing markers. |
void |
erase(int x,
int y)
Erases markers of any color using the current diameter. |
void |
eraseColor(int x,
int y)
Erases markers of the current color using the current diameter. |
void |
eraseNonUniqueLabeledBasins(PrimitiveCatchmentBasinsGraph graph)
Erases the intersection of the markers with the primitive catchment basins crossed by multiple markers. |
void |
erasePreviousMarkers(PrimitiveCatchmentBasinsGraph graph)
Erases the intersection of the previous markers with the primitive catchment basins (vertices of graph ) crossed by the last
marker created/edited. |
java.awt.Color |
getBrushColor()
Returns the color of the brush. |
java.awt.Color |
getColor(int x,
int y)
Returns the color of the pixel localized at ( x ,
y ). |
void |
loadMarkers(java.awt.Image image)
Overrides the existing markers with the given image. |
void |
loadMarkers(java.awt.Image image,
boolean override)
Sets an image to be used as markers. |
void |
paint(int x,
int y)
Paints markers using the brush with the current color and diameter. |
void |
setBrushColor(java.awt.Color color)
Sets the color of the brush. |
void |
setBrushDiameter(int diameter)
Sets the diameter of the brush. |
boolean |
stopPainting()
Stops painting/erasing markers. |
Methods inherited from class br.usp.ime.klava.segmentit.gui.ZoomableImageIcon |
---|
getZoomLevel, paintIcon, setOpacity, setZoomLevel |
Methods inherited from class javax.swing.ImageIcon |
---|
getAccessibleContext, getDescription, getIconHeight, getIconWidth, getImage, getImageLoadStatus, getImageObserver, setDescription, setImage, setImageObserver, toString |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public MarkersEditor(int width, int height)
MarkersEditor
that stores a markers image of
the given dimensions.
width
- the width of the markers imageheight
- the height of the markers imageMethod Detail |
---|
public void loadMarkers(java.awt.Image image)
image
- an image to be used as markerspublic void loadMarkers(java.awt.Image image, boolean override)
image
- an image to be used as markersoverride
- true
if the existing markers should be removed,
false
if the image
should be drawn
over existing markers.public void clean()
public void setBrushColor(java.awt.Color color)
color
- the color of the brushpublic java.awt.Color getBrushColor()
public void setBrushDiameter(int diameter)
diameter
- the diameter (in pixels) of the brushpublic void paint(int x, int y)
x
- the x-coordinate of the brushy
- the y-coordinate of the brushpublic void erase(int x, int y)
x
- the x-coordinate of the brushy
- the y-coordinate of the brushpublic void eraseColor(int x, int y)
x
- the x-coordinate of the brushy
- the y-coordinate of the brushpublic boolean stopPainting()
true
if it was in an editing statepublic java.awt.Color getColor(int x, int y)
x
,
y
).
x
- the x-coordinate of the pixely
- the y-coordinate of the pixel
Color
of the marker localized at (x
,y
), null
if the pixel is transparentpublic void erasePreviousMarkers(PrimitiveCatchmentBasinsGraph graph)
graph
) crossed by the last
marker created/edited.
graph
- a PrimitiveCatchmentBasinsGraph
public void eraseNonUniqueLabeledBasins(PrimitiveCatchmentBasinsGraph graph)
graph
- a PrimitiveCatchmentBasinsGraph
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |