Package com.sodius.mdw.metamodel.excel
Interface Sheet
-
- All Superinterfaces:
Comparable<Object>
,org.eclipse.emf.ecore.EModelElement
,org.eclipse.emf.ecore.EObject
,MDWEObject
,MDWObject
,org.eclipse.emf.common.notify.Notifier
public interface Sheet extends MDWEObject, org.eclipse.emf.ecore.EModelElement
A representation of the model object 'Sheet'.The following features are supported:
- See Also:
ExcelPackage.getSheet()
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
addColumns()
Creates the necessary columns based on existing rows and cells.CellRegion
addMergedRegion(int firstRow, int lastRow, int firstColumn, int lastColumn)
Creates a merged region for the specified rows and columns.Row
addRow()
Creates a new row below the last known row of this sheet.MDWEList<Column>
getColumns()
Returns the value of the 'Columns' containment reference list.float
getDefaultColumnWidth()
Returns the value of the 'Default Column Width' attribute.float
getDefaultRowHeight()
Returns the value of the 'Default Row Height' attribute.MDWEList<CellRegion>
getMergedRegions()
Returns the value of the 'Merged Regions' containment reference list.String
getName()
Returns the value of the 'Name' attribute.MDWEList<Row>
getRows()
Returns the value of the 'Rows' containment reference list.Workbook
getWorkbook()
Returns the value of the 'Workbook' container reference.void
setDefaultColumnWidth(float value)
Sets the value of the 'Default Column Width
' attribute.void
setDefaultRowHeight(float value)
Sets the value of the 'Default Row Height
' attribute.void
setName(String value)
Sets the value of the 'Name
' attribute.void
setWorkbook(Workbook value)
Sets the value of the 'Workbook
' container reference.-
Methods inherited from interface org.eclipse.emf.ecore.EModelElement
getEAnnotation, getEAnnotations
-
Methods inherited from interface org.eclipse.emf.ecore.EObject
eAllContents, eClass, eContainer, eContainingFeature, eContainmentFeature, eContents, eCrossReferences, eGet, eGet, eInvoke, eIsProxy, eIsSet, eResource, eSet, eUnset
-
Methods inherited from interface com.sodius.mdw.core.model.MDWObject
compareTo, eExtendedClass, eIsInstanceOf, eIsInstanceOf, eIsProfiled, eIsRemoved, eMetamodel, eMetaTypeName, eModel, eRemove, eSetUniqueID, eUniqueID, superScript, superScript, toBoolean, toBoolean, toByte, toByte, toChar, toChar, toDouble, toDouble, toFloat, toFloat, toInt, toInt, toList, toList, toList, toList, toList, toLong, toLong, toObject, toObject, toSet, toSet, toShort, toShort, toString, toString
-
-
-
-
Method Detail
-
getRows
MDWEList<Row> getRows()
Returns the value of the 'Rows' containment reference list. The list contents are of typeRow
. It is bidirectional and its opposite is 'Sheet
'.- Returns:
- the value of the 'Rows' containment reference list.
- See Also:
ExcelPackage.getSheet_Rows()
,Row.getSheet()
-
getName
String getName()
Returns the value of the 'Name' attribute. The default value is""
.- Returns:
- the value of the 'Name' attribute.
- See Also:
setName(String)
,ExcelPackage.getSheet_Name()
-
setName
void setName(String value)
Sets the value of the 'Name
' attribute.- Parameters:
value
- the new value of the 'Name' attribute.- See Also:
getName()
-
getMergedRegions
MDWEList<CellRegion> getMergedRegions()
Returns the value of the 'Merged Regions' containment reference list. The list contents are of typeCellRegion
.- Returns:
- the value of the 'Merged Regions' containment reference list.
- See Also:
ExcelPackage.getSheet_MergedRegions()
-
getDefaultRowHeight
float getDefaultRowHeight()
Returns the value of the 'Default Row Height' attribute.- Returns:
- the value of the 'Default Row Height' attribute.
- See Also:
setDefaultRowHeight(float)
,ExcelPackage.getSheet_DefaultRowHeight()
-
setDefaultRowHeight
void setDefaultRowHeight(float value)
Sets the value of the 'Default Row Height
' attribute.- Parameters:
value
- the new value of the 'Default Row Height' attribute.- See Also:
getDefaultRowHeight()
-
getDefaultColumnWidth
float getDefaultColumnWidth()
Returns the value of the 'Default Column Width' attribute.- Returns:
- the value of the 'Default Column Width' attribute.
- See Also:
setDefaultColumnWidth(float)
,ExcelPackage.getSheet_DefaultColumnWidth()
-
setDefaultColumnWidth
void setDefaultColumnWidth(float value)
Sets the value of the 'Default Column Width
' attribute.- Parameters:
value
- the new value of the 'Default Column Width' attribute.- See Also:
getDefaultColumnWidth()
-
getColumns
MDWEList<Column> getColumns()
Returns the value of the 'Columns' containment reference list. The list contents are of typeColumn
. It is bidirectional and its opposite is 'Sheet
'.- Returns:
- the value of the 'Columns' containment reference list.
- See Also:
ExcelPackage.getSheet_Columns()
,Column.getSheet()
-
getWorkbook
Workbook getWorkbook()
Returns the value of the 'Workbook' container reference. It is bidirectional and its opposite is 'Sheets
'.- Returns:
- the value of the 'Workbook' container reference.
- See Also:
setWorkbook(Workbook)
,ExcelPackage.getSheet_Workbook()
,Workbook.getSheets()
-
setWorkbook
void setWorkbook(Workbook value)
Sets the value of the 'Workbook
' container reference.- Parameters:
value
- the new value of the 'Workbook' container reference.- See Also:
getWorkbook()
-
addColumns
void addColumns()
Creates the necessary columns based on existing rows and cells.This method determines the maximum number of cells on each row and then ensures the number of columns matches this number of cells, creating columns as needed. Note this method won't remove existing columns if there are more than required given the number of cells.
Clients shall call this method once all necessary rows and cells have been created, so that corresponding columns are automatically added to the model.
Note that column information is not used when writing an Excel workbook. Only rows and cells information is mandatory.
-
addMergedRegion
CellRegion addMergedRegion(int firstRow, int lastRow, int firstColumn, int lastColumn)
Creates a merged region for the specified rows and columns.- Parameters:
firstRow
- the row at which the merged region starts.lastRow
- the row at which the merged region ends.firstColumn
- the column at which the merged region starts.lastColumn
- the column at which the merged region ends.- Returns:
- the created merged region.
-
addRow
Row addRow()
Creates a new row below the last known row of this sheet.- Returns:
- the created row.
-
-