1 19 20 package jxl.write.biff; 21 22 import jxl.SheetSettings; 23 24 import jxl.biff.Type; 25 import jxl.biff.IntegerHelper; 26 import jxl.biff.WritableRecordData; 27 28 31 class Window2Record extends WritableRecordData 32 { 33 36 private byte[] data; 37 38 41 public Window2Record(SheetSettings settings) 42 { 43 super(Type.WINDOW2); 44 45 int selected = settings.isSelected() ? 0x06 : 0x0; 46 47 int options = 0; 48 49 options |= 0x0; 51 if (settings.getShowGridLines()) 52 { 53 options |= 0x02; 54 } 55 56 options |= 0x04; 58 options |= 0x0; 60 if (settings.getDisplayZeroValues()) 61 { 62 options |= 0x10; 63 } 64 65 options |= 0x20; 67 options |= 0x80; 69 if (settings.getHorizontalFreeze() != 0 || 71 settings.getVerticalFreeze() != 0) 72 { 73 options |= 0x08; 74 selected |= 0x01; 75 } 76 77 data = new byte[] 79 {(byte) options, 80 (byte) selected, 81 (byte) 0, 82 (byte) 0, 83 (byte) 0, 84 (byte) 0, 85 (byte) 0x40, 86 (byte) 0, 87 (byte) 0, 88 (byte) 0, 89 (byte) 0, 90 (byte) 0, 91 (byte) 0, 92 (byte) 0, 93 (byte) 0, 94 (byte) 0, 95 (byte) 0, 96 (byte) 0 }; 97 } 98 99 104 public byte[] getData() 105 { 106 return data; 107 } 108 } 109 | Popular Tags |