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.

Terminal.java 2.2KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. /*
  2. @VaadinApache2LicenseForJavaFiles@
  3. */
  4. package com.vaadin.terminal;
  5. import java.io.Serializable;
  6. /**
  7. * An interface that provides information about the user's terminal.
  8. * Implementors typically provide additional information using methods not in
  9. * this interface. </p>
  10. *
  11. * @author Vaadin Ltd.
  12. * @version
  13. * @VERSION@
  14. * @since 3.0
  15. */
  16. public interface Terminal extends Serializable {
  17. /**
  18. * Gets the name of the default theme for this terminal.
  19. *
  20. * @return the name of the theme that is used by default by this terminal.
  21. */
  22. public String getDefaultTheme();
  23. /**
  24. * Gets the width of the terminal screen in pixels. This is the width of the
  25. * screen and not the width available for the application.
  26. * <p>
  27. * Note that the screen width is typically not available in the
  28. * {@link com.vaadin.Application#init()} method as this is called before the
  29. * browser has a chance to report the screen size to the server.
  30. * </p>
  31. *
  32. * @return the width of the terminal screen.
  33. */
  34. public int getScreenWidth();
  35. /**
  36. * Gets the height of the terminal screen in pixels. This is the height of
  37. * the screen and not the height available for the application.
  38. *
  39. * <p>
  40. * Note that the screen height is typically not available in the
  41. * {@link com.vaadin.Application#init()} method as this is called before the
  42. * browser has a chance to report the screen size to the server.
  43. * </p>
  44. *
  45. * @return the height of the terminal screen.
  46. */
  47. public int getScreenHeight();
  48. /**
  49. * An error event implementation for Terminal.
  50. */
  51. public interface ErrorEvent extends Serializable {
  52. /**
  53. * Gets the contained throwable, the cause of the error.
  54. */
  55. public Throwable getThrowable();
  56. }
  57. /**
  58. * Interface for listening to Terminal errors.
  59. */
  60. public interface ErrorListener extends Serializable {
  61. /**
  62. * Invoked when a terminal error occurs.
  63. *
  64. * @param event
  65. * the fired event.
  66. */
  67. public void terminalError(Terminal.ErrorEvent event);
  68. }
  69. }