mirror of
https://github.com/magefree/mage.git
synced 2025-12-24 04:22:01 -08:00
replace public fields with encapsulation
This commit is contained in:
parent
d1e319787c
commit
8319fbf9ad
26 changed files with 544 additions and 327 deletions
|
|
@ -9,19 +9,19 @@ import static mage.constants.Constants.*;
|
|||
*/
|
||||
public class CardDimensions {
|
||||
|
||||
public int frameHeight;
|
||||
public int frameWidth;
|
||||
public int symbolHeight;
|
||||
public int symbolWidth;
|
||||
public int contentXOffset;
|
||||
public int nameYOffset;
|
||||
public int typeYOffset;
|
||||
public int textYOffset;
|
||||
public int textWidth;
|
||||
public int textHeight;
|
||||
public int powBoxTextTop;
|
||||
public int powBoxTextLeft;
|
||||
public int nameFontSize;
|
||||
private final int frameHeight;
|
||||
private final int frameWidth;
|
||||
private final int symbolHeight;
|
||||
private final int symbolWidth;
|
||||
private final int contentXOffset;
|
||||
private final int nameYOffset;
|
||||
private final int typeYOffset;
|
||||
private final int textYOffset;
|
||||
private final int textWidth;
|
||||
private final int textHeight;
|
||||
private final int powBoxTextTop;
|
||||
private final int powBoxTextLeft;
|
||||
private final int nameFontSize;
|
||||
|
||||
public CardDimensions(double scaleFactor) {
|
||||
frameHeight = (int) (FRAME_MAX_HEIGHT * scaleFactor);
|
||||
|
|
@ -39,4 +39,55 @@ public class CardDimensions {
|
|||
nameFontSize = Math.max(9, (int) (NAME_FONT_MAX_SIZE * scaleFactor));
|
||||
}
|
||||
|
||||
public int getFrameHeight() {
|
||||
return frameHeight;
|
||||
}
|
||||
|
||||
public int getFrameWidth() {
|
||||
return frameWidth;
|
||||
}
|
||||
|
||||
public int getSymbolHeight() {
|
||||
return symbolHeight;
|
||||
}
|
||||
|
||||
public int getSymbolWidth() {
|
||||
return symbolWidth;
|
||||
}
|
||||
|
||||
public int getContentXOffset() {
|
||||
return contentXOffset;
|
||||
}
|
||||
|
||||
public int getNameYOffset() {
|
||||
return nameYOffset;
|
||||
}
|
||||
|
||||
public int getTypeYOffset() {
|
||||
return typeYOffset;
|
||||
}
|
||||
|
||||
public int getTextYOffset() {
|
||||
return textYOffset;
|
||||
}
|
||||
|
||||
public int getTextWidth() {
|
||||
return textWidth;
|
||||
}
|
||||
|
||||
public int getTextHeight() {
|
||||
return textHeight;
|
||||
}
|
||||
|
||||
public int getPowBoxTextTop() {
|
||||
return powBoxTextTop;
|
||||
}
|
||||
|
||||
public int getPowBoxTextLeft() {
|
||||
return powBoxTextLeft;
|
||||
}
|
||||
|
||||
public int getNameFontSize() {
|
||||
return nameFontSize;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -7,11 +7,67 @@ import mage.cards.TextPopup;
|
|||
import mage.view.CardView;
|
||||
|
||||
public class TransferData {
|
||||
public Component component;
|
||||
public TextPopup popupText;
|
||||
public Point locationOnScreen;
|
||||
public int popupOffsetX;
|
||||
public int popupOffsetY;
|
||||
public UUID gameId;
|
||||
public CardView card;
|
||||
private Component component;
|
||||
private TextPopup popupText;
|
||||
private Point locationOnScreen;
|
||||
private int popupOffsetX;
|
||||
private int popupOffsetY;
|
||||
private UUID gameId;
|
||||
private CardView card;
|
||||
|
||||
public Component getComponent() {
|
||||
return component;
|
||||
}
|
||||
|
||||
public void setComponent(Component component) {
|
||||
this.component = component;
|
||||
}
|
||||
|
||||
public TextPopup getPopupText() {
|
||||
return popupText;
|
||||
}
|
||||
|
||||
public void setPopupText(TextPopup popupText) {
|
||||
this.popupText = popupText;
|
||||
}
|
||||
|
||||
public Point getLocationOnScreen() {
|
||||
return locationOnScreen;
|
||||
}
|
||||
|
||||
public void setLocationOnScreen(Point locationOnScreen) {
|
||||
this.locationOnScreen = locationOnScreen;
|
||||
}
|
||||
|
||||
public int getPopupOffsetX() {
|
||||
return popupOffsetX;
|
||||
}
|
||||
|
||||
public void setPopupOffsetX(int popupOffsetX) {
|
||||
this.popupOffsetX = popupOffsetX;
|
||||
}
|
||||
|
||||
public int getPopupOffsetY() {
|
||||
return popupOffsetY;
|
||||
}
|
||||
|
||||
public void setPopupOffsetY(int popupOffsetY) {
|
||||
this.popupOffsetY = popupOffsetY;
|
||||
}
|
||||
|
||||
public UUID getGameId() {
|
||||
return gameId;
|
||||
}
|
||||
|
||||
public void setGameId(UUID gameId) {
|
||||
this.gameId = gameId;
|
||||
}
|
||||
|
||||
public CardView getCard() {
|
||||
return card;
|
||||
}
|
||||
|
||||
public void setCard(CardView card) {
|
||||
this.card = card;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue