org.nasdanika.html.model.bootstrap.impl.TableRowImpl Maven / Gradle / Ivy
/**
*/
package org.nasdanika.html.model.bootstrap.impl;
import java.util.Collection;
import org.eclipse.emf.common.notify.NotificationChain;
import org.eclipse.emf.common.util.EList;
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.InternalEObject;
import org.eclipse.emf.ecore.util.InternalEList;
import org.nasdanika.html.bootstrap.Color;
import org.nasdanika.html.model.bootstrap.BootstrapPackage;
import org.nasdanika.html.model.bootstrap.TableCell;
import org.nasdanika.html.model.bootstrap.TableRow;
/**
*
* An implementation of the model object 'Table Row'.
*
*
* The following features are implemented:
*
*
* - {@link org.nasdanika.html.model.bootstrap.impl.TableRowImpl#getCells Cells}
* - {@link org.nasdanika.html.model.bootstrap.impl.TableRowImpl#getColor Color}
* - {@link org.nasdanika.html.model.bootstrap.impl.TableRowImpl#getBackground Background}
*
*
* @generated
*/
public class TableRowImpl extends BootstrapElementImpl implements TableRow {
/**
* 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 #getBackground() Background}' attribute.
*
*
* @see #getBackground()
* @generated
* @ordered
*/
protected static final Color BACKGROUND_EDEFAULT = null;
/**
*
*
* @generated
*/
protected TableRowImpl() {
super();
}
/**
*
*
* @generated
*/
@Override
protected EClass eStaticClass() {
return BootstrapPackage.Literals.TABLE_ROW;
}
/**
*
*
* @generated
*/
@SuppressWarnings("unchecked")
@Override
public EList getCells() {
return (EList)eDynamicGet(BootstrapPackage.TABLE_ROW__CELLS, BootstrapPackage.Literals.TABLE_ROW__CELLS, true, true);
}
/**
*
*
* @generated
*/
@Override
public Color getColor() {
return (Color)eDynamicGet(BootstrapPackage.TABLE_ROW__COLOR, BootstrapPackage.Literals.TABLE_ROW__COLOR, true, true);
}
/**
*
*
* @generated
*/
@Override
public void setColor(Color newColor) {
eDynamicSet(BootstrapPackage.TABLE_ROW__COLOR, BootstrapPackage.Literals.TABLE_ROW__COLOR, newColor);
}
/**
*
*
* @generated
*/
@Override
public Color getBackground() {
return (Color)eDynamicGet(BootstrapPackage.TABLE_ROW__BACKGROUND, BootstrapPackage.Literals.TABLE_ROW__BACKGROUND, true, true);
}
/**
*
*
* @generated
*/
@Override
public void setBackground(Color newBackground) {
eDynamicSet(BootstrapPackage.TABLE_ROW__BACKGROUND, BootstrapPackage.Literals.TABLE_ROW__BACKGROUND, newBackground);
}
/**
*
*
* @generated
*/
@Override
public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
switch (featureID) {
case BootstrapPackage.TABLE_ROW__CELLS:
return ((InternalEList>)getCells()).basicRemove(otherEnd, msgs);
}
return super.eInverseRemove(otherEnd, featureID, msgs);
}
/**
*
*
* @generated
*/
@Override
public Object eGet(int featureID, boolean resolve, boolean coreType) {
switch (featureID) {
case BootstrapPackage.TABLE_ROW__CELLS:
return getCells();
case BootstrapPackage.TABLE_ROW__COLOR:
return getColor();
case BootstrapPackage.TABLE_ROW__BACKGROUND:
return getBackground();
}
return super.eGet(featureID, resolve, coreType);
}
/**
*
*
* @generated
*/
@SuppressWarnings("unchecked")
@Override
public void eSet(int featureID, Object newValue) {
switch (featureID) {
case BootstrapPackage.TABLE_ROW__CELLS:
getCells().clear();
getCells().addAll((Collection extends TableCell>)newValue);
return;
case BootstrapPackage.TABLE_ROW__COLOR:
setColor((Color)newValue);
return;
case BootstrapPackage.TABLE_ROW__BACKGROUND:
setBackground((Color)newValue);
return;
}
super.eSet(featureID, newValue);
}
/**
*
*
* @generated
*/
@Override
public void eUnset(int featureID) {
switch (featureID) {
case BootstrapPackage.TABLE_ROW__CELLS:
getCells().clear();
return;
case BootstrapPackage.TABLE_ROW__COLOR:
setColor(COLOR_EDEFAULT);
return;
case BootstrapPackage.TABLE_ROW__BACKGROUND:
setBackground(BACKGROUND_EDEFAULT);
return;
}
super.eUnset(featureID);
}
/**
*
*
* @generated
*/
@Override
public boolean eIsSet(int featureID) {
switch (featureID) {
case BootstrapPackage.TABLE_ROW__CELLS:
return !getCells().isEmpty();
case BootstrapPackage.TABLE_ROW__COLOR:
return COLOR_EDEFAULT == null ? getColor() != null : !COLOR_EDEFAULT.equals(getColor());
case BootstrapPackage.TABLE_ROW__BACKGROUND:
return BACKGROUND_EDEFAULT == null ? getBackground() != null : !BACKGROUND_EDEFAULT.equals(getBackground());
}
return super.eIsSet(featureID);
}
} //TableRowImpl
© 2015 - 2024 Weber Informatics LLC | Privacy Policy