org.apache.cocoon.components.elementprocessor.impl.poi.hssf.elements
public class: Anchors [javadoc |
source]
java.lang.Object
org.apache.cocoon.components.elementprocessor.impl.poi.hssf.elements.Anchors
Anchors. This particular object is represented in gnumeric's XML as four
integers, space separated. Presumably, each represents an anchor for a
particular direction -- top, bottom, left, right -- but what the reference
is for each anchor is not known, nor is it known which one is top, bottom,
left, or right, or even whether that's the correct interpretation of the
numbers. This is an area of the gnumeric XML that is not terribly well
documented even in their code, and I don't think the features that use
anchors are terribly mature yet.
- author:
Marc - Johnson (marc_johnson27591@hotmail.com)
- version:
CVS - $Id: Anchors.java 433543 2006-08-22 06:22:54Z crossley $
| Field Summary |
|---|
| public static final int | ANCHOR_UNKNOWN | |
| public static final int | ANCHOR_PERCENTAGE_FROM_COLROW_ST | |
| public static final int | ANCHOR_PERCENTAGE_FROM_COLROW_END | |
| public static final int | ANCHOR_PTS_FROM_COLROW_START | |
| public static final int | ANCHOR_PTS_FROM_COLROW_END | |
| public static final int | ANCHOR_PTS_ABSOLUTE | |
| Constructor: |
public Anchors(String value) throws IOException {
if (value == null) {
throw new IOException("cannot process a null anchors string");
}
char[] input = value.trim().toCharArray();
int index = 0;
for (int j = 0; j < _component_count; j++) {
while (index < input.length
&& Character.isWhitespace(input[index])) {
++index;
}
if (index == input.length) {
throw new IOException("insufficient anchors in string");
}
int tailIndex = index;
while (tailIndex < input.length
&& !Character.isWhitespace(input[tailIndex])) {
++tailIndex;
}
_components[j] = NumericConverter.extractInteger(new String(input,
index, tailIndex - index), _validator).intValue();
index = tailIndex;
}
if (new String(input, index, input.length - index).trim().length() != 0) {
throw new IOException("Too much data in string for "
+ _component_count + " anchors");
}
}
construct the Anchors object Parameters:
value - the string containing the anchor values
Throws:
IOException - if the string is badly formed
- exception:
IOException - if the string is badly formed
|
| Method from org.apache.cocoon.components.elementprocessor.impl.poi.hssf.elements.Anchors Summary: |
|---|
|
getComponents |
| Method from org.apache.cocoon.components.elementprocessor.impl.poi.hssf.elements.Anchors Detail: |
public int[] getComponents() {
return _components;
}
|