FileDocCategorySizeDatePackage
Line.javaAPI DocApache Poi 3.0.13951Sun Mar 11 12:59:30 GMT 2007org.apache.poi.hslf.model

Line

public class Line extends SimpleShape
Represents a line in a PowerPoint drawing
author
Yegor Kozlov

Fields Summary
public static final int
PEN_SOLID
Solid (continuous) pen
public static final int
PEN_PS_DASH
PS_DASH system dash style
public static final int
PEN_DOT
PS_DOT system dash style
public static final int
PEN_DASHDOT
PS_DASHDOT system dash style
public static final int
PEN_DASHDOTDOT
PS_DASHDOTDOT system dash style
public static final int
PEN_DOTGEL
square dot style
public static final int
PEN_DASH
dash style
public static final int
PEN_LONGDASHGEL
long dash style
public static final int
PEN_DASHDOTGEL
dash short dash
public static final int
PEN_LONGDASHDOTGEL
long dash short dash
public static final int
PEN_LONGDASHDOTDOTGEL
long dash short dash short dash
public static final int
LINE_SIMPLE
Single line (of width lineWidth)
public static final int
LINE_DOUBLE
Double lines of equal width
public static final int
LINE_THICKTHIN
Double lines, one thick, one thin
public static final int
LINE_THINTHICK
Double lines, reverse order
public static final int
LINE_TRIPLE
Three lines, thin, thick, thin
Constructors Summary
protected Line(EscherContainerRecord escherRecord, Shape parent)



        
        super(escherRecord, parent);
    
public Line(Shape parent)

        super(null, parent);
        _escherContainer = createSpContainer(parent instanceof ShapeGroup);
    
public Line()

        this(null);
    
Methods Summary
protected org.apache.poi.ddf.EscherContainerRecordcreateSpContainer(boolean isChild)

        EscherContainerRecord spcont = super.createSpContainer(isChild);

        EscherSpRecord spRecord = spcont.getChildById(EscherSpRecord.RECORD_ID);
        short type = (ShapeTypes.Line << 4) | 0x2;
        spRecord.setOptions(type);
  
        //set default properties for a line
        EscherOptRecord opt = (EscherOptRecord)getEscherChild(spcont, EscherOptRecord.RECORD_ID);

        //default line properties
        setEscherProperty(opt, EscherProperties.GEOMETRY__SHAPEPATH, 4);
        setEscherProperty(opt, EscherProperties.GEOMETRY__FILLOK, 0x10000);
        setEscherProperty(opt, EscherProperties.FILL__NOFILLHITTEST, 0x100000);
        setEscherProperty(opt, EscherProperties.LINESTYLE__COLOR, 0x8000001);
        setEscherProperty(opt, EscherProperties.LINESTYLE__NOLINEDRAWDASH, 0xA0008);
        setEscherProperty(opt, EscherProperties.SHADOWSTYLE__COLOR, 0x8000002);

        return spcont;