Class IndesignUtility
- java.lang.Object
-
- de.hybris.platform.commons.translator.renderers.IndesignUtility
-
public class IndesignUtility extends java.lang.Object
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringBORDERstatic java.lang.StringCELLPADDINGstatic java.lang.StringCELLSPACINGstatic java.lang.StringCLOSE_TAGstatic floatDEFAULT_SURPRESSED_BORDER_WIDTHstatic java.lang.StringNOstatic java.lang.StringOPEN_TAGstatic java.lang.StringPARASTYLE_OPENstatic java.lang.StringSTYLE_NAMEstatic java.lang.StringSURPRESSED_BORDER_WIDTHstatic java.lang.StringWIDTHstatic java.lang.StringYES
-
Constructor Summary
Constructors Constructor Description IndesignUtility(java.util.Properties properties)Create a new InDesign Utility and specify the InDesign specific configuration
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static booleancellIsRenderable(AbstractNode node)static java.lang.StringcloseForcedParentsTags(AbstractNode node)Get back the close tags of the node's open parents
Example:static java.lang.StringcloseParentsTags(AbstractNode node)Get back the close tags of the node's open parents
Check if the parent tag is already closed
Example:java.lang.StringgetBorder(AbstractNode node)static java.lang.StringgetCellpadding(AbstractNode node)static java.lang.StringgetCellspacing(AbstractNode node)static java.lang.StringgetColumnWidth(AbstractNode node, int column)This methodjava.util.PropertiesgetProperties()Returns the InDesign specific configuration that is declared in the file "indesign.properties"static java.lang.StringinitializeCharStyle(AbstractNode node)static voidinitializeParaStyle(AbstractNode node, java.lang.String styleName)static java.lang.StringopenForcedParentsTags(AbstractNode node)Get back the open tags of the node's closed parents
Example:static java.lang.StringopenParentsTags(AbstractNode node)Get back the open tags of the node's closed parents
Check if the parent tag is already closed
Example:static booleanparentIsMain(AbstractNode node)protected static java.lang.StringparentTags(AbstractNode node, boolean checkOpenTags, boolean openClose)Get back the tags of the node's parents according to the openClose parameter
This method runs recursively up thru the node tree to find the parents
-
-
-
Field Detail
-
STYLE_NAME
public static final java.lang.String STYLE_NAME
- See Also:
- Constant Field Values
-
PARASTYLE_OPEN
public static final java.lang.String PARASTYLE_OPEN
- See Also:
- Constant Field Values
-
YES
public static final java.lang.String YES
- See Also:
- Constant Field Values
-
NO
public static final java.lang.String NO
- See Also:
- Constant Field Values
-
OPEN_TAG
public static final java.lang.String OPEN_TAG
- See Also:
- Constant Field Values
-
CLOSE_TAG
public static final java.lang.String CLOSE_TAG
- See Also:
- Constant Field Values
-
BORDER
public static final java.lang.String BORDER
- See Also:
- Constant Field Values
-
CELLPADDING
public static final java.lang.String CELLPADDING
- See Also:
- Constant Field Values
-
CELLSPACING
public static final java.lang.String CELLSPACING
- See Also:
- Constant Field Values
-
WIDTH
public static final java.lang.String WIDTH
- See Also:
- Constant Field Values
-
SURPRESSED_BORDER_WIDTH
public static final java.lang.String SURPRESSED_BORDER_WIDTH
- See Also:
- Constant Field Values
-
DEFAULT_SURPRESSED_BORDER_WIDTH
public static final float DEFAULT_SURPRESSED_BORDER_WIDTH
- See Also:
- Constant Field Values
-
-
Method Detail
-
getProperties
public java.util.Properties getProperties()
Returns the InDesign specific configuration that is declared in the file "indesign.properties"- Returns:
- The InDesign specific configuration that is declared in the file "indesign.properties"
-
initializeParaStyle
public static void initializeParaStyle(AbstractNode node, java.lang.String styleName)
-
initializeCharStyle
public static java.lang.String initializeCharStyle(AbstractNode node)
-
closeParentsTags
public static java.lang.String closeParentsTags(AbstractNode node)
Get back the close tags of the node's open parents
Check if the parent tag is already closed
Example:- Parameters:
node- the actual node- Returns:
- the close tags of the node's open parents as string
-
closeForcedParentsTags
public static java.lang.String closeForcedParentsTags(AbstractNode node)
Get back the close tags of the node's open parents
Example:- Parameters:
node- the actual node- Returns:
- the close tags of the node's open parents as string
-
openParentsTags
public static java.lang.String openParentsTags(AbstractNode node)
Get back the open tags of the node's closed parents
Check if the parent tag is already closed
Example:- Parameters:
node- the actual node- Returns:
- the open tags of the node's closed parents as string
-
openForcedParentsTags
public static java.lang.String openForcedParentsTags(AbstractNode node)
Get back the open tags of the node's closed parents
Example:- Parameters:
node- the actual node- Returns:
- the open tags of the node's closed parents as string
-
parentTags
protected static java.lang.String parentTags(AbstractNode node, boolean checkOpenTags, boolean openClose)
Get back the tags of the node's parents according to the openClose parameter
This method runs recursively up thru the node tree to find the parents- Parameters:
node- the actual nodecheckOpenTags- should be checked if the parent tag is already open (true - yes, false - no)openClose- true - open tags; false - closed tags- Returns:
- the tags of the node's parents as string according to the openClose parameter
-
parentIsMain
public static boolean parentIsMain(AbstractNode node)
-
getBorder
public java.lang.String getBorder(AbstractNode node)
-
getCellpadding
public static java.lang.String getCellpadding(AbstractNode node)
-
getCellspacing
public static java.lang.String getCellspacing(AbstractNode node)
-
getColumnWidth
public static java.lang.String getColumnWidth(AbstractNode node, int column)
This method- Parameters:
node- a TableNodecolumn- current column count starting from 0- Returns:
- indesign tag that define width for column
-
cellIsRenderable
public static boolean cellIsRenderable(AbstractNode node)
-
-