本文整理了Java中org.apache.poi.hssf.usermodel.HSSFPicture.<init>()
方法的一些代码示例,展示了HSSFPicture.<init>()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。HSSFPicture.<init>()
方法的具体详情如下:
包路径:org.apache.poi.hssf.usermodel.HSSFPicture
类名称:HSSFPicture
方法名:<init>
[英]Constructs a picture object.
[中]构造图片对象。
代码示例来源:origin: org.apache.poi/poi
/**
* Creates a picture.
*
* @param anchor the client anchor describes how this group is attached
* to the sheet.
* @param pictureIndex - pointer to the byte array saved inside workbook in escher bse record
* @return the newly created shape.
*/
public HSSFPicture createPicture(HSSFClientAnchor anchor, int pictureIndex) {
HSSFPicture shape = new HSSFPicture(null, anchor);
shape.setPictureIndex(pictureIndex);
addShape(shape);
//open existing file
onCreate(shape);
return shape;
}
代码示例来源:origin: org.apache.poi/poi
@Override
protected HSSFShape cloneShape() {
EscherContainerRecord spContainer = new EscherContainerRecord();
byte [] inSp = getEscherContainer().serialize();
spContainer.fillFields(inSp, 0, new DefaultEscherRecordFactory());
ObjRecord obj = (ObjRecord) getObjRecord().cloneViaReserialise();
return new HSSFPicture(spContainer, obj);
}
代码示例来源:origin: org.apache.poi/poi
/**
* Creates a picture.
*
* @param anchor the client anchor describes how this group is attached
* to the sheet.
* @return the newly created shape.
*/
public HSSFPicture createPicture(HSSFChildAnchor anchor, int pictureIndex) {
HSSFPicture shape = new HSSFPicture(this, anchor);
shape.setParent(this);
shape.setAnchor(anchor);
shape.setPictureIndex(pictureIndex);
shapes.add(shape);
onCreate(shape);
EscherSpRecord sp = shape.getEscherContainer().getChildById(EscherSpRecord.RECORD_ID);
if (shape.getAnchor().isHorizontallyFlipped()){
sp.setFlags(sp.getFlags() | EscherSpRecord.FLAG_FLIPHORIZ);
}
if (shape.getAnchor().isVerticallyFlipped()){
sp.setFlags(sp.getFlags() | EscherSpRecord.FLAG_FLIPVERT);
}
return shape;
}
代码示例来源:origin: org.apache.poi/poi
switch (cmo.getObjectType()) {
case CommonObjectDataSubRecord.OBJECT_TYPE_PICTURE:
shape = new HSSFPicture(container, objRecord);
break;
case CommonObjectDataSubRecord.OBJECT_TYPE_RECTANGLE:
代码示例来源:origin: org.apache.poi/poi
HSSFPicture shape = new HSSFPicture(null, (HSSFClientAnchor)anchor);
shape.setPictureIndex(pictureIndex);
EscherContainerRecord spContainer = shape.getEscherContainer();
代码示例来源:origin: org.openl.rules/org.openl.lib.poi.dev
/**
* Creates a picture.
*
* @param anchor the client anchor describes how this group is attached
* to the sheet.
* @return the newly created shape.
*/
public HSSFPicture createPicture(HSSFChildAnchor anchor, int pictureIndex)
{
HSSFPicture shape = new HSSFPicture(this, anchor);
shape.anchor = anchor;
shape.setPictureIndex( pictureIndex );
shapes.add(shape);
return shape;
}
/**
代码示例来源:origin: com.haulmont.thirdparty/poi
/**
* Creates a picture.
*
* @param anchor the client anchor describes how this group is attached
* to the sheet.
* @param pictureIndex - pointer to the byte array saved inside workbook in escher bse record
* @return the newly created shape.
*/
public HSSFPicture createPicture(HSSFClientAnchor anchor, int pictureIndex) {
HSSFPicture shape = new HSSFPicture(null, anchor);
shape.setPictureIndex(pictureIndex);
addShape(shape);
//open existing file
onCreate(shape);
return shape;
}
代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.poi
/**
* Creates a picture.
*
* @param anchor the client anchor describes how this group is attached
* to the sheet.
* @param pictureIndex - pointer to the byte array saved inside workbook in escher bse record
* @return the newly created shape.
*/
public HSSFPicture createPicture(HSSFClientAnchor anchor, int pictureIndex) {
HSSFPicture shape = new HSSFPicture(null, anchor);
shape.setPictureIndex(pictureIndex);
addShape(shape);
//open existing file
onCreate(shape);
return shape;
}
代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.poi
@Override
protected HSSFShape cloneShape() {
EscherContainerRecord spContainer = new EscherContainerRecord();
byte [] inSp = getEscherContainer().serialize();
spContainer.fillFields(inSp, 0, new DefaultEscherRecordFactory());
ObjRecord obj = (ObjRecord) getObjRecord().cloneViaReserialise();
return new HSSFPicture(spContainer, obj);
}
代码示例来源:origin: com.haulmont.thirdparty/poi
@Override
protected HSSFShape cloneShape() {
EscherContainerRecord spContainer = new EscherContainerRecord();
byte [] inSp = getEscherContainer().serialize();
spContainer.fillFields(inSp, 0, new DefaultEscherRecordFactory());
ObjRecord obj = (ObjRecord) getObjRecord().cloneViaReserialise();
return new HSSFPicture(spContainer, obj);
}
}
代码示例来源:origin: org.openl.rules/org.openl.lib.poi.dev
/**
* Creates a picture.
*
* @param anchor the client anchor describes how this group is attached
* to the sheet.
* @return the newly created shape.
*/
public HSSFPicture createPicture(HSSFClientAnchor anchor, int pictureIndex)
{
HSSFPicture shape = new HSSFPicture(null, anchor);
shape.setPictureIndex( pictureIndex );
shape.anchor = anchor;
addShape(shape);
EscherBSERecord bse = _sheet.getWorkbook().getWorkbook().getBSERecord(pictureIndex);
bse.setRef(bse.getRef() + 1);
return shape;
}
代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.poi
/**
* Creates a picture.
*
* @param anchor the client anchor describes how this group is attached
* to the sheet.
* @return the newly created shape.
*/
public HSSFPicture createPicture(HSSFChildAnchor anchor, int pictureIndex) {
HSSFPicture shape = new HSSFPicture(this, anchor);
shape.setParent(this);
shape.setAnchor(anchor);
shape.setPictureIndex(pictureIndex);
shapes.add(shape);
onCreate(shape);
EscherSpRecord sp = shape.getEscherContainer().getChildById(EscherSpRecord.RECORD_ID);
if (shape.getAnchor().isHorizontallyFlipped()){
sp.setFlags(sp.getFlags() | EscherSpRecord.FLAG_FLIPHORIZ);
}
if (shape.getAnchor().isVerticallyFlipped()){
sp.setFlags(sp.getFlags() | EscherSpRecord.FLAG_FLIPVERT);
}
return shape;
}
代码示例来源:origin: com.haulmont.thirdparty/poi
/**
* Creates a picture.
*
* @param anchor the client anchor describes how this group is attached
* to the sheet.
* @return the newly created shape.
*/
public HSSFPicture createPicture(HSSFChildAnchor anchor, int pictureIndex) {
HSSFPicture shape = new HSSFPicture(this, anchor);
shape.setParent(this);
shape.setAnchor(anchor);
shape.setPictureIndex(pictureIndex);
shapes.add(shape);
onCreate(shape);
EscherSpRecord sp = shape.getEscherContainer().getChildById(EscherSpRecord.RECORD_ID);
if (shape.getAnchor().isHorizontallyFlipped()){
sp.setFlags(sp.getFlags() | EscherSpRecord.FLAG_FLIPHORIZ);
}
if (shape.getAnchor().isVerticallyFlipped()){
sp.setFlags(sp.getFlags() | EscherSpRecord.FLAG_FLIPVERT);
}
return shape;
}
代码示例来源:origin: com.haulmont.thirdparty/poi
switch (cmo.getObjectType()) {
case CommonObjectDataSubRecord.OBJECT_TYPE_PICTURE:
shape = new HSSFPicture(container, objRecord);
break;
case CommonObjectDataSubRecord.OBJECT_TYPE_RECTANGLE:
代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.poi
switch (cmo.getObjectType()) {
case CommonObjectDataSubRecord.OBJECT_TYPE_PICTURE:
shape = new HSSFPicture(container, objRecord);
break;
case CommonObjectDataSubRecord.OBJECT_TYPE_RECTANGLE:
代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.poi
HSSFPicture shape = new HSSFPicture(null, (HSSFClientAnchor)anchor);
shape.setPictureIndex(pictureIndex);
EscherContainerRecord spContainer = shape.getEscherContainer();
代码示例来源:origin: org.openl.rules/org.openl.lib.poi.dev
HSSFPicture picture = new HSSFPicture( parent, anchor );
picture.setPictureIndex( pictureIndex );
内容来源于网络,如有侵权,请联系作者删除!