forked from External/mage
[refactoring][minor] Replaced all tabs with four spaces.
This commit is contained in:
parent
e646e4768d
commit
239a4fb100
2891 changed files with 79411 additions and 79411 deletions
|
|
@ -76,45 +76,45 @@ import java.util.UUID;
|
|||
*/
|
||||
public class PlayerPanelExt extends javax.swing.JPanel {
|
||||
|
||||
private UUID playerId;
|
||||
private UUID gameId;
|
||||
private Session session;
|
||||
private PlayerView player;
|
||||
private UUID playerId;
|
||||
private UUID gameId;
|
||||
private Session session;
|
||||
private PlayerView player;
|
||||
|
||||
private ShowCardsDialog graveyard;
|
||||
private BigCard bigCard;
|
||||
private ShowCardsDialog graveyard;
|
||||
private BigCard bigCard;
|
||||
|
||||
private static final int AVATAR_COUNT = 77;
|
||||
private static final int AVATAR_COUNT = 77;
|
||||
|
||||
private static final Border greenBorder = new LineBorder(Color.red, 3);
|
||||
private static final Border redBorder = new LineBorder(Color.red, 2);
|
||||
private static final Border emptyBorder = BorderFactory.createEmptyBorder(0,0,0,0);
|
||||
private static final Border greenBorder = new LineBorder(Color.red, 3);
|
||||
private static final Border redBorder = new LineBorder(Color.red, 2);
|
||||
private static final Border emptyBorder = BorderFactory.createEmptyBorder(0,0,0,0);
|
||||
|
||||
private static final Dimension topCardDimension = new Dimension(40, 56);
|
||||
private static final Dimension topCardDimension = new Dimension(40, 56);
|
||||
|
||||
private int avatarId = -1;
|
||||
private int avatarId = -1;
|
||||
|
||||
/** Creates new form PlayerPanel */
|
||||
public PlayerPanelExt() {
|
||||
setPreferredSize(new Dimension(94, 212));
|
||||
setPreferredSize(new Dimension(94, 212));
|
||||
initComponents();
|
||||
}
|
||||
|
||||
public void init(UUID gameId, UUID playerId, BigCard bigCard) {
|
||||
this.gameId = gameId;
|
||||
this.playerId = playerId;
|
||||
this.bigCard = bigCard;
|
||||
session = MageFrame.getSession();
|
||||
cheat.setVisible(session.isTestMode());
|
||||
}
|
||||
public void init(UUID gameId, UUID playerId, BigCard bigCard) {
|
||||
this.gameId = gameId;
|
||||
this.playerId = playerId;
|
||||
this.bigCard = bigCard;
|
||||
session = MageFrame.getSession();
|
||||
cheat.setVisible(session.isTestMode());
|
||||
}
|
||||
|
||||
public void update(PlayerView player) {
|
||||
this.player = player;
|
||||
lifeLabel.setText(Integer.toString(player.getLife()));
|
||||
poisonLabel.setText(Integer.toString(player.getPoison()));
|
||||
handLabel.setText(Integer.toString(player.getHandCount()));
|
||||
libraryLabel.setText(Integer.toString(player.getLibraryCount()));
|
||||
graveLabel.setText(Integer.toString(player.getGraveyard().size()));
|
||||
public void update(PlayerView player) {
|
||||
this.player = player;
|
||||
lifeLabel.setText(Integer.toString(player.getLife()));
|
||||
poisonLabel.setText(Integer.toString(player.getPoison()));
|
||||
handLabel.setText(Integer.toString(player.getHandCount()));
|
||||
libraryLabel.setText(Integer.toString(player.getLibraryCount()));
|
||||
graveLabel.setText(Integer.toString(player.getGraveyard().size()));
|
||||
|
||||
if (!MageFrame.isLite()) {
|
||||
int id = player.getUserData().getAvatarId();
|
||||
|
|
@ -133,49 +133,49 @@ public class PlayerPanelExt extends javax.swing.JPanel {
|
|||
this.avatar.update("player", resized, resized, resized, resized, r);
|
||||
}
|
||||
}
|
||||
this.avatar.setText(player.getName());
|
||||
this.btnPlayer.setText(player.getName());
|
||||
if (player.isActive()) {
|
||||
this.avatar.setBorder(greenBorder);
|
||||
this.btnPlayer.setBorder(greenBorder);
|
||||
} else if (player.hasLeft()) {
|
||||
this.avatar.setBorder(redBorder);
|
||||
this.btnPlayer.setBorder(redBorder);
|
||||
} else {
|
||||
this.avatar.setBorder(emptyBorder);
|
||||
this.btnPlayer.setBorder(emptyBorder);
|
||||
}
|
||||
this.avatar.setText(player.getName());
|
||||
this.btnPlayer.setText(player.getName());
|
||||
if (player.isActive()) {
|
||||
this.avatar.setBorder(greenBorder);
|
||||
this.btnPlayer.setBorder(greenBorder);
|
||||
} else if (player.hasLeft()) {
|
||||
this.avatar.setBorder(redBorder);
|
||||
this.btnPlayer.setBorder(redBorder);
|
||||
} else {
|
||||
this.avatar.setBorder(emptyBorder);
|
||||
this.btnPlayer.setBorder(emptyBorder);
|
||||
}
|
||||
|
||||
synchronized (this) {
|
||||
if (player.getTopCard() != null) {
|
||||
if (topCard == null || !topCard.getId().equals(player.getTopCard().getId())) {
|
||||
if (topCard == null) {
|
||||
topCardPanel.setVisible(true);
|
||||
}
|
||||
topCard = player.getTopCard();
|
||||
topCardPanel.update(topCard);
|
||||
topCardPanel.updateImage();
|
||||
ActionCallback callback = Plugins.getInstance().getActionCallback();
|
||||
((MageActionCallback)callback).refreshSession();
|
||||
topCardPanel.updateCallback(callback, gameId);
|
||||
}
|
||||
} else if (topCard != null) {
|
||||
topCard = null;
|
||||
topCardPanel.setVisible(false);
|
||||
}
|
||||
}
|
||||
synchronized (this) {
|
||||
if (player.getTopCard() != null) {
|
||||
if (topCard == null || !topCard.getId().equals(player.getTopCard().getId())) {
|
||||
if (topCard == null) {
|
||||
topCardPanel.setVisible(true);
|
||||
}
|
||||
topCard = player.getTopCard();
|
||||
topCardPanel.update(topCard);
|
||||
topCardPanel.updateImage();
|
||||
ActionCallback callback = Plugins.getInstance().getActionCallback();
|
||||
((MageActionCallback)callback).refreshSession();
|
||||
topCardPanel.updateCallback(callback, gameId);
|
||||
}
|
||||
} else if (topCard != null) {
|
||||
topCard = null;
|
||||
topCardPanel.setVisible(false);
|
||||
}
|
||||
}
|
||||
|
||||
update(player.getManaPool());
|
||||
}
|
||||
update(player.getManaPool());
|
||||
}
|
||||
|
||||
protected void update(ManaPoolView pool) {
|
||||
manaLabels.get("B").setText(Integer.toString(pool.getBlack()));
|
||||
manaLabels.get("R").setText(Integer.toString(pool.getRed()));
|
||||
manaLabels.get("W").setText(Integer.toString(pool.getWhite()));
|
||||
manaLabels.get("G").setText(Integer.toString(pool.getGreen()));
|
||||
manaLabels.get("U").setText(Integer.toString(pool.getBlue()));
|
||||
manaLabels.get("X").setText(Integer.toString(pool.getColorless()));
|
||||
}
|
||||
protected void update(ManaPoolView pool) {
|
||||
manaLabels.get("B").setText(Integer.toString(pool.getBlack()));
|
||||
manaLabels.get("R").setText(Integer.toString(pool.getRed()));
|
||||
manaLabels.get("W").setText(Integer.toString(pool.getWhite()));
|
||||
manaLabels.get("G").setText(Integer.toString(pool.getGreen()));
|
||||
manaLabels.get("U").setText(Integer.toString(pool.getBlue()));
|
||||
manaLabels.get("X").setText(Integer.toString(pool.getColorless()));
|
||||
}
|
||||
|
||||
/** This method is called from within the constructor to
|
||||
* initialize the form.
|
||||
|
|
@ -184,313 +184,313 @@ public class PlayerPanelExt extends javax.swing.JPanel {
|
|||
*/
|
||||
@SuppressWarnings("unchecked")
|
||||
private void initComponents() {
|
||||
|
||||
panelBackground = new MageRoundPane();
|
||||
panelBackground.setPreferredSize(new Dimension(92, 212));
|
||||
Rectangle r = new Rectangle(80, 80);
|
||||
lifeLabel = new JLabel();
|
||||
handLabel = new JLabel();
|
||||
poisonLabel = new JLabel();
|
||||
libraryLabel = new JLabel();
|
||||
setOpaque(false);
|
||||
|
||||
panelBackground.setXOffset(3);
|
||||
panelBackground.setYOffset(3);
|
||||
panelBackground = new MageRoundPane();
|
||||
panelBackground.setPreferredSize(new Dimension(92, 212));
|
||||
Rectangle r = new Rectangle(80, 80);
|
||||
lifeLabel = new JLabel();
|
||||
handLabel = new JLabel();
|
||||
poisonLabel = new JLabel();
|
||||
libraryLabel = new JLabel();
|
||||
setOpaque(false);
|
||||
|
||||
panelBackground.setXOffset(3);
|
||||
panelBackground.setYOffset(3);
|
||||
panelBackground.setVisible(true);
|
||||
|
||||
// Avatar
|
||||
Image image = ImageHelper.getImageFromResources("/avatars/unknown.jpg");
|
||||
// Avatar
|
||||
Image image = ImageHelper.getImageFromResources("/avatars/unknown.jpg");
|
||||
|
||||
topCardPanel = Plugins.getInstance().getMageCard(new CardView(Sets.findCard("Forest")), bigCard, topCardDimension, gameId, true);
|
||||
topCardPanel.setVisible(false);
|
||||
panelBackground.add(topCardPanel);
|
||||
topCardPanel.setVisible(false);
|
||||
panelBackground.add(topCardPanel);
|
||||
|
||||
BufferedImage resized = ImageHelper.getResizedImage(BufferedImageBuilder.bufferImage(image, BufferedImage.TYPE_INT_ARGB), r);
|
||||
avatar = new HoverButton("player", resized, resized, resized, r);
|
||||
avatar.setObserver(new Command() {
|
||||
@Override
|
||||
public void execute() {
|
||||
session.sendPlayerUUID(gameId, playerId);
|
||||
}
|
||||
});
|
||||
r = new Rectangle(18, 18);
|
||||
lifeLabel.setToolTipText("Life");
|
||||
Image imageLife = ImageHelper.getImageFromResources("/info/life.png");
|
||||
BufferedImage resizedLife = ImageHelper.getResizedImage(BufferedImageBuilder.bufferImage(imageLife, BufferedImage.TYPE_INT_ARGB), r);
|
||||
life = new ImagePanel(resizedLife, ImagePanel.ACTUAL);
|
||||
life.setToolTipText("Life");
|
||||
life.setOpaque(false);
|
||||
r = new Rectangle(18, 18);
|
||||
handLabel.setToolTipText("Hand");
|
||||
Image imageHand = ImageHelper.getImageFromResources("/info/hand.png");
|
||||
BufferedImage resizedHand = ImageHelper.getResizedImage(BufferedImageBuilder.bufferImage(imageHand, BufferedImage.TYPE_INT_ARGB), r);
|
||||
hand = new ImagePanel(resizedHand, ImagePanel.ACTUAL);
|
||||
hand.setToolTipText("Hand");
|
||||
hand.setOpaque(false);
|
||||
BufferedImage resized = ImageHelper.getResizedImage(BufferedImageBuilder.bufferImage(image, BufferedImage.TYPE_INT_ARGB), r);
|
||||
avatar = new HoverButton("player", resized, resized, resized, r);
|
||||
avatar.setObserver(new Command() {
|
||||
@Override
|
||||
public void execute() {
|
||||
session.sendPlayerUUID(gameId, playerId);
|
||||
}
|
||||
});
|
||||
r = new Rectangle(18, 18);
|
||||
lifeLabel.setToolTipText("Life");
|
||||
Image imageLife = ImageHelper.getImageFromResources("/info/life.png");
|
||||
BufferedImage resizedLife = ImageHelper.getResizedImage(BufferedImageBuilder.bufferImage(imageLife, BufferedImage.TYPE_INT_ARGB), r);
|
||||
life = new ImagePanel(resizedLife, ImagePanel.ACTUAL);
|
||||
life.setToolTipText("Life");
|
||||
life.setOpaque(false);
|
||||
r = new Rectangle(18, 18);
|
||||
handLabel.setToolTipText("Hand");
|
||||
Image imageHand = ImageHelper.getImageFromResources("/info/hand.png");
|
||||
BufferedImage resizedHand = ImageHelper.getResizedImage(BufferedImageBuilder.bufferImage(imageHand, BufferedImage.TYPE_INT_ARGB), r);
|
||||
hand = new ImagePanel(resizedHand, ImagePanel.ACTUAL);
|
||||
hand.setToolTipText("Hand");
|
||||
hand.setOpaque(false);
|
||||
|
||||
// Poison count
|
||||
poisonLabel.setText("0");
|
||||
r = new Rectangle(14, 14);
|
||||
poisonLabel.setToolTipText("Poison");
|
||||
Image imagePoison = ImageHelper.getImageFromResources("/info/poison.png");
|
||||
BufferedImage resizedPoison = ImageHelper.getResizedImage(BufferedImageBuilder.bufferImage(imagePoison, BufferedImage.TYPE_INT_ARGB), r);
|
||||
poison = new ImagePanel(resizedPoison, ImagePanel.ACTUAL);
|
||||
poison.setToolTipText("Poison");
|
||||
poison.setOpaque(false);
|
||||
r = new Rectangle(19, 19);
|
||||
libraryLabel.setToolTipText("Library");
|
||||
Image imageLibrary = ImageHelper.getImageFromResources("/info/library.png");
|
||||
BufferedImage resizedLibrary = ImageHelper.getResizedImage(BufferedImageBuilder.bufferImage(imageLibrary, BufferedImage.TYPE_INT_ARGB), r);
|
||||
library = new ImagePanel(resizedLibrary, ImagePanel.ACTUAL);
|
||||
library.setToolTipText("Library");
|
||||
library.setOpaque(false);
|
||||
// Poison count
|
||||
poisonLabel.setText("0");
|
||||
r = new Rectangle(14, 14);
|
||||
poisonLabel.setToolTipText("Poison");
|
||||
Image imagePoison = ImageHelper.getImageFromResources("/info/poison.png");
|
||||
BufferedImage resizedPoison = ImageHelper.getResizedImage(BufferedImageBuilder.bufferImage(imagePoison, BufferedImage.TYPE_INT_ARGB), r);
|
||||
poison = new ImagePanel(resizedPoison, ImagePanel.ACTUAL);
|
||||
poison.setToolTipText("Poison");
|
||||
poison.setOpaque(false);
|
||||
r = new Rectangle(19, 19);
|
||||
libraryLabel.setToolTipText("Library");
|
||||
Image imageLibrary = ImageHelper.getImageFromResources("/info/library.png");
|
||||
BufferedImage resizedLibrary = ImageHelper.getResizedImage(BufferedImageBuilder.bufferImage(imageLibrary, BufferedImage.TYPE_INT_ARGB), r);
|
||||
library = new ImagePanel(resizedLibrary, ImagePanel.ACTUAL);
|
||||
library.setToolTipText("Library");
|
||||
library.setOpaque(false);
|
||||
|
||||
// Grave count and open graveyard button
|
||||
graveLabel = new JLabel();
|
||||
r = new Rectangle(21, 21);
|
||||
graveLabel.setToolTipText("Graveyard");
|
||||
Image imageGrave = ImageHelper.getImageFromResources("/info/grave.png");
|
||||
BufferedImage resizedGrave = ImageHelper.getResizedImage(BufferedImageBuilder.bufferImage(imageGrave, BufferedImage.TYPE_INT_ARGB), r);
|
||||
grave = new HoverButton(null, resizedGrave, resizedGrave, resizedGrave, r);
|
||||
grave.setToolTipText("Graveyard");
|
||||
grave.setOpaque(false);
|
||||
grave.setObserver(new Command() {
|
||||
@Override
|
||||
public void execute() {
|
||||
btnGraveActionPerformed(null);
|
||||
}
|
||||
});
|
||||
// Grave count and open graveyard button
|
||||
graveLabel = new JLabel();
|
||||
r = new Rectangle(21, 21);
|
||||
graveLabel.setToolTipText("Graveyard");
|
||||
Image imageGrave = ImageHelper.getImageFromResources("/info/grave.png");
|
||||
BufferedImage resizedGrave = ImageHelper.getResizedImage(BufferedImageBuilder.bufferImage(imageGrave, BufferedImage.TYPE_INT_ARGB), r);
|
||||
grave = new HoverButton(null, resizedGrave, resizedGrave, resizedGrave, r);
|
||||
grave.setToolTipText("Graveyard");
|
||||
grave.setOpaque(false);
|
||||
grave.setObserver(new Command() {
|
||||
@Override
|
||||
public void execute() {
|
||||
btnGraveActionPerformed(null);
|
||||
}
|
||||
});
|
||||
|
||||
// Cheat button
|
||||
r = new Rectangle(25, 21);
|
||||
image = ImageHelper.getImageFromResources("/info/cheat.png");
|
||||
resized = ImageHelper.getResizedImage(BufferedImageBuilder.bufferImage(image, BufferedImage.TYPE_INT_ARGB), r);
|
||||
cheat = new JButton();
|
||||
cheat.setIcon(new ImageIcon(resized));
|
||||
cheat.setToolTipText("Cheat button");
|
||||
cheat.addActionListener(new ActionListener() {
|
||||
@Override
|
||||
public void actionPerformed(ActionEvent e) {
|
||||
btnCheatActionPerformed(e);
|
||||
}
|
||||
});
|
||||
// Cheat button
|
||||
r = new Rectangle(25, 21);
|
||||
image = ImageHelper.getImageFromResources("/info/cheat.png");
|
||||
resized = ImageHelper.getResizedImage(BufferedImageBuilder.bufferImage(image, BufferedImage.TYPE_INT_ARGB), r);
|
||||
cheat = new JButton();
|
||||
cheat.setIcon(new ImageIcon(resized));
|
||||
cheat.setToolTipText("Cheat button");
|
||||
cheat.addActionListener(new ActionListener() {
|
||||
@Override
|
||||
public void actionPerformed(ActionEvent e) {
|
||||
btnCheatActionPerformed(e);
|
||||
}
|
||||
});
|
||||
|
||||
btnPlayer = new JButton();
|
||||
btnPlayer.setText("Player");
|
||||
btnPlayer.setVisible(false);
|
||||
btnPlayer.setToolTipText("Player");
|
||||
btnPlayer.addActionListener(new ActionListener() {
|
||||
@Override
|
||||
public void actionPerformed(ActionEvent e) {
|
||||
session.sendPlayerUUID(gameId, playerId);
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
// Add mana symbols
|
||||
BufferedImage imageManaW = ManaSymbols.getManaSymbolImageSmall("W");
|
||||
ImagePanel manaW = new ImagePanel(imageManaW, ImagePanel.ACTUAL);
|
||||
manaW.setOpaque(false);
|
||||
JLabel manaCountLabelW = new JLabel();
|
||||
manaCountLabelW.setText("0");
|
||||
manaLabels.put("W", manaCountLabelW);
|
||||
btnPlayer = new JButton();
|
||||
btnPlayer.setText("Player");
|
||||
btnPlayer.setVisible(false);
|
||||
btnPlayer.setToolTipText("Player");
|
||||
btnPlayer.addActionListener(new ActionListener() {
|
||||
@Override
|
||||
public void actionPerformed(ActionEvent e) {
|
||||
session.sendPlayerUUID(gameId, playerId);
|
||||
}
|
||||
});
|
||||
|
||||
BufferedImage imageManaU = ManaSymbols.getManaSymbolImageSmall("U");
|
||||
ImagePanel manaU = new ImagePanel(imageManaU, ImagePanel.ACTUAL);
|
||||
manaU.setOpaque(false);
|
||||
JLabel manaCountLabelU = new JLabel();
|
||||
manaCountLabelU.setText("0");
|
||||
manaLabels.put("U", manaCountLabelU);
|
||||
|
||||
BufferedImage imageManaB = ManaSymbols.getManaSymbolImageSmall("B");
|
||||
ImagePanel manaB = new ImagePanel(imageManaB, ImagePanel.ACTUAL);
|
||||
manaB.setOpaque(false);
|
||||
JLabel manaCountLabelB = new JLabel();
|
||||
manaCountLabelB.setText("0");
|
||||
manaLabels.put("B", manaCountLabelB);
|
||||
// Add mana symbols
|
||||
BufferedImage imageManaW = ManaSymbols.getManaSymbolImageSmall("W");
|
||||
ImagePanel manaW = new ImagePanel(imageManaW, ImagePanel.ACTUAL);
|
||||
manaW.setOpaque(false);
|
||||
JLabel manaCountLabelW = new JLabel();
|
||||
manaCountLabelW.setText("0");
|
||||
manaLabels.put("W", manaCountLabelW);
|
||||
|
||||
BufferedImage imageManaR = ManaSymbols.getManaSymbolImageSmall("R");
|
||||
ImagePanel manaR = new ImagePanel(imageManaR, ImagePanel.ACTUAL);
|
||||
manaR.setOpaque(false);
|
||||
JLabel manaCountLabelR = new JLabel();
|
||||
manaCountLabelR.setText("0");
|
||||
manaLabels.put("R", manaCountLabelR);
|
||||
BufferedImage imageManaU = ManaSymbols.getManaSymbolImageSmall("U");
|
||||
ImagePanel manaU = new ImagePanel(imageManaU, ImagePanel.ACTUAL);
|
||||
manaU.setOpaque(false);
|
||||
JLabel manaCountLabelU = new JLabel();
|
||||
manaCountLabelU.setText("0");
|
||||
manaLabels.put("U", manaCountLabelU);
|
||||
|
||||
BufferedImage imageManaG = ManaSymbols.getManaSymbolImageSmall("G");
|
||||
ImagePanel manaG = new ImagePanel(imageManaG, ImagePanel.ACTUAL);
|
||||
manaG.setOpaque(false);
|
||||
JLabel manaCountLabelG = new JLabel();
|
||||
manaCountLabelG.setText("0");
|
||||
manaLabels.put("G", manaCountLabelG);
|
||||
BufferedImage imageManaB = ManaSymbols.getManaSymbolImageSmall("B");
|
||||
ImagePanel manaB = new ImagePanel(imageManaB, ImagePanel.ACTUAL);
|
||||
manaB.setOpaque(false);
|
||||
JLabel manaCountLabelB = new JLabel();
|
||||
manaCountLabelB.setText("0");
|
||||
manaLabels.put("B", manaCountLabelB);
|
||||
|
||||
BufferedImage imageManaX = ManaSymbols.getManaSymbolImageSmall("X");
|
||||
ImagePanel manaX = new ImagePanel(imageManaX, ImagePanel.ACTUAL);
|
||||
manaX.setOpaque(false);
|
||||
JLabel manaCountLabelX = new JLabel();
|
||||
manaCountLabelX.setText("0");
|
||||
manaLabels.put("X", manaCountLabelX);
|
||||
GroupLayout gl_panelBackground = new GroupLayout(panelBackground);
|
||||
gl_panelBackground.setHorizontalGroup(
|
||||
gl_panelBackground.createParallelGroup(Alignment.LEADING)
|
||||
.addGroup(gl_panelBackground.createSequentialGroup()
|
||||
.addGap(9)
|
||||
.addComponent(life, GroupLayout.PREFERRED_SIZE, 18, GroupLayout.PREFERRED_SIZE)
|
||||
.addGap(3)
|
||||
.addGroup(gl_panelBackground.createParallelGroup(Alignment.LEADING)
|
||||
.addGroup(gl_panelBackground.createSequentialGroup()
|
||||
.addGap(18)
|
||||
.addComponent(hand, GroupLayout.PREFERRED_SIZE, 18, GroupLayout.PREFERRED_SIZE))
|
||||
.addComponent(lifeLabel, GroupLayout.PREFERRED_SIZE, 20, GroupLayout.PREFERRED_SIZE))
|
||||
.addGap(4)
|
||||
.addComponent(handLabel, GroupLayout.PREFERRED_SIZE, 20, GroupLayout.PREFERRED_SIZE))
|
||||
.addGroup(gl_panelBackground.createSequentialGroup()
|
||||
.addGap(9)
|
||||
.addGroup(gl_panelBackground.createParallelGroup(Alignment.LEADING)
|
||||
.addGroup(gl_panelBackground.createSequentialGroup()
|
||||
.addGap(3)
|
||||
.addComponent(poison, GroupLayout.PREFERRED_SIZE, 14, GroupLayout.PREFERRED_SIZE))
|
||||
.addGroup(gl_panelBackground.createSequentialGroup()
|
||||
.addGap(2)
|
||||
.addComponent(manaW, GroupLayout.PREFERRED_SIZE, 15, GroupLayout.PREFERRED_SIZE))
|
||||
.addGroup(gl_panelBackground.createSequentialGroup()
|
||||
.addGap(2)
|
||||
.addComponent(manaU, GroupLayout.PREFERRED_SIZE, 15, GroupLayout.PREFERRED_SIZE))
|
||||
.addGroup(gl_panelBackground.createSequentialGroup()
|
||||
.addGap(2)
|
||||
.addComponent(manaB, GroupLayout.PREFERRED_SIZE, 15, GroupLayout.PREFERRED_SIZE))
|
||||
.addComponent(grave, GroupLayout.PREFERRED_SIZE, 21, GroupLayout.PREFERRED_SIZE))
|
||||
.addGroup(gl_panelBackground.createParallelGroup(Alignment.LEADING)
|
||||
.addGroup(gl_panelBackground.createSequentialGroup()
|
||||
.addGroup(gl_panelBackground.createParallelGroup(Alignment.LEADING)
|
||||
.addGroup(gl_panelBackground.createSequentialGroup()
|
||||
.addGap(18)
|
||||
.addComponent(library, GroupLayout.PREFERRED_SIZE, 19, GroupLayout.PREFERRED_SIZE))
|
||||
.addComponent(poisonLabel, GroupLayout.PREFERRED_SIZE, 20, GroupLayout.PREFERRED_SIZE)
|
||||
.addGroup(gl_panelBackground.createSequentialGroup()
|
||||
.addGap(20)
|
||||
.addComponent(manaR, GroupLayout.PREFERRED_SIZE, 15, GroupLayout.PREFERRED_SIZE))
|
||||
.addGroup(gl_panelBackground.createSequentialGroup()
|
||||
.addGap(1)
|
||||
.addComponent(manaCountLabelW, GroupLayout.PREFERRED_SIZE, 30, GroupLayout.PREFERRED_SIZE)))
|
||||
.addGap(3)
|
||||
.addComponent(manaCountLabelR, GroupLayout.PREFERRED_SIZE, 30, GroupLayout.PREFERRED_SIZE))
|
||||
.addGroup(gl_panelBackground.createSequentialGroup()
|
||||
.addGap(1)
|
||||
.addGroup(gl_panelBackground.createParallelGroup(Alignment.LEADING)
|
||||
.addComponent(manaCountLabelB, GroupLayout.PREFERRED_SIZE, 30, GroupLayout.PREFERRED_SIZE)
|
||||
.addGroup(gl_panelBackground.createSequentialGroup()
|
||||
.addGap(19)
|
||||
.addComponent(manaX, GroupLayout.PREFERRED_SIZE, 15, GroupLayout.PREFERRED_SIZE)))
|
||||
.addGap(5)
|
||||
.addComponent(manaCountLabelX, GroupLayout.PREFERRED_SIZE, 30, GroupLayout.PREFERRED_SIZE))
|
||||
.addGroup(gl_panelBackground.createSequentialGroup()
|
||||
.addGap(20)
|
||||
.addComponent(manaG, GroupLayout.PREFERRED_SIZE, 15, GroupLayout.PREFERRED_SIZE))
|
||||
.addGroup(gl_panelBackground.createSequentialGroup()
|
||||
.addGap(40)
|
||||
.addComponent(manaCountLabelG, GroupLayout.PREFERRED_SIZE, 30, GroupLayout.PREFERRED_SIZE))
|
||||
.addGroup(gl_panelBackground.createSequentialGroup()
|
||||
.addGap(40)
|
||||
.addComponent(libraryLabel, GroupLayout.PREFERRED_SIZE, 20, GroupLayout.PREFERRED_SIZE))
|
||||
.addGroup(gl_panelBackground.createSequentialGroup()
|
||||
.addGap(18)
|
||||
.addComponent(cheat, GroupLayout.PREFERRED_SIZE, 25, GroupLayout.PREFERRED_SIZE))
|
||||
.addGroup(gl_panelBackground.createSequentialGroup()
|
||||
.addGap(5)
|
||||
.addComponent(graveLabel, GroupLayout.PREFERRED_SIZE, 21, GroupLayout.PREFERRED_SIZE))
|
||||
.addGroup(gl_panelBackground.createSequentialGroup()
|
||||
.addGap(1)
|
||||
.addComponent(manaCountLabelU, GroupLayout.PREFERRED_SIZE, 30, GroupLayout.PREFERRED_SIZE))))
|
||||
.addGroup(gl_panelBackground.createSequentialGroup()
|
||||
.addGap(6)
|
||||
.addGroup(gl_panelBackground.createParallelGroup(Alignment.LEADING)
|
||||
.addComponent(btnPlayer, Alignment.TRAILING, GroupLayout.DEFAULT_SIZE, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
|
||||
.addComponent(avatar, Alignment.TRAILING, GroupLayout.DEFAULT_SIZE, 80, Short.MAX_VALUE))
|
||||
.addGap(14))
|
||||
);
|
||||
gl_panelBackground.setVerticalGroup(
|
||||
gl_panelBackground.createParallelGroup(Alignment.LEADING)
|
||||
.addGroup(gl_panelBackground.createSequentialGroup()
|
||||
.addGap(6)
|
||||
.addComponent(avatar, GroupLayout.PREFERRED_SIZE, 80, GroupLayout.PREFERRED_SIZE)
|
||||
.addPreferredGap(ComponentPlacement.RELATED)
|
||||
.addComponent(btnPlayer)
|
||||
.addPreferredGap(ComponentPlacement.RELATED)
|
||||
.addGroup(gl_panelBackground.createParallelGroup(Alignment.LEADING)
|
||||
.addGroup(gl_panelBackground.createSequentialGroup()
|
||||
.addGap(1)
|
||||
.addComponent(life, GroupLayout.PREFERRED_SIZE, 18, GroupLayout.PREFERRED_SIZE))
|
||||
.addGroup(gl_panelBackground.createSequentialGroup()
|
||||
.addGap(1)
|
||||
.addComponent(hand, GroupLayout.PREFERRED_SIZE, 18, GroupLayout.PREFERRED_SIZE))
|
||||
.addComponent(lifeLabel, GroupLayout.PREFERRED_SIZE, 20, GroupLayout.PREFERRED_SIZE)
|
||||
.addComponent(handLabel, GroupLayout.PREFERRED_SIZE, 20, GroupLayout.PREFERRED_SIZE))
|
||||
.addGap(1)
|
||||
.addGroup(gl_panelBackground.createParallelGroup(Alignment.LEADING)
|
||||
.addGroup(gl_panelBackground.createSequentialGroup()
|
||||
.addGap(4)
|
||||
.addComponent(poison, GroupLayout.PREFERRED_SIZE, 14, GroupLayout.PREFERRED_SIZE)
|
||||
.addGap(4)
|
||||
.addComponent(manaW, GroupLayout.PREFERRED_SIZE, 15, GroupLayout.PREFERRED_SIZE)
|
||||
.addGap(2)
|
||||
.addComponent(manaU, GroupLayout.PREFERRED_SIZE, 15, GroupLayout.PREFERRED_SIZE)
|
||||
.addGap(2)
|
||||
.addComponent(manaB, GroupLayout.PREFERRED_SIZE, 15, GroupLayout.PREFERRED_SIZE)
|
||||
.addGap(5)
|
||||
.addComponent(grave, GroupLayout.PREFERRED_SIZE, 21, GroupLayout.PREFERRED_SIZE))
|
||||
.addGroup(gl_panelBackground.createSequentialGroup()
|
||||
.addGroup(gl_panelBackground.createParallelGroup(Alignment.LEADING)
|
||||
.addGroup(gl_panelBackground.createSequentialGroup()
|
||||
.addGroup(gl_panelBackground.createParallelGroup(Alignment.LEADING)
|
||||
.addGroup(gl_panelBackground.createSequentialGroup()
|
||||
.addGap(1)
|
||||
.addComponent(library, GroupLayout.PREFERRED_SIZE, 19, GroupLayout.PREFERRED_SIZE))
|
||||
.addComponent(poisonLabel, GroupLayout.PREFERRED_SIZE, 20, GroupLayout.PREFERRED_SIZE))
|
||||
.addGap(2)
|
||||
.addComponent(manaR, GroupLayout.PREFERRED_SIZE, 15, GroupLayout.PREFERRED_SIZE))
|
||||
.addGroup(gl_panelBackground.createSequentialGroup()
|
||||
.addGap(14)
|
||||
.addComponent(manaCountLabelW, GroupLayout.PREFERRED_SIZE, 30, GroupLayout.PREFERRED_SIZE))
|
||||
.addGroup(gl_panelBackground.createSequentialGroup()
|
||||
.addGap(14)
|
||||
.addComponent(manaCountLabelR, GroupLayout.PREFERRED_SIZE, 30, GroupLayout.PREFERRED_SIZE)))
|
||||
.addGap(4)
|
||||
.addGroup(gl_panelBackground.createParallelGroup(Alignment.LEADING)
|
||||
.addComponent(manaCountLabelB, GroupLayout.PREFERRED_SIZE, 30, GroupLayout.PREFERRED_SIZE)
|
||||
.addGroup(gl_panelBackground.createSequentialGroup()
|
||||
.addGap(8)
|
||||
.addComponent(manaX, GroupLayout.PREFERRED_SIZE, 15, GroupLayout.PREFERRED_SIZE))
|
||||
.addComponent(manaCountLabelX, GroupLayout.PREFERRED_SIZE, 30, GroupLayout.PREFERRED_SIZE)))
|
||||
.addGroup(gl_panelBackground.createSequentialGroup()
|
||||
.addGap(39)
|
||||
.addComponent(manaG, GroupLayout.PREFERRED_SIZE, 15, GroupLayout.PREFERRED_SIZE))
|
||||
.addGroup(gl_panelBackground.createSequentialGroup()
|
||||
.addGap(31)
|
||||
.addComponent(manaCountLabelG, GroupLayout.PREFERRED_SIZE, 30, GroupLayout.PREFERRED_SIZE))
|
||||
.addComponent(libraryLabel, GroupLayout.PREFERRED_SIZE, 20, GroupLayout.PREFERRED_SIZE)
|
||||
.addGroup(gl_panelBackground.createSequentialGroup()
|
||||
.addGap(76)
|
||||
.addComponent(cheat, GroupLayout.PREFERRED_SIZE, 21, GroupLayout.PREFERRED_SIZE))
|
||||
.addGroup(gl_panelBackground.createSequentialGroup()
|
||||
.addGap(76)
|
||||
.addComponent(graveLabel, GroupLayout.PREFERRED_SIZE, 21, GroupLayout.PREFERRED_SIZE))
|
||||
.addGroup(gl_panelBackground.createSequentialGroup()
|
||||
.addGap(31)
|
||||
.addComponent(manaCountLabelU, GroupLayout.PREFERRED_SIZE, 30, GroupLayout.PREFERRED_SIZE))))
|
||||
);
|
||||
panelBackground.setLayout(gl_panelBackground);
|
||||
GroupLayout groupLayout = new GroupLayout(this);
|
||||
groupLayout.setHorizontalGroup(
|
||||
groupLayout.createParallelGroup(Alignment.LEADING)
|
||||
.addGroup(groupLayout.createSequentialGroup()
|
||||
.addComponent(panelBackground, GroupLayout.PREFERRED_SIZE, GroupLayout.PREFERRED_SIZE, GroupLayout.PREFERRED_SIZE))
|
||||
);
|
||||
groupLayout.setVerticalGroup(
|
||||
groupLayout.createParallelGroup(Alignment.LEADING)
|
||||
.addGroup(groupLayout.createSequentialGroup()
|
||||
.addComponent(panelBackground, GroupLayout.PREFERRED_SIZE, GroupLayout.PREFERRED_SIZE, GroupLayout.PREFERRED_SIZE))
|
||||
);
|
||||
setLayout(groupLayout);
|
||||
BufferedImage imageManaR = ManaSymbols.getManaSymbolImageSmall("R");
|
||||
ImagePanel manaR = new ImagePanel(imageManaR, ImagePanel.ACTUAL);
|
||||
manaR.setOpaque(false);
|
||||
JLabel manaCountLabelR = new JLabel();
|
||||
manaCountLabelR.setText("0");
|
||||
manaLabels.put("R", manaCountLabelR);
|
||||
|
||||
BufferedImage imageManaG = ManaSymbols.getManaSymbolImageSmall("G");
|
||||
ImagePanel manaG = new ImagePanel(imageManaG, ImagePanel.ACTUAL);
|
||||
manaG.setOpaque(false);
|
||||
JLabel manaCountLabelG = new JLabel();
|
||||
manaCountLabelG.setText("0");
|
||||
manaLabels.put("G", manaCountLabelG);
|
||||
|
||||
BufferedImage imageManaX = ManaSymbols.getManaSymbolImageSmall("X");
|
||||
ImagePanel manaX = new ImagePanel(imageManaX, ImagePanel.ACTUAL);
|
||||
manaX.setOpaque(false);
|
||||
JLabel manaCountLabelX = new JLabel();
|
||||
manaCountLabelX.setText("0");
|
||||
manaLabels.put("X", manaCountLabelX);
|
||||
GroupLayout gl_panelBackground = new GroupLayout(panelBackground);
|
||||
gl_panelBackground.setHorizontalGroup(
|
||||
gl_panelBackground.createParallelGroup(Alignment.LEADING)
|
||||
.addGroup(gl_panelBackground.createSequentialGroup()
|
||||
.addGap(9)
|
||||
.addComponent(life, GroupLayout.PREFERRED_SIZE, 18, GroupLayout.PREFERRED_SIZE)
|
||||
.addGap(3)
|
||||
.addGroup(gl_panelBackground.createParallelGroup(Alignment.LEADING)
|
||||
.addGroup(gl_panelBackground.createSequentialGroup()
|
||||
.addGap(18)
|
||||
.addComponent(hand, GroupLayout.PREFERRED_SIZE, 18, GroupLayout.PREFERRED_SIZE))
|
||||
.addComponent(lifeLabel, GroupLayout.PREFERRED_SIZE, 20, GroupLayout.PREFERRED_SIZE))
|
||||
.addGap(4)
|
||||
.addComponent(handLabel, GroupLayout.PREFERRED_SIZE, 20, GroupLayout.PREFERRED_SIZE))
|
||||
.addGroup(gl_panelBackground.createSequentialGroup()
|
||||
.addGap(9)
|
||||
.addGroup(gl_panelBackground.createParallelGroup(Alignment.LEADING)
|
||||
.addGroup(gl_panelBackground.createSequentialGroup()
|
||||
.addGap(3)
|
||||
.addComponent(poison, GroupLayout.PREFERRED_SIZE, 14, GroupLayout.PREFERRED_SIZE))
|
||||
.addGroup(gl_panelBackground.createSequentialGroup()
|
||||
.addGap(2)
|
||||
.addComponent(manaW, GroupLayout.PREFERRED_SIZE, 15, GroupLayout.PREFERRED_SIZE))
|
||||
.addGroup(gl_panelBackground.createSequentialGroup()
|
||||
.addGap(2)
|
||||
.addComponent(manaU, GroupLayout.PREFERRED_SIZE, 15, GroupLayout.PREFERRED_SIZE))
|
||||
.addGroup(gl_panelBackground.createSequentialGroup()
|
||||
.addGap(2)
|
||||
.addComponent(manaB, GroupLayout.PREFERRED_SIZE, 15, GroupLayout.PREFERRED_SIZE))
|
||||
.addComponent(grave, GroupLayout.PREFERRED_SIZE, 21, GroupLayout.PREFERRED_SIZE))
|
||||
.addGroup(gl_panelBackground.createParallelGroup(Alignment.LEADING)
|
||||
.addGroup(gl_panelBackground.createSequentialGroup()
|
||||
.addGroup(gl_panelBackground.createParallelGroup(Alignment.LEADING)
|
||||
.addGroup(gl_panelBackground.createSequentialGroup()
|
||||
.addGap(18)
|
||||
.addComponent(library, GroupLayout.PREFERRED_SIZE, 19, GroupLayout.PREFERRED_SIZE))
|
||||
.addComponent(poisonLabel, GroupLayout.PREFERRED_SIZE, 20, GroupLayout.PREFERRED_SIZE)
|
||||
.addGroup(gl_panelBackground.createSequentialGroup()
|
||||
.addGap(20)
|
||||
.addComponent(manaR, GroupLayout.PREFERRED_SIZE, 15, GroupLayout.PREFERRED_SIZE))
|
||||
.addGroup(gl_panelBackground.createSequentialGroup()
|
||||
.addGap(1)
|
||||
.addComponent(manaCountLabelW, GroupLayout.PREFERRED_SIZE, 30, GroupLayout.PREFERRED_SIZE)))
|
||||
.addGap(3)
|
||||
.addComponent(manaCountLabelR, GroupLayout.PREFERRED_SIZE, 30, GroupLayout.PREFERRED_SIZE))
|
||||
.addGroup(gl_panelBackground.createSequentialGroup()
|
||||
.addGap(1)
|
||||
.addGroup(gl_panelBackground.createParallelGroup(Alignment.LEADING)
|
||||
.addComponent(manaCountLabelB, GroupLayout.PREFERRED_SIZE, 30, GroupLayout.PREFERRED_SIZE)
|
||||
.addGroup(gl_panelBackground.createSequentialGroup()
|
||||
.addGap(19)
|
||||
.addComponent(manaX, GroupLayout.PREFERRED_SIZE, 15, GroupLayout.PREFERRED_SIZE)))
|
||||
.addGap(5)
|
||||
.addComponent(manaCountLabelX, GroupLayout.PREFERRED_SIZE, 30, GroupLayout.PREFERRED_SIZE))
|
||||
.addGroup(gl_panelBackground.createSequentialGroup()
|
||||
.addGap(20)
|
||||
.addComponent(manaG, GroupLayout.PREFERRED_SIZE, 15, GroupLayout.PREFERRED_SIZE))
|
||||
.addGroup(gl_panelBackground.createSequentialGroup()
|
||||
.addGap(40)
|
||||
.addComponent(manaCountLabelG, GroupLayout.PREFERRED_SIZE, 30, GroupLayout.PREFERRED_SIZE))
|
||||
.addGroup(gl_panelBackground.createSequentialGroup()
|
||||
.addGap(40)
|
||||
.addComponent(libraryLabel, GroupLayout.PREFERRED_SIZE, 20, GroupLayout.PREFERRED_SIZE))
|
||||
.addGroup(gl_panelBackground.createSequentialGroup()
|
||||
.addGap(18)
|
||||
.addComponent(cheat, GroupLayout.PREFERRED_SIZE, 25, GroupLayout.PREFERRED_SIZE))
|
||||
.addGroup(gl_panelBackground.createSequentialGroup()
|
||||
.addGap(5)
|
||||
.addComponent(graveLabel, GroupLayout.PREFERRED_SIZE, 21, GroupLayout.PREFERRED_SIZE))
|
||||
.addGroup(gl_panelBackground.createSequentialGroup()
|
||||
.addGap(1)
|
||||
.addComponent(manaCountLabelU, GroupLayout.PREFERRED_SIZE, 30, GroupLayout.PREFERRED_SIZE))))
|
||||
.addGroup(gl_panelBackground.createSequentialGroup()
|
||||
.addGap(6)
|
||||
.addGroup(gl_panelBackground.createParallelGroup(Alignment.LEADING)
|
||||
.addComponent(btnPlayer, Alignment.TRAILING, GroupLayout.DEFAULT_SIZE, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
|
||||
.addComponent(avatar, Alignment.TRAILING, GroupLayout.DEFAULT_SIZE, 80, Short.MAX_VALUE))
|
||||
.addGap(14))
|
||||
);
|
||||
gl_panelBackground.setVerticalGroup(
|
||||
gl_panelBackground.createParallelGroup(Alignment.LEADING)
|
||||
.addGroup(gl_panelBackground.createSequentialGroup()
|
||||
.addGap(6)
|
||||
.addComponent(avatar, GroupLayout.PREFERRED_SIZE, 80, GroupLayout.PREFERRED_SIZE)
|
||||
.addPreferredGap(ComponentPlacement.RELATED)
|
||||
.addComponent(btnPlayer)
|
||||
.addPreferredGap(ComponentPlacement.RELATED)
|
||||
.addGroup(gl_panelBackground.createParallelGroup(Alignment.LEADING)
|
||||
.addGroup(gl_panelBackground.createSequentialGroup()
|
||||
.addGap(1)
|
||||
.addComponent(life, GroupLayout.PREFERRED_SIZE, 18, GroupLayout.PREFERRED_SIZE))
|
||||
.addGroup(gl_panelBackground.createSequentialGroup()
|
||||
.addGap(1)
|
||||
.addComponent(hand, GroupLayout.PREFERRED_SIZE, 18, GroupLayout.PREFERRED_SIZE))
|
||||
.addComponent(lifeLabel, GroupLayout.PREFERRED_SIZE, 20, GroupLayout.PREFERRED_SIZE)
|
||||
.addComponent(handLabel, GroupLayout.PREFERRED_SIZE, 20, GroupLayout.PREFERRED_SIZE))
|
||||
.addGap(1)
|
||||
.addGroup(gl_panelBackground.createParallelGroup(Alignment.LEADING)
|
||||
.addGroup(gl_panelBackground.createSequentialGroup()
|
||||
.addGap(4)
|
||||
.addComponent(poison, GroupLayout.PREFERRED_SIZE, 14, GroupLayout.PREFERRED_SIZE)
|
||||
.addGap(4)
|
||||
.addComponent(manaW, GroupLayout.PREFERRED_SIZE, 15, GroupLayout.PREFERRED_SIZE)
|
||||
.addGap(2)
|
||||
.addComponent(manaU, GroupLayout.PREFERRED_SIZE, 15, GroupLayout.PREFERRED_SIZE)
|
||||
.addGap(2)
|
||||
.addComponent(manaB, GroupLayout.PREFERRED_SIZE, 15, GroupLayout.PREFERRED_SIZE)
|
||||
.addGap(5)
|
||||
.addComponent(grave, GroupLayout.PREFERRED_SIZE, 21, GroupLayout.PREFERRED_SIZE))
|
||||
.addGroup(gl_panelBackground.createSequentialGroup()
|
||||
.addGroup(gl_panelBackground.createParallelGroup(Alignment.LEADING)
|
||||
.addGroup(gl_panelBackground.createSequentialGroup()
|
||||
.addGroup(gl_panelBackground.createParallelGroup(Alignment.LEADING)
|
||||
.addGroup(gl_panelBackground.createSequentialGroup()
|
||||
.addGap(1)
|
||||
.addComponent(library, GroupLayout.PREFERRED_SIZE, 19, GroupLayout.PREFERRED_SIZE))
|
||||
.addComponent(poisonLabel, GroupLayout.PREFERRED_SIZE, 20, GroupLayout.PREFERRED_SIZE))
|
||||
.addGap(2)
|
||||
.addComponent(manaR, GroupLayout.PREFERRED_SIZE, 15, GroupLayout.PREFERRED_SIZE))
|
||||
.addGroup(gl_panelBackground.createSequentialGroup()
|
||||
.addGap(14)
|
||||
.addComponent(manaCountLabelW, GroupLayout.PREFERRED_SIZE, 30, GroupLayout.PREFERRED_SIZE))
|
||||
.addGroup(gl_panelBackground.createSequentialGroup()
|
||||
.addGap(14)
|
||||
.addComponent(manaCountLabelR, GroupLayout.PREFERRED_SIZE, 30, GroupLayout.PREFERRED_SIZE)))
|
||||
.addGap(4)
|
||||
.addGroup(gl_panelBackground.createParallelGroup(Alignment.LEADING)
|
||||
.addComponent(manaCountLabelB, GroupLayout.PREFERRED_SIZE, 30, GroupLayout.PREFERRED_SIZE)
|
||||
.addGroup(gl_panelBackground.createSequentialGroup()
|
||||
.addGap(8)
|
||||
.addComponent(manaX, GroupLayout.PREFERRED_SIZE, 15, GroupLayout.PREFERRED_SIZE))
|
||||
.addComponent(manaCountLabelX, GroupLayout.PREFERRED_SIZE, 30, GroupLayout.PREFERRED_SIZE)))
|
||||
.addGroup(gl_panelBackground.createSequentialGroup()
|
||||
.addGap(39)
|
||||
.addComponent(manaG, GroupLayout.PREFERRED_SIZE, 15, GroupLayout.PREFERRED_SIZE))
|
||||
.addGroup(gl_panelBackground.createSequentialGroup()
|
||||
.addGap(31)
|
||||
.addComponent(manaCountLabelG, GroupLayout.PREFERRED_SIZE, 30, GroupLayout.PREFERRED_SIZE))
|
||||
.addComponent(libraryLabel, GroupLayout.PREFERRED_SIZE, 20, GroupLayout.PREFERRED_SIZE)
|
||||
.addGroup(gl_panelBackground.createSequentialGroup()
|
||||
.addGap(76)
|
||||
.addComponent(cheat, GroupLayout.PREFERRED_SIZE, 21, GroupLayout.PREFERRED_SIZE))
|
||||
.addGroup(gl_panelBackground.createSequentialGroup()
|
||||
.addGap(76)
|
||||
.addComponent(graveLabel, GroupLayout.PREFERRED_SIZE, 21, GroupLayout.PREFERRED_SIZE))
|
||||
.addGroup(gl_panelBackground.createSequentialGroup()
|
||||
.addGap(31)
|
||||
.addComponent(manaCountLabelU, GroupLayout.PREFERRED_SIZE, 30, GroupLayout.PREFERRED_SIZE))))
|
||||
);
|
||||
panelBackground.setLayout(gl_panelBackground);
|
||||
GroupLayout groupLayout = new GroupLayout(this);
|
||||
groupLayout.setHorizontalGroup(
|
||||
groupLayout.createParallelGroup(Alignment.LEADING)
|
||||
.addGroup(groupLayout.createSequentialGroup()
|
||||
.addComponent(panelBackground, GroupLayout.PREFERRED_SIZE, GroupLayout.PREFERRED_SIZE, GroupLayout.PREFERRED_SIZE))
|
||||
);
|
||||
groupLayout.setVerticalGroup(
|
||||
groupLayout.createParallelGroup(Alignment.LEADING)
|
||||
.addGroup(groupLayout.createSequentialGroup()
|
||||
.addComponent(panelBackground, GroupLayout.PREFERRED_SIZE, GroupLayout.PREFERRED_SIZE, GroupLayout.PREFERRED_SIZE))
|
||||
);
|
||||
setLayout(groupLayout);
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -502,42 +502,42 @@ public class PlayerPanelExt extends javax.swing.JPanel {
|
|||
panelBackground.setBounds(0, 0, 92, 160);
|
||||
}
|
||||
else {
|
||||
avatar.setVisible(true);
|
||||
btnPlayer.setVisible(false);
|
||||
panelBackground.setPreferredSize(new Dimension(92, 212));
|
||||
panelBackground.setBounds(0, 0, 92, 212);
|
||||
avatar.setVisible(true);
|
||||
btnPlayer.setVisible(false);
|
||||
panelBackground.setPreferredSize(new Dimension(92, 212));
|
||||
panelBackground.setBounds(0, 0, 92, 212);
|
||||
}
|
||||
}
|
||||
|
||||
private void btnGraveActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnGraveActionPerformed
|
||||
if (graveyard == null) {
|
||||
graveyard = new ShowCardsDialog();
|
||||
}
|
||||
graveyard.loadCards(player.getName() + " graveyard", player.getGraveyard(), bigCard, Config.dimensions, gameId, false);
|
||||
}
|
||||
private void btnGraveActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnGraveActionPerformed
|
||||
if (graveyard == null) {
|
||||
graveyard = new ShowCardsDialog();
|
||||
}
|
||||
graveyard.loadCards(player.getName() + " graveyard", player.getGraveyard(), bigCard, Config.dimensions, gameId, false);
|
||||
}
|
||||
|
||||
private void btnCheatActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnCheatActionPerformed
|
||||
DckDeckImporter deckImporter = new DckDeckImporter();
|
||||
session.cheat(gameId, playerId, deckImporter.importDeck("cheat.dck"));
|
||||
}
|
||||
private void btnCheatActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnCheatActionPerformed
|
||||
DckDeckImporter deckImporter = new DckDeckImporter();
|
||||
session.cheat(gameId, playerId, deckImporter.importDeck("cheat.dck"));
|
||||
}
|
||||
|
||||
private HoverButton avatar;
|
||||
private JButton btnPlayer;
|
||||
private ImagePanel life;
|
||||
private ImagePanel poison;
|
||||
private ImagePanel hand;
|
||||
private HoverButton grave;
|
||||
private ImagePanel library;
|
||||
private CardView topCard;
|
||||
private MageCard topCardPanel;
|
||||
private JButton cheat;
|
||||
private MageRoundPane panelBackground;
|
||||
private HoverButton avatar;
|
||||
private JButton btnPlayer;
|
||||
private ImagePanel life;
|
||||
private ImagePanel poison;
|
||||
private ImagePanel hand;
|
||||
private HoverButton grave;
|
||||
private ImagePanel library;
|
||||
private CardView topCard;
|
||||
private MageCard topCardPanel;
|
||||
private JButton cheat;
|
||||
private MageRoundPane panelBackground;
|
||||
|
||||
private JLabel lifeLabel;
|
||||
private JLabel handLabel;
|
||||
private JLabel libraryLabel;
|
||||
private JLabel poisonLabel;
|
||||
private JLabel graveLabel;
|
||||
private JLabel lifeLabel;
|
||||
private JLabel handLabel;
|
||||
private JLabel libraryLabel;
|
||||
private JLabel poisonLabel;
|
||||
private JLabel graveLabel;
|
||||
|
||||
private Map<String, JLabel> manaLabels = new HashMap<String, JLabel>();
|
||||
private Map<String, JLabel> manaLabels = new HashMap<String, JLabel>();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue