Package g3.project.elements
Class PageElement
- java.lang.Object
-
- nu.xom.Node
-
- nu.xom.ParentNode
-
- nu.xom.Element
-
- g3.project.elements.VisualElement
-
- g3.project.elements.PageElement
-
- All Implemented Interfaces:
Scriptable
public class PageElement extends VisualElement
- Author:
- Group 3
-
-
Constructor Summary
Constructors Constructor Description PageElement(java.lang.String name)
ConstructorPageElement(java.lang.String name, java.lang.String uri)
ConstructorPageElement(nu.xom.Element element)
Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
delete(DocIO resIO)
Delete the element and sub-elements.java.lang.Integer
getIndex()
Get the page index.java.util.Optional<java.lang.String>
getTitle()
void
insertVisual(VisualElement el)
Insert a Visual element.protected void
setIndex(java.lang.Integer ind)
Set the page index.java.util.Optional<java.lang.String>
setTitle(java.lang.String name)
-
Methods inherited from class g3.project.elements.VisualElement
addScriptFile, derefAttribute, getAllProps, getAlpha, getByID, getDelaySecs, getDurationSecs, getEvalRequired, getFillColour, getID, getOrigin, getPage, getParentElementScriptingBindings, getParentScriptable, getRealType, getScriptEl, getScriptingBindings, getSize, getStateVariable, getStroke, getVisibility, getVisualProps, getZInd, hasUpdated, makeAttrWithNS, putStateVariable, setAlpha, setDelaySecs, setDurationSecs, setEvalRequired, setFillColour, setID, setOriginXY, setOriginXY, setProps, setSize, setSize, setVisibility, setZInd
-
Methods inherited from class nu.xom.Element
addAttribute, addNamespaceDeclaration, appendChild, copy, getAttribute, getAttribute, getAttribute, getAttributeCount, getAttributeValue, getAttributeValue, getBaseURI, getChildElements, getChildElements, getChildElements, getFirstChildElement, getFirstChildElement, getLocalName, getNamespaceDeclarationCount, getNamespacePrefix, getNamespacePrefix, getNamespaceURI, getNamespaceURI, getQualifiedName, getValue, insertChild, removeAttribute, removeChildren, removeNamespaceDeclaration, setBaseURI, setLocalName, setNamespacePrefix, setNamespaceURI, shallowCopy, toString, toXML
-
Methods inherited from class nu.xom.ParentNode
appendChild, getChild, getChildCount, indexOf, insertChild, removeChild, removeChild, replaceChild
-
-
-
-
Constructor Detail
-
PageElement
public PageElement(java.lang.String name)
Constructor- Parameters:
name
- Name of element.
-
PageElement
public PageElement(java.lang.String name, java.lang.String uri)
Constructor- Parameters:
name
- Name of element.uri
- Element URI.
-
PageElement
public PageElement(nu.xom.Element element)
Constructor- Parameters:
element
- Element.
-
-
Method Detail
-
delete
public final void delete(DocIO resIO)
Description copied from class:VisualElement
Delete the element and sub-elements.- Specified by:
delete
in classVisualElement
- Parameters:
resIO
- Resource handler to remove resources on delete.
-
getTitle
public java.util.Optional<java.lang.String> getTitle()
- Returns:
- Maybe Page title.
-
insertVisual
public void insertVisual(VisualElement el)
Insert a Visual element.- Parameters:
el
- element.
-
setTitle
public java.util.Optional<java.lang.String> setTitle(java.lang.String name)
- Parameters:
name
- Title.- Returns:
- Maybe set title.
-
setIndex
protected void setIndex(java.lang.Integer ind)
Set the page index. This should be done before return from the Document to a user.- Parameters:
ind
- Index.
-
getIndex
public java.lang.Integer getIndex()
Get the page index. This should be set before use in the engine.- Returns:
- Index.
-
-