com.smartgwt.client.widgets.drawing

## Class DrawPolygon

- java.lang.Object
- - com.smartgwt.client.core.BaseClass
  - - com.smartgwt.client.widgets.drawing.DrawItem
    - - com.smartgwt.client.widgets.drawing.DrawPath
      - - com.smartgwt.client.widgets.drawing.DrawPolygon

- All Implemented Interfaces:
    com.google.gwt.event.shared.HasHandlers, HasClickHandlers, HasDragMoveHandlers, HasDragResizeMoveHandlers, HasDragStartHandlers, HasDragStopHandlers, HasMouseDownHandlers, HasMouseMoveHandlers, HasMouseOutHandlers, HasMouseOverHandlers, HasMouseUpHandlers, HasMovedHandlers, HasResizedHandlers, HasShowContextMenuHandlers
  Direct Known Subclasses:
    DrawTriangle

      public class DrawPolygon
      extends DrawPath

  DrawItem subclass to render polygons

- - ### Field Summary

    - ### Fields inherited from class com.smartgwt.client.core.BaseClass

      `config, id, scClassName`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `DrawPolygon()`
    `DrawPolygon(com.google.gwt.core.client.JavaScriptObject jsObj)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `com.google.gwt.core.client.JavaScriptObject` | `create()`
    `LineCap` | `getLineCap()` Style of drawing the corners of the polygon.
    `static DrawPolygon` | `getOrCreateRef(com.google.gwt.core.client.JavaScriptObject jsObj)`
    `Point[]` | `getPoints()` Array of points of the polygon.
    `void` | `setJavaScriptObject(com.google.gwt.core.client.JavaScriptObject jsObj)`
    `void` | `setLineCap(LineCap lineCap)` Style of drawing the corners of the polygon.
    `void` | `setPoints(Point... points)` Array of points of the polygon.

    - ### Methods inherited from class com.smartgwt.client.widgets.drawing.DrawPath

      `getKnobs, moveBy, moveTo, setDefaultProperties, setKnobs`

    - ### Methods inherited from class com.smartgwt.client.widgets.drawing.DrawItem

      `addClickHandler, addDragMoveHandler, addDragResizeMoveHandler, addDragStartHandler, addDragStopHandler, addMouseDownHandler, addMouseMoveHandler, addMouseOutHandler, addMouseOverHandler, addMouseUpHandler, addMovedHandler, addResizedHandler, addShowContextMenuHandler, computeAngle, computeAngleAsDouble, dragResizeMove, draw, erase, getAttributeAsIntArray, getBoundingBox, getCanDrag, getCanHover, getCenter, getContextMenu, getCursor, getDestroyed, getDestroying, getDragStartDistance, getDrawGroup, getDrawPane, getEndArrow, getFillColor, getFillGradient, getFillOpacity, getHoverHTML, getKeepInParentRect, getLineColor, getLineOpacity, getLinePattern, getLineWidth, getMoveKnobOffset, getMoveKnobPoint, getPageLeft, getPageTop, getPrompt, getRef, getResizeKnobPoints, getRotation, getScale, getShadow, getShowHover, getStartArrow, getSvgString, hide, hideKnobs, hover, isInBounds, isPointInPath, resizeBy, resizeTo, rotateBy, rotateBy, rotateTo, rotateTo, scaleBy, scaleBy, scaleTo, scaleTo, setAttribute, setCanDrag, setCanHover, setContextMenu, setCursor, setDefaultProperties, setDragStartDistance, setDrawGroup, setDrawPane, setEndArrow, setFillColor, setFillGradient, setFillOpacity, setKeepInParentRect, setKeepInParentRect, setLineColor, setLineOpacity, setLinePattern, setLineWidth, setMoveKnobOffset, setMoveKnobPoint, setPrompt, setResizeKnobPoints, setRotation, setScale, setShadow, setShowHover, setStartArrow, show, showKnobs`

    - ### Methods inherited from class com.smartgwt.client.core.BaseClass

      `asSGWTComponent, destroy, doAddHandler, doInit, error, error, errorIfNotCreated, fireEvent, getAttribute, getAttributeAsBoolean, getAttributeAsDate, getAttributeAsDouble, getAttributeAsElement, getAttributeAsFloat, getAttributeAsInt, getAttributeAsJavaScriptObject, getAttributeAsMap, getAttributeAsString, getAttributeAsStringArray, getClassName, getConfig, getHandlerCount, getID, getJsObj, getOrCreateJsObj, getScClassName, internalSetID, internalSetID, isCreated, onBind, onInit, registerID, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setID, setProperty, setProperty, setProperty, setProperty, setScClassName`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

    - ### Methods inherited from interface com.google.gwt.event.shared.HasHandlers

      `fireEvent`

- - ### Constructor Detail

    - #### DrawPolygon

          public DrawPolygon()

    - #### DrawPolygon

          public DrawPolygon(com.google.gwt.core.client.JavaScriptObject jsObj)

  - ### Method Detail

    - #### getOrCreateRef

          public static DrawPolygon getOrCreateRef(com.google.gwt.core.client.JavaScriptObject jsObj)

    - #### setJavaScriptObject

          public void setJavaScriptObject(com.google.gwt.core.client.JavaScriptObject jsObj)

      Overrides:
        `setJavaScriptObject` in class `DrawPath`

    - #### create

          public com.google.gwt.core.client.JavaScriptObject create()

      Overrides:
        `create` in class `DrawPath`

    - #### setLineCap

          public void setLineCap(LineCap lineCap)

      Style of drawing the corners of the polygon.
      Overrides:
        `setLineCap` in class `DrawItem`
      Parameters:
        `lineCap` - lineCap Default value is "butt"

    - #### getLineCap

          public LineCap getLineCap()

      Style of drawing the corners of the polygon.
      Overrides:
        `getLineCap` in class `DrawItem`
      Returns:
        LineCap

    - #### setPoints

          public void setPoints(Point... points)

      Array of points of the polygon.
      Overrides:
        `setPoints` in class `DrawPath`
      Parameters:
        `points` - points Default value is [[0,0], [50,50], [100,0]]

    - #### getPoints

          public Point[] getPoints()

      Array of points of the polygon.
      Overrides:
        `getPoints` in class `DrawPath`
      Returns:
        Point