org.nasdanika.html.model.bootstrap.impl.ButtonImpl Maven / Gradle / Ivy
The newest version!
/**
*/
package org.nasdanika.html.model.bootstrap.impl;
import org.eclipse.emf.ecore.EClass;
import org.nasdanika.html.bootstrap.Color;
import org.nasdanika.html.model.bootstrap.BootstrapPackage;
import org.nasdanika.html.model.bootstrap.Button;
/**
*
* An implementation of the model object 'Button'.
*
*
* The following features are implemented:
*
*
* - {@link org.nasdanika.html.model.bootstrap.impl.ButtonImpl#getColor Color}
* - {@link org.nasdanika.html.model.bootstrap.impl.ButtonImpl#isOutline Outline}
*
*
* @generated
*/
public class ButtonImpl extends DivImpl implements Button {
/**
* The default value of the '{@link #getColor() Color}' attribute.
*
*
* @see #getColor()
* @generated
* @ordered
*/
protected static final Color COLOR_EDEFAULT = null;
/**
* The default value of the '{@link #isOutline() Outline}' attribute.
*
*
* @see #isOutline()
* @generated
* @ordered
*/
protected static final boolean OUTLINE_EDEFAULT = false;
/**
*
*
* @generated
*/
protected ButtonImpl() {
super();
}
/**
*
*
* @generated
*/
@Override
protected EClass eStaticClass() {
return BootstrapPackage.Literals.BUTTON;
}
/**
*
*
* @generated
*/
@Override
public Color getColor() {
return (Color)eDynamicGet(BootstrapPackage.BUTTON__COLOR, BootstrapPackage.Literals.BUTTON__COLOR, true, true);
}
/**
*
*
* @generated
*/
@Override
public void setColor(Color newColor) {
eDynamicSet(BootstrapPackage.BUTTON__COLOR, BootstrapPackage.Literals.BUTTON__COLOR, newColor);
}
/**
*
*
* @generated
*/
@Override
public boolean isOutline() {
return (Boolean)eDynamicGet(BootstrapPackage.BUTTON__OUTLINE, BootstrapPackage.Literals.BUTTON__OUTLINE, true, true);
}
/**
*
*
* @generated
*/
@Override
public void setOutline(boolean newOutline) {
eDynamicSet(BootstrapPackage.BUTTON__OUTLINE, BootstrapPackage.Literals.BUTTON__OUTLINE, newOutline);
}
/**
*
*
* @generated
*/
@Override
public Object eGet(int featureID, boolean resolve, boolean coreType) {
switch (featureID) {
case BootstrapPackage.BUTTON__COLOR:
return getColor();
case BootstrapPackage.BUTTON__OUTLINE:
return isOutline();
}
return super.eGet(featureID, resolve, coreType);
}
/**
*
*
* @generated
*/
@Override
public void eSet(int featureID, Object newValue) {
switch (featureID) {
case BootstrapPackage.BUTTON__COLOR:
setColor((Color)newValue);
return;
case BootstrapPackage.BUTTON__OUTLINE:
setOutline((Boolean)newValue);
return;
}
super.eSet(featureID, newValue);
}
/**
*
*
* @generated
*/
@Override
public void eUnset(int featureID) {
switch (featureID) {
case BootstrapPackage.BUTTON__COLOR:
setColor(COLOR_EDEFAULT);
return;
case BootstrapPackage.BUTTON__OUTLINE:
setOutline(OUTLINE_EDEFAULT);
return;
}
super.eUnset(featureID);
}
/**
*
*
* @generated
*/
@Override
public boolean eIsSet(int featureID) {
switch (featureID) {
case BootstrapPackage.BUTTON__COLOR:
return COLOR_EDEFAULT == null ? getColor() != null : !COLOR_EDEFAULT.equals(getColor());
case BootstrapPackage.BUTTON__OUTLINE:
return isOutline() != OUTLINE_EDEFAULT;
}
return super.eIsSet(featureID);
}
} //ButtonImpl