Package uk.ac.starlink.topcat
Class ResourceIcon
java.lang.Object
uk.ac.starlink.topcat.ResourceIcon
- All Implemented Interfaces:
Icon
Handles the procurement of icons and other graphics for the TableViewer
and related classes. All the icons required by these classes are
provided as static final members of this class.
This class should really implement Icon
rather
than extending ImageIcon
. However in Sun's J2SE1.4
AbstractButton implementation there is a bit where it will only
grey out the icon if it actually is an ImageIcon. So we inherit
from there.
- Author:
- Mark Taylor (Starlink)
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final ImageIcon
static final ImageIcon
static final ImageIcon
static final ImageIcon
static final ImageIcon
static final ImageIcon
static final ImageIcon
static final ImageIcon
static final ImageIcon
static final ImageIcon
static final ImageIcon
static final ImageIcon
static final ImageIcon
static final ImageIcon
static final ImageIcon
static final ImageIcon
static final ImageIcon
static final ImageIcon
static final Icon
Blank icon.static final ImageIcon
static final ImageIcon
static final ImageIcon
static final ImageIcon
static final ImageIcon
static final ImageIcon
static final ImageIcon
static final ImageIcon
static final ImageIcon
static final ImageIcon
static final ImageIcon
static final ImageIcon
static final ImageIcon
static final ImageIcon
static final ImageIcon
static final ImageIcon
static final ImageIcon
static final ImageIcon
static final ImageIcon
static final ImageIcon
static final ImageIcon
static final ImageIcon
static final ImageIcon
static final ImageIcon
static final ImageIcon
static final ImageIcon
static final ImageIcon
static final ImageIcon
static final ImageIcon
static final ImageIcon
static final ImageIcon
static final ImageIcon
static final ImageIcon
static final ImageIcon
static final ImageIcon
static final ImageIcon
static final ImageIcon
static final ImageIcon
static final ImageIcon
static final ImageIcon
static final ImageIcon
static final ImageIcon
static final ImageIcon
static final ImageIcon
static final ImageIcon
static final ImageIcon
static final ImageIcon
static final ImageIcon
static final ImageIcon
static final ImageIcon
static final ImageIcon
static final ImageIcon
static final ImageIcon
static final ImageIcon
static final ImageIcon
static final ImageIcon
static final ImageIcon
static final ImageIcon
static final ImageIcon
static final ImageIcon
static final ImageIcon
static final ImageIcon
static final ImageIcon
static final ImageIcon
static final ImageIcon
static final ImageIcon
static final ImageIcon
static final ImageIcon
static final ImageIcon
static final ImageIcon
static final ImageIcon
static final ImageIcon
static final ImageIcon
static final ImageIcon
static final ImageIcon
static final ImageIcon
static final ImageIcon
static final ImageIcon
static final ImageIcon
static final ImageIcon
static final ImageIcon
static final ImageIcon
static final ImageIcon
static final ImageIcon
static final ImageIcon
static final ImageIcon
static final ImageIcon
static final ImageIcon
static final ImageIcon
static final ImageIcon
static final ImageIcon
static final ImageIcon
static final ImageIcon
static final ImageIcon
static final ImageIcon
static final ImageIcon
static final ImageIcon
static final ImageIcon
static final ImageIcon
static final ImageIcon
static final ImageIcon
static final ImageIcon
static final ImageIcon
static final ImageIcon
static final ImageIcon
static final ImageIcon
static final ImageIcon
static final ImageIcon
static final ImageIcon
static final ImageIcon
static final ImageIcon
static final ImageIcon
static final ImageIcon
static final ImageIcon
static final ImageIcon
static final ImageIcon
static final ImageIcon
static final ImageIcon
static final ImageIcon
static final ImageIcon
static final ImageIcon
static final ImageIcon
static final ImageIcon
static final ImageIcon
static final ImageIcon
static final ImageIcon
static final ImageIcon
static final ImageIcon
static final String
Location of image resource files relative to this class.static final ImageIcon
static final ImageIcon
static final ImageIcon
static final ImageIcon
static final ImageIcon
static final ImageIcon
static final ImageIcon
static final ImageIcon
static final ImageIcon
static final ImageIcon
static final ImageIcon
static final ImageIcon
static final ImageIcon
static final ImageIcon
static final ImageIcon
static final ImageIcon
static final ImageIcon
static final ImageIcon
static final ImageIcon
static final ImageIcon
static final ImageIcon
static final ImageIcon
static final ImageIcon
static final ImageIcon
static final ImageIcon
static final ImageIcon
static final ImageIcon
static final ImageIcon
static final ImageIcon
static final ImageIcon
static final ImageIcon
static final ImageIcon
static final ImageIcon
static final ImageIcon
static final ImageIcon
static final ImageIcon
static final ImageIcon
static final ImageIcon
static final ImageIcon
static final ImageIcon
static final ImageIcon
static final ImageIcon
static final ImageIcon
static final ImageIcon
static final ImageIcon
static final ImageIcon
static final ImageIcon
static final ImageIcon
static final ImageIcon
static final ImageIcon
static final ImageIcon
static final ImageIcon
static final ImageIcon
static final ImageIcon
static final ImageIcon
static final ImageIcon
static final ImageIcon
static final ImageIcon
static final ImageIcon
static final ImageIcon
static final ImageIcon
static final ImageIcon
static final ImageIcon
static final ImageIcon
static final ImageIcon
static final ImageIcon
static final ImageIcon
static final ImageIcon
static final ImageIcon
static final ImageIcon
static final ImageIcon
static final ImageIcon
static final ImageIcon
static final ImageIcon
static final ImageIcon
static final ImageIcon
static final ImageIcon
static final ImageIcon
-
Method Summary
Modifier and TypeMethodDescriptionstatic void
Checks that all the required resource files are present for this class.static ImageIcon
combineIcons
(Icon[] icons) Paints a stack of icons on top of each other and returns the result.Returns a URL from which this icon can be retrieved by external applications.int
int
getImage()
Returns an Image for this icon if it can, ornull
if it can't for some reason.static Icon
Returns a full-size TOPCAT logo for display.static Icon
Returns an icon-size TOPCAT logo.getURL()
Returns the URL for the image that forms this icon; it is called PREFIX + location relative to this class.static void
Invokes thewriteHelpMapXML(java.io.OutputStream, java.lang.String)
method to standard output.void
static ImageIcon
Doctors an icon representing a control to look like it means adding that control.static ImageIcon
toImportIcon
(Icon baseIcon) Doctors an icon look like it means importing a table associated with that icon.static ImageIcon
toSaveIcon
(Icon baseIcon) Doctors an icon look like it means saving data associated with that icon.static void
writeHelpMapXML
(OutputStream ostrm, String prefix) Writes the <mapID> elements required for a JavaHelp map file representing the icons represented by this class.
-
Field Details
-
PREFIX
Location of image resource files relative to this class.- See Also:
-
DO_WHAT
-
STARLINK
-
TABLE
-
TOPCAT_LOGO
-
TOPCAT_LOGO_SMALL
-
TOPCAT_LOGO_XM
-
TOPCAT_LOGO_XM_SMALL
-
STAR_LOGO
-
ASTROGRID_LOGO
-
BRISTOL_LOGO
-
VOTECH_LOGO
-
STFC_LOGO
-
GAVO_LOGO
-
ESA_LOGO
-
VIZIER_LOGO
-
EU_LOGO
-
EUROPLANET_LOGO
-
CLOSE
-
EXIT
-
LOAD
-
SAVE
-
IMPORT
-
PRINT
-
PRINT_ZIP
-
IMAGE
-
FITS
-
COPY
-
REDO
-
PAUSE
-
SCROLL
-
ADD
-
SUBTRACT
-
DELETE
-
HELP
-
HELP_BROWSER
-
DEMO
-
HIDE
-
REVEAL
-
HIDE_ALL
-
REVEAL_ALL
-
HIDE_ALL_TINY
-
REVEAL_ALL_TINY
-
MODIFY
-
SEARCH
-
LOG
-
CLEAR
-
HIDE_WINDOWS
-
SCROLLER
-
PARALLEL
-
STILTS
-
STILTS_HELP
-
EDIT
-
CLIPBOARD
-
CONTROL
-
COLUMNS
-
STATS
-
HISTOGRAM
-
CUMULATIVE
-
NORMALISE
-
PLOT
-
DENSITY
-
PLOT3D
-
SPHERE
-
STACK
-
PARAMS
-
VIEWER
-
SUBSETS
-
FUNCTION
-
MATCH1
-
MATCH2
-
MATCHN
-
CONCAT
-
MULTICONE
-
MULTISIA
-
MULTISSA
-
DATALINK
-
SAMP
-
GAVO
-
VIZIER
-
BASTI
-
TREE_DIALOG
-
CLASSIFY
-
ACTIVATE
-
REACTIVATE
-
REACTIVATE_ALL
-
ACTIVATE_SEQ
-
ACTIVATE_SEQ_ALL
-
PAUSE_SEQ
-
CANCEL_SEQ
-
DELETE_INACTIVE
-
UNSORT
-
DELETE_COLUMN
-
VISIBLE_SUBSET
-
JEL_VISIBLE_SUBSET
-
RANGE_SUBSET
-
XRANGE_SUBSET
-
BLOB_SUBSET
-
BLOB_SUBSET_END
-
POLY_SUBSET
-
POLY_SUBSET_END
-
RESIZE
-
RESIZE_X
-
RESIZE_Y
-
GRID_ON
-
GRID_OFF
-
Y_CURSOR
-
Y0_LINE
-
TO_COLUMN
-
HIGHLIGHT
-
APPLY_SUBSET
-
COUNT
-
RECOUNT
-
INVERT
-
HEAD
-
TAIL
-
SAMPLE
-
INCLUDE_ROWS
-
EXCLUDE_ROWS
-
UP
-
DOWN
-
UP_TRIM
-
DOWN_TRIM
-
MOVE_UP
-
MOVE_DOWN
-
EQUATION
-
EXPLODE
-
COLLAPSE
-
ADDSKY
-
COLOR_LOG
-
XLOG
-
YLOG
-
XFLIP
-
YFLIP
-
XYZ
-
FOG
-
ANTIALIAS
-
COLOR
-
FINE
-
ROUGH
-
AXIS_EDIT
-
AXIS_LOCK
-
AUX_LOCK
-
BROADCAST
-
SEND
-
ADD_TAB
-
REMOVE_TAB
-
COLORS
-
ADD_COLORS
-
REMOVE_COLORS
-
NORTH
-
WEIGHT
-
JPEG
-
SPLIT
-
FORWARD
-
BACKWARD
-
PAGE_SETUP
-
MANUAL
-
MANUAL_BROWSER
-
MANUAL1_BROWSER
-
LEGEND
-
LABEL
-
RADIAL
-
CONNECT
-
DISCONNECT
-
NO_HUB
-
PDF
-
TUNING
-
PROFILE
-
SYSTEM
-
KEEP_OPEN
-
LISTEN
-
TO_BROWSER
-
SYNTAX
-
FOOTPRINT
-
ZOOM_IN
-
ZOOM_OUT
-
SKETCH
-
PROGRESS
-
MATCHPLOT
-
CDSXMATCH
-
HISTO_SAVE
-
HISTO_IMPORT
-
WARNING
-
APPROVE_ALL
-
MEASURE
-
LOCK
-
QAPPROX
-
RESET_AUTH
-
UP_DOWN
-
FLOAT
-
PLOT_DATA
-
PLOT_PAIR
-
PLOT_QUAD
-
PLOT_HISTO
-
PLOT_AREA
-
PLOT_VECTOR
-
PLOT_MATRIX
-
PLOT2_PLANE
-
PLOT2_SKY
-
PLOT2_CUBE
-
PLOT2_SPHERE
-
PLOT2_MATRIX
-
PLOT2_TIME
-
PLOT2_HISTOGRAM
-
HISTOBARS
-
NAV_HELP
-
NAV_DEC
-
SMALL_CLOSE
-
SMALL_HELP
-
ADD_CONTROL
-
AXIS_CONFIG
-
FRAME_CONFIG
-
SAVE_OVERLAY
-
IMPORT_OVERLAY
-
COLLAPSED
-
EXPANDED
-
HOME
-
TV_UP
-
TV_DOWN
-
FOLDER_NODE
-
LIBRARY_NODE
-
FUNCTION_NODE
-
CONSTANT_NODE
-
dummy
-
BLANK
Blank icon.
-
-
Method Details
-
getIconHeight
public int getIconHeight()- Specified by:
getIconHeight
in interfaceIcon
-
getIconWidth
public int getIconWidth()- Specified by:
getIconWidth
in interfaceIcon
-
paintIcon
-
getImage
Returns an Image for this icon if it can, ornull
if it can't for some reason.- Returns:
- an Image
-
getURL
Returns the URL for the image that forms this icon; it is called PREFIX + location relative to this class. This will probably be a jar: protocol URL and only useful to Java applications (possibly only within this JVM).- Returns:
- the icon URL
-
getExternalURL
Returns a URL from which this icon can be retrieved by external applications. This is served from TOPCAT's internal HTTP server, and so is only available as long as this instance of the program is running.- Returns:
- url, or null if no server is running
- Throws:
IOException
-
combineIcons
Paints a stack of icons on top of each other and returns the result. Later elements obscure earlier ones- Parameters:
icons
- icon array- Returns:
- combination
-
toAddIcon
Doctors an icon representing a control to look like it means adding that control. Currently, it puts a little plus sign in the corner.- Parameters:
baseIcon
- standard sized (24x24) base icon- Returns:
- doctored icon
-
toSaveIcon
Doctors an icon look like it means saving data associated with that icon. Currently, it puts a little floppy disk icon in the corner.- Parameters:
baseIcon
- standard sized (24x24) base icon- Returns:
- doctored icon
-
toImportIcon
Doctors an icon look like it means importing a table associated with that icon. Currently, it puts a little table icon in the corner.- Parameters:
baseIcon
- standard sized (24x24) base icon- Returns:
- doctored icon
-
getTopcatLogo
Returns a full-size TOPCAT logo for display.- Returns:
- topcat logo
-
getTopcatLogoSmall
Returns an icon-size TOPCAT logo.- Returns:
- 24x24 pixel topcat logo
-
checkResourcesPresent
Checks that all the required resource files are present for this class. If any of the image files are not present, it will throw an informative FileNotFoundException.- Throws:
FileNotFoundException
- if any of the graphics files are missing
-
writeHelpMapXML
Writes the <mapID> elements required for a JavaHelp map file representing the icons represented by this class. The URLs are relative to the location of the help files.- Parameters:
ostrm
- the destination output stream for the dataprefix
- a string to prefix to each relative URL
-
main
Invokes thewriteHelpMapXML(java.io.OutputStream, java.lang.String)
method to standard output.- Throws:
IOException
-