mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-15 18:28:00 +00:00
- Formatting CardPicturePanel.
This commit is contained in:
@@ -15,7 +15,6 @@
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package forge.gui;
|
||||
|
||||
import java.awt.BorderLayout;
|
||||
@@ -45,7 +44,10 @@ import forge.toolbox.imaging.FImageUtil;
|
||||
*
|
||||
*/
|
||||
public final class CardPicturePanel extends JPanel implements ImageFetcher.Callback {
|
||||
/** Constant <code>serialVersionUID=-3160874016387273383L</code>. */
|
||||
|
||||
/**
|
||||
* Constant <code>serialVersionUID=-3160874016387273383L</code>.
|
||||
*/
|
||||
private static final long serialVersionUID = -3160874016387273383L;
|
||||
|
||||
private Object displayed;
|
||||
@@ -68,6 +70,7 @@ public final class CardPicturePanel extends JPanel implements ImageFetcher.Callb
|
||||
public void setCard(final CardStateView c) {
|
||||
setCard(c, true);
|
||||
}
|
||||
|
||||
public void setCard(final CardStateView c, final boolean mayView) {
|
||||
setImage(c, mayView);
|
||||
}
|
||||
@@ -78,7 +81,7 @@ public final class CardPicturePanel extends JPanel implements ImageFetcher.Callb
|
||||
|
||||
final BufferedImage image = getImage();
|
||||
if (image != null && image != this.currentImage) {
|
||||
if (displayed instanceof PaperCard && ((PaperCard)displayed).isFoil()) {
|
||||
if (displayed instanceof PaperCard && ((PaperCard) displayed).isFoil()) {
|
||||
ColorModel cm = image.getColorModel();
|
||||
boolean isAlphaPremultiplied = cm.isAlphaPremultiplied();
|
||||
WritableRaster raster = image.copyData(null);
|
||||
@@ -111,7 +114,7 @@ public final class CardPicturePanel extends JPanel implements ImageFetcher.Callb
|
||||
if (image == null) {
|
||||
ImageFetcher.fetchImage(card.getCard(), card.getImageKey(), this);
|
||||
}
|
||||
return FImageUtil.getImage((CardStateView)displayed);
|
||||
return FImageUtil.getImage((CardStateView) displayed);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user