com.f1j.ss
Interface DrawingModel


public interface DrawingModel
extends DrawingModel

This interface defines the drawing API with spreadsheet extensions.


Fields inherited from class com.f1j.drawing.AutoShapeTypes
eShapeLine, eShapeOval, eShapeRectangle, eShapeTextBox
 
Fields inherited from class com.f1j.drawing.ShapeTypes
eAutoShape, eFormControl, eGroup, ePicture
 
Method Summary
 FcChart addChart(ShapeAnchor shapeAnchor)
          Adds a new chart control to the drawing.
 Shape addFormControl(EFormControl eType, ShapeAnchor shapeAnchor)
          Adds a new form control to the drawing.
 ShapeAnchor createShapeAnchor(double left, double top, double right, double bottom)
          Creates a shape anchor with the specified coordinates.
 void drawFormControl(EFormControl eType)
          Initiates a drawing mode for the user to manually draw a form control.
 EFormControl getDrawingModeFormControl()
          If the current user drawing mode is eFormControl, returns the control type.
 
Methods inherited from interface com.f1j.drawing.DrawingModel
addPicture, addPicture, addShape, cancelDrawingMode, canEditCopy, canEditCut, canEditPaste, clearSelection, drawShape, editCopy, editCut, editPaste, getDrawingModeShape, getDrawingModeType, getSelectedShapes, groupShapes, isAllowNewShapes, isDrawingMode, isSelectionMode, regroupShapes, setSelection, setSelection, setSelectionMode, ungroupShapes
 
Methods inherited from interface com.f1j.drawing.Drawing
findShape, findShapes, getAllShapes, getShape, getShapeCount
 

Method Detail

addChart

public FcChart addChart(ShapeAnchor shapeAnchor)
                 throws AccessDeniedException
Adds a new chart control to the drawing. The chart data will be linked to the current range selection.
Parameters:
shapeAnchor - An interface to a client-defined object specifying the position and size of the control.
Returns:
the new control object.
Throws:
AccessDeniedException - if the sheet is protected.

addFormControl

public Shape addFormControl(EFormControl eType,
                            ShapeAnchor shapeAnchor)
                     throws AccessDeniedException
Adds a new form control to the drawing.
Parameters:
eType - An enumerated value defined in the FormControlTypes interface.
shapeAnchor - An interface to a client-defined object specifying the position and size of the control.
Returns:
the new control object.
Throws:
AccessDeniedException - if the sheet is protected.

createShapeAnchor

public ShapeAnchor createShapeAnchor(double left,
                                     double top,
                                     double right,
                                     double bottom)
Creates a shape anchor with the specified coordinates.
Parameters:
left - left position. The whole part of the value is the column containing the left side, and the fractional part of the value is the position of the left side within that column.
top - top position. The whole part of the value is the row containing the top side, and the fractional part of the value is the position of the top side within that row.
right - right position. The whole part of the value is the column containing the right side, and the fractional part of the value is the position of the right side within that column.
bottom - bottom position. The whole part of the value is the row containing the bottom side, and the fractional part of the value is the position of the bottom side within that row.
Returns:
the ShapeAnchor.

drawFormControl

public void drawFormControl(EFormControl eType)
                     throws AccessDeniedException
Initiates a drawing mode for the user to manually draw a form control.
Parameters:
eType - An enumerated value defined in the FormControlTypes interface.
Throws:
AccessDeniedException - if the sheet is protected.
See Also:
DrawingModel.cancelDrawingMode(), DrawingModel.isDrawingMode(), DrawingModel.getDrawingModeType(), getDrawingModeFormControl()

getDrawingModeFormControl

public EFormControl getDrawingModeFormControl()
                                       throws F1Exception
If the current user drawing mode is eFormControl, returns the control type.
Returns:
An enumerated value defined in the FormControlTypes interface. If not currently in the eFormControl user drawing mode, the return value is <0.
Throws:
F1Exception - if an error occurs.
See Also:
drawFormControl(com.f1j.ss.EFormControl), DrawingModel.isDrawingMode(), DrawingModel.getDrawingModeType(), DrawingModel.cancelDrawingMode()