examplePanel.setWidget(dock);
}
protected void executeJS(final String js) {
commands.add(js);
history.add(new PLabel("> " + js));
inputTextBox.setText("");
PScript.get().execute(js, new ExecutionCallback() {
@Override
public void onSuccess(final String msg) {
history.add(new PLabel(msg));
scroll.scrollToBottom();
}
@Override
public void onFailure(final String msg) {
final PLabel lbl = new PLabel(msg);
lbl.setStyleProperty("color", "red");
history.add(lbl);
scroll.scrollToBottom();
}
});
}