Class OverlayIcons
- java.lang.Object
-
- com.biomatters.geneious.publicapi.plugin.Icons
-
- com.biomatters.geneious.publicapi.components.OverlayIcons
-
public class OverlayIcons extends Icons
-
-
Constructor Summary
Constructors Constructor Description OverlayIcons(Icons baseIcons, double overallWidthFraction, double overallHeightFraction, double baseIconSizeFraction, double baseIconCenterX, double baseIconCenterY, double overlaySizeFraction, double overlayCenterX, double overlayCenterY, Icons... overlayIcons)
OverlayIcons(Icons baseIcons, Icons... overlayIcons)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static OverlayIcons
get(Icons baseIcons, Icons... overlayIcons)
javax.swing.Icon
getIcon(int size)
Return a size * size point iconjavax.swing.Icon
getIcon(int size, java.awt.Color overrideColor)
Moves the colors in thisIcons
towards the given color.javax.swing.Icon
getIcon16()
Return a 16 * 16 point icon.javax.swing.Icon
getIcon24()
Return a 24 * 24 point icon.javax.swing.Icon
getIcon32()
Return a 32 * 32 point icon.java.lang.String
getId()
Used internally by Geneious for caching.-
Methods inherited from class com.biomatters.geneious.publicapi.plugin.Icons
asGreyedOut, createGreyedOutIcon, equals, getOriginalIcon, getOriginalIconForRetina, getOriginalIconUnscaled, hashCode
-
-
-
-
Constructor Detail
-
OverlayIcons
public OverlayIcons(Icons baseIcons, Icons... overlayIcons)
Create a newIcons
that overlays one or moreIcons
on top of a baseIcons
. The specified overlayIcons are overlied in the order specified, i.e. the last one is drawn on the very top.
Consider usingget(Icons, Icons...)
to allow caching of overlay icons- Parameters:
baseIcons
- the base Icons on which to overlay the other IconsoverlayIcons
- 0 or more icons to overlay on the base Icons.- See Also:
get(Icons, Icons...)
-
OverlayIcons
public OverlayIcons(Icons baseIcons, double overallWidthFraction, double overallHeightFraction, double baseIconSizeFraction, double baseIconCenterX, double baseIconCenterY, double overlaySizeFraction, double overlayCenterX, double overlayCenterY, Icons... overlayIcons)
Create a newIcons
that overlays one or moreIcons
on top of a baseIcons
. The specified overlayIcons are overlied in the order specified, i.e. the last one is drawn on the very top.- Parameters:
baseIcons
- the base Icons on which to overlay the other IconsoverallWidthFraction
- a fraction (between 0 and 1) of the base icon width to use as the overall width of the result iconoverallHeightFraction
- a fraction (between 0 and 1) of the base icon height to use as the overall height of the result iconbaseIconSizeFraction
- a value between 0 and 1 to indicate a fraction of the result icon size to cover with the base icon. The base icon will be scaled down if this is less than 1baseIconCenterX
- a value between 0 and 1 to indicate where on the result icon to horizontally center the base icon. Use 0.5 to center the base icon over the center of the result iconbaseIconCenterY
- a value between 0 and 1 to indicate where on the result icon to vertically center the base icon. Use 0.5 to center the base icon over the center of the result iconoverlaySizeFraction
- a value between 0 and 1 to indicate a fraction of the result icon size to cover with the overlay icons. The overlay icons will be scaled down if his is less than 1overlayCenterX
- a value between 0 and 1 to indicate where on the result icon to horizontally center the overlay icons. Use 0.5 to center the overlay icons over the center of the result iconoverlayCenterY
- a value between 0 and 1 to indicate where on the result icon to vertically center the overlay icons. Use 0.5 to center the overlay icons over the center of the result iconoverlayIcons
- 0 or more icons to overlay on the base Icons.- Since:
- API 4.202020 (Geneious 2020.2.0)
-
-
Method Detail
-
get
public static OverlayIcons get(Icons baseIcons, Icons... overlayIcons)
Return anIcons
that overlays one or moreIcons
on top of a baseIcons
. The specified overlayIcons are overlied in the order specified, i.e. the last one is drawn on the very top.- Parameters:
baseIcons
- the base Icons on which to overlay the other IconsoverlayIcons
- 0 or more icons to overlay on the base Icons.- Returns:
- overlay icons, creating if necessary via
OverlayIcons(Icons, Icons...)
or fetching from a cache. - Since:
- API 4.1000 (Geneious 10.0.0)
-
getId
public java.lang.String getId()
Description copied from class:Icons
Used internally by Geneious for caching.- Overrides:
getId
in classIcons
- Returns:
- A
UUID
string that is based on the pixel data of the icon images used to construct this Icons. Therefore identical Icons should have identical id's. Note that the id is dependent on the order of the images passed in to the constructor, so Icons created with images specified in different orders will have different id's
-
getIcon16
public javax.swing.Icon getIcon16()
Description copied from class:Icons
Return a 16 * 16 point icon. Appropriate for use in JTree, JTable rows and small JButtons.
-
getIcon24
public javax.swing.Icon getIcon24()
Description copied from class:Icons
Return a 24 * 24 point icon. Appropriate for use in large toolbar buttons.
-
getIcon32
public javax.swing.Icon getIcon32()
Description copied from class:Icons
Return a 32 * 32 point icon. Appropriate for use in large table rows.
-
getIcon
public javax.swing.Icon getIcon(int size)
Description copied from class:Icons
Return a size * size point icon
-
-