groupelement.js 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. // Copyright 2007 The Closure Library Authors. All Rights Reserved.
  2. //
  3. // Licensed under the Apache License, Version 2.0 (the "License");
  4. // you may not use this file except in compliance with the License.
  5. // You may obtain a copy of the License at
  6. //
  7. // http://www.apache.org/licenses/LICENSE-2.0
  8. //
  9. // Unless required by applicable law or agreed to in writing, software
  10. // distributed under the License is distributed on an "AS-IS" BASIS,
  11. // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  12. // See the License for the specific language governing permissions and
  13. // limitations under the License.
  14. /**
  15. * @fileoverview A thin wrapper around the DOM element for graphics groups.
  16. * @author arv@google.com (Erik Arvidsson)
  17. */
  18. goog.provide('goog.graphics.GroupElement');
  19. goog.require('goog.graphics.Element');
  20. /**
  21. * Interface for a graphics group element.
  22. * You should not construct objects from this constructor. The graphics
  23. * will return the object for you.
  24. * @param {Element} element The DOM element to wrap.
  25. * @param {goog.graphics.AbstractGraphics} graphics The graphics creating
  26. * this element.
  27. * @constructor
  28. * @extends {goog.graphics.Element}
  29. * @deprecated goog.graphics is deprecated. It existed to abstract over browser
  30. * differences before the canvas tag was widely supported. See
  31. * http://en.wikipedia.org/wiki/Canvas_element for details.
  32. */
  33. goog.graphics.GroupElement = function(element, graphics) {
  34. goog.graphics.Element.call(this, element, graphics);
  35. };
  36. goog.inherits(goog.graphics.GroupElement, goog.graphics.Element);
  37. /**
  38. * Remove all drawing elements from the group.
  39. */
  40. goog.graphics.GroupElement.prototype.clear = goog.abstractMethod;
  41. /**
  42. * Set the size of the group element.
  43. * @param {number|string} width The width of the group element.
  44. * @param {number|string} height The height of the group element.
  45. */
  46. goog.graphics.GroupElement.prototype.setSize = goog.abstractMethod;