门店管理系统_代码.doc_第1页
门店管理系统_代码.doc_第2页
门店管理系统_代码.doc_第3页
门店管理系统_代码.doc_第4页
门店管理系统_代码.doc_第5页
已阅读5页,还剩58页未读 继续免费阅读

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

package jxl.biff.drawing;import common.Assert;import common.Logger;import java.io.IOException;import jxl.WorkbookSettings;import jxl.write.biff.File;Store management class ComboBox implements DrawingGroupObject private static Logger logger = Logger.getLogger(ComboBox.class); private EscherContainer readSpContainer; private EscherContainer spContainer; private MsoDrawingRecord msoDrawingRecord; private ObjRecord objRecord; private boolean initialized = false; private int objectId; private int blipId; private int shapeId; private int column; private int row; private double width; private double height; private int referenceCount; private EscherContainer escherData; private Origin origin; private DrawingGroup drawingGroup; private DrawingData drawingData; private ShapeType type; private int drawingNumber; private WorkbookSettings workbookSettings; Store management ComboBox(MsoDrawingRecord mso, ObjRecord obj, DrawingData dd, DrawingGroup dg, WorkbookSettings ws) this.drawingGroup = dg; this.msoDrawingRecord = mso; this.drawingData = dd; this.objRecord = obj; this.initialized = false; this.workbookSettings = ws; this.origin = Origin.READ; this.drawingData.addData(this.msoDrawingRecord.getData(); this.drawingNumber = (this.drawingData.getNumDrawings() - 1); this.drawingGroup.addDrawing(this); Assert.verify(mso != null) & (obj != null); initialize(); Store management ComboBox(DrawingGroupObject dgo, DrawingGroup dg, WorkbookSettings ws) ComboBox d = (ComboBox)dgo; Assert.verify(d.origin = Origin.READ); this.msoDrawingRecord = d.msoDrawingRecord; this.objRecord = d.objRecord; this.initialized = false; this.origin = Origin.READ; this.drawingData = d.drawingData; this.drawingGroup = dg; this.drawingNumber = d.drawingNumber; this.drawingGroup.addDrawing(this); this.workbookSettings = ws; Store management ComboBox() this.initialized = true; this.origin = Origin.WRITE; this.referenceCount = 1; this.type = ShapeType.HOST_CONTROL; private void initialize() this.readSpContainer = this.drawingData.getSpContainer(this.drawingNumber); Assert.verify(this.readSpContainer != null); EscherRecord children = this.readSpContainer.getChildren(); Sp sp = (Sp)this.readSpContainer.getChildren()0; this.objectId = this.objRecord.getObjectId(); this.shapeId = sp.getShapeId(); this.type = ShapeType.getType(sp.getShapeType(); if (this.type = ShapeType.UNKNOWN) logger.warn(Unknown shape type); ClientAnchor clientAnchor = null; for (int i = 0; (i children.length) & (clientAnchor = null); i+) if (childreni.getType() = EscherRecordType.CLIENT_ANCHOR) clientAnchor = (ClientAnchor)childreni; if (clientAnchor = null) logger.warn(Client anchor not found); else this.column = (int)clientAnchor.getX1(); this.row = (int)clientAnchor.getY1(); this.initialized = true; Store management final void setObjectId(int objid, int bip, int sid) this.objectId = objid; this.blipId = bip; this.shapeId = sid; if (this.origin = Origin.READ) this.origin = Origin.READ_WRITE; Store management final int getObjectId() if (!this.initialized) initialize(); return this.objectId; Store management final int getShapeId() if (!this.initialized) initialize(); return this.shapeId; Store management final int getBlipId() if (!this.initialized) initialize(); return this.blipId; Store management MsoDrawingRecord getMsoDrawingRecord() return this.msoDrawingRecord; Store management EscherContainer getSpContainer() if (!this.initialized) initialize(); if (this.origin = Origin.READ) return getReadSpContainer(); SpContainer spc = new SpContainer(); Sp sp = new Sp(this.type, this.shapeId, 2560); spc.add(sp); Opt opt = new Opt(); opt.addProperty(127, false, false, 17039620); opt.addProperty(191, false, false, 524296); opt.addProperty(511, false, false, 524288); opt.addProperty(959, false, false, 131072); spc.add(opt); ClientAnchor clientAnchor = new ClientAnchor(this.column, this.row, this.column + 1, this.row + 1); spc.add(clientAnchor); ClientData clientData = new ClientData(); spc.add(clientData); return spc; Store management void setDrawingGroup(DrawingGroup dg) this.drawingGroup = dg; Store management DrawingGroup getDrawingGroup() return this.drawingGroup; Store management Origin getOrigin() return this.origin; Store management int getReferenceCount() return this.referenceCount; Store management void setReferenceCount(int r) this.referenceCount = r; Store management double getX() if (!this.initialized) initialize(); return this.column; Store management void setX(double x) if (this.origin = Origin.READ) if (!this.initialized) initialize(); this.origin = Origin.READ_WRITE; this.column = (int)x); Store management double getY() if (!this.initialized) initialize(); return this.row; Store management void setY(double y) if (this.origin = Origin.READ) if (!this.initialized) initialize(); this.origin = Origin.READ_WRITE; this.row = (int)y); Store management double getWidth() if (!this.initialized) initialize(); return this.width; Store management void setWidth(double w) if (this.origin = Origin.READ) if (!this.initialized) initialize(); this.origin = Origin.READ_WRITE; this.width = w; Store management double getHeight() if (!this.initialized) initialize(); return this.height; Store management void setHeight(double h) if (this.origin = Origin.READ) if (!this.initialized) initialize(); this.origin = Origin.READ_WRITE; this.height = h; private EscherContainer getReadSpContainer() if (!this.initialized) initialize(); return this.readSpContainer; Store management byte getImageData() Assert.verify(this.origin = Origin.READ) | (this.origin = Origin.READ_WRITE); if (!this.initialized) initialize(); return this.drawingGroup.getImageData(this.blipId); Store management ShapeType getType() return this.type; Store management byte getImageBytes() Assert.verify(false); return null; Store management String getImageFilePath() Assert.verify(false); return null; Store management void writeAdditionalRecords(File outputFile) throws IOException if (this.origin = Origin.READ) outputFile.write(this.objRecord); return; ObjRecord objrec = new ObjRecord(this.objectId, ObjRecord.COMBOBOX); outputFile.write(objrec); Store management void writeTailRecords(File outputFile) Store management int getRow() return 0; Store management int getColumn() return 0; Store management int hashCode() return getClass().getName().hashCode(); Store management boolean isFirst() return this.msoDrawingRecord.isFirst(); Store management boolean isFormObject() return false; package jxl.biff.drawing;import common.Assert;import common.Logger;import java.io.IOException;import jxl.WorkbookSettings;import jxl.biff.ContinueRecord;import jxl.biff.IntegerHelper;import jxl.biff.StringHelper;import jxl.write.biff.File;Store management class Comment implements DrawingGroupObject private static Logger logger = Logger.getLogger(Comment.class); private EscherContainer readSpContainer; private EscherContainer spContainer; private MsoDrawingRecord msoDrawingRecord; private ObjRecord objRecord; private boolean initialized = false; private int objectId; private int blipId; private int shapeId; private int column; private int row; private double width; private double height; private int referenceCount; private EscherContainer escherData; private Origin origin; private DrawingGroup drawingGroup; private DrawingData drawingData; private ShapeType type; private int drawingNumber; private MsoDrawingRecord mso; private TextObjectRecord txo; private NoteRecord note; private ContinueRecord text; private ContinueRecord formatting; private String commentText; private WorkbookSettings workbookSettings; Store management Comment(MsoDrawingRecord msorec, ObjRecord obj, DrawingData dd, DrawingGroup dg, WorkbookSettings ws) this.drawingGroup = dg; this.msoDrawingRecord = msorec; this.drawingData = dd; this.objRecord = obj; this.initialized = false; this.workbookSettings = ws; this.origin = Origin.READ; this.drawingData.addData(this.msoDrawingRecord.getData(); this.drawingNumber = (this.drawingData.getNumDrawings() - 1); this.drawingGroup.addDrawing(this); Assert.verify(this.msoDrawingRecord != null) & (this.objRecord != null); if (!this.initialized) initialize(); Store management Comment(DrawingGroupObject dgo, DrawingGroup dg, WorkbookSettings ws) Comment d = (Comment)dgo; Assert.verify(d.origin = Origin.READ); this.msoDrawingRecord = d.msoDrawingRecord; this.objRecord = d.objRecord; this.initialized = false; this.origin = Origin.READ; this.drawingData = d.drawingData; this.drawingGroup = dg; this.drawingNumber = d.drawingNumber; this.drawingGroup.addDrawing(this); this.mso = d.mso; this.txo = d.txo; this.text = d.text; this.formatting = d.formatting; this.note = d.note; this.width = d.width; this.height = d.height; this.workbookSettings = ws; Store management Comment(String txt, int c, int r) this.initialized = true; this.origin = Origin.WRITE; this.column = c; this.row = r; this.referenceCount = 1; this.type = ShapeType.TEXT_BOX; mentText = txt; this.width = 3.0D; this.height = 4.0D; private void initialize() this.readSpContainer = this.drawingData.getSpContainer(this.drawingNumber); Assert.verify(this.readSpContainer != null); EscherRecord children = this.readSpContainer.getChildren(); Sp sp = (Sp)this.readSpContainer.getChildren()0; this.objectId = this.objRecord.getObjectId(); this.shapeId = sp.getShapeId(); this.type = ShapeType.getType(sp.getShapeType(); if (this.type = ShapeType.UNKNOWN) logger.warn(Unknown shape type); ClientAnchor clientAnchor = null; for (int i = 0; (i children.length) & (clientAnchor = null); i+) if (childreni.getType() = EscherRecordType.CLIENT_ANCHOR) clientAnchor = (ClientAnchor)childreni; if (clientAnchor = null) logger.warn(client anchor not found); else this.column = (int)clientAnchor.getX1() - 1); this.row = (int)clientAnchor.getY1() + 1); this.width = (clientAnchor.getX2() - clientAnchor.getX1(); this.height = (clientAnchor.getY2() - clientAnchor.getY1(); this.initialized = true; Store management final void setObjectId(int objid, int bip, int sid) this.objectId = objid; this.blipId = bip; this.shapeId = sid; if (this.origin = Origin.READ) this.origin = Origin.READ_WRITE; Store management final int getObjectId() if (!this.initialized) initialize(); return this.objectId; Store management final int getShapeId() if (!this.initialized) initialize(); return this.shapeId; Store management final int getBlipId() if (!this.initialized) initialize(); return this.blipId; Store management MsoDrawingRecord getMsoDrawingRecord() return this.msoDrawingRecord; Store management EscherContainer getSpContainer() if (!this.initialized) initialize(); if (this.origin = Origin.READ) return getReadSpContainer(); if (this.spContainer = null) this.spContainer = new SpContainer(); Sp sp = new Sp(this.type, this.shapeId, 2560); this.spContainer.add(sp); Opt opt = new Opt(); opt.addProperty(344, false, false, 0); opt.addProperty(385, false, false, 134217808); opt.addProperty(387, false, false, 134217808); opt.addProperty(959, false, false, 131074); this.spContainer.add(opt); ClientAnchor clientAnchor = new ClientAnchor(this.column + 1.3D, Math.max(0.0D, this.row - 0.6D), this.column + 1.3D + this.width, this.row + this.height); this.spContainer.add(clientAnchor); ClientData clientData = new ClientData(); this.spContainer.add(clientData); ClientTextBox clientTextBox = new ClientTextBox(); this.spContainer.add(clientTextBox); return this.spContainer; Store management void setDrawingGroup(DrawingGroup dg) this.drawingGroup = dg; Store management DrawingGroup getDrawingGroup() return this.drawingGroup; Store management Origin getOrigin() return this.origin; Store management int getReferenceCount() return this.referenceCount; Store management void setReferenceCount(int r) this.referenceCount = r; Store management double getX() if (!this.initialized) initialize(); return this.column; Store management void setX(double x) if (this.origin = Origin.READ) if (!this.initialized) initialize(); this.origin = Origin.READ_WRITE; this.column = (int)x); Store management double getY() if (!this.initialized) initialize(); return this.row; Store management void setY(double y) if (this.origin = Origin.READ) if (!this.initialized) initialize(); this.origin = Origin.READ_WRITE; this.row = (int)y); Store management double getWidth() if (!this.initialized) initialize(); return this.width; Store management void setWidth(double w) if (this.origin = Origin.READ) if (!this.initialized) initialize(); this.origin = Origin.READ_WRITE; this.width = w; Store management double getHeight() if (!this.initialized) initialize(); return this.height; Store management void setHeight(double h) if (this.origin = Origin.READ) if (!this.initialized) initialize(); this.origin = Origin.READ_WRITE; this.height = h; private EscherContainer getReadSpContainer() if (!this.initialized) initialize(); return this.readSpContainer; Store management byte getImageData() Assert.verify(this.origin = Origin.READ) | (this.origin = Origin.READ_WRITE); if (!this.initialized) initialize(); return this.drawingGroup.getImageData(this.blipId); Store management ShapeType getType() return this.type; Store management void setTextObject(TextObjectRecord t) this.txo = t; Store management void setNote(NoteRecord t) this.note = t; Store management void setText(ContinueRecord t) this.text = t; Store management void setFormatting(ContinueRecord t) this.formatting = t; Store management byte getImageBytes() Assert.verify(false); return null; Store management String getImageFilePath() Assert.verify(false); return null; Store management void addMso(MsoDrawingRecord d) this.mso = d; this.drawingData.addRawData(this.mso.getData(); Store management void writeAdditionalRecords(File outputFile) throws IOException if (this.origin = Origin.READ) outputFile.write(this.objRecord); if (this.mso != null) outputFile.write(this.mso); outputFile.write(this.txo); outputFile.write(this.text); if (this.formatting != null) outputFile.write(this.formatting); return; ObjRecord objrec = new ObjRecord(this.objectId, ObjRecord.EXCELNOTE); outputFile.w

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论