An attribute object.
Method from org.apache.pdfbox.pdmodel.documentinterchange.logicalstructure.PDAttributeObject Detail: |
protected static String arrayToString(Object[] array) {
StringBuilder sb = new StringBuilder("[");
for (int i = 0; i < array.length; i++)
{
if (i > 0)
{
sb.append(", ");
}
sb.append(array[i]);
}
return sb.append(']').toString();
}
|
protected static String arrayToString(float[] array) {
StringBuilder sb = new StringBuilder("[");
for (int i = 0; i < array.length; i++)
{
if (i > 0)
{
sb.append(", ");
}
sb.append(array[i]);
}
return sb.append(']').toString();
}
|
public static PDAttributeObject create(COSDictionary dictionary) {
String owner = dictionary.getNameAsString(COSName.O);
if (PDUserAttributeObject.USER_PROPERTIES.equals(owner))
{
return new PDUserAttributeObject(dictionary);
}
return new PDDefaultAttributeObject(dictionary);
}
Creates an attribute object. |
public String getOwner() {
return this.getCOSDictionary().getNameAsString(COSName.O);
}
Returns the owner of the attributes. |
public boolean isEmpty() {
// only entry is the owner?
return (this.getCOSDictionary().size() == 1) && (this.getOwner() != null);
}
Detects whether there are no properties in the attribute object. |
protected void notifyChanged() {
if (this.getStructureElement() != null)
{
this.getStructureElement().attributeChanged(this);
}
}
Notifies the attribute object change listeners about a change in this
attribute object. |
protected void potentiallyNotifyChanged(Object oldValue,
Object newValue) {
if (this.isValueChanged(oldValue, newValue))
{
this.notifyChanged();
}
}
Notifies the attribute object change listeners if the attribute is changed. |
protected void setOwner(String owner) {
this.getCOSDictionary().setName(COSName.O, owner);
}
Sets the owner of the attributes. |
protected void setStructureElement(PDStructureElement structureElement) {
this.structureElement = structureElement;
}
Sets the structure element. |
public String toString() {
return new StringBuilder("O=").append(this.getOwner()).toString();
}
|