Little bit of type safety, little bit of redundant cast removal.
git-svn-id: svn+ssh://src.earth.threerings.net/vilya/trunk@548 c613c5cb-e716-0410-b11b-feb51c14d237
This commit is contained in:
@@ -183,11 +183,11 @@ public class TurnDisplay extends JPanel
|
||||
{
|
||||
String name = event.getName();
|
||||
if (name.equals(_turnObj.getTurnHolderFieldName())) {
|
||||
JLabel oldLabel = (JLabel) _labels.get((Name) event.getOldValue());
|
||||
JLabel oldLabel = _labels.get(event.getOldValue());
|
||||
if (oldLabel != null) {
|
||||
oldLabel.setIcon(null);
|
||||
}
|
||||
JLabel newLabel = (JLabel) _labels.get((Name) event.getValue());
|
||||
JLabel newLabel = _labels.get(event.getValue());
|
||||
if (newLabel != null) {
|
||||
newLabel.setIcon(_turnIcon);
|
||||
}
|
||||
@@ -213,7 +213,7 @@ public class TurnDisplay extends JPanel
|
||||
protected TurnGameObject _turnObj;
|
||||
|
||||
/** A mapping of the labels currently associated with each player. */
|
||||
protected HashMap _labels = new HashMap();
|
||||
protected HashMap<Name,JLabel> _labels = new HashMap<Name,JLabel>();
|
||||
|
||||
/** The game-specified player icons. */
|
||||
protected Icon[] _playerIcons;
|
||||
|
||||
Reference in New Issue
Block a user