org.nasdanika.html.model.bootstrap.impl.TableCellImpl Maven / Gradle / Ivy
/**
*/
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.TableCell;
/**
*
* An implementation of the model object 'Table Cell'.
*
*
* The following features are implemented:
*
*
* - {@link org.nasdanika.html.model.bootstrap.impl.TableCellImpl#isHeader Header}
* - {@link org.nasdanika.html.model.bootstrap.impl.TableCellImpl#getColSpan Col Span}
* - {@link org.nasdanika.html.model.bootstrap.impl.TableCellImpl#getRowSpan Row Span}
* - {@link org.nasdanika.html.model.bootstrap.impl.TableCellImpl#getColor Color}
* - {@link org.nasdanika.html.model.bootstrap.impl.TableCellImpl#getBackground Background}
*
*
* @generated
*/
public class TableCellImpl extends BootstrapElementImpl implements TableCell {
/**
* The default value of the '{@link #isHeader() Header}' attribute.
*
*
* @see #isHeader()
* @generated
* @ordered
*/
protected static final boolean HEADER_EDEFAULT = false;
/**
* The default value of the '{@link #getColSpan() Col Span}' attribute.
*
*
* @see #getColSpan()
* @generated
* @ordered
*/
protected static final int COL_SPAN_EDEFAULT = 0;
/**
* The default value of the '{@link #getRowSpan() Row Span}' attribute.
*
*
* @see #getRowSpan()
* @generated
* @ordered
*/
protected static final int ROW_SPAN_EDEFAULT = 0;
/**
* 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 TableCellImpl() {
super();
}
/**
*
*
* @generated
*/
@Override
protected EClass eStaticClass() {
return BootstrapPackage.Literals.TABLE_CELL;
}
/**
*
*
* @generated
*/
@Override
public boolean isHeader() {
return (Boolean)eDynamicGet(BootstrapPackage.TABLE_CELL__HEADER, BootstrapPackage.Literals.TABLE_CELL__HEADER, true, true);
}
/**
*
*
* @generated
*/
@Override
public void setHeader(boolean newHeader) {
eDynamicSet(BootstrapPackage.TABLE_CELL__HEADER, BootstrapPackage.Literals.TABLE_CELL__HEADER, newHeader);
}
/**
*
*
* @generated
*/
@Override
public int getColSpan() {
return (Integer)eDynamicGet(BootstrapPackage.TABLE_CELL__COL_SPAN, BootstrapPackage.Literals.TABLE_CELL__COL_SPAN, true, true);
}
/**
*
*
* @generated
*/
@Override
public void setColSpan(int newColSpan) {
eDynamicSet(BootstrapPackage.TABLE_CELL__COL_SPAN, BootstrapPackage.Literals.TABLE_CELL__COL_SPAN, newColSpan);
}
/**
*
*
* @generated
*/
@Override
public int getRowSpan() {
return (Integer)eDynamicGet(BootstrapPackage.TABLE_CELL__ROW_SPAN, BootstrapPackage.Literals.TABLE_CELL__ROW_SPAN, true, true);
}
/**
*
*
* @generated
*/
@Override
public void setRowSpan(int newRowSpan) {
eDynamicSet(BootstrapPackage.TABLE_CELL__ROW_SPAN, BootstrapPackage.Literals.TABLE_CELL__ROW_SPAN, newRowSpan);
}
/**
*
*
* @generated
*/
@Override
public Color getColor() {
return (Color)eDynamicGet(BootstrapPackage.TABLE_CELL__COLOR, BootstrapPackage.Literals.TABLE_CELL__COLOR, true, true);
}
/**
*
*
* @generated
*/
@Override
public void setColor(Color newColor) {
eDynamicSet(BootstrapPackage.TABLE_CELL__COLOR, BootstrapPackage.Literals.TABLE_CELL__COLOR, newColor);
}
/**
*
*
* @generated
*/
@Override
public Color getBackground() {
return (Color)eDynamicGet(BootstrapPackage.TABLE_CELL__BACKGROUND, BootstrapPackage.Literals.TABLE_CELL__BACKGROUND, true, true);
}
/**
*
*
* @generated
*/
@Override
public void setBackground(Color newBackground) {
eDynamicSet(BootstrapPackage.TABLE_CELL__BACKGROUND, BootstrapPackage.Literals.TABLE_CELL__BACKGROUND, newBackground);
}
/**
*
*
* @generated
*/
@Override
public Object eGet(int featureID, boolean resolve, boolean coreType) {
switch (featureID) {
case BootstrapPackage.TABLE_CELL__HEADER:
return isHeader();
case BootstrapPackage.TABLE_CELL__COL_SPAN:
return getColSpan();
case BootstrapPackage.TABLE_CELL__ROW_SPAN:
return getRowSpan();
case BootstrapPackage.TABLE_CELL__COLOR:
return getColor();
case BootstrapPackage.TABLE_CELL__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_CELL__HEADER:
setHeader((Boolean)newValue);
return;
case BootstrapPackage.TABLE_CELL__COL_SPAN:
setColSpan((Integer)newValue);
return;
case BootstrapPackage.TABLE_CELL__ROW_SPAN:
setRowSpan((Integer)newValue);
return;
case BootstrapPackage.TABLE_CELL__COLOR:
setColor((Color)newValue);
return;
case BootstrapPackage.TABLE_CELL__BACKGROUND:
setBackground((Color)newValue);
return;
}
super.eSet(featureID, newValue);
}
/**
*
*
* @generated
*/
@Override
public void eUnset(int featureID) {
switch (featureID) {
case BootstrapPackage.TABLE_CELL__HEADER:
setHeader(HEADER_EDEFAULT);
return;
case BootstrapPackage.TABLE_CELL__COL_SPAN:
setColSpan(COL_SPAN_EDEFAULT);
return;
case BootstrapPackage.TABLE_CELL__ROW_SPAN:
setRowSpan(ROW_SPAN_EDEFAULT);
return;
case BootstrapPackage.TABLE_CELL__COLOR:
setColor(COLOR_EDEFAULT);
return;
case BootstrapPackage.TABLE_CELL__BACKGROUND:
setBackground(BACKGROUND_EDEFAULT);
return;
}
super.eUnset(featureID);
}
/**
*
*
* @generated
*/
@Override
public boolean eIsSet(int featureID) {
switch (featureID) {
case BootstrapPackage.TABLE_CELL__HEADER:
return isHeader() != HEADER_EDEFAULT;
case BootstrapPackage.TABLE_CELL__COL_SPAN:
return getColSpan() != COL_SPAN_EDEFAULT;
case BootstrapPackage.TABLE_CELL__ROW_SPAN:
return getRowSpan() != ROW_SPAN_EDEFAULT;
case BootstrapPackage.TABLE_CELL__COLOR:
return COLOR_EDEFAULT == null ? getColor() != null : !COLOR_EDEFAULT.equals(getColor());
case BootstrapPackage.TABLE_CELL__BACKGROUND:
return BACKGROUND_EDEFAULT == null ? getBackground() != null : !BACKGROUND_EDEFAULT.equals(getBackground());
}
return super.eIsSet(featureID);
}
} //TableCellImpl