1 19 20 package jxl.read.biff; 21 22 import common.Logger; 23 24 import jxl.biff.IntegerHelper; 25 import jxl.biff.RecordData; 26 27 30 public class RowRecord extends RecordData 31 { 32 35 private static Logger logger = Logger.getLogger(RowRecord.class); 36 37 40 private int rowNumber; 41 44 private int rowHeight; 45 48 private boolean collapsed; 49 52 private boolean defaultFormat; 53 56 private boolean matchesDefFontHeight; 57 60 private int xfIndex; 61 62 65 private static final int defaultHeightIndicator = 0xff; 66 67 72 RowRecord(Record t) 73 { 74 super(t); 75 76 byte[] data = getRecord().getData(); 77 rowNumber = IntegerHelper.getInt(data[0], data[1]); 78 rowHeight = IntegerHelper.getInt(data[6], data[7]); 79 80 int options = IntegerHelper.getInt(data[12], data[13], 81 data[14], data[15]); 82 83 collapsed = (options & 0x20) != 0; 84 matchesDefFontHeight = (options & 0x40) == 0; 85 defaultFormat = (options & 0x80) != 0; 86 xfIndex = (options & 0x0fff0000) >> 16; 87 } 88 89 94 boolean isDefaultHeight() 95 { 96 return rowHeight == defaultHeightIndicator; 97 } 98 99 104 public boolean matchesDefaultFontHeight() 105 { 106 return matchesDefFontHeight; 107 } 108 109 114 public int getRowNumber() 115 { 116 return rowNumber; 117 } 118 119 124 public int getRowHeight() 125 { 126 return rowHeight; 127 } 128 129 134 public boolean isCollapsed() 135 { 136 return collapsed; 137 } 138 139 144 public int getXFIndex() 145 { 146 return xfIndex; 147 } 148 149 154 public boolean hasDefaultFormat() 155 { 156 return defaultFormat; 157 } 158 } 159 160 161 | Popular Tags |