com.smartgwt.client.widgets.drawing

## Class DrawTriangle

- 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
        - - com.smartgwt.client.widgets.drawing.DrawTriangle

- All Implemented Interfaces:
    HasHandlers, HasClickHandlers, HasDragMoveHandlers, HasDragResizeMoveHandlers, HasDragResizeStartHandlers, HasDragResizeStopHandlers, HasDragStartHandlers, HasDragStopHandlers, HasMouseDownHandlers, HasMouseMoveHandlers, HasMouseOutHandlers, HasMouseOverHandlers, HasMouseUpHandlers, HasMovedHandlers, HasResizedHandlers, HasShowContextMenuHandlers

      public class DrawTriangle
      extends DrawPolygon

  DrawItem subclass to render triangles

- - ### Field Summary

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

      `config, factoryCreated, factoryProperties, id, scClassName`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `DrawTriangle()`
    `DrawTriangle(JavaScriptObject jsObj)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `JavaScriptObject` | `create()`
    `Point` | `getCenter()` Get the incenter of the triangle.
    `static DrawTriangle` | `getOrCreateRef(JavaScriptObject jsObj)`
    `Point[]` | `getPoints()` Array of points of the triangle.
    `void` | `resizeBy(int dX, int dY)` Resize by the specified delta
    `void` | `setPoints(Point... points)` Array of points of the triangle.

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

      `getKnobs, getLineCap, setKnobs, setLineCap`

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

      `moveBy, moveFirstPointTo, resizeTo, setDefaultProperties`

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

      `addClickHandler, addDragMoveHandler, addDragResizeMoveHandler, addDragResizeStartHandler, addDragResizeStopHandler, addDragStartHandler, addDragStopHandler, addMouseDownHandler, addMouseMoveHandler, addMouseOutHandler, addMouseOverHandler, addMouseUpHandler, addMovedHandler, addResizedHandler, addShowContextMenuHandler, changeAutoChildDefaults, changeAutoChildDefaults, changeAutoChildDefaults, computeAngle, computeAngleAsDouble, dragResizeMove, draw, erase, getAttributeAsIntArray, getBoundingBox, getBoundingBoxAsDouble, getCanDrag, getCanHover, getCanvasAutoChild, getContextMenu, getCornerResizeKnob, getCursor, getDestroyed, getDestroying, getDragStartDistance, getDrawGroup, getDrawItemAutoChild, getDrawPane, getEditProxyConstructor, getEndArrow, getEndKnob, getEventOpaque, getFillColor, getFillGradient, getFillGradientAsString, getFillOpacity, getFormItemAutoChild, getHoverDelay, getHoverHTML, getKeepInParentRect, getLineColor, getLineOpacity, getLinePattern, getLineWidth, getMoveKnob, getMoveKnobOffset, getMoveKnobPoint, getPageLeft, getPageTop, getPrompt, getProportionalResizeModifiers, getProportionalResizing, getRef, getResizeBoundingBox, getResizeBoundingBoxAsDouble, getResizeKnobPoints, getResizeOutline, getResizeViaLocalTransformOnly, getRotation, getRotationAsDouble, getScale, getShadow, getShowHover, getShowResizeOutline, getSideResizeKnob, getStartArrow, getStartKnob, getSvgString, getTranslate, getXShearFactor, getYShearFactor, hide, hideAllKnobs, hideKnobs, hideKnobs, hover, isInBounds, isPointInPath, moveTo, rotateBy, rotateTo, scaleBy, scaleTo, setAttribute, setAttribute, setAutoChildConstructor, setAutoChildProperties, setAutoChildProperties, setAutoChildProperties, setAutoChildProperties, setAutoChildVisibility, setCanDrag, setCanHover, setCenterPoint, setContextMenu, setCursor, setDefaultProperties, setDragStartDistance, setDrawGroup, setDrawPane, setEditProxyConstructor, setEndArrow, setEventOpaque, setFillColor, setFillGradient, setFillGradient, setFillOpacity, setHoverDelay, setKeepInParentRect, setKeepInParentRect, setLineColor, setLineOpacity, setLinePattern, setLineWidth, setMoveKnobOffset, setMoveKnobPoint, setPrompt, setPropertyValue, setProportionalResizeModifiers, setProportionalResizing, setResizeKnobPoints, setResizeViaLocalTransformOnly, setRotation, setRotation, setScale, setShadow, setShowHover, setShowResizeOutline, setStartArrow, setTranslate, setXShearFactor, setYShearFactor, show, showAllKnobs, showKnobs, showKnobs, supportsEndArrow, supportsStartArrow`

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

      `applyFactoryProperties, asSGWTComponent, createJsObj, 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, getTestInstance, hasAutoAssignedID, internalSetID, internalSetID, isCreated, isFactoryCreated, onBind, onInit, registerID, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setConfig, setFactoryCreated, setID, setJavaScriptObject, 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

    - #### DrawTriangle

          public DrawTriangle()

    - #### DrawTriangle

          public DrawTriangle(JavaScriptObject jsObj)

  - ### Method Detail

    - #### getOrCreateRef

          public static DrawTriangle getOrCreateRef(JavaScriptObject jsObj)

    - #### create

          public JavaScriptObject create()

      Overrides:
        `create` in class `DrawPolygon`

    - #### setPoints

          public void setPoints(Point... points)

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

    - #### getPoints

          public Point[] getPoints()

      Array of points of the triangle.
      Overrides:
        `getPoints` in class `DrawPolygon`
      Returns:
        Point...

    - #### getCenter

          public Point getCenter()

      Get the incenter of the triangle.
      Overrides:
        `getCenter` in class `DrawPath`
      Returns:
        the incenter

    - #### resizeBy

          public void resizeBy(int dX,
                      int dY)

      Resize by the specified delta
      Overrides:
        `resizeBy` in class `DrawPath`
      Parameters:
        `dX` - number of pixels to resize by horizontally
        `dY` - number of pixels to resize by vertically