public class GIcon extends ImageIcon
Modifier and Type | Class and Description |
---|---|
static class |
GIcon.Type
Types of icons.
|
ImageIcon.AccessibleImageIcon
Modifier and Type | Field and Description |
---|---|
static String |
DEFAULT_GENIUS_ICON_FILE
Default GENIUS application frame icon file name
|
Constructor and Description |
---|
GIcon(GIcon.Type type,
int size)
Constructor with the type of the icon end its size.
|
Modifier and Type | Method and Description |
---|---|
static GIcon |
createGIconFromURL(URL url,
int size)
Gets an icon from the provided URL and scales it to the requested size.
|
static GIcon |
createIconFromFile(String iconpath)
Create a GIcon from an image file
|
static ImageIcon |
createIconFromURL(URL url,
int size)
Gets an icon from the provided URL and scales it to the requested size.
|
static Image |
createImageFromURL(URL url,
int size)
Gets an image from the provided URL and scales it to the requested size.
|
static URL |
getIconURL(String imageName)
Get the URL of an icon, prepending the prefix "/fr/cnes/genius/icons/" to imageName.
|
static URL |
getIconURLFromPath(String imagePath)
Get the URL of an icon, prepending the prefix "/fr/cnes/genius/icons/" to imageName.
|
getAccessibleContext, getDescription, getIconHeight, getIconWidth, getImage, getImageLoadStatus, getImageObserver, loadImage, paintIcon, setDescription, setImage, setImageObserver, toString
public static final String DEFAULT_GENIUS_ICON_FILE
public GIcon(GIcon.Type type, int size)
type
- type of icon available in the following list : OPEN, SAVE, EXIT, START, STOP,
WARNING, ERROR, INFO, DELETE, PRINTsize
- size in pixels of this icon.public static URL getIconURL(String imageName) throws GException
imageName
- name of the image file that will be prefixed by "/fr/cnes/genius/icons/".GException
- in case the icon can not be found.public static URL getIconURLFromPath(String imagePath) throws GException
imagePath
- resource path of the image file that will not be prefixed by
"/fr/cnes/genius/icons/".GException
- in case the icon can not be found.public static GIcon createGIconFromURL(URL url, int size) throws IOException
url
- of the icon.size
- of the result icon.IOException
- In case the icon can not be read.public static ImageIcon createIconFromURL(URL url, int size) throws IOException
url
- of the icon.size
- of the result icon.IOException
- In case the icon can not be read.public static Image createImageFromURL(URL url, int size) throws IOException
url
- of the image.size
- of the result image.IOException
- In case the image can not be read.Copyright © 2024. All rights reserved.