1 19 20 package jxl.write; 21 22 import java.io.IOException ; 23 24 import jxl.Workbook; 25 import jxl.Range; 26 import jxl.format.UnderlineStyle; 27 import jxl.format.Colour; 28 29 32 public abstract class WritableWorkbook 33 { 34 36 39 public static final WritableFont ARIAL_10_PT = 40 new WritableFont(WritableFont.ARIAL); 41 42 45 public static final WritableFont HYPERLINK_FONT = 46 new WritableFont(WritableFont.ARIAL, 47 WritableFont.DEFAULT_POINT_SIZE, 48 WritableFont.NO_BOLD, 49 false, 50 UnderlineStyle.SINGLE, 51 Colour.BLUE); 52 53 56 public static final WritableCellFormat NORMAL_STYLE = 57 new WritableCellFormat(ARIAL_10_PT, NumberFormats.DEFAULT); 58 59 62 public static final WritableCellFormat HYPERLINK_STYLE = 63 new WritableCellFormat(HYPERLINK_FONT); 64 65 68 public static final WritableCellFormat HIDDEN_STYLE = 69 new WritableCellFormat(new DateFormat(";;;")); 70 71 74 protected WritableWorkbook() 75 { 76 } 77 78 84 public abstract WritableSheet[] getSheets(); 85 86 91 public abstract String [] getSheetNames(); 92 93 101 public abstract WritableSheet getSheet(int index) 102 throws IndexOutOfBoundsException ; 103 104 110 public abstract WritableSheet getSheet(String name); 111 112 117 public abstract int getNumberOfSheets(); 118 119 127 public abstract void close() throws IOException , WriteException; 128 129 141 public abstract WritableSheet createSheet(String name, int index); 142 143 151 public abstract void copySheet(int s, String name, int index); 152 153 161 public abstract void copySheet(String s, String name, int index); 162 163 168 public abstract void removeSheet(int index); 169 170 178 public abstract WritableSheet moveSheet(int fromIndex, int toIndex); 179 180 184 public abstract void write() throws IOException ; 185 186 191 public abstract void setProtected(boolean prot); 192 193 201 public abstract void setColourRGB(Colour c, int r, int g, int b); 202 203 211 public void copy(Workbook w) 212 { 213 } 215 216 225 public abstract WritableCell findCellByName(String name); 226 227 241 public abstract Range[] findByName(String name); 242 243 248 public abstract String [] getRangeNames(); 249 250 260 public abstract void addNameArea(String name, 261 WritableSheet sheet, 262 int firstCol, 263 int firstRow, 264 int lastCol, 265 int lastRow); 266 267 268 276 public abstract void setOutputFile(java.io.File fileName) throws IOException ; 277 278 } 279 | Popular Tags |