/** * Constructs a brand new comment atom record. */ protected Comment2000Atom() { _header = new byte[8]; _data = new byte[28]; LittleEndian.putShort(_header, 2, (short)getRecordType()); LittleEndian.putInt(_header, 4, _data.length); // It is fine for the other values to be zero }
@Override public Date getDate() { return _comment2000.getComment2000Atom().getDate(); }
@Override public Point2D getOffset() { final double x = Units.masterToPoints(_comment2000.getComment2000Atom().getXOffset()); final double y = Units.masterToPoints(_comment2000.getComment2000Atom().getYOffset()); return new Point2D.Double(x, y); }
@Override public void setOffset(Point2D offset) { final int x = Units.pointsToMaster(offset.getX()); final int y = Units.pointsToMaster(offset.getY()); _comment2000.getComment2000Atom().setXOffset(x); _comment2000.getComment2000Atom().setYOffset(y); } }
/** * Create a new Comment2000, with blank fields */ public Comment2000() { _header = new byte[8]; _children = new Record[4]; // Setup our header block _header[0] = 0x0f; // We are a container record LittleEndian.putShort(_header, 2, (short)_type); // Setup our child records CString csa = new CString(); CString csb = new CString(); CString csc = new CString(); csa.setOptions(0x00); csb.setOptions(0x10); csc.setOptions(0x20); _children[0] = csa; _children[1] = csb; _children[2] = csc; _children[3] = new Comment2000Atom(); findInterestingChildren(); }
@Override public void setDate(Date date) { _comment2000.getComment2000Atom().setDate(date); }
/** * Create a new Comment2000, with blank fields */ public Comment2000() { _header = new byte[8]; _children = new Record[4]; // Setup our header block _header[0] = 0x0f; // We are a container record LittleEndian.putShort(_header, 2, (short)_type); // Setup our child records CString csa = new CString(); CString csb = new CString(); CString csc = new CString(); csa.setOptions(0x00); csb.setOptions(0x10); csc.setOptions(0x20); _children[0] = csa; _children[1] = csb; _children[2] = csc; _children[3] = new Comment2000Atom(); findInterestingChildren(); }
/** * Constructs a brand new comment atom record. */ protected Comment2000Atom() { _header = new byte[8]; _data = new byte[28]; LittleEndian.putShort(_header, 2, (short)getRecordType()); LittleEndian.putInt(_header, 4, _data.length); // It is fine for the other values to be zero }