|
JClass DesktopViews 6.3.0 API Documentation |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.klg.jclass.page.JCPageTemplate
This class contains the methods and schema necessary to convert an
XML-described page template into a template JCPage
.
Constructor Summary | |
JCPageTemplate()
|
Method Summary | |
protected static com.klg.jclass.page.JCPageTemplate.BorderDefinition |
getBorderSetup(Node parent_node,
com.klg.jclass.page.JCUnit unit)
|
protected static JCUnit.Measure |
getBorderThickness(Node node,
com.klg.jclass.page.JCUnit units)
|
protected static int |
getBorderType(Node node)
Returns the border type specified for this node. |
protected static Color |
getColorAttribute(Node node)
Returns the color; null means transparent, no color. |
protected static com.klg.jclass.page.JCPageTemplate.ColumnDefinition |
getColumnSetup(Node parent_node,
com.klg.jclass.page.JCUnit unit)
|
protected static boolean |
getFirstAttribute(Node node)
Returns whether the template is considered a starting point or not. |
protected static com.klg.jclass.page.JCFrame |
getFrameFromListByName(List frames,
String name)
|
protected static JCUnit.Point |
getLocation(Node parent_node,
com.klg.jclass.page.JCUnit unit)
|
protected static JCUnit.Margins |
getMargins(Node parent_node,
com.klg.jclass.page.JCUnit unit)
|
protected static double |
getMarginSide(NamedNodeMap attributes,
String location)
|
protected static String |
getNameAttribute(Node node)
Gets the name attribute of the current node. |
protected static int |
getOrientationAttribute(Node node)
Returns the orientation method for this node. |
protected static JCUnit.Dimension |
getSize(Node parent_node,
com.klg.jclass.page.JCUnit unit)
|
protected static com.klg.jclass.page.JCPage |
getTemplateByName(List templates,
String name)
|
protected static com.klg.jclass.page.JCUnit |
getUnitAttribute(Node node)
Returns the JCUnit specified for this node. |
static void |
importTemplates(com.klg.jclass.page.JCDocument doc,
File xmlfile)
Loads and verifies a system of page templates from an XML file. |
static void |
importTemplates(com.klg.jclass.page.JCDocument doc,
InputSource input)
Loads and verifies a system of page templates from an XML file. |
static void |
importTemplates(com.klg.jclass.page.JCDocument doc,
Reader reader)
Loads and verifies a system of page templates from an XML file. |
static List |
loadTemplates(File xmlfile)
Loads and verifies a system of page templates from an XML file. |
static List |
loadTemplates(InputSource input)
Loads and verifies a system of page templates from an XML stream. |
static List |
loadTemplates(Reader reader)
Loads and verifies a system of page templates from an XML stream. |
static void |
main(String[] args)
Loads page templates from a file given as the first argument. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public JCPageTemplate()
Method Detail |
public static void importTemplates(com.klg.jclass.page.JCDocument doc, File xmlfile) throws SAXException, IOException, ParserConfigurationException
doc
- the document to store the templates inxmlfile
- the file from which to read the XML source
IOException
SAXException
ParserConfigurationException
public static void importTemplates(com.klg.jclass.page.JCDocument doc, Reader reader) throws SAXException, IOException, ParserConfigurationException
doc
- the document to store the templates inreader
- the source from which to read the XML page template
IOException
SAXException
ParserConfigurationException
public static void importTemplates(com.klg.jclass.page.JCDocument doc, InputSource input) throws SAXException, IOException, ParserConfigurationException
doc
- the document to store the templates ininput
- the InputSource
from which to read the XML page template
IOException
SAXException
ParserConfigurationException
public static List loadTemplates(File xmlfile) throws SAXException, IOException, ParserConfigurationException
xmlfile
- the file from which to read the XML source
JCPages
constructed from the XML
IOException
SAXException
ParserConfigurationException
public static List loadTemplates(Reader reader) throws SAXException, IOException, ParserConfigurationException
reader
- the source from which to read the XML page template
JCPages
constructed from the XML
IOException
SAXException
ParserConfigurationException
protected static String getNameAttribute(Node node)
node
- the node whose name is to be retrieved
protected static Color getColorAttribute(Node node)
node
- the node whose color is to be retrieved
protected static boolean getFirstAttribute(Node node)
node
- the node whose first marker attributed is to be checked
true
if the node is marked to be the first page usedprotected static int getOrientationAttribute(Node node)
node
- the node whose orientation method is to be retrieved
protected static com.klg.jclass.page.JCUnit getUnitAttribute(Node node)
JCUnit
specified for this node. If a unit was not specified this should
still be passed a valid node with "inches" as the default value
node
- the node whose units are to be retrieved
protected static JCUnit.Point getLocation(Node parent_node, com.klg.jclass.page.JCUnit unit)
protected static JCUnit.Dimension getSize(Node parent_node, com.klg.jclass.page.JCUnit unit)
protected static com.klg.jclass.page.JCPageTemplate.ColumnDefinition getColumnSetup(Node parent_node, com.klg.jclass.page.JCUnit unit)
protected static int getBorderType(Node node)
node
-
protected static JCUnit.Measure getBorderThickness(Node node, com.klg.jclass.page.JCUnit units)
protected static com.klg.jclass.page.JCPageTemplate.BorderDefinition getBorderSetup(Node parent_node, com.klg.jclass.page.JCUnit unit)
protected static com.klg.jclass.page.JCFrame getFrameFromListByName(List frames, String name)
protected static double getMarginSide(NamedNodeMap attributes, String location)
protected static JCUnit.Margins getMargins(Node parent_node, com.klg.jclass.page.JCUnit unit)
protected static com.klg.jclass.page.JCPage getTemplateByName(List templates, String name)
public static List loadTemplates(InputSource input) throws SAXException, IOException, ParserConfigurationException
input
- the source from which to read an XML-formatted page template
JCPages
constructed from the XML
IOException
SAXException
ParserConfigurationException
public static void main(String[] args)
args
-
|
Copyright © 2004 Quest Software Inc.. All rights reserved. |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |