Opened 12 years ago
Closed 12 years ago
#8342 closed defect (fixed)
Some images (plus, minus, bing) have package dependent references
Reported by: | The111 | Owned by: | The111 |
---|---|---|---|
Priority: | normal | Milestone: | |
Component: | JMapViewer | Version: | latest |
Keywords: | Cc: |
Description (last modified by )
The loading and error images are referenced as follows:
LOADING_IMAGE = ImageIO.read(JMapViewer.class.getResourceAsStream("images/hourglass.png")); ERROR_IMAGE = ImageIO.read(JMapViewer.class.getResourceAsStream("images/error.png"));
This is a good thing, since if somebody uses the JMV release JAR file in an application and subclasses JMV, these images can still be found through the JMapViewer.class reference.
However, the plus, minus, and bing images are referenced as follows:
ImageIcon icon = new ImageIcon(getClass().getResource("images/plus.png"));
The problem with this is that if somebody uses the JMV release JAR in their application, and creates a subclass of JMV, that class will not be able to find the path "images/" if it has a different package. Thus it is probably smart to change these references to the same style as the earlier ones, like this:
ImageIcon icon = new ImageIcon(JMapViewer.class.getResource("images/plus.png"));
Attachments (0)
Change History (1)
comment:1 by , 12 years ago
Description: | modified (diff) |
---|---|
Resolution: | → fixed |
Status: | new → closed |
Summary: | Some images (plus, minus, bing) are not referenced properly for JAR use → Some images (plus, minus, bing) have package dependent references |
Fixed in [o29187]. Changed the image references for plus.png, minus.png, and bing.png to not be package dependent. Also updated release JAR's so they can benefit from this update.