}
@Override
public void commitEvent(Event event) {
Logger logger = Logger.getLogger(MySelectionListener.class.getName());
SceneEvent se = (SceneEvent)event;
if (event instanceof ActivatedEvent) {
logger.warning("SELECTION: ACTIVATED EVENT " +
se.getEntityList().get(0));
}
else if (event instanceof SelectionEvent) {
List<Entity> selected = SceneManager.getSceneManager().getSelectedEntities();
ListIterator<Entity> it = selected.listIterator();
logger.warning("SELECTION: SELECTION EVENT " + selected.size());
while (it.hasNext() == true) {
Entity entity = it.next();
logger.warning("SELECTION: SELETION EVENT " +
entity.getName());
}
}
else if (event instanceof ContextEvent) {
logger.warning("SELECTION: CONTEXT EVENT " +
se.getEntityList().size());
}
else if (event instanceof HoverEvent) {
logger.warning("SELECTION: HOVER EVENT " +
se.getEntityList().get(0) + " " +
((HoverEvent)event).isStart() + " @ " +
((HoverEvent)event).getMouseEvent().getX() + " " +
((HoverEvent)event).getMouseEvent().getY());
}
else if (event instanceof EnterExitEvent) {
logger.warning("SELECTION: ENTER EXIT EVENT " +
se.getEntityList().get(0) + " " +
((EnterExitEvent)event).isEnter());
}
}