mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-20 12:48:00 +00:00
- Fixed results of FindBugs.
This commit is contained in:
@@ -376,9 +376,12 @@ public class GameAction {
|
|||||||
public final void controllerChangeZoneCorrection(final Card c) {
|
public final void controllerChangeZoneCorrection(final Card c) {
|
||||||
System.out.println("Correcting zone for " + c.toString());
|
System.out.println("Correcting zone for " + c.toString());
|
||||||
final PlayerZone oldBattlefield = AllZone.getZoneOf(c);
|
final PlayerZone oldBattlefield = AllZone.getZoneOf(c);
|
||||||
|
if (oldBattlefield == null) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
final PlayerZone newBattlefield = c.getController().getZone(oldBattlefield.getZoneType());
|
final PlayerZone newBattlefield = c.getController().getZone(oldBattlefield.getZoneType());
|
||||||
|
|
||||||
if ((oldBattlefield == null) || (newBattlefield == null) || oldBattlefield.equals(newBattlefield)) {
|
if (newBattlefield == null || oldBattlefield.equals(newBattlefield)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -671,9 +674,11 @@ public class GameAction {
|
|||||||
runParams.put("Destination", ZoneType.Library.name());
|
runParams.put("Destination", ZoneType.Library.name());
|
||||||
AllZone.getTriggerHandler().runTrigger(TriggerType.ChangesZone, runParams);
|
AllZone.getTriggerHandler().runTrigger(TriggerType.ChangesZone, runParams);
|
||||||
|
|
||||||
Player owner = p.getPlayer();
|
if (p != null) {
|
||||||
if (owner != null) {
|
Player owner = p.getPlayer();
|
||||||
owner.updateLabelObservers();
|
if (owner != null) {
|
||||||
|
owner.updateLabelObservers();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Soulbond unpairing
|
// Soulbond unpairing
|
||||||
|
|||||||
@@ -199,7 +199,7 @@ public final class MtgDataParser implements Iterator<CardRules> {
|
|||||||
"([A-Z0-9][A-Z0-9][A-Z0-9] [CURM], )*[A-Z0-9][A-Z0-9][A-Z0-9] [CURM]", nextline)) {
|
"([A-Z0-9][A-Z0-9][A-Z0-9] [CURM], )*[A-Z0-9][A-Z0-9][A-Z0-9] [CURM]", nextline)) {
|
||||||
rules.add(nextline);
|
rules.add(nextline);
|
||||||
}
|
}
|
||||||
ret.setCardRules((String[]) rules.toArray());
|
ret.setCardRules(rules.toArray(new String[rules.size()]));
|
||||||
|
|
||||||
return nextline;
|
return nextline;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2491,7 +2491,7 @@ public final class AbilityFactoryChangeZone {
|
|||||||
final Cost abCost = af.getAbCost();
|
final Cost abCost = af.getAbCost();
|
||||||
final Card source = sa.getSourceCard();
|
final Card source = sa.getSourceCard();
|
||||||
final HashMap<String, String> params = af.getMapParams();
|
final HashMap<String, String> params = af.getMapParams();
|
||||||
final String destination = params.get("Destination");
|
final ZoneType destination = ZoneType.smartValueOf(params.get("Destination"));
|
||||||
final ZoneType origin = ZoneType.smartValueOf(params.get("Origin"));
|
final ZoneType origin = ZoneType.smartValueOf(params.get("Origin"));
|
||||||
|
|
||||||
if (abCost != null) {
|
if (abCost != null) {
|
||||||
@@ -2679,7 +2679,7 @@ public final class AbilityFactoryChangeZone {
|
|||||||
public static boolean changeZoneAllTriggerAINoCost(final AbilityFactory af, final SpellAbility sa, final boolean mandatory) {
|
public static boolean changeZoneAllTriggerAINoCost(final AbilityFactory af, final SpellAbility sa, final boolean mandatory) {
|
||||||
// Change Zone All, can be any type moving from one zone to another
|
// Change Zone All, can be any type moving from one zone to another
|
||||||
final HashMap<String, String> params = af.getMapParams();
|
final HashMap<String, String> params = af.getMapParams();
|
||||||
final String destination = params.get("Destination");
|
final ZoneType destination = ZoneType.smartValueOf(params.get("Destination"));
|
||||||
final ZoneType origin = ZoneType.smartValueOf(params.get("Origin"));
|
final ZoneType origin = ZoneType.smartValueOf(params.get("Origin"));
|
||||||
|
|
||||||
CardList humanType = AllZone.getHumanPlayer().getCardsIn(origin);
|
CardList humanType = AllZone.getHumanPlayer().getCardsIn(origin);
|
||||||
|
|||||||
@@ -1650,7 +1650,7 @@ public final class AbilityFactoryChoose {
|
|||||||
chosen = list.get(0).getName();
|
chosen = list.get(0).getName();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (chosen == "") {
|
if (chosen.equals("")) {
|
||||||
chosen = "Morphling";
|
chosen = "Morphling";
|
||||||
}
|
}
|
||||||
GuiUtils.chooseOne("Computer picked: ", chosen);
|
GuiUtils.chooseOne("Computer picked: ", chosen);
|
||||||
|
|||||||
@@ -2665,7 +2665,7 @@ public class AbilityFactoryCounters {
|
|||||||
if (source.getCounters(cType) >= amount) {
|
if (source.getCounters(cType) >= amount) {
|
||||||
if (!dest.hasKeyword("CARDNAME can't have counters placed on it.")
|
if (!dest.hasKeyword("CARDNAME can't have counters placed on it.")
|
||||||
&& !(dest.hasKeyword("CARDNAME can't have -1/-1 counters placed on it.") && cType
|
&& !(dest.hasKeyword("CARDNAME can't have -1/-1 counters placed on it.") && cType
|
||||||
.equals("M1M1"))) {
|
.equals(Counters.M1M1))) {
|
||||||
dest.addCounter(cType, amount);
|
dest.addCounter(cType, amount);
|
||||||
source.subtractCounter(cType, amount);
|
source.subtractCounter(cType, amount);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -863,8 +863,8 @@ public final class AbilityFactoryReveal {
|
|||||||
}
|
}
|
||||||
sb.append(". Put ");
|
sb.append(". Put ");
|
||||||
|
|
||||||
final String found = params.get("FoundDestination");
|
final ZoneType found = ZoneType.smartValueOf(params.get("FoundDestination"));
|
||||||
final String revealed = params.get("RevealedDestination");
|
final ZoneType revealed = ZoneType.smartValueOf(params.get("RevealedDestination"));
|
||||||
if (found != null) {
|
if (found != null) {
|
||||||
|
|
||||||
sb.append(untilAmount > 1 ? "those cards" : "that card");
|
sb.append(untilAmount > 1 ? "those cards" : "that card");
|
||||||
|
|||||||
@@ -492,10 +492,7 @@ public class AbilityFactorySetState {
|
|||||||
if (list.get(i).isDoubleFaced()) {
|
if (list.get(i).isDoubleFaced()) {
|
||||||
if (list.get(i).getCurState() == CardCharactersticName.Original) {
|
if (list.get(i).getCurState() == CardCharactersticName.Original) {
|
||||||
if (list.get(i).changeToState(CardCharactersticName.Transformed) && remChanged) {
|
if (list.get(i).changeToState(CardCharactersticName.Transformed) && remChanged) {
|
||||||
if (remChanged) {
|
abilityFactory.getHostCard().addRemembered(list.get(i));
|
||||||
abilityFactory.getHostCard().addRemembered(list.get(i));
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
} else if (list.get(i).getCurState() == CardCharactersticName.Transformed) {
|
} else if (list.get(i).getCurState() == CardCharactersticName.Transformed) {
|
||||||
if (list.get(i).changeToState(CardCharactersticName.Original)) {
|
if (list.get(i).changeToState(CardCharactersticName.Original)) {
|
||||||
|
|||||||
@@ -47,7 +47,7 @@ public class AbilityMana extends AbilityActivated implements java.io.Serializabl
|
|||||||
private String origProduced;
|
private String origProduced;
|
||||||
private String lastExpressChoice = "";
|
private String lastExpressChoice = "";
|
||||||
private String manaRestrictions = "";
|
private String manaRestrictions = "";
|
||||||
private ArrayList<Mana> lastProduced = new ArrayList<Mana>();;
|
private ArrayList<Mana> lastProduced = new ArrayList<Mana>();
|
||||||
private int amount = 1;
|
private int amount = 1;
|
||||||
|
|
||||||
/** The reflected. */
|
/** The reflected. */
|
||||||
|
|||||||
@@ -111,7 +111,7 @@ public class InputPayManaCostUtil {
|
|||||||
String colorsNeeded = colorRequired.toString();
|
String colorsNeeded = colorRequired.toString();
|
||||||
if ("1".equals(colorsNeeded)) { // only colorless left
|
if ("1".equals(colorsNeeded)) { // only colorless left
|
||||||
if (sa.getSourceCard() != null
|
if (sa.getSourceCard() != null
|
||||||
&& sa.getSourceCard().getSVar("ManaNeededToAvoidNegativeEffect") != "") {
|
&& !sa.getSourceCard().getSVar("ManaNeededToAvoidNegativeEffect").equals("")) {
|
||||||
colorsNeeded = "";
|
colorsNeeded = "";
|
||||||
String[] negEffects = sa.getSourceCard().getSVar("ManaNeededToAvoidNegativeEffect").split(",");
|
String[] negEffects = sa.getSourceCard().getSVar("ManaNeededToAvoidNegativeEffect").split(",");
|
||||||
for (String negColor : negEffects) {
|
for (String negColor : negEffects) {
|
||||||
|
|||||||
@@ -782,16 +782,17 @@ public class PhaseHandler extends MyObservable implements java.io.Serializable {
|
|||||||
public final void skipTurn(final Player player) {
|
public final void skipTurn(final Player player) {
|
||||||
// skipping turn without having extras is equivalent to giving your
|
// skipping turn without having extras is equivalent to giving your
|
||||||
// opponent an extra turn
|
// opponent an extra turn
|
||||||
if (this.extraTurns.isEmpty()) {
|
boolean skipped = false;
|
||||||
this.addExtraTurn(player.getOpponent());
|
for (ExtraTurn turn : this.extraTurns) {
|
||||||
} else {
|
if (turn.getPlayer().equals(player)) {
|
||||||
final int pos = this.extraTurns.lastIndexOf(player);
|
this.extraTurns.remove(turn);
|
||||||
if (pos == -1) {
|
skipped = true;
|
||||||
this.addExtraTurn(player.getOpponent());
|
break;
|
||||||
} else {
|
|
||||||
this.extraTurns.remove(pos);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (!skipped) {
|
||||||
|
this.addExtraTurn(player.getOpponent());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -122,22 +122,6 @@ public class AIPlayer extends Player {
|
|||||||
// /
|
// /
|
||||||
// //////////////////////////////
|
// //////////////////////////////
|
||||||
|
|
||||||
/** {@inheritDoc} */
|
|
||||||
@Override
|
|
||||||
public final CardList mayDrawCard() {
|
|
||||||
return this.mayDrawCards(1);
|
|
||||||
}
|
|
||||||
|
|
||||||
/** {@inheritDoc} */
|
|
||||||
@Override
|
|
||||||
public final CardList mayDrawCards(final int n) {
|
|
||||||
if (this.getCardsIn(ZoneType.Library).size() > n) {
|
|
||||||
return this.drawCards(n);
|
|
||||||
} else {
|
|
||||||
return new CardList();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* <p>
|
* <p>
|
||||||
* dredge.
|
* dredge.
|
||||||
|
|||||||
@@ -880,7 +880,7 @@ public class ComputerUtil {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Make mana needed to avoid negative effect a mandatory cost for the AI
|
// Make mana needed to avoid negative effect a mandatory cost for the AI
|
||||||
if (card.getSVar("ManaNeededToAvoidNegativeEffect") != "") {
|
if (!card.getSVar("ManaNeededToAvoidNegativeEffect").equals("")) {
|
||||||
final String[] negEffects = card.getSVar("ManaNeededToAvoidNegativeEffect").split(",");
|
final String[] negEffects = card.getSVar("ManaNeededToAvoidNegativeEffect").split(",");
|
||||||
int amountAdded = 0;
|
int amountAdded = 0;
|
||||||
for (int nStr = 0; nStr < negEffects.length; nStr++) {
|
for (int nStr = 0; nStr < negEffects.length; nStr++) {
|
||||||
@@ -1018,7 +1018,9 @@ public class ComputerUtil {
|
|||||||
}
|
}
|
||||||
|
|
||||||
final Cost cost = m.getPayCosts();
|
final Cost cost = m.getPayCosts();
|
||||||
needsLimitedResources |= !cost.isReusuableResource();
|
if (cost != null) {
|
||||||
|
needsLimitedResources |= !cost.isReusuableResource();
|
||||||
|
}
|
||||||
|
|
||||||
// if the AI can't pay the additional costs skip the mana
|
// if the AI can't pay the additional costs skip the mana
|
||||||
// ability
|
// ability
|
||||||
|
|||||||
@@ -114,22 +114,6 @@ public class HumanPlayer extends Player {
|
|||||||
// /
|
// /
|
||||||
// /////////////
|
// /////////////
|
||||||
|
|
||||||
/** {@inheritDoc} */
|
|
||||||
@Override
|
|
||||||
public final CardList mayDrawCards(final int n) {
|
|
||||||
if (this.canDraw() && GameActionUtil.showYesNoDialog(null, "Draw " + n + " cards?")) {
|
|
||||||
return this.drawCards(n);
|
|
||||||
} else {
|
|
||||||
return new CardList();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/** {@inheritDoc} */
|
|
||||||
@Override
|
|
||||||
public final CardList mayDrawCard() {
|
|
||||||
return this.mayDrawCards(1);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* <p>
|
* <p>
|
||||||
* dredge.
|
* dredge.
|
||||||
|
|||||||
@@ -1145,26 +1145,6 @@ public abstract class Player extends GameEntity {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* <p>
|
|
||||||
* mayDrawCard.
|
|
||||||
* </p>
|
|
||||||
*
|
|
||||||
* @return a CardList of cards actually drawn
|
|
||||||
*/
|
|
||||||
public abstract CardList mayDrawCard();
|
|
||||||
|
|
||||||
/**
|
|
||||||
* <p>
|
|
||||||
* mayDrawCards.
|
|
||||||
* </p>
|
|
||||||
*
|
|
||||||
* @param numCards
|
|
||||||
* a int.
|
|
||||||
* @return a CardList of cards actually drawn
|
|
||||||
*/
|
|
||||||
public abstract CardList mayDrawCards(int numCards);
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* <p>
|
* <p>
|
||||||
* drawCard.
|
* drawCard.
|
||||||
|
|||||||
@@ -164,7 +164,7 @@ public class CardDetailPanel extends JPanel implements CardContainer {
|
|||||||
|
|
||||||
final boolean faceDown = card.isFaceDown() && (card.getController() != AllZone.getHumanPlayer());
|
final boolean faceDown = card.isFaceDown() && (card.getController() != AllZone.getHumanPlayer());
|
||||||
if (!faceDown) {
|
if (!faceDown) {
|
||||||
if (card.getManaCost().equals("") || card.isLand()) {
|
if (card.getManaCost().toString().equals("") || card.isLand()) {
|
||||||
this.nameCostLabel.setText(card.getName());
|
this.nameCostLabel.setText(card.getName());
|
||||||
} else {
|
} else {
|
||||||
this.nameCostLabel.setText(card.getName() + " - " + card.getManaCost());
|
this.nameCostLabel.setText(card.getName() + " - " + card.getManaCost());
|
||||||
@@ -328,7 +328,7 @@ public class CardDetailPanel extends JPanel implements CardContainer {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// chosen type
|
// chosen type
|
||||||
if (card.getChosenType() != "") {
|
if (!card.getChosenType().equals("")) {
|
||||||
if (area.length() != 0) {
|
if (area.length() != 0) {
|
||||||
area.append("\n");
|
area.append("\n");
|
||||||
}
|
}
|
||||||
@@ -348,7 +348,7 @@ public class CardDetailPanel extends JPanel implements CardContainer {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// named card
|
// named card
|
||||||
if (card.getNamedCard() != "") {
|
if (!card.getNamedCard().equals("")) {
|
||||||
if (area.length() != 0) {
|
if (area.length() != 0) {
|
||||||
area.append("\n");
|
area.append("\n");
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -290,7 +290,7 @@ public class GuiImportPicture extends JDialog {
|
|||||||
@Override
|
@Override
|
||||||
public void mouseClicked(final java.awt.event.MouseEvent e) {
|
public void mouseClicked(final java.awt.event.MouseEvent e) {
|
||||||
GuiImportPicture.this.jButtonStart.setEnabled(false);
|
GuiImportPicture.this.jButtonStart.setEnabled(false);
|
||||||
if (GuiImportPicture.this.jLabelSource.getText() != "") {
|
if (GuiImportPicture.this.jLabelSource.getText().equals("")) {
|
||||||
final FileFinder ff = new FileFinder();
|
final FileFinder ff = new FileFinder();
|
||||||
try {
|
try {
|
||||||
GuiImportPicture.this.listFiles = ff.findFiles(GuiImportPicture.this.jLabelSource.getText()
|
GuiImportPicture.this.listFiles = ff.findFiles(GuiImportPicture.this.jLabelSource.getText()
|
||||||
|
|||||||
@@ -291,7 +291,7 @@ public final class SColumnUtil {
|
|||||||
final ACEditorBase<TItem, TModel> ed = (ACEditorBase<TItem, TModel>)
|
final ACEditorBase<TItem, TModel> ed = (ACEditorBase<TItem, TModel>)
|
||||||
CDeckEditorUI.SINGLETON_INSTANCE.getCurrentEditorController();
|
CDeckEditorUI.SINGLETON_INSTANCE.getCurrentEditorController();
|
||||||
|
|
||||||
final JTable tbl = (id0.toString().substring(0, 4) == "DECK")
|
final JTable tbl = (id0.toString().substring(0, 4).equals("DECK"))
|
||||||
? ed.getTableDeck().getTable()
|
? ed.getTableDeck().getTable()
|
||||||
: ed.getTableCatalog().getTable();
|
: ed.getTableCatalog().getTable();
|
||||||
|
|
||||||
|
|||||||
@@ -109,7 +109,7 @@ public class TableColumnInfo<T> extends TableColumn {
|
|||||||
* @return the fnSort
|
* @return the fnSort
|
||||||
*/
|
*/
|
||||||
public Lambda1<Comparable, Entry<T, Integer>> getFnSort() {
|
public Lambda1<Comparable, Entry<T, Integer>> getFnSort() {
|
||||||
if (fnSort.equals(null)) {
|
if (fnSort == null) {
|
||||||
throw new NullPointerException("A sort function hasn't been set for "
|
throw new NullPointerException("A sort function hasn't been set for "
|
||||||
+ "Column " + TableColumnInfo.this.getIdentifier());
|
+ "Column " + TableColumnInfo.this.getIdentifier());
|
||||||
}
|
}
|
||||||
@@ -122,7 +122,7 @@ public class TableColumnInfo<T> extends TableColumn {
|
|||||||
* @return the fnDisplay
|
* @return the fnDisplay
|
||||||
*/
|
*/
|
||||||
public Lambda1<Object, Entry<T, Integer>> getFnDisplay() {
|
public Lambda1<Object, Entry<T, Integer>> getFnDisplay() {
|
||||||
if (fnSort.equals(null)) {
|
if (fnSort == null) {
|
||||||
throw new NullPointerException("A display function hasn't been set for "
|
throw new NullPointerException("A display function hasn't been set for "
|
||||||
+ "Column " + TableColumnInfo.this.getIdentifier());
|
+ "Column " + TableColumnInfo.this.getIdentifier());
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -429,7 +429,7 @@ public final class DragCell extends JPanel implements ILocalRepaint {
|
|||||||
temp.priorityDecrease();
|
temp.priorityDecrease();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (temp.equals(docSelected)) { continue; }
|
if (d.equals(docSelected)) { continue; }
|
||||||
if (temp.getPriority() > lowest) { continue; }
|
if (temp.getPriority() > lowest) { continue; }
|
||||||
if (temp.getPriority() <= currentPriority0) { continue; }
|
if (temp.getPriority() <= currentPriority0) { continue; }
|
||||||
|
|
||||||
|
|||||||
@@ -32,7 +32,7 @@ public class SDisplayUtil {
|
|||||||
final int delay = 80; // Milliseconds between steps
|
final int delay = 80; // Milliseconds between steps
|
||||||
|
|
||||||
if (remindIsRunning) { return; }
|
if (remindIsRunning) { return; }
|
||||||
if (pnl.equals(null)) { return; }
|
if (pnl == null) { return; }
|
||||||
|
|
||||||
remindIsRunning = true;
|
remindIsRunning = true;
|
||||||
final int oldR = pnl.getBackground().getRed();
|
final int oldR = pnl.getBackground().getRed();
|
||||||
|
|||||||
@@ -166,7 +166,7 @@ public final class SRearrangingUtil {
|
|||||||
&& (cellTarget.getW() / 2) > SResizingUtil.W_MIN) {
|
&& (cellTarget.getW() / 2) > SResizingUtil.W_MIN) {
|
||||||
dropzone = Dropzone.RIGHT;
|
dropzone = Dropzone.RIGHT;
|
||||||
pnlDocument.setCursor(CUR_R);
|
pnlDocument.setCursor(CUR_R);
|
||||||
tempW = Math.round(cellTarget.getW() / 2);
|
tempW = cellTarget.getW() / 2;
|
||||||
|
|
||||||
pnlPreview.setBounds(
|
pnlPreview.setBounds(
|
||||||
cellTarget.getX() + cellTarget.getW() - tempW,
|
cellTarget.getX() + cellTarget.getW() - tempW,
|
||||||
@@ -191,7 +191,7 @@ public final class SRearrangingUtil {
|
|||||||
&& (cellTarget.getH() / 2) > SResizingUtil.H_MIN) {
|
&& (cellTarget.getH() / 2) > SResizingUtil.H_MIN) {
|
||||||
dropzone = Dropzone.BOTTOM;
|
dropzone = Dropzone.BOTTOM;
|
||||||
pnlDocument.setCursor(CUR_B);
|
pnlDocument.setCursor(CUR_B);
|
||||||
tempH = Math.round(cellTarget.getH() / 2);
|
tempH = cellTarget.getH() / 2;
|
||||||
|
|
||||||
pnlPreview.setBounds(
|
pnlPreview.setBounds(
|
||||||
cellTarget.getX() + SLayoutConstants.BORDER_T,
|
cellTarget.getX() + SLayoutConstants.BORDER_T,
|
||||||
@@ -244,7 +244,7 @@ public final class SRearrangingUtil {
|
|||||||
case LEFT:
|
case LEFT:
|
||||||
cellNew.setBounds(
|
cellNew.setBounds(
|
||||||
tempX, tempY,
|
tempX, tempY,
|
||||||
Math.round(tempW / 2), tempH);
|
tempW / 2, tempH);
|
||||||
cellTarget.setBounds(
|
cellTarget.setBounds(
|
||||||
tempX + cellNew.getW(), tempY,
|
tempX + cellNew.getW(), tempY,
|
||||||
tempW - cellNew.getW(), tempH);
|
tempW - cellNew.getW(), tempH);
|
||||||
@@ -253,7 +253,7 @@ public final class SRearrangingUtil {
|
|||||||
case RIGHT:
|
case RIGHT:
|
||||||
cellTarget.setBounds(
|
cellTarget.setBounds(
|
||||||
tempX, tempY,
|
tempX, tempY,
|
||||||
Math.round(tempW / 2), tempH);
|
tempW / 2, tempH);
|
||||||
cellNew.setBounds(
|
cellNew.setBounds(
|
||||||
cellTarget.getX() + cellTarget.getW(), tempY ,
|
cellTarget.getX() + cellTarget.getW(), tempY ,
|
||||||
tempW - cellTarget.getW(), tempH);
|
tempW - cellTarget.getW(), tempH);
|
||||||
@@ -262,7 +262,7 @@ public final class SRearrangingUtil {
|
|||||||
case TOP:
|
case TOP:
|
||||||
cellNew.setBounds(
|
cellNew.setBounds(
|
||||||
tempX, tempY,
|
tempX, tempY,
|
||||||
tempW, tempH - Math.round(tempH / 2));
|
tempW, tempH - (tempH / 2));
|
||||||
cellTarget.setBounds(
|
cellTarget.setBounds(
|
||||||
tempX, tempY + cellNew.getH(),
|
tempX, tempY + cellNew.getH(),
|
||||||
tempW, tempH - cellNew.getH());
|
tempW, tempH - cellNew.getH());
|
||||||
@@ -271,7 +271,7 @@ public final class SRearrangingUtil {
|
|||||||
case BOTTOM:
|
case BOTTOM:
|
||||||
cellTarget.setBounds(
|
cellTarget.setBounds(
|
||||||
tempX, tempY,
|
tempX, tempY,
|
||||||
tempW, Math.round(tempH / 2));
|
tempW, tempH / 2);
|
||||||
|
|
||||||
cellNew.setBounds(
|
cellNew.setBounds(
|
||||||
tempX, cellTarget.getY() + cellTarget.getH(),
|
tempX, cellTarget.getY() + cellTarget.getH(),
|
||||||
|
|||||||
Reference in New Issue
Block a user