|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.net.URLStreamHandler
org.springframework.richclient.image.Handler
public class Handler
A URL protocol handler that resolves images from an ImageSource.
The syntax of an "image:" URL is: image:{imageKey}
We recommend that you use the system parameter at startup to ensure that the handler is registered:
-Djava.protocol.handler.pkgs=org.springframework.richclient
A static method installImageUrlHandler(org.springframework.richclient.image.ImageSource)
is provided that extends the
system property and includes the 'org.springframework.richclient'. This
method can also be triggered by creating an imageSource using
DefaultImageSource.DefaultImageSource(boolean, java.util.Map)
. Note
that this will only work if the system property isn't already read. If an URL
was created and an URLStreamHandlerFactory
is available, extending
the system property won't have any effect.
Constructor Summary | |
---|---|
Handler()
Creates an instance of Handler . |
Method Summary | |
---|---|
static void |
installImageUrlHandler(ImageSource urlHandlerImageSource)
Installs this class as a handler for the "image:" protocol. |
protected URLConnection |
openConnection(URL url)
|
Methods inherited from class java.net.URLStreamHandler |
---|
equals, getDefaultPort, getHostAddress, hashCode, hostsEqual, openConnection, parseURL, sameFile, setURL, setURL, toExternalForm |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Handler()
Handler
.
Method Detail |
---|
public static void installImageUrlHandler(ImageSource urlHandlerImageSource)
protected URLConnection openConnection(URL url) throws IOException
openConnection
in class URLStreamHandler
IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |