use of com.cas.sim.tis.app.listener.TypicalCaseListener in project TeachingInSimulation by ScOrPiOzzy.
the class TypicalCaseState method bindEvents.
private void bindEvents() {
listener = new TypicalCaseListener(this);
listener.registerWithInput(inputManager);
addListener(desktop, new MouseEventAdapter() {
@Override
public void mouseClicked(MouseEvent e) {
if (elecComp == null) {
return;
}
// moved_before_putdown = false;
putDown();
super.mouseClicked(e);
}
@Override
public void mouseRightClicked(MouseEvent e) {
if (holding == null) {
return;
}
holding.removeFromParent();
holding = null;
elecComp = null;
cameraState.setZoomEnable(true);
super.mouseRightClicked(e);
}
});
}
Aggregations