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:
    com.google.gwt.event.shared.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, configOnly, factoryCreated, factoryProperties, id, scClassName`

  - ### Constructor Summary

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

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `com.google.gwt.core.client.JavaScriptObject` | `create()`
    `Point` | `getCenter()` Returns the incenter of the triangle in `local coordinates`.
    `static DrawTriangle` | `getOrCreateRef(com.google.gwt.core.client.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, getShowTitleLabelBackground, getTitleRotationMode, setKnobs, setLineCap, setShowTitleLabelBackground, setTitleRotationMode`

    - ### 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, getTitle, getTitleLabel, getTitleLabelBackground, getTitleLabelPadding, 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, setShapeData, setShowHover, setShowResizeOutline, setStartArrow, setTitle, setTitleLabelPadding, 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, isConfigOnly, isCreated, isFactoryCreated, onBind, onInit, registerID, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setConfig, setConfigOnly, 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(com.google.gwt.core.client.JavaScriptObject jsObj)

  - ### Method Detail

    - #### getOrCreateRef

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

    - #### create

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

      Overrides:
        `create` in class `DrawPolygon`

    - #### setPoints

          public void setPoints(Point... points)

      Array of points of the triangle. specified in the `local coordinate system`.
      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. specified in the `local coordinate system`.
      Overrides:
        `getPoints` in class `DrawPolygon`
      Returns:
        Point...

    - #### getCenter

          public Point getCenter()

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

    - #### 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