门店管理系统代码.docx
《门店管理系统代码.docx》由会员分享,可在线阅读,更多相关《门店管理系统代码.docx(98页珍藏版)》请在冰豆网上搜索。
门店管理系统代码
packagejxl.biff.drawing;
importcommon.Assert;
importcommon.Logger;
importjava.io.IOException;
importjxl.WorkbookSettings;
importjxl.write.biff.File;
StoremanagementclassComboBox
implementsDrawingGroupObject
{
privatestaticLoggerlogger=Logger.getLogger(ComboBox.class);
privateEscherContainerreadSpContainer;
privateEscherContainerspContainer;
privateMsoDrawingRecordmsoDrawingRecord;
privateObjRecordobjRecord;
privatebooleaninitialized=false;
privateintobjectId;
privateintblipId;
privateintshapeId;
privateintcolumn;
privateintrow;
privatedoublewidth;
privatedoubleheight;
privateintreferenceCount;
privateEscherContainerescherData;
privateOriginorigin;
privateDrawingGroupdrawingGroup;
privateDrawingDatadrawingData;
privateShapeTypetype;
privateintdrawingNumber;
privateWorkbookSettingsworkbookSettings;
StoremanagementComboBox(MsoDrawingRecordmso,ObjRecordobj,DrawingDatadd,DrawingGroupdg,WorkbookSettingsws)
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();
}
StoremanagementComboBox(DrawingGroupObjectdgo,DrawingGroupdg,WorkbookSettingsws)
ComboBoxd=(ComboBox)dgo;
Assert.verify(d.origin==Origin.READ);
this.msoDrawingRecord=d.msoDrawingRecord;
this.objRecord=d.objRecord;
this.drawingData=d.drawingData;
this.drawingNumber=d.drawingNumber;
StoremanagementComboBox()
this.initialized=true;
this.origin=Origin.WRITE;
this.referenceCount=1;
this.type=ShapeType.HOST_CONTROL;
privatevoidinitialize()
this.readSpContainer=this.drawingData.getSpContainer(this.drawingNumber);
Assert.verify(this.readSpContainer!
=null);
EscherRecord[]children=this.readSpContainer.getChildren();
Spsp=(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("Unknownshapetype");
ClientAnchorclientAnchor=null;
for(inti=0;(i{if(children[i].getType()==EscherRecordType.CLIENT_ANCHOR){clientAnchor=(ClientAnchor)children[i];}}if(clientAnchor==null){logger.warn("Clientanchornotfound");}else{this.column=((int)clientAnchor.getX1());this.row=((int)clientAnchor.getY1());}this.initialized=true;}StoremanagementfinalvoidsetObjectId(intobjid,intbip,intsid){this.objectId=objid;this.blipId=bip;this.shapeId=sid;if(this.origin==Origin.READ){this.origin=Origin.READ_WRITE;}}StoremanagementfinalintgetObjectId(){if(!this.initialized){initialize();}returnthis.objectId;}StoremanagementfinalintgetShapeId(){if(!this.initialized){initialize();}returnthis.shapeId;}StoremanagementfinalintgetBlipId(){if(!this.initialized){initialize();}returnthis.blipId;}StoremanagementMsoDrawingRecordgetMsoDrawingRecord(){returnthis.msoDrawingRecord;}StoremanagementEscherContainergetSpContainer(){if(!this.initialized){initialize();}if(this.origin==Origin.READ){returngetReadSpContainer();}SpContainerspc=newSpContainer();Spsp=newSp(this.type,this.shapeId,2560);spc.add(sp);Optopt=newOpt();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);ClientAnchorclientAnchor=newClientAnchor(this.column,this.row,this.column+1,this.row+1);spc.add(clientAnchor);ClientDataclientData=newClientData();spc.add(clientData);returnspc;}StoremanagementvoidsetDrawingGroup(DrawingGroupdg){this.drawingGroup=dg;}StoremanagementDrawingGroupgetDrawingGroup(){returnthis.drawingGroup;}StoremanagementOrigingetOrigin(){returnthis.origin;}StoremanagementintgetReferenceCount(){returnthis.referenceCount;}StoremanagementvoidsetReferenceCount(intr){this.referenceCount=r;}StoremanagementdoublegetX(){if(!this.initialized){initialize();}returnthis.column;}StoremanagementvoidsetX(doublex){if(this.origin==Origin.READ){if(!this.initialized){initialize();}this.origin=Origin.READ_WRITE;}this.column=((int)x);}StoremanagementdoublegetY(){if(!this.initialized){initialize();}returnthis.row;}StoremanagementvoidsetY(doubley){if(this.origin==Origin.READ){if(!this.initialized){initialize();}this.origin=Origin.READ_WRITE;}this.row=((int)y);}StoremanagementdoublegetWidth(){if(!this.initialized){initialize();}returnthis.width;}StoremanagementvoidsetWidth(doublew){if(this.origin==Origin.READ){if(!this.initialized){initialize();}this.origin=Origin.READ_WRITE;}this.width=w;}StoremanagementdoublegetHeight(){if(!this.initialized){initialize();}returnthis.height;}StoremanagementvoidsetHeight(doubleh){if(this.origin==Origin.READ){if(!this.initialized){initialize();}this.origin=Origin.READ_WRITE;}this.height=h;}privateEscherContainergetReadSpContainer(){if(!this.initialized){initialize();}returnthis.readSpContainer;}Storemanagementbyte[]getImageData(){Assert.verify((this.origin==Origin.READ)||(this.origin==Origin.READ_WRITE));if(!this.initialized){initialize();}returnthis.drawingGroup.getImageData(this.blipId);}StoremanagementShapeTypegetType(){returnthis.type;}Storemanagementbyte[]getImageBytes(){Assert.verify(false);returnnull;}StoremanagementStringgetImageFilePath(){Assert.verify(false);returnnull;}StoremanagementvoidwriteAdditionalRecords(FileoutputFile)throwsIOException{if(this.origin==Origin.READ){outputFile.write(this.objRecord);return;}ObjRecordobjrec=newObjRecord(this.objectId,ObjRecord.COMBOBOX);outputFile.write(objrec);}StoremanagementvoidwriteTailRecords(FileoutputFile){}StoremanagementintgetRow(){return0;}StoremanagementintgetColumn(){return0;}StoremanagementinthashCode(){returngetClass().getName().hashCode();}StoremanagementbooleanisFirst(){returnthis.msoDrawingRecord.isFirst();}StoremanagementbooleanisFormObject(){returnfalse;}}packagejxl.biff.drawing;importcommon.Assert;importcommon.Logger;importjava.io.IOException;importjxl.WorkbookSettings;importjxl.biff.ContinueRecord;importjxl.biff.IntegerHelper;importjxl.biff.StringHelper;importjxl.write.biff.File;StoremanagementclassCommentimplementsDrawingGroupObject{privatestaticLoggerlogger=Logger.getLogger(Comment.class);privateEscherContainerreadSpContainer;privateEscherContainerspContainer;privateMsoDrawingRecordmsoDrawingRecord;privateObjRecordobjRecord;privatebooleaninitialized=false;privateintobjectId;privateintblipId;privateintshapeId;privateintcolumn;privateintrow;privatedoublewidth;privatedoubleheight;privateintreferenceCount;privateEscherContainerescherData;privateOriginorigin;privateDrawingGroupdrawingGroup;privateDrawingDatadrawingData;privateShapeTypetype;privateintdrawingNumber;privateMsoDrawingRecordmso;privateTextObjectRecordtxo;privateNoteRecordnote;privateContinueRecordtext;privateContinueRecordformatting;privateStringcommentText;privateWorkbookSettingsworkbookSettings;StoremanagementComment(MsoDrawingRecordmsorec,ObjRecordobj,DrawingDatadd,DrawingGroupdg,WorkbookSettingsws){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();}}StoremanagementComment(DrawingGroupObjectdgo,DrawingGroupdg,WorkbookSettingsws){Commentd=(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;}StoremanagementComment(Stringtxt,intc,intr){this.initialized=true;this.origin=Origin.WRITE;this.column=c;
if(children[i].getType()==EscherRecordType.CLIENT_ANCHOR)
clientAnchor=(ClientAnchor)children[i];
if(clientAnchor==null)
logger.warn("Clientanchornotfound");
else
this.column=((int)clientAnchor.getX1());
this.row=((int)clientAnchor.getY1());
StoremanagementfinalvoidsetObjectId(intobjid,intbip,intsid)
this.objectId=objid;
this.blipId=bip;
this.shapeId=sid;
if(this.origin==Origin.READ)
this.origin=Origin.READ_WRITE;
StoremanagementfinalintgetObjectId()
if(!
this.initialized)
returnthis.objectId;
StoremanagementfinalintgetShapeId()
returnthis.shapeId;
StoremanagementfinalintgetBlipId()
returnthis.blipId;
StoremanagementMsoDrawingRecordgetMsoDrawingRecord()
returnthis.msoDrawingRecord;
StoremanagementEscherContainergetSpContainer()
returngetReadSpContainer();
SpContainerspc=newSpContainer();
Spsp=newSp(this.type,this.shapeId,2560);
spc.add(sp);
Optopt=newOpt();
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);
ClientAnchorclientAnchor=newClientAnchor(this.column,this.row,this.column+1,this.row+1);
spc.add(clientAnchor);
ClientDataclientData=newClientData();
spc.add(clientData);
returnspc;
StoremanagementvoidsetDrawingGroup(DrawingGroupdg)
StoremanagementDrawingGroupgetDrawingGroup()
returnthis.drawingGroup;
StoremanagementOrigingetOrigin()
returnthis.origin;
StoremanagementintgetReferenceCount()
returnthis.referenceCount;
StoremanagementvoidsetReferenceCount(intr)
this.referenceCount=r;
StoremanagementdoublegetX()
returnthis.column;
StoremanagementvoidsetX(doublex)
this.column=((int)x);
StoremanagementdoublegetY()
returnthis.row;
StoremanagementvoidsetY(doubley)
this.row=((int)y);
StoremanagementdoublegetWidth()
returnthis.width;
StoremanagementvoidsetWidth(doublew)
this.width=w;
StoremanagementdoublegetHeight()
returnthis.height;
StoremanagementvoidsetHeight(doubleh)
this.height=h;
privateEscherContainergetReadSpContainer()
returnthis.readSpContainer;
Storemanagementbyte[]getImageData()
Assert.verify((this.origin==Origin.READ)||(this.origin==Origin.READ_WRITE));
returnthis.drawingGroup.getImageData(this.blipId);
StoremanagementShapeTypegetType()
returnthis.type;
Storemanagementbyte[]getImageBytes()
Assert.verify(false);
returnnull;
StoremanagementStringgetImageFilePath()
StoremanagementvoidwriteAdditionalRecords(FileoutputFile)
throwsIOException
outputFile.write(this.objRecord);
return;
ObjRecordobjrec=newObjRecord(this.objectId,ObjRecord.COMBOBOX);
outputFile.write(objrec);
StoremanagementvoidwriteTailRecords(FileoutputFile)
StoremanagementintgetRow()
return0;
StoremanagementintgetColumn()
StoremanagementinthashCode()
returngetClass().getName().hashCode();
StoremanagementbooleanisFirst()
returnthis.msoDrawingRecord.isFirst();
StoremanagementbooleanisFormObject()
returnfalse;
importjxl.biff.ContinueRecord;
importjxl.biff.IntegerHelper;
importjxl.biff.StringHelper;
StoremanagementclassComment
privatestaticLoggerlogger=Logger.getLogger(Comment.class);
privateMsoDrawingRecordmso;
privateTextObjectRecordtxo;
privateNoteRecordnote;
privateContinueRecordtext;
privateContinueRecordformatting;
privateStringcommentText;
StoremanagementComment(MsoDrawingRecordmsorec,ObjRecordobj,DrawingDatadd,DrawingGroupdg,WorkbookSettingsws)
this.msoDrawingRecord=msorec;
Assert.verify((this.msoDrawingRecord!
=null)&&(this.objRecord!
StoremanagementComment(DrawingGroupObjectdgo,DrawingGroupdg,WorkbookSettingsws)
Commentd=(Comment)dgo;
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;
StoremanagementComment(Stringtxt,intc,intr)
this.column=c;
copyright@ 2008-2022 冰豆网网站版权所有
经营许可证编号:鄂ICP备2022015515号-1