Package qupath.lib.gui.tools
Class IconFactory
java.lang.Object
qupath.lib.gui.tools.IconFactory
Factory class for creating icons.
- Author:
- Pete Bankhead
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic enum
Default icons for QuPath commands. -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic Image
createIconImage
(IconFactory.PathIcons icon, int size) Create an image from a default icon glyph.static Node
createNode
(int width, int height, IconFactory.PathIcons type) Create a node from a default icon glyph.static Node
createPathObjectIcon
(PathObject pathObject, int width, int height) Create an icon depicting a PathObject.static Node
createROIIcon
(ROI roi, int width, int height, Color color) Create an icon depicting a ROI.
-
Constructor Details
-
IconFactory
public IconFactory()
-
-
Method Details
-
createPathObjectIcon
Create an icon depicting a PathObject.- Parameters:
pathObject
- the region of interestwidth
- the preferred icon widthheight
- the preferred icon height- Returns:
- a node that may be used as an icon resembling the shapes of an object's ROI(s)
-
createROIIcon
Create an icon depicting a ROI.- Parameters:
roi
- the region of interestwidth
- the preferred icon widthheight
- the preferred icon heightcolor
- the icon (line) color- Returns:
- a node that may be used as an icon resembling the shape of the ROI
-
createNode
Create a node from a default icon glyph.- Parameters:
width
- preferred width of the icon nodeheight
- preferred height of the icon nodetype
- enum identifying the icon- Returns:
- a node that may be used as an icon
-
createIconImage
Create an image from a default icon glyph.- Parameters:
icon
- the icon to usesize
- the requested size of the image- Returns:
-