You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

Console.java 795B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. package com.itmill.toolkit.terminal.gwt.client;
  2. import com.google.gwt.user.client.ui.Label;
  3. import com.google.gwt.user.client.ui.RootPanel;
  4. public final class Console {
  5. private RootPanel rp;
  6. public Console(RootPanel rp) {
  7. this.rp = rp;
  8. }
  9. public void log(String msg) {
  10. rp.add(new Label(msg));
  11. }
  12. public void error(String msg) {
  13. rp.add((new Label(msg)));
  14. }
  15. public void printObject(Object msg) {
  16. rp.add((new Label(msg.toString())));
  17. }
  18. // public native void log(String msg)
  19. ///*-{
  20. // console.log(msg);
  21. //}-*/;
  22. //
  23. // public native void warn(String msg)
  24. // /*-{
  25. // console.warn(msg);
  26. // }-*/;
  27. //
  28. // public native void error(String msg)
  29. // /*-{
  30. // console.error(msg);
  31. // }-*/;
  32. //
  33. // public native void printObject(Object msg)
  34. // /*-{
  35. // console.dir(msg);
  36. // }-*/;
  37. }