com.smartgwt.client.widgets.drawing
Class DrawSector

java.lang.Object
  extended by com.smartgwt.client.core.BaseClass
      extended by com.smartgwt.client.widgets.drawing.DrawItem
          extended by com.smartgwt.client.widgets.drawing.DrawSector
All Implemented Interfaces:
HasHandlers, HasClickHandlers, HasDragMoveHandlers, HasDragStartHandlers, HasDragStopHandlers, HasMouseDownHandlers, HasMouseMoveHandlers, HasMouseOutHandlers, HasMouseOverHandlers, HasMouseUpHandlers, HasMovedHandlers, HasResizedHandlers, HasShowContextMenuHandlers

public class DrawSector
extends DrawItem

DrawItem subclass to render Pie Slices.


Field Summary
 
Fields inherited from class com.smartgwt.client.core.BaseClass
config, id, scClassName
 
Constructor Summary
DrawSector()
           
DrawSector(JavaScriptObject jsObj)
           
 
Method Summary
 JavaScriptObject create()
           
 Point getCenterPoint()
          Center point of the sector
 float getEndAngle()
          end angle of the sector
static DrawSector getOrCreateRef(JavaScriptObject jsObj)
           
 int getRadius()
          Radius of the sector.
 float getStartAngle()
          start angle of the sector
 void moveBy(int x, int y)
          Move the drawSector to the specified position.
 void moveTo(int x, int y)
          Move the drawSector by the specified delta
 void resizeBy(int dX, int dY)
          Resize by the specified delta.
 void setCenterPoint(Point centerPoint)
          Center point of the sector

If this method is called after the component has been drawn/initialized: Change the center point for this sector.
 void setEndAngle(float endAngle)
          end angle of the sector
 void setJavaScriptObject(JavaScriptObject jsObj)
           
 void setRadius(int radius)
          Radius of the sector.
 void setStartAngle(float startAngle)
          start angle of the sector
 
Methods inherited from class com.smartgwt.client.widgets.drawing.DrawItem
addClickHandler, addDragMoveHandler, addDragStartHandler, addDragStopHandler, addMouseDownHandler, addMouseMoveHandler, addMouseOutHandler, addMouseOverHandler, addMouseUpHandler, addMovedHandler, addResizedHandler, addShowContextMenuHandler, computeAngle, convertToDrawItemArray, destroy, draw, erase, getAttributeAsIntArray, getBoundingBox, getCanDrag, getCenter, getContextMenu, getDestroyed, getDestroying, getDragStartDistance, getDrawGroup, getDrawPane, getEndArrow, getFillColor, getFillGradient, getFillOpacity, getKnobs, getLineCap, getLineColor, getLineOpacity, getLinePattern, getLineWidth, getMoveKnobOffset, getMoveKnobPoint, getPageLeft, getPageTop, getRef, getResizeKnobPoints, getRotation, getScale, getShadow, getStartArrow, getSvgString, hide, hideKnobs, isInBounds, isPointInPath, resizeTo, rotateBy, rotateTo, scaleBy, scaleTo, setCanDrag, setContextMenu, setDragStartDistance, setDrawGroup, setDrawPane, setEndArrow, setFillColor, setFillGradient, setFillOpacity, setKnobs, setLineCap, setLineColor, setLineOpacity, setLinePattern, setLineWidth, setMoveKnobOffset, setMoveKnobPoint, setResizeKnobPoints, setRotation, setScale, setShadow, setStartArrow, show, showKnobs
 
Methods inherited from class com.smartgwt.client.core.BaseClass
doAddHandler, error, error, errorIfNotCreated, fireEvent, getAttribute, getAttributeAsBoolean, getAttributeAsDate, getAttributeAsDouble, getAttributeAsElement, getAttributeAsFloat, getAttributeAsInt, getAttributeAsJavaScriptObject, getAttributeAsMap, getAttributeAsString, getAttributeAsStringArray, getConfig, getHandlerCount, getID, getJsObj, getOrCreateJsObj, getScClassName, isCreated, onInit, 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

DrawSector

public DrawSector()

DrawSector

public DrawSector(JavaScriptObject jsObj)
Method Detail

getOrCreateRef

public static DrawSector getOrCreateRef(JavaScriptObject jsObj)

setJavaScriptObject

public void setJavaScriptObject(JavaScriptObject jsObj)
Overrides:
setJavaScriptObject in class DrawItem

create

public JavaScriptObject create()
Overrides:
create in class DrawItem

setCenterPoint

public void setCenterPoint(Point centerPoint)
Center point of the sector

If this method is called after the component has been drawn/initialized: Change the center point for this sector.

Parameters:
centerPoint - left coordinate. Default value is [0,0]

getCenterPoint

public Point getCenterPoint()
Center point of the sector

Returns:
Point

setEndAngle

public void setEndAngle(float endAngle)
                 throws IllegalStateException
end angle of the sector

Parameters:
endAngle - endAngle Default value is 20.0
Throws:
IllegalStateException - this property cannot be changed after the underlying component has been created

getEndAngle

public float getEndAngle()
end angle of the sector

Returns:
float

setRadius

public void setRadius(int radius)
               throws IllegalStateException
Radius of the sector.

Parameters:
radius - radius Default value is 100
Throws:
IllegalStateException - this property cannot be changed after the underlying component has been created

getRadius

public int getRadius()
Radius of the sector.

Returns:
int

setStartAngle

public void setStartAngle(float startAngle)
                   throws IllegalStateException
start angle of the sector

Parameters:
startAngle - startAngle Default value is 0.0
Throws:
IllegalStateException - this property cannot be changed after the underlying component has been created

getStartAngle

public float getStartAngle()
start angle of the sector

Returns:
float

moveBy

public void moveBy(int x,
                   int y)
Move the drawSector to the specified position.

Overrides:
moveBy in class DrawItem
Parameters:
x - number of pixels to move by horizontally
y - number of pixels to move by vertically

moveTo

public void moveTo(int x,
                   int y)
Move the drawSector by the specified delta

Parameters:
x - coordinate to move to horizontally
y - coordinate to move to vertically

resizeBy

public void resizeBy(int dX,
                     int dY)
Resize by the specified delta. Note that the resize delta will be applied to each point.

Overrides:
resizeBy in class DrawItem
Parameters:
dX - number of pixels to resize by horizontally
dY - number of pixels to resize by vertically