/main/src/com/gwtext/client/widgets/chart/yui/CartesianSeries.java

http://gwt-ext.googlecode.com/ · Java · 81 lines · 23 code · 11 blank · 47 comment · 0 complexity · 413fbe81ab0077b99132b4d49bf8f6b1 MD5 · raw file

  1. /*
  2. * GWT-Ext Widget Library
  3. * Copyright 2007 - 2008, GWT-Ext LLC., and individual contributors as indicated
  4. * by the @authors tag. See the copyright.txt in the distribution for a
  5. * full listing of individual contributors.
  6. *
  7. * This is free software; you can redistribute it and/or modify it
  8. * under the terms of the GNU Lesser General Public License as
  9. * published by the Free Software Foundation; either version 3 of
  10. * the License, or (at your option) any later version.
  11. *
  12. * This software is distributed in the hope that it will be useful,
  13. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  14. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  15. * Lesser General Public License for more details.
  16. *
  17. * You should have received a copy of the GNU Lesser General Public
  18. * License along with this software; if not, write to the Free
  19. * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
  20. * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
  21. */
  22. package com.gwtext.client.widgets.chart.yui;
  23. import com.google.gwt.core.client.JavaScriptObject;
  24. import com.gwtext.client.core.JsObject;
  25. import com.gwtext.client.util.JavaScriptObjectHelper;
  26. /**
  27. * CartesianSeries class for the YUI Charts widget. Defines a CartesianChart's vertical or horizontal axis.
  28. *
  29. * @author Sanjiv Jivan
  30. */
  31. public class CartesianSeries extends JsObject {
  32. public CartesianSeries() {
  33. jsObj = create();
  34. }
  35. protected native JavaScriptObject create() /*-{
  36. return new $wnd.YAHOO.widget.CartesianSeries();
  37. }-*/;
  38. /**
  39. * Set the xField. The field used to access the x-axis value from the items from the data source.
  40. *
  41. * @param xField the xField
  42. */
  43. public void setXField(String xField) {
  44. JavaScriptObjectHelper.setAttribute(jsObj, "xField", xField);
  45. }
  46. /**
  47. * Return the xField.
  48. *
  49. * @return the xField
  50. */
  51. public String getXField() {
  52. return JavaScriptObjectHelper.getAttribute(jsObj, "xField");
  53. }
  54. /**
  55. * The field used to access the y-axis value from the items from the data source.
  56. *
  57. * @param yField the yField
  58. */
  59. public void setYField(String yField) {
  60. JavaScriptObjectHelper.setAttribute(jsObj, "yField", yField);
  61. }
  62. /**
  63. * The field used to access the y-axis value from the items from the data source.
  64. *
  65. * @return the yField
  66. */
  67. public String getYField() {
  68. return JavaScriptObjectHelper.getAttribute(jsObj, "yField");
  69. }
  70. }