Switch to google's Predicate.
git-svn-id: svn+ssh://src.earth.threerings.net/vilya/trunk@841 c613c5cb-e716-0410-b11b-feb51c14d237
This commit is contained in:
@@ -34,10 +34,10 @@ import java.awt.event.MouseEvent;
|
|||||||
|
|
||||||
import javax.swing.event.MouseInputAdapter;
|
import javax.swing.event.MouseInputAdapter;
|
||||||
|
|
||||||
|
import com.google.common.base.Predicate;
|
||||||
import com.google.common.collect.Lists;
|
import com.google.common.collect.Lists;
|
||||||
|
|
||||||
import com.samskivert.util.ObserverList;
|
import com.samskivert.util.ObserverList;
|
||||||
import com.samskivert.util.Predicate;
|
|
||||||
import com.samskivert.util.QuickSort;
|
import com.samskivert.util.QuickSort;
|
||||||
|
|
||||||
import com.threerings.media.FrameManager;
|
import com.threerings.media.FrameManager;
|
||||||
@@ -745,7 +745,7 @@ public abstract class CardPanel extends VirtualMediaPanel
|
|||||||
protected boolean isSelectable (CardSprite sprite)
|
protected boolean isSelectable (CardSprite sprite)
|
||||||
{
|
{
|
||||||
return _handSelectionMode != NONE &&
|
return _handSelectionMode != NONE &&
|
||||||
(_handSelectionPredicate == null || _handSelectionPredicate.isMatch(sprite));
|
(_handSelectionPredicate == null || _handSelectionPredicate.apply(sprite));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -761,7 +761,7 @@ public abstract class CardPanel extends VirtualMediaPanel
|
|||||||
|
|
||||||
// otherwise, look for a sprite that fits the predicate and isn't the parameter
|
// otherwise, look for a sprite that fits the predicate and isn't the parameter
|
||||||
for (CardSprite cs : _handSprites) {
|
for (CardSprite cs : _handSprites) {
|
||||||
if (cs != sprite && _handSelectionPredicate.isMatch(cs)) {
|
if (cs != sprite && _handSelectionPredicate.apply(cs)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user