Skip to content
GitLab
Explore
Sign in
Register
Commits on Source (2)
HBackgroundImage: detach from sun.awt.image
· fa2f80fc
hpi1
authored
Apr 05, 2019
Use Toolkit instead.
fa2f80fc
Add logging
· ea51aa48
hpi1
authored
Apr 05, 2019
ea51aa48
Hide whitespace changes
Inline
Side-by-side
src/libbluray/bdj/java/org/bluray/ti/selection/TitleContextImpl.java
View file @
ea51aa48
...
...
@@ -51,6 +51,8 @@ public class TitleContextImpl implements TitleContext {
}
public
ServiceContentHandler
[]
getServiceContentHandlers
()
throws
SecurityException
{
logger
.
info
(
"getServiceContentHandlers"
);
SecurityManager
sm
=
System
.
getSecurityManager
();
if
(
sm
!=
null
)
{
sm
.
checkPermission
(
new
ServiceContextPermission
(
"getServiceContentHandlers"
,
"own"
));
...
...
@@ -129,6 +131,8 @@ public class TitleContextImpl implements TitleContext {
}
public
void
destroy
()
throws
SecurityException
{
logger
.
info
(
"destroy()"
);
SecurityManager
sm
=
System
.
getSecurityManager
();
if
(
sm
!=
null
)
{
sm
.
checkPermission
(
new
ServiceContextPermission
(
"stop"
,
"own"
));
...
...
src/libbluray/bdj/java/org/havi/ui/HBackgroundImage.java
View file @
ea51aa48
...
...
@@ -29,14 +29,9 @@ import java.util.ArrayList;
import
org.havi.ui.event.HBackgroundImageEvent
;
import
org.havi.ui.event.HBackgroundImageListener
;
import
sun.awt.image.ByteArrayImageSource
;
import
sun.awt.image.FileImageSource
;
import
sun.awt.image.URLImageSource
;
public
class
HBackgroundImage
implements
ImageObserver
{
public
HBackgroundImage
(
String
filename
)
{
producer
=
new
FileImageSource
(
filename
);
img
=
Toolkit
.
getDefaultToolkit
().
createImage
(
producer
);
img
=
Toolkit
.
getDefaultToolkit
().
createImage
(
filename
);
}
public
HBackgroundImage
(
byte
pixels
[])
{
...
...
@@ -44,13 +39,11 @@ public class HBackgroundImage implements ImageObserver {
System
.
err
.
println
(
"null pixels from "
+
org
.
videolan
.
Logger
.
dumpStack
());
return
;
}
producer
=
new
ByteArrayImageSource
(
pixels
);
img
=
Toolkit
.
getDefaultToolkit
().
createImage
(
producer
);
img
=
Toolkit
.
getDefaultToolkit
().
createImage
(
pixels
,
0
,
pixels
.
length
);
}
public
HBackgroundImage
(
URL
contents
)
{
producer
=
new
URLImageSource
(
contents
);
img
=
Toolkit
.
getDefaultToolkit
().
createImage
(
producer
);
img
=
Toolkit
.
getDefaultToolkit
().
createImage
(
contents
);
}
public
void
load
(
HBackgroundImageListener
listener
)
{
...
...