Avoid some repaints when we can.

git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3664 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
Ray Greenwell
2005-07-28 21:10:11 +00:00
parent 898a3bf5d5
commit d87ca1d8e1
@@ -80,18 +80,22 @@ public class PlayerStatusView extends JPanel
*/ */
public void setStatus (int status) public void setStatus (int status)
{ {
if (_status != status) {
_status = status; _status = status;
repaint(); repaint();
} }
}
/** /**
* Sets whether to highlight the player status display when rendered. * Sets whether to highlight the player status display when rendered.
*/ */
public void setHighlighted (boolean highlight) public void setHighlighted (boolean highlight)
{ {
if (_highlight != highlight) {
_highlight = highlight; _highlight = highlight;
repaint(); repaint();
} }
}
/** Returns a string representation of this instance. */ /** Returns a string representation of this instance. */
public String toString () public String toString ()