Method from org.apache.pdfbox.pdmodel.interactive.annotation.PDAnnotationLine Detail: |
public PDBorderStyleDictionary getBorderStyle() {
COSDictionary bs = (COSDictionary) this.getDictionary().getItem(
COSName.getPDFName( "BS" ) );
if (bs != null)
{
return new PDBorderStyleDictionary( bs );
}
else
{
return null;
}
}
This will retrieve the border style dictionary, specifying the width and
dash pattern used in drawing the line. |
public boolean getCaption() {
return getDictionary().getBoolean( "Cap", false );
}
This will retrieve if the contents are shown as a caption or not. |
public float getCaptionHorizontalOffset() {
float retval = 0.f;
COSArray array = (COSArray)this.getDictionary().getDictionaryObject( "CO" );
if( array != null )
{
retval = array.toFloatArray()[0];
}
return retval;
}
This will retrieve the horizontal offset of the caption. |
public String getCaptionPositioning() {
return this.getDictionary().getString("CP");
}
This will retrieve the caption positioning. |
public float getCaptionVerticalOffset() {
float retval = 0.f;
COSArray array = (COSArray)this.getDictionary().getDictionaryObject( "CO" );
if( array != null )
{
retval = array.toFloatArray()[1];
}
return retval;
}
This will retrieve the vertical offset of the caption. |
public String getEndPointEndingStyle() {
String retval = LE_NONE;
COSArray array = (COSArray)getDictionary().getDictionaryObject( "LE" );
if( array != null )
{
retval = array.getName( 1 );
}
return retval;
}
This will retrieve the line ending style for the end point,
possible values shown in the LE_ constants section. |
public PDGamma getInteriorColour() {
COSArray ic = (COSArray) getDictionary().getDictionaryObject( "IC" );
if (ic != null)
{
return new PDGamma( ic );
}
else
{
return null;
}
}
This will retrieve the interior colour of the line endings defined in the
LE entry. Colour is in DeviceRGB colourspace. |
public float getLeaderLineExtensionLength() {
return this.getDictionary().getFloat("LLE");
}
This will retrieve the length of the leader line extensions. |
public float getLeaderLineLength() {
return this.getDictionary().getFloat("LL");
}
This will retrieve the length of the leader line. |
public float getLeaderLineOffsetLength() {
return this.getDictionary().getFloat("LLO");
}
This will retrieve the length of the leader line offset. |
public float[] getLine() {
COSArray l = (COSArray) getDictionary().getDictionaryObject( "L" );
return l.toFloatArray();
}
This will retrieve the start and end coordinates of the line (or leader
line if LL entry is set). |
public String getStartPointEndingStyle() {
String retval = LE_NONE;
COSArray array = (COSArray)getDictionary().getDictionaryObject( "LE" );
if( array != null )
{
retval = array.getName( 0 );
}
return retval;
}
This will retrieve the line ending style for the start point,
possible values shown in the LE_ constants section. |
public void setBorderStyle(PDBorderStyleDictionary bs) {
this.getDictionary().setItem( "BS", bs);
}
This will set the border style dictionary, specifying the width and dash
pattern used in drawing the line. |
public void setCaption(boolean cap) {
getDictionary().setBoolean( "Cap", cap );
}
This will set if the contents are shown as a caption to the line. |
public void setCaptionHorizontalOffset(float offset) {
COSArray array = (COSArray)this.getDictionary().getDictionaryObject( "CO" );
if( array == null )
{
array = new COSArray();
array.setFloatArray(new float[] {offset, 0.f});
this.getDictionary().setItem( "CO", array );
}
else
{
array.set(0, new COSFloat(offset) );
}
}
This will set the horizontal offset of the caption. |
public void setCaptionPositioning(String captionPositioning) {
this.getDictionary().setString("CP", captionPositioning);
}
This will set the caption positioning.
Allowed values are: "Inline" and "Top" |
public void setCaptionVerticalOffset(float offset) {
COSArray array = (COSArray)this.getDictionary().getDictionaryObject( "CO" );
if( array == null )
{
array = new COSArray();
array.setFloatArray(new float[] {0.f, offset});
this.getDictionary().setItem( "CO", array );
}
else
{
array.set(1, new COSFloat(offset) );
}
}
This will set the vertical offset of the caption. |
public void setEndPointEndingStyle(String style) {
if( style == null )
{
style = LE_NONE;
}
COSArray array = (COSArray)getDictionary().getDictionaryObject( "LE" );
if( array == null )
{
array = new COSArray();
array.add( COSName.getPDFName( LE_NONE ) );
array.add( COSName.getPDFName( style ) );
getDictionary().setItem( "LE", array );
}
else
{
array.setName( 1, style );
}
}
This will set the line ending style for the end point,
see the LE_ constants for the possible values. |
public void setInteriorColour(PDGamma ic) {
getDictionary().setItem( "IC", ic );
}
This will set interior colour of the line endings defined in the LE
entry. Colour is in DeviceRGB colourspace. |
public void setLeaderLineExtensionLength(float leaderLineExtensionLength) {
this.getDictionary().setFloat("LLE", leaderLineExtensionLength);
}
This will set the length of the leader line extensions. |
public void setLeaderLineLength(float leaderLineLength) {
this.getDictionary().setFloat("LL", leaderLineLength);
}
This will set the length of the leader line. |
public void setLeaderLineOffsetLength(float leaderLineOffsetLength) {
this.getDictionary().setFloat("LLO", leaderLineOffsetLength);
}
This will set the length of the leader line offset. |
public void setLine(float[] l) {
COSArray newL = new COSArray();
newL.setFloatArray( l );
getDictionary().setItem( "L", newL );
}
This will set start and end coordinates of the line (or leader line if LL
entry is set). |
public void setStartPointEndingStyle(String style) {
if( style == null )
{
style = LE_NONE;
}
COSArray array = (COSArray)getDictionary().getDictionaryObject( "LE" );
if( array == null )
{
array = new COSArray();
array.add( COSName.getPDFName( style ) );
array.add( COSName.getPDFName( LE_NONE ) );
getDictionary().setItem( "LE", array );
}
else
{
array.setName( 0, style );
}
}
This will set the line ending style for the start point,
see the LE_ constants for the possible values. |