blob: d355b58a237dbcce5730d5335bc926a0e2b4b100 [file] [log] [blame]
/*******************************************************************************
* Copyright (c) 2007, 2008 IBM Corporation and Others
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Tatsuya ISHIHARA - initial API and implementation
*******************************************************************************/
package org.eclipse.actf.model.dom.odf.draw.impl;
import org.eclipse.actf.model.dom.odf.base.ODFDocument;
import org.eclipse.actf.model.dom.odf.base.impl.ODFElementImpl;
import org.eclipse.actf.model.dom.odf.draw.DrawConstants;
import org.eclipse.actf.model.dom.odf.draw.OpacityElement;
import org.w3c.dom.Element;
class OpacityElementImpl extends ODFElementImpl implements OpacityElement {
private static final long serialVersionUID = -5695526535859019948L;
protected OpacityElementImpl(ODFDocument odfDoc, Element element) {
super(odfDoc, element);
}
public String getAttrDrawName() {
if (hasAttributeNS(DrawConstants.DRAW_NAMESPACE_URI,
DrawConstants.ATTR_NAME))
return getAttributeNS(DrawConstants.DRAW_NAMESPACE_URI,
DrawConstants.ATTR_NAME);
return null;
}
public String getAttrDrawDisplayName() {
if (hasAttributeNS(DrawConstants.DRAW_NAMESPACE_URI,
DrawConstants.ATTR_DISPLAY_NAME))
return getAttributeNS(DrawConstants.DRAW_NAMESPACE_URI,
DrawConstants.ATTR_DISPLAY_NAME);
return null;
}
public String getAttrDrawStyle() {
if (hasAttributeNS(DrawConstants.DRAW_NAMESPACE_URI,
DrawConstants.ATTR_STYLE))
return getAttributeNS(DrawConstants.DRAW_NAMESPACE_URI,
DrawConstants.ATTR_STYLE);
return null;
}
public String getAttrDrawStart() {
if (hasAttributeNS(DrawConstants.DRAW_NAMESPACE_URI,
DrawConstants.ATTR_START))
return getAttributeNS(DrawConstants.DRAW_NAMESPACE_URI,
DrawConstants.ATTR_START);
return null;
}
public String getAttrDrawEnd() {
if (hasAttributeNS(DrawConstants.DRAW_NAMESPACE_URI,
DrawConstants.ATTR_END))
return getAttributeNS(DrawConstants.DRAW_NAMESPACE_URI,
DrawConstants.ATTR_END);
return null;
}
public int getAttrDrawAngle() {
if (hasAttributeNS(DrawConstants.DRAW_NAMESPACE_URI,
DrawConstants.ATTR_ANGLE)) {
return new Integer(getAttributeNS(DrawConstants.DRAW_NAMESPACE_URI,
DrawConstants.ATTR_ANGLE)).intValue();
}
return -1;
}
public String getAttrDrawBorder() {
if (hasAttributeNS(DrawConstants.DRAW_NAMESPACE_URI,
DrawConstants.ATTR_BORDER))
return getAttributeNS(DrawConstants.DRAW_NAMESPACE_URI,
DrawConstants.ATTR_BORDER);
return null;
}
}