Code example for PropertyChangeEvent

Methods: getPropertyName, getSource

0
	public Position getPosition() { 
		return this.card.getPosition();
	} 
 
	public void propertyChange(PropertyChangeEvent evt) {
		Card card = (Card) evt.getSource();
		if ("discovered".equals(evt.getPropertyName())) {
			setBorder(Color.MAGENTA);
		} else { 
			if (card.isVisible()) {
				this.setIcon(resourceLoadUtils.icon(this.card.getName()));
				setBorder(Color.YELLOW);
			} else { 
				this.setIcon(resourceLoadUtils.icon("back"));
				setBorder(Color.WHITE);
			} 
		} 
 
	} 
 
	private void setBorder(Color color) {