com.mxgraph.io.vdx
public class mxVdxUtils extends Object
Constructor and Description |
---|
mxVdxUtils() |
Modifier and Type | Method and Description |
---|---|
static mxPoint |
adjustConstraint(mxPoint constraint)
Adjusts a constraint in the range of 0..1
|
static double |
conversionFactor()
Returns the conversion factor from inches to pixels.
|
static List<Node> |
copyNodeList(NodeList nodeList)
Copy a given NodeList into a List
|
static Object[] |
getOrderArray(List<PageShapeIDKey> orderList,
HashMap<PageShapeIDKey,Object> map)
Creates an array with the cells contained in the map, ordered according
the order of the keys in orderList.
|
static HashMap<String,Object> |
getStyleMap(String style,
String asig)
Create a style map from a String with style definitions.
|
static String |
getStyleString(Map<String,Object> styleMap,
String asig)
Returns the string that represents the content of a given style map.
|
static boolean |
nodeListHasTag(NodeList nl,
String tag)
Checks if the NodeList has a Node with name = tag.
|
static Element |
nodeListTag(NodeList nl,
String tag)
Returns the first Element that has name = tag in Node List.
|
static Element |
nodeListTagIndexed(NodeList nl,
String tag,
String ix)
Returns the Element that has name = tag and Index = ix in Node List.
|
static List<Element> |
nodeListTags(NodeList nl,
String tag)
Returns a list with the elements included in the Node List that have name = tag.
|
static void |
printPointList(List<mxPoint> list)
Print a list of mxPoint in the standard output.
|
static String |
surroundedByTags(String text,
String tag)
Returns a text surrounded by tags html.
|
static String |
toInitialCapital(String text)
Converts the initial letter of each word in text to uppercase
|
static String |
toSmallCaps(String text,
String size)
Trnsforms each lower case letter in text to small capital.
|
public static boolean nodeListHasTag(NodeList nl, String tag)
nl
- NodeListtag
- Name of the node.true
if the Node List has a Node with name = tag.public static Element nodeListTag(NodeList nl, String tag)
nl
- NodeListtag
- Name of the Elementpublic static Element nodeListTagIndexed(NodeList nl, String tag, String ix)
nl
- NodeListtag
- name of the Elementpublic static List<Element> nodeListTags(NodeList nl, String tag)
nl
- NodeListtag
- name of the Element.public static List<Node> copyNodeList(NodeList nodeList)
nodeList
- Node List.public static double conversionFactor()
public static mxPoint adjustConstraint(mxPoint constraint)
constraint
- Point with the constraint.public static String getStyleString(Map<String,Object> styleMap, String asig)
styleMap
- Map with the styles valuespublic static String surroundedByTags(String text, String tag)
text
- Text to be surrounded.tag
- Name of the tag.public static String toInitialCapital(String text)
text
- Text to be transformed.public static String toSmallCaps(String text, String size)
text
- Text to be transformed.size
- Size of the original text.public static HashMap<String,Object> getStyleMap(String style, String asig)
style
- Definition of the style.asig
- Asignation simbol used in 'style'.public static void printPointList(List<mxPoint> list)
list
- Lis of mxPoint.public static Object[] getOrderArray(List<PageShapeIDKey> orderList, HashMap<PageShapeIDKey,Object> map)
orderList
- List of keys in the order desired.map
- Map with the object to be put in the array.Copyright (c) 2010 Gaudenz Alder. All rights reserved.