blob: 8d173d9c50fb6b105cdd2b3a6079e4360e441690 [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.GradientElement;
import org.w3c.dom.Element;
class GradientElementImpl extends ODFElementImpl implements GradientElement {
private static final long serialVersionUID = 6232361241398332303L;
protected GradientElementImpl(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 getAttrDrawStartColor() {
if (hasAttributeNS(DrawConstants.DRAW_NAMESPACE_URI,
DrawConstants.ATTR_START_COLOR))
return getAttributeNS(DrawConstants.DRAW_NAMESPACE_URI,
DrawConstants.ATTR_START_COLOR);
return null;
}
public String getAttrDrawEndColor() {
if (hasAttributeNS(DrawConstants.DRAW_NAMESPACE_URI,
DrawConstants.ATTR_END_COLOR))
return getAttributeNS(DrawConstants.DRAW_NAMESPACE_URI,
DrawConstants.ATTR_END_COLOR);
return null;
}
public String getAttrDrawStartIntensity() {
if (hasAttributeNS(DrawConstants.DRAW_NAMESPACE_URI,
DrawConstants.ATTR_START_INTENSITY))
return getAttributeNS(DrawConstants.DRAW_NAMESPACE_URI,
DrawConstants.ATTR_START_INTENSITY);
return null;
}
public String getAttrDrawEndIntensity() {
if (hasAttributeNS(DrawConstants.DRAW_NAMESPACE_URI,
DrawConstants.ATTR_END_INTENSITY))
return getAttributeNS(DrawConstants.DRAW_NAMESPACE_URI,
DrawConstants.ATTR_END_INTENSITY);
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;
}
public String getAttrDrawCx() {
if (hasAttributeNS(DrawConstants.DRAW_NAMESPACE_URI,
DrawConstants.ATTR_CX))
return getAttributeNS(DrawConstants.DRAW_NAMESPACE_URI,
DrawConstants.ATTR_CX);
return null;
}
public String getAttrDrawCy() {
if (hasAttributeNS(DrawConstants.DRAW_NAMESPACE_URI,
DrawConstants.ATTR_CY))
return getAttributeNS(DrawConstants.DRAW_NAMESPACE_URI,
DrawConstants.ATTR_CY);
return null;
}
}