/** * Forces the button to display the specified face * @param faceName * The name of the face to display */ public void showFace(SVGFaceName faceName) { // GWT.log((currentFaceName != null ? currentFaceName.name() : "null") + " -> " + faceName.name()); SVGFace currentFace = currentFaceName != null ? getFace(currentFaceName) : null; SVGFace face = faceName != null ? getFace(faceName) : null; if (face != currentFace) { if (currentFace != null) { for (SVGFaceChange change : currentFace.getChanges()) { change.uninstall(this); } } if (face != null) { for (SVGFaceChange change : face.getChanges()) { change.install(this); } } } currentFaceName = faceName; }
/** * Forces the button to display the specified face * @param faceName * The name of the face to display */ public void showFace(SVGFaceName faceName) { // GWT.log((currentFaceName != null ? currentFaceName.name() : "null") + " -> " + faceName.name()); SVGFace currentFace = currentFaceName != null ? getFace(currentFaceName) : null; SVGFace face = faceName != null ? getFace(faceName) : null; if (face != currentFace) { if (currentFace != null) { for (SVGFaceChange change : currentFace.getChanges()) { change.uninstall(this); } } if (face != null) { for (SVGFaceChange change : face.getChanges()) { change.install(this); } } } currentFaceName = faceName; }