Bitmasks seem to be using wrong operator ("anything | 1 != 0" is always true)
Note return value check was changed from != to == based on JavaDoc for return value and logic in overridden method in superclass.
This commit is contained in:
@@ -79,11 +79,11 @@ public class StatusPanel extends JComponent
|
|||||||
public boolean imageUpdate (Image img, int infoflags, int x, int y, int width, int height)
|
public boolean imageUpdate (Image img, int infoflags, int x, int y, int width, int height)
|
||||||
{
|
{
|
||||||
boolean updated = false;
|
boolean updated = false;
|
||||||
if ((infoflags | WIDTH) != 0) {
|
if ((infoflags & WIDTH) != 0) {
|
||||||
_psize.width = width;
|
_psize.width = width;
|
||||||
updated = true;
|
updated = true;
|
||||||
}
|
}
|
||||||
if ((infoflags | HEIGHT) != 0) {
|
if ((infoflags & HEIGHT) != 0) {
|
||||||
_psize.height = height;
|
_psize.height = height;
|
||||||
updated = true;
|
updated = true;
|
||||||
}
|
}
|
||||||
@@ -92,7 +92,7 @@ public class StatusPanel extends JComponent
|
|||||||
setSize(_psize);
|
setSize(_psize);
|
||||||
getParent().setSize(_psize);
|
getParent().setSize(_psize);
|
||||||
}
|
}
|
||||||
return (infoflags | ALLBITS) != 0;
|
return (infoflags & ALLBITS) == 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user