1 2 17 18 19 package org.apache.poi.hwpf.usermodel; 20 21 import org.apache.poi.util.BitField; 22 import org.apache.poi.util.LittleEndian; 23 24 public class ShadingDescriptor 25 implements Cloneable 26 { 27 public static final int SIZE = 2; 28 29 private short _info; 30 private final static BitField _icoFore = new BitField(0x1f); 31 private final static BitField _icoBack = new BitField(0x3e0); 32 private final static BitField _ipat = new BitField(0xfc00); 33 34 public ShadingDescriptor() 35 { 36 } 37 38 public ShadingDescriptor(byte[] buf, int offset) 39 { 40 this(LittleEndian.getShort(buf, offset)); 41 } 42 43 public ShadingDescriptor(short info) 44 { 45 _info = info; 46 } 47 48 public short toShort() 49 { 50 return _info; 51 } 52 53 public void serialize(byte[] buf, int offset) 54 { 55 LittleEndian.putShort(buf, offset, _info); 56 } 57 58 public Object clone() 59 throws CloneNotSupportedException 60 { 61 return super.clone(); 62 } 63 } 64 | Popular Tags |