Language
The Free and Open Productivity Suite
util
Class DrawTools
java.lang.Object
|
+--util.DrawTools
- public class DrawTools
- extends Object
contains helper methods for draw documents
Method Summary |
void |
addShape(XComponent oDoc,
int height,
int width,
int x,
int y,
String kind)
creates a XShape and adds it to the documents
first drawpage |
static XComponent |
createDrawDoc(XMultiServiceFactory xMSF)
Opens a new draw document
with arguments |
XShape |
createShape(XComponent oDoc,
int height,
int width,
int x,
int y,
String kind)
creates a XShape |
static XDrawPage |
getDrawPage(XComponent aDoc,
int nr)
gets the specified XDrawPage of a draw document |
static XDrawPages |
getDrawPages(XComponent aDoc)
gets the XDrawPages container of a draw document |
static XShapes |
getShapes(XDrawPage oDP)
gets the XShapes container of a draw page |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DrawTools
public DrawTools()
createDrawDoc
public static XComponent createDrawDoc(XMultiServiceFactory xMSF)
- Opens a new draw document
with arguments
- Parameters:
xMSF
- the MultiServiceFactory- Returns:
- the XComponent Interface of the document
getDrawPages
public static XDrawPages getDrawPages(XComponent aDoc)
- gets the XDrawPages container of a draw document
- Parameters:
aDoc
- the draw document- Returns:
- the XDrawpages container of the document
getDrawPage
public static XDrawPage getDrawPage(XComponent aDoc,
int nr)
- gets the specified XDrawPage of a draw document
- Parameters:
aDoc
- the draw documentnr
- the index of the DrawPage- Returns:
- the XDrawpage with index nr of the document
getShapes
public static XShapes getShapes(XDrawPage oDP)
- gets the XShapes container of a draw page
- Parameters:
oDP
- the draw page- Returns:
- the XDrawShape container of the drawpage
createShape
public XShape createShape(XComponent oDoc,
int height,
int width,
int x,
int y,
String kind)
- creates a XShape
- Parameters:
oDoc
- the documentheight
- the height of the shapewidth
- the width of the shapex
- the x-position of the shapey
- the y-position of the shapekind
- the kind of the shape ('Ellipse', 'Line' or 'Rectangle')- Returns:
- the created XShape
addShape
public void addShape(XComponent oDoc,
int height,
int width,
int x,
int y,
String kind)
- creates a XShape and adds it to the documents
first drawpage
- Parameters:
oDoc
- the documentheight
- the height of the shapewidth
- the width of the shapex
- the x-position of the shapey
- the y-position of the shapekind
- the kind of the shape ('Ellipse', 'Line' or 'Rectangle')- Returns:
- the created XShape