public class Slide extends Component implements ListContainer, TableContainer, TextboxContainer, ChartContainer
Slide represents the presentation slide feature of the ODF document. Slide
provides methods to get the slide index,get the content of the current slide, etc.| Modifier and Type | Class and Description |
|---|---|
static class |
Slide.SlideBuilder
This is a tool class which supplies all of the slide creation detail.
|
static class |
Slide.SlideLayout
A slide layout is a slide with some predefine place holder.
|
| Modifier and Type | Method and Description |
|---|---|
List |
addList()
Add a new List to this container.
|
List |
addList(ListDecorator decorator)
Add a List with specified ListDecorator to this container.
|
Table |
addTable()
Add a new Table to this container.
|
Table |
addTable(int numRows,
int numCols)
Add a new Table to this container with a specified row number and column number.
|
Textbox |
addTextbox()
Add a text box
|
Textbox |
addTextbox(FrameRectangle position)
Add a text box with a specific size at a specific position
|
void |
clearList()
Remove all Lists from this container.
|
Chart |
createChart(String title,
DataSet dataset,
Rectangle rect)
Creates a new Chart for this container.
|
Chart |
createChart(String title,
SpreadsheetDocument document,
CellRangeAddressList cellRangeAddr,
boolean firstRowAsLabel,
boolean firstColumnAsLabel,
boolean rowAsDataSeries,
Rectangle rect)
Creates a new Chart for this container.
|
Chart |
createChart(String title,
String[] labels,
String[] legends,
double[][] data,
Rectangle rect)
Creates a new Chart for this container.
|
void |
deleteChartById(String chartId)
Deletes chart by chart id.
|
void |
deleteChartByTitle(String title)
Deletes chart(s) by chart title.
|
Chart |
getChartById(String chartId)
Gets chart with specified id.
|
List<Chart> |
getChartByTitle(String title)
Gets chart list with specified title.
|
int |
getChartCount()
Returns the chart count of this container
|
OdfElement |
getFrameContainerElement()
Get the ODF element which can have
|
static Slide |
getInstance(DrawPageElement pageElement)
Get a presentation slide instance by an instance of
DrawPageElement. |
OdfElement |
getListContainerElement()
Get the ODF element which can have
|
Iterator<List> |
getListIterator()
Return an Iterator of the Lists in this ListContainer.
|
Notes |
getNotesPage()
Get the Notes page of this slide
|
DrawPageElement |
getOdfElement()
Return an instance of
DrawPageElement which represents presentation slide feature. |
int |
getSlideIndex()
Get the current slide index in the owner document.
|
String |
getSlideName()
Get the current slide name.
|
Table.TableBuilder |
getTableBuilder()
Return the table builder of this document.
|
Table |
getTableByName(String name)
Return an instance of table feature with the specific table name.
|
OdfElement |
getTableContainerElement()
Get the ODF element which can have
|
protected TableContainer |
getTableContainerImpl() |
List<Table> |
getTableList()
Return a list of table features in this document.
|
Textbox |
getTextboxByName(String name)
Return a text box whose name is a given value.
|
List<Textbox> |
getTextboxByUsage(PresentationDocument.PresentationClass usage)
This method is only useful in presentation slide.
|
Iterator<Textbox> |
getTextboxIterator()
Return an Iterator of the text objects in this container.
|
boolean |
removeList(List list)
Remove the existing List from this container.
|
boolean |
removeTextbox(Textbox box)
Remove the text box
|
void |
setSlideName(String name)
Set the current slide name.
|
getComponentByElement, getOwnerDocument, registerComponent, unregisterComponentpublic static Slide getInstance(DrawPageElement pageElement)
DrawPageElement.pageElement - an instance of DrawPageElementSlide that can represent pageElementpublic DrawPageElement getOdfElement()
DrawPageElement which represents presentation slide feature.getOdfElement in class ComponentDrawPageElementpublic int getSlideIndex()
-1, if the odf element which can represent this slide is not in the document DOM tree
public String getSlideName()
If the "draw:name" attribute is not present there, create an unique name for this slide
public void setSlideName(String name)
It must be unique slide name in the current presentation. If not, an IllegalArgumentException will be thrown. If the given name is null, an IllegalArgumentException will also be thrown.
name - the new name of the current slideIllegalArgumentException - if the given name is null or it is not unique in the current
presentation.public Notes getNotesPage()
Notes which represent the notes page of the current slidepublic OdfElement getListContainerElement()
ListContainergetListContainerElement in interface ListContainerpublic List addList()
ListContaineraddList in interface ListContainerpublic List addList(ListDecorator decorator)
ListContaineraddList in interface ListContainerdecorator - the specified ListDecoratorpublic void clearList()
ListContainerclearList in interface ListContainerpublic Iterator<List> getListIterator()
ListContainergetListIterator in interface ListContainerIteratorpublic boolean removeList(List list)
ListContainerremoveList in interface ListContainerpublic Table addTable()
TableContaineraddTable in interface TableContainerpublic Table addTable(int numRows, int numCols)
TableContainerThe table will be inserted at the end of the tableContainer. An unique table name will be
given, you may set a custom table name using the setTableName method.
addTable in interface TableContainernumRows - the row numbernumCols - the column numberTablepublic Table getTableByName(String name)
TableContainergetTableByName in interface TableContainername - of the table being searched for.public List<Table> getTableList()
TableContainergetTableList in interface TableContainerpublic Table.TableBuilder getTableBuilder()
TableContainergetTableBuilder in interface TableContainerpublic OdfElement getTableContainerElement()
TableContainergetTableContainerElement in interface TableContainerprotected TableContainer getTableContainerImpl()
public Textbox addTextbox()
TextboxContaineraddTextbox in interface TextboxContainerpublic Iterator<Textbox> getTextboxIterator()
TextboxContainergetTextboxIterator in interface TextboxContainerpublic boolean removeTextbox(Textbox box)
TextboxContainerremoveTextbox in interface TextboxContainerbox - - the instance of text boxpublic OdfElement getFrameContainerElement()
FrameContainergetFrameContainerElement in interface FrameContainerpublic Textbox addTextbox(FrameRectangle position)
TextboxContaineraddTextbox in interface TextboxContainerposition - - the rectangle (position and size) of this text boxpublic Textbox getTextboxByName(String name)
TextboxContainergetTextboxByName in interface TextboxContainername - - the name of the text boxpublic List<Textbox> getTextboxByUsage(PresentationDocument.PresentationClass usage)
TextboxContainerThis method will return a list of text boxs by the usage in presentation slides.
getTextboxByUsage in interface TextboxContainerusage - - the usage descriptionpublic Chart createChart(String title, DataSet dataset, Rectangle rect)
ChartContainercreateChart in interface ChartContainertitle - chart title.dataset - chart data set.rect - chart rectangle.public Chart createChart(String title, SpreadsheetDocument document, CellRangeAddressList cellRangeAddr, boolean firstRowAsLabel, boolean firstColumnAsLabel, boolean rowAsDataSeries, Rectangle rect)
ChartContainercreateChart in interface ChartContainertitle - chart title.document - the data source spreadsheet document.cellRangeAddr - the cell range address list which is used as chart data set.firstRowAsLabel - whether uses first row as label.firstColumnAsLabel - whether uses first column as label.rowAsDataSeries - whether uses data as series.rect - chart rectangle.public Chart createChart(String title, String[] labels, String[] legends, double[][] data, Rectangle rect)
ChartContainercreateChart in interface ChartContainertitle - chart rectangle.labels - label stringslegends - legend stringsdata - chart data set.rect - chart rectangle.public void deleteChartById(String chartId)
ChartContainerdeleteChartById in interface ChartContainerchartId - the id of specified chart.public void deleteChartByTitle(String title)
ChartContainerdeleteChartByTitle in interface ChartContainertitle - the title of specified chart(s).public Chart getChartById(String chartId)
ChartContainergetChartById in interface ChartContainerchartId - the id of this chart.public List<Chart> getChartByTitle(String title)
ChartContainergetChartByTitle in interface ChartContainertitle - the title of specified chart(s).public int getChartCount()
ChartContainergetChartCount in interface ChartContainerCopyright © 2010–2018 Apache Software Foundation; Copyright © 2018–2020 The Document Foundation. All rights reserved.