collisionResponseEnabledMI.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
boolean isCollisionResponse = collisionResponseEnabledMI.isSelected();
boolean isGravity = gravityEnabledMI.isSelected();
ClientContext.getInputManager().postEvent(
new AvatarCollisionChangeRequestEvent(isCollisionResponse, isGravity));
}
});
// Check box to set gravity (floor following) enabled
gravityEnabledMI = new JCheckBoxMenuItem(bundle.getString("Avatar_Gravity_Enabled"));
gravityEnabledMI.setSelected(true); // TODO should be set by server
gravityEnabledMI.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
boolean isCollisionResponse = collisionResponseEnabledMI.isSelected();
boolean isGravity = gravityEnabledMI.isSelected();
ClientContext.getInputManager().postEvent(
new AvatarCollisionChangeRequestEvent(isCollisionResponse, isGravity));
}
});
ctxListener = new ContextMenuListener() {
public void contextMenuDisplayed(ContextMenuEvent event) {