boolean () { if (!myTabs.attractions.contains(myInfo)) { if (getLayeredIcon().isLayerEnabled(1)) { getLayeredIcon().setLayerEnabled(1, false); setAttractionIcon(null); invalidateIfNeeded(); return true; } return false; } boolean needsUpdate = false; if (getLayeredIcon().getIcon(1) != myInfo.getAlertIcon()) { setAttractionIcon(myInfo.getAlertIcon()); needsUpdate = true; } int maxInitialBlinkCount = 5; int maxRefireBlinkCount = maxInitialBlinkCount + 2; if (myInfo.getBlinkCount() < maxInitialBlinkCount && myInfo.isAlertRequested()) { getLayeredIcon().setLayerEnabled(1, !getLayeredIcon().isLayerEnabled(1)); if (myInfo.getBlinkCount() == 0) { needsUpdate = true; } myInfo.setBlinkCount(myInfo.getBlinkCount() + 1); if (myInfo.getBlinkCount() == maxInitialBlinkCount) { myInfo.resetAlertRequest(); } repaint(); } else { if (myInfo.getBlinkCount() < maxRefireBlinkCount && myInfo.isAlertRequested()) { getLayeredIcon().setLayerEnabled(1, !getLayeredIcon().isLayerEnabled(1)); myInfo.setBlinkCount(myInfo.getBlinkCount() + 1); if (myInfo.getBlinkCount() == maxRefireBlinkCount) { myInfo.setBlinkCount(maxInitialBlinkCount); myInfo.resetAlertRequest(); } repaint(); } else { needsUpdate = !getLayeredIcon().isLayerEnabled(1); getLayeredIcon().setLayerEnabled(1, true); } } invalidateIfNeeded(); return needsUpdate; }