blob: 047f1719d2cc64694b83acab93a1c45c83fc4bac [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.StrokeDashElement;
import org.w3c.dom.Element;
class StrokeDashElementImpl extends ODFElementImpl implements StrokeDashElement {
private static final long serialVersionUID = 4210037532835480557L;
protected StrokeDashElementImpl(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 int getAttrDrawDots1() {
if (hasAttributeNS(DrawConstants.DRAW_NAMESPACE_URI,
DrawConstants.ATTR_DOTS1)) {
return new Integer(getAttributeNS(DrawConstants.DRAW_NAMESPACE_URI,
DrawConstants.ATTR_DOTS1)).intValue();
}
return -1;
}
public String getAttrDrawDots1Length() {
if (hasAttributeNS(DrawConstants.DRAW_NAMESPACE_URI,
DrawConstants.ATTR_DOTS1_LENGTH))
return getAttributeNS(DrawConstants.DRAW_NAMESPACE_URI,
DrawConstants.ATTR_DOTS1_LENGTH);
return null;
}
public int getAttrDrawDots2() {
if (hasAttributeNS(DrawConstants.DRAW_NAMESPACE_URI,
DrawConstants.ATTR_DOTS2)) {
return new Integer(getAttributeNS(DrawConstants.DRAW_NAMESPACE_URI,
DrawConstants.ATTR_DOTS2)).intValue();
}
return -1;
}
public String getAttrDrawDots2Length() {
if (hasAttributeNS(DrawConstants.DRAW_NAMESPACE_URI,
DrawConstants.ATTR_DOTS2_LENGTH))
return getAttributeNS(DrawConstants.DRAW_NAMESPACE_URI,
DrawConstants.ATTR_DOTS2_LENGTH);
return null;
}
public String getAttrDrawDistance() {
if (hasAttributeNS(DrawConstants.DRAW_NAMESPACE_URI,
DrawConstants.ATTR_DISTANCE))
return getAttributeNS(DrawConstants.DRAW_NAMESPACE_URI,
DrawConstants.ATTR_DISTANCE);
return null;
}
}