tw.idv.imacat.calcmosaic
Class SpreadsheetDocument

java.lang.Object
  extended by tw.idv.imacat.calcmosaic.SpreadsheetDocument

public class SpreadsheetDocument
extends java.lang.Object

A spreadsheet document.

Version:
0.1.0
Author:
imacat

Constructor Summary
SpreadsheetDocument(com.sun.star.lang.XComponent document)
          Creates a new instance of SpreadsheetDocument.
 
Method Summary
 void createMosaic(java.awt.image.BufferedImage image, int sheetIndex, java.lang.String sheetName)
          Creates a mosaic art spreadsheet from an image, with mosaic cell size calculated automatically.
 void createMosaic(java.awt.image.BufferedImage image, int sheetIndex, java.lang.String sheetName, int maxRows)
          Creates a mosaic art spreadsheet from an image, with mosaic cell size specified.
 void createMosaic(java.awt.image.BufferedImage image, int sheetIndex, java.lang.String sheetName, int maxRows, boolean isCleanUp)
          Creates a mosaic art spreadsheet from an image.
 void createMosaic(java.io.File file, int sheetIndex)
          Creates a mosaic art spreadsheet from an image file, with mosaic cell size calculated automatically.
 void createMosaic(java.io.File file, int sheetIndex, int maxRows)
          Creates a mosaic art spreadsheet from an image file, with mosaic cell size specified.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SpreadsheetDocument

public SpreadsheetDocument(com.sun.star.lang.XComponent document)
Creates a new instance of SpreadsheetDocument.

Parameters:
document - the document component
Method Detail

createMosaic

public void createMosaic(java.io.File file,
                         int sheetIndex)
                  throws java.io.IOException
Creates a mosaic art spreadsheet from an image file, with mosaic cell size calculated automatically.

Parameters:
file - the source image file
sheetIndex - the index of the mosaic spreadsheet
Throws:
java.io.IOException - when file couldn't be found or was corrupt

createMosaic

public void createMosaic(java.io.File file,
                         int sheetIndex,
                         int maxRows)
                  throws java.io.IOException
Creates a mosaic art spreadsheet from an image file, with mosaic cell size specified.

Parameters:
file - the source image file
sheetIndex - the index of the mosaic spreadsheet
maxRows - the maximum number of rows to use, 0 means to calculate automatically
Throws:
java.io.IOException - when file couldn't be found or was corrupt

createMosaic

public void createMosaic(java.awt.image.BufferedImage image,
                         int sheetIndex,
                         java.lang.String sheetName)
Creates a mosaic art spreadsheet from an image, with mosaic cell size calculated automatically.

Parameters:
image - the source image
sheetIndex - the index of the mosaic spreadsheet
sheetName - the name of the mosaic spreadsheet

createMosaic

public void createMosaic(java.awt.image.BufferedImage image,
                         int sheetIndex,
                         java.lang.String sheetName,
                         int maxRows)
Creates a mosaic art spreadsheet from an image, with mosaic cell size specified.

Parameters:
image - the source image
sheetIndex - the index of the mosaic spreadsheet
sheetName - the name of the mosaic spreadsheet
maxRows - the maximum number of rows to use, 0 means to calculate automatically

createMosaic

public void createMosaic(java.awt.image.BufferedImage image,
                         int sheetIndex,
                         java.lang.String sheetName,
                         int maxRows,
                         boolean isCleanUp)
Creates a mosaic art spreadsheet from an image.

Parameters:
image - the source image
sheetIndex - the index of the mosaic spreadsheet
sheetName - the name of the mosaic spreadsheet
maxRows - the maximum number of rows to use, 0 means to calculate automatically
isCleanUp - whether we should remove all the other existing spreadsheets