contentPane.setWidget(1, 0, body);
contentPane.setWidget(2, 0, footer);
root = new AbsolutePanel();
root.setSize("100%", "100%");
root.add(contentPane);
FocusPanel wrap = new FocusPanel(root);
controlKeyHandler = new IntRunnable() {
@Override
public void run(int i) {
Event e = Event.getCurrentEvent();
switch(i) {
case 83: //CTRL+S
if (e != null) e.preventDefault();
CommandEvent.fire(new CurrentDocumentSaveCommand(false));
break;
case 79: //CTRL+O
if (e != null) e.preventDefault();
CommandEvent.fire(new SystemShowDialogCommand(DynamicFileListDialog.class));
break;
case 78: //CTRL+N
if (e != null) e.preventDefault();
CommandEvent.fire(new NewDocumentStartCommand());
break;
}
}
};
wrap.addKeyDownHandler(new KeyDownHandler() {
@Override
public void onKeyDown(KeyDownEvent event) {
if (event.isControlKeyDown()) {
controlKeyHandler.run(event.getNativeKeyCode());
} else {