Du kannst nicht mehr als 25 Themen auswählen Themen müssen mit entweder einem Buchstaben oder einer Ziffer beginnen. Sie können Bindestriche („-“) enthalten und bis zu 35 Zeichen lang sein.

BrowserFrame.java 1.9KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. /*
  2. * Copyright 2000-2018 Vaadin Ltd.
  3. *
  4. * Licensed under the Apache License, Version 2.0 (the "License"); you may not
  5. * use this file except in compliance with the License. You may obtain a copy of
  6. * the License at
  7. *
  8. * http://www.apache.org/licenses/LICENSE-2.0
  9. *
  10. * Unless required by applicable law or agreed to in writing, software
  11. * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
  12. * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
  13. * License for the specific language governing permissions and limitations under
  14. * the License.
  15. */
  16. package com.vaadin.ui;
  17. import com.vaadin.server.Resource;
  18. import com.vaadin.shared.ui.browserframe.BrowserFrameState;
  19. /**
  20. * A component displaying an embedded web page. Implemented as a HTML
  21. * <code>iframe</code> element.
  22. *
  23. * @author Vaadin Ltd.
  24. * @since 7.0
  25. */
  26. public class BrowserFrame extends AbstractEmbedded {
  27. /**
  28. * Creates a new empty browser frame.
  29. */
  30. public BrowserFrame() {
  31. }
  32. /**
  33. * Creates a new empty browser frame with the given caption.
  34. *
  35. * @param caption
  36. * The caption for the component
  37. */
  38. public BrowserFrame(String caption) {
  39. setCaption(caption);
  40. }
  41. /**
  42. * Creates a new browser frame with the given caption and content.
  43. *
  44. * @param caption
  45. * The caption for the component.
  46. * @param source
  47. * A Resource representing the Web page that should be displayed.
  48. */
  49. public BrowserFrame(String caption, Resource source) {
  50. this(caption);
  51. setSource(source);
  52. }
  53. @Override
  54. protected BrowserFrameState getState() {
  55. return (BrowserFrameState) super.getState();
  56. }
  57. @Override
  58. protected BrowserFrameState getState(boolean markAsDirty) {
  59. return (BrowserFrameState) super.getState(markAsDirty);
  60. }
  61. }