com.f1j.drawing
Interface DrawingModel

All Known Subinterfaces:
DrawingModel

public interface DrawingModel
extends AutoShapeTypes, ShapeTypes, Drawing, Lockable

This interface defines the common drawing API.


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
 Shape addPicture(byte[] data, ShapeAnchor shapeAnchor)
          Adds a new picture to the drawing.
 Shape addPicture(java.io.InputStream input, ShapeAnchor shapeAnchor)
          Adds a new picture to the drawing.
 Shape addShape(EAutoShape eShape, ShapeAnchor shapeAnchor)
          Adds a new AutoShape to the drawing.
 void cancelDrawingMode()
          Cancels any user drawing mode.
 boolean canEditCopy()
          Returns whether an edit copy operation can be performed.
 boolean canEditCut()
          Returns whether an edit cut operation can be performed.
 boolean canEditPaste()
          Returns whether an edit paste operation can be performed.
 void clearSelection()
          Clears the selection.
 void drawShape(EAutoShape eShape)
          Initiates a drawing mode for the user to manually draw an AutoShape.
 void editCopy()
          Copies the selected shapes or text from a text box.
 void editCut()
          Cuts the selected shapes or text from a text box.
 void editPaste()
          Pastes data from the clipboard.
 EAutoShape getDrawingModeShape()
          If the current user drawing mode is eAutoShape, returns the shape type.
 EShape getDrawingModeType()
          Returns the type of the current user drawing mode.
 ShapeRange getSelectedShapes()
          Returns the current selection.
 Shape groupShapes(ShapeRange shapes)
          Groups shapes together into a grouped shape.
 boolean isAllowNewShapes()
          Returns true if it is currently possible to add new shapes to the drawing.
 boolean isDrawingMode()
          Returns true if currently in a user drawing mode.
 boolean isSelectionMode()
          Returns true if the drawing is in shape selection mode.
 Shape regroupShapes(ShapeRange shapeRange)
          Regroups shapes together that had been previously ungrouped.
 void setSelection(Shape shape)
          Sets the selection to a particular shape.
 void setSelection(ShapeRange shapes)
          Sets the selection to a particular shape range.
 void setSelectionMode(boolean bSelectionMode)
          Activates or deactivates shape selection mode.
 void ungroupShapes(ShapeRange shapeRange)
          Ungroups shapes.
 
Methods inherited from interface com.f1j.drawing.Drawing
findShape, findShapes, getAllShapes, getShape, getShapeCount
 

Method Detail

addShape

public Shape addShape(EAutoShape eShape,
                      ShapeAnchor shapeAnchor)
               throws AccessDeniedException,
                      F1Exception
Adds a new AutoShape to the drawing.
Parameters:
eShape - An enumerated value defined in the AutoShapeTypes interface.
shapeAnchor - An interface to a client-defined object specifying the position and size of the shape.
Returns:
the new shape object.
Specified by:
addShape in interface Drawing

addPicture

public Shape addPicture(byte[] data,
                        ShapeAnchor shapeAnchor)
                 throws AccessDeniedException,
                        F1Exception
Adds a new picture to the drawing.
Parameters:
data - Image data
shapeAnchor - An interface to a client-defined object specifying the position and size of the shape.
Returns:
the new picture.
Specified by:
addPicture in interface Drawing

addPicture

public Shape addPicture(java.io.InputStream input,
                        ShapeAnchor shapeAnchor)
                 throws AccessDeniedException,
                        F1Exception
Adds a new picture to the drawing.
Parameters:
input - Input stream containing image data
shapeAnchor - An interface to a client-defined object specifying the position and size of the shape.
Returns:
the new picture.
Specified by:
addPicture in interface Drawing

cancelDrawingMode

public void cancelDrawingMode()
Cancels any user drawing mode.
See Also:
drawShape(com.f1j.drawing.EAutoShape), isDrawingMode()

canEditCut

public boolean canEditCut()
Returns whether an edit cut operation can be performed.
Returns:
whether an edit cut operation can be performed.

canEditCopy

public boolean canEditCopy()
Returns whether an edit copy operation can be performed.
Returns:
whether an edit copy operation can be performed.

canEditPaste

public boolean canEditPaste()
Returns whether an edit paste operation can be performed.
Returns:
whether an edit paste operation can be performed.

clearSelection

public void clearSelection()
Clears the selection.

drawShape

public void drawShape(EAutoShape eShape)
               throws AccessDeniedException,
                      F1Exception
Initiates a drawing mode for the user to manually draw an AutoShape.
Parameters:
eShape - An enumerated value defined in the AutoShapeTypes interface.
See Also:
cancelDrawingMode(), isDrawingMode(), getDrawingModeType(), getDrawingModeShape()

editCut

public void editCut()
             throws AccessDeniedException,
                    F1Exception
Cuts the selected shapes or text from a text box.

editCopy

public void editCopy()
              throws F1Exception
Copies the selected shapes or text from a text box.

editPaste

public void editPaste()
               throws AccessDeniedException,
                      F1Exception
Pastes data from the clipboard.

groupShapes

public Shape groupShapes(ShapeRange shapes)
                  throws AccessDeniedException,
                         F1Exception
Groups shapes together into a grouped shape.
Parameters:
shapes - The shapes to group.
Returns:
the new grouped shape.

isAllowNewShapes

public boolean isAllowNewShapes()
Returns true if it is currently possible to add new shapes to the drawing.
Returns:
true if new shapes can be added to the drawing; otherwise false.

isDrawingMode

public boolean isDrawingMode()
Returns true if currently in a user drawing mode.
Returns:
true if currently in a user drawing mode; otherwise false.
See Also:
drawShape(com.f1j.drawing.EAutoShape), getDrawingModeType(), cancelDrawingMode()

getDrawingModeShape

public EAutoShape getDrawingModeShape()
                               throws F1Exception
If the current user drawing mode is eAutoShape, returns the shape type.
Returns:
An enumerated value defined in the AutoShapeTypes interface. If not currently in the eAutoShape user drawing mode, the return value is <0.
See Also:
drawShape(com.f1j.drawing.EAutoShape), isDrawingMode(), getDrawingModeType(), cancelDrawingMode()

getDrawingModeType

public EShape getDrawingModeType()
                          throws F1Exception
Returns the type of the current user drawing mode.
Returns:
An enumerated value defined in the ShapeTypes interface. If not currently in a user drawing mode, the return value is <0.
See Also:
drawShape(com.f1j.drawing.EAutoShape), isDrawingMode(), cancelDrawingMode()

getSelectedShapes

public ShapeRange getSelectedShapes()
Returns the current selection.
Returns:
a ShapeRange interface representing the current selection.

isSelectionMode

public boolean isSelectionMode()
Returns true if the drawing is in shape selection mode. In shape selection mode, the selection of shapes takes precedence over any mouse operations in the client application.
Returns:
true if in shape selection mode; otherwise false.
See Also:
setSelectionMode(boolean)

regroupShapes

public Shape regroupShapes(ShapeRange shapeRange)
                    throws AccessDeniedException,
                           F1Exception
Regroups shapes together that had been previously ungrouped.
Parameters:
shapeRange - The shapes to regroup.
Returns:
the new grouped shape.

setSelection

public void setSelection(Shape shape)
                  throws AccessDeniedException,
                         F1Exception
Sets the selection to a particular shape.
Parameters:
shape - The shape to select.

setSelection

public void setSelection(ShapeRange shapes)
                  throws AccessDeniedException,
                         F1Exception
Sets the selection to a particular shape range.
Parameters:
shapes - The shapes to select.

setSelectionMode

public void setSelectionMode(boolean bSelectionMode)
Activates or deactivates shape selection mode. In shape selection mode, the selection of shapes takes precedence over any mouse operations in the client application.
Parameters:
bSelectionMode - true to activate shape selection mode; false to deactivate.
See Also:
isSelectionMode()

ungroupShapes

public void ungroupShapes(ShapeRange shapeRange)
                   throws AccessDeniedException,
                          F1Exception
Ungroups shapes.
Parameters:
shapeRange - The shapes to ungroup.