id int32 0 165k | repo stringlengths 7 58 | path stringlengths 12 218 | func_name stringlengths 3 140 | original_string stringlengths 73 34.1k | language stringclasses 1
value | code stringlengths 73 34.1k | code_tokens list | docstring stringlengths 3 16k | docstring_tokens list | sha stringlengths 40 40 | url stringlengths 105 339 |
|---|---|---|---|---|---|---|---|---|---|---|---|
103,400 | heinrichreimer/material-drawer | library/src/main/java/com/heinrichreimersoftware/materialdrawer/DrawerView.java | DrawerView.clearFixedItems | public DrawerView clearFixedItems() {
for (DrawerItem item : mAdapterFixed.getItems()) {
item.detach();
}
mAdapterFixed.clear();
updateFixedList();
return this;
} | java | public DrawerView clearFixedItems() {
for (DrawerItem item : mAdapterFixed.getItems()) {
item.detach();
}
mAdapterFixed.clear();
updateFixedList();
return this;
} | [
"public",
"DrawerView",
"clearFixedItems",
"(",
")",
"{",
"for",
"(",
"DrawerItem",
"item",
":",
"mAdapterFixed",
".",
"getItems",
"(",
")",
")",
"{",
"item",
".",
"detach",
"(",
")",
";",
"}",
"mAdapterFixed",
".",
"clear",
"(",
")",
";",
"updateFixedLi... | Removes all fixed items from the drawer view | [
"Removes",
"all",
"fixed",
"items",
"from",
"the",
"drawer",
"view"
] | 7c2406812d73f710ef8bb73d4a0f4bbef3b275ce | https://github.com/heinrichreimer/material-drawer/blob/7c2406812d73f710ef8bb73d4a0f4bbef3b275ce/library/src/main/java/com/heinrichreimersoftware/materialdrawer/DrawerView.java#L1598-L1605 |
103,401 | heinrichreimer/material-drawer | library/src/main/java/com/heinrichreimersoftware/materialdrawer/widget/LinearListView.java | LinearListView.setAdapter | public void setAdapter(ListAdapter adapter) {
if (mAdapter != null) {
mAdapter.unregisterDataSetObserver(mDataObserver);
}
mAdapter = adapter;
if (mAdapter != null) {
mAdapter.registerDataSetObserver(mDataObserver);
mAreAllItemsSelectable = mAdapter.... | java | public void setAdapter(ListAdapter adapter) {
if (mAdapter != null) {
mAdapter.unregisterDataSetObserver(mDataObserver);
}
mAdapter = adapter;
if (mAdapter != null) {
mAdapter.registerDataSetObserver(mDataObserver);
mAreAllItemsSelectable = mAdapter.... | [
"public",
"void",
"setAdapter",
"(",
"ListAdapter",
"adapter",
")",
"{",
"if",
"(",
"mAdapter",
"!=",
"null",
")",
"{",
"mAdapter",
".",
"unregisterDataSetObserver",
"(",
"mDataObserver",
")",
";",
"}",
"mAdapter",
"=",
"adapter",
";",
"if",
"(",
"mAdapter",... | Sets the data behind this LinearListView.
@param adapter The ListAdapter which is responsible for maintaining the data
backing this list and for producing a view to represent an
item in that data set.
@see #getAdapter() | [
"Sets",
"the",
"data",
"behind",
"this",
"LinearListView",
"."
] | 7c2406812d73f710ef8bb73d4a0f4bbef3b275ce | https://github.com/heinrichreimer/material-drawer/blob/7c2406812d73f710ef8bb73d4a0f4bbef3b275ce/library/src/main/java/com/heinrichreimersoftware/materialdrawer/widget/LinearListView.java#L128-L142 |
103,402 | heinrichreimer/material-drawer | library/src/main/java/com/heinrichreimersoftware/materialdrawer/widget/LinearListView.java | LinearListView.setEmptyView | public void setEmptyView(View emptyView) {
mEmptyView = emptyView;
final ListAdapter adapter = getAdapter();
final boolean empty = ((adapter == null) || adapter.isEmpty());
updateEmptyStatus(empty);
} | java | public void setEmptyView(View emptyView) {
mEmptyView = emptyView;
final ListAdapter adapter = getAdapter();
final boolean empty = ((adapter == null) || adapter.isEmpty());
updateEmptyStatus(empty);
} | [
"public",
"void",
"setEmptyView",
"(",
"View",
"emptyView",
")",
"{",
"mEmptyView",
"=",
"emptyView",
";",
"final",
"ListAdapter",
"adapter",
"=",
"getAdapter",
"(",
")",
";",
"final",
"boolean",
"empty",
"=",
"(",
"(",
"adapter",
"==",
"null",
")",
"||",
... | Sets the view to show if the adapter is empty | [
"Sets",
"the",
"view",
"to",
"show",
"if",
"the",
"adapter",
"is",
"empty"
] | 7c2406812d73f710ef8bb73d4a0f4bbef3b275ce | https://github.com/heinrichreimer/material-drawer/blob/7c2406812d73f710ef8bb73d4a0f4bbef3b275ce/library/src/main/java/com/heinrichreimersoftware/materialdrawer/widget/LinearListView.java#L195-L201 |
103,403 | Atmosphere/wasync | wasync/src/main/java/org/atmosphere/wasync/util/ReaderInputStream.java | ReaderInputStream.fillBuffer | private void fillBuffer() throws IOException {
if (!endOfInput && (lastCoderResult == null || lastCoderResult.isUnderflow())) {
encoderIn.compact();
int position = encoderIn.position();
// We don't use Reader#read(CharBuffer) here because it is more efficient
// t... | java | private void fillBuffer() throws IOException {
if (!endOfInput && (lastCoderResult == null || lastCoderResult.isUnderflow())) {
encoderIn.compact();
int position = encoderIn.position();
// We don't use Reader#read(CharBuffer) here because it is more efficient
// t... | [
"private",
"void",
"fillBuffer",
"(",
")",
"throws",
"IOException",
"{",
"if",
"(",
"!",
"endOfInput",
"&&",
"(",
"lastCoderResult",
"==",
"null",
"||",
"lastCoderResult",
".",
"isUnderflow",
"(",
")",
")",
")",
"{",
"encoderIn",
".",
"compact",
"(",
")",
... | Fills the internal char buffer from the reader.
@throws IOException If an I/O error occurs | [
"Fills",
"the",
"internal",
"char",
"buffer",
"from",
"the",
"reader",
"."
] | 0146828b2f5138d4cbb4872fcbfe7d6e1887ac14 | https://github.com/Atmosphere/wasync/blob/0146828b2f5138d4cbb4872fcbfe7d6e1887ac14/wasync/src/main/java/org/atmosphere/wasync/util/ReaderInputStream.java#L203-L221 |
103,404 | Atmosphere/wasync | wasync/src/main/java/org/atmosphere/wasync/RequestBuilder.java | RequestBuilder.header | public T header(String name, String value) {
Collection<String> l = headers.get(name);
if (l == null) {
l = new ArrayList<String>();
}
l.add(value);
headers.put(name, l);
return derived.cast(this);
} | java | public T header(String name, String value) {
Collection<String> l = headers.get(name);
if (l == null) {
l = new ArrayList<String>();
}
l.add(value);
headers.put(name, l);
return derived.cast(this);
} | [
"public",
"T",
"header",
"(",
"String",
"name",
",",
"String",
"value",
")",
"{",
"Collection",
"<",
"String",
">",
"l",
"=",
"headers",
".",
"get",
"(",
"name",
")",
";",
"if",
"(",
"l",
"==",
"null",
")",
"{",
"l",
"=",
"new",
"ArrayList",
"<",... | Add a header.
@param name header name
@param value header value
@return this | [
"Add",
"a",
"header",
"."
] | 0146828b2f5138d4cbb4872fcbfe7d6e1887ac14 | https://github.com/Atmosphere/wasync/blob/0146828b2f5138d4cbb4872fcbfe7d6e1887ac14/wasync/src/main/java/org/atmosphere/wasync/RequestBuilder.java#L109-L117 |
103,405 | Atmosphere/wasync | wasync/src/main/java/org/atmosphere/wasync/RequestBuilder.java | RequestBuilder.queryString | public T queryString(String name, String value) {
List<String> l = queryString.get(name);
if (l == null) {
l = new ArrayList<String>();
}
l.add(value);
queryString.put(name, l);
return derived.cast(this);
} | java | public T queryString(String name, String value) {
List<String> l = queryString.get(name);
if (l == null) {
l = new ArrayList<String>();
}
l.add(value);
queryString.put(name, l);
return derived.cast(this);
} | [
"public",
"T",
"queryString",
"(",
"String",
"name",
",",
"String",
"value",
")",
"{",
"List",
"<",
"String",
">",
"l",
"=",
"queryString",
".",
"get",
"(",
"name",
")",
";",
"if",
"(",
"l",
"==",
"null",
")",
"{",
"l",
"=",
"new",
"ArrayList",
"... | Add a query param.
@param name header name
@param value header value
@return this | [
"Add",
"a",
"query",
"param",
"."
] | 0146828b2f5138d4cbb4872fcbfe7d6e1887ac14 | https://github.com/Atmosphere/wasync/blob/0146828b2f5138d4cbb4872fcbfe7d6e1887ac14/wasync/src/main/java/org/atmosphere/wasync/RequestBuilder.java#L125-L133 |
103,406 | jferard/fastods | fastods/src/main/java/com/github/jferard/fastods/Link.java | Link.create | public static Link create(final String text, final TextStyle ts, final NamedObject table) {
return new Link(text, ts, '#'+table.getName());
} | java | public static Link create(final String text, final TextStyle ts, final NamedObject table) {
return new Link(text, ts, '#'+table.getName());
} | [
"public",
"static",
"Link",
"create",
"(",
"final",
"String",
"text",
",",
"final",
"TextStyle",
"ts",
",",
"final",
"NamedObject",
"table",
")",
"{",
"return",
"new",
"Link",
"(",
"text",
",",
"ts",
",",
"'",
"'",
"+",
"table",
".",
"getName",
"(",
... | Create a new styled Link to a table
@param text the text content
@param ts the style
@param table the destination
@return the link | [
"Create",
"a",
"new",
"styled",
"Link",
"to",
"a",
"table"
] | a034d173083ffa602dc525699b97f753082eaef9 | https://github.com/jferard/fastods/blob/a034d173083ffa602dc525699b97f753082eaef9/fastods/src/main/java/com/github/jferard/fastods/Link.java#L51-L53 |
103,407 | jferard/fastods | fastods/src/main/java/com/github/jferard/fastods/Link.java | Link.create | public static Link create(final String text, final NamedObject table) {
return new Link(text, null, '#'+table.getName());
} | java | public static Link create(final String text, final NamedObject table) {
return new Link(text, null, '#'+table.getName());
} | [
"public",
"static",
"Link",
"create",
"(",
"final",
"String",
"text",
",",
"final",
"NamedObject",
"table",
")",
"{",
"return",
"new",
"Link",
"(",
"text",
",",
"null",
",",
"'",
"'",
"+",
"table",
".",
"getName",
"(",
")",
")",
";",
"}"
] | Create a new Link to a table
@param text the text content
@param table the destination
@return the link | [
"Create",
"a",
"new",
"Link",
"to",
"a",
"table"
] | a034d173083ffa602dc525699b97f753082eaef9 | https://github.com/jferard/fastods/blob/a034d173083ffa602dc525699b97f753082eaef9/fastods/src/main/java/com/github/jferard/fastods/Link.java#L61-L63 |
103,408 | jferard/fastods | fastods/src/main/java/com/github/jferard/fastods/Link.java | Link.create | public static Link create(final String text, final TextStyle ts, final String ref) {
return new Link(text, ts, '#'+ref);
} | java | public static Link create(final String text, final TextStyle ts, final String ref) {
return new Link(text, ts, '#'+ref);
} | [
"public",
"static",
"Link",
"create",
"(",
"final",
"String",
"text",
",",
"final",
"TextStyle",
"ts",
",",
"final",
"String",
"ref",
")",
"{",
"return",
"new",
"Link",
"(",
"text",
",",
"ts",
",",
"'",
"'",
"+",
"ref",
")",
";",
"}"
] | Create a new styled link to a given ref
@param text the text content
@param ts the style
@param ref the ref
@return the link | [
"Create",
"a",
"new",
"styled",
"link",
"to",
"a",
"given",
"ref"
] | a034d173083ffa602dc525699b97f753082eaef9 | https://github.com/jferard/fastods/blob/a034d173083ffa602dc525699b97f753082eaef9/fastods/src/main/java/com/github/jferard/fastods/Link.java#L73-L75 |
103,409 | jferard/fastods | fastods/src/main/java/com/github/jferard/fastods/Link.java | Link.create | public static Link create(final String text, final String ref) {
return new Link(text, null, '#'+ref);
} | java | public static Link create(final String text, final String ref) {
return new Link(text, null, '#'+ref);
} | [
"public",
"static",
"Link",
"create",
"(",
"final",
"String",
"text",
",",
"final",
"String",
"ref",
")",
"{",
"return",
"new",
"Link",
"(",
"text",
",",
"null",
",",
"'",
"'",
"+",
"ref",
")",
";",
"}"
] | Create a new link to a given ref
@param text the text content
@param ref the ref
@return the link | [
"Create",
"a",
"new",
"link",
"to",
"a",
"given",
"ref"
] | a034d173083ffa602dc525699b97f753082eaef9 | https://github.com/jferard/fastods/blob/a034d173083ffa602dc525699b97f753082eaef9/fastods/src/main/java/com/github/jferard/fastods/Link.java#L83-L85 |
103,410 | jferard/fastods | fastods/src/main/java/com/github/jferard/fastods/Link.java | Link.create | public static Link create(final String text, final TextStyle ts, final File file) {
return new Link(text, ts, file.toURI().toString());
} | java | public static Link create(final String text, final TextStyle ts, final File file) {
return new Link(text, ts, file.toURI().toString());
} | [
"public",
"static",
"Link",
"create",
"(",
"final",
"String",
"text",
",",
"final",
"TextStyle",
"ts",
",",
"final",
"File",
"file",
")",
"{",
"return",
"new",
"Link",
"(",
"text",
",",
"ts",
",",
"file",
".",
"toURI",
"(",
")",
".",
"toString",
"(",... | Create a new styled link to a given file
@param text the text content
@param ts the style
@param file the file
@return the link | [
"Create",
"a",
"new",
"styled",
"link",
"to",
"a",
"given",
"file"
] | a034d173083ffa602dc525699b97f753082eaef9 | https://github.com/jferard/fastods/blob/a034d173083ffa602dc525699b97f753082eaef9/fastods/src/main/java/com/github/jferard/fastods/Link.java#L94-L96 |
103,411 | jferard/fastods | fastods/src/main/java/com/github/jferard/fastods/Link.java | Link.create | public static Link create(final String text, final File file) {
return new Link(text, null, file.toURI().toString());
} | java | public static Link create(final String text, final File file) {
return new Link(text, null, file.toURI().toString());
} | [
"public",
"static",
"Link",
"create",
"(",
"final",
"String",
"text",
",",
"final",
"File",
"file",
")",
"{",
"return",
"new",
"Link",
"(",
"text",
",",
"null",
",",
"file",
".",
"toURI",
"(",
")",
".",
"toString",
"(",
")",
")",
";",
"}"
] | Create a new link to a given file
@param text the text content
@param file the file
@return the link | [
"Create",
"a",
"new",
"link",
"to",
"a",
"given",
"file"
] | a034d173083ffa602dc525699b97f753082eaef9 | https://github.com/jferard/fastods/blob/a034d173083ffa602dc525699b97f753082eaef9/fastods/src/main/java/com/github/jferard/fastods/Link.java#L104-L106 |
103,412 | jferard/fastods | fastods/src/main/java/com/github/jferard/fastods/Link.java | Link.create | public static Link create(final String text, final TextStyle ts, final URL url) {
return new Link(text, ts, url.toString());
} | java | public static Link create(final String text, final TextStyle ts, final URL url) {
return new Link(text, ts, url.toString());
} | [
"public",
"static",
"Link",
"create",
"(",
"final",
"String",
"text",
",",
"final",
"TextStyle",
"ts",
",",
"final",
"URL",
"url",
")",
"{",
"return",
"new",
"Link",
"(",
"text",
",",
"ts",
",",
"url",
".",
"toString",
"(",
")",
")",
";",
"}"
] | Create a new styled link to a given url
@param text the text content
@param ts the style
@param url the file
@return the link | [
"Create",
"a",
"new",
"styled",
"link",
"to",
"a",
"given",
"url"
] | a034d173083ffa602dc525699b97f753082eaef9 | https://github.com/jferard/fastods/blob/a034d173083ffa602dc525699b97f753082eaef9/fastods/src/main/java/com/github/jferard/fastods/Link.java#L115-L117 |
103,413 | jferard/fastods | fastods/src/main/java/com/github/jferard/fastods/Link.java | Link.create | public static Link create(final String text, final URL url) {
return new Link(text, null, url.toString());
} | java | public static Link create(final String text, final URL url) {
return new Link(text, null, url.toString());
} | [
"public",
"static",
"Link",
"create",
"(",
"final",
"String",
"text",
",",
"final",
"URL",
"url",
")",
"{",
"return",
"new",
"Link",
"(",
"text",
",",
"null",
",",
"url",
".",
"toString",
"(",
")",
")",
";",
"}"
] | Create a new link to a given url
@param text the text content
@param url the file
@return the link | [
"Create",
"a",
"new",
"link",
"to",
"a",
"given",
"url"
] | a034d173083ffa602dc525699b97f753082eaef9 | https://github.com/jferard/fastods/blob/a034d173083ffa602dc525699b97f753082eaef9/fastods/src/main/java/com/github/jferard/fastods/Link.java#L125-L127 |
103,414 | jferard/fastods | fastods/src/main/java/com/github/jferard/fastods/style/TableCellStyleBuilder.java | TableCellStyleBuilder.borderAll | public TableCellStyleBuilder borderAll(final Length size, final Color borderColor,
final BorderAttribute.Style style) {
final BorderAttribute bs = new BorderAttribute(size, borderColor, style);
this.bordersBuilder.all(bs);
return this;
} | java | public TableCellStyleBuilder borderAll(final Length size, final Color borderColor,
final BorderAttribute.Style style) {
final BorderAttribute bs = new BorderAttribute(size, borderColor, style);
this.bordersBuilder.all(bs);
return this;
} | [
"public",
"TableCellStyleBuilder",
"borderAll",
"(",
"final",
"Length",
"size",
",",
"final",
"Color",
"borderColor",
",",
"final",
"BorderAttribute",
".",
"Style",
"style",
")",
"{",
"final",
"BorderAttribute",
"bs",
"=",
"new",
"BorderAttribute",
"(",
"size",
... | Add a border style for all the borders of this cell.
@param size the size of the line
@param borderColor the color to be used in format #rrggbb e.g. '#ff0000' for a red border
@param style the style of the border line, either BorderAttribute.BORDER_SOLID or BorderAttribute.BORDER_DOUBLE
@return this for f... | [
"Add",
"a",
"border",
"style",
"for",
"all",
"the",
"borders",
"of",
"this",
"cell",
"."
] | a034d173083ffa602dc525699b97f753082eaef9 | https://github.com/jferard/fastods/blob/a034d173083ffa602dc525699b97f753082eaef9/fastods/src/main/java/com/github/jferard/fastods/style/TableCellStyleBuilder.java#L98-L103 |
103,415 | jferard/fastods | fastods/src/main/java/com/github/jferard/fastods/style/TableCellStyleBuilder.java | TableCellStyleBuilder.borderBottom | public TableCellStyleBuilder borderBottom(final Length size, final Color borderColor,
final BorderAttribute.Style style) {
final BorderAttribute bs = new BorderAttribute(size, borderColor, style);
this.bordersBuilder.bottom(bs);
return this;
} | java | public TableCellStyleBuilder borderBottom(final Length size, final Color borderColor,
final BorderAttribute.Style style) {
final BorderAttribute bs = new BorderAttribute(size, borderColor, style);
this.bordersBuilder.bottom(bs);
return this;
} | [
"public",
"TableCellStyleBuilder",
"borderBottom",
"(",
"final",
"Length",
"size",
",",
"final",
"Color",
"borderColor",
",",
"final",
"BorderAttribute",
".",
"Style",
"style",
")",
"{",
"final",
"BorderAttribute",
"bs",
"=",
"new",
"BorderAttribute",
"(",
"size",... | Add a border style for the bottom border of this cell.
@param size the size of the line
@param borderColor the color to be used in format #rrggbb e.g. '#ff0000' for a red border
@param style the style of the border line, either BorderAttribute.BORDER_SOLID or BorderAttribute.BORDER_DOUBLE
@return this for... | [
"Add",
"a",
"border",
"style",
"for",
"the",
"bottom",
"border",
"of",
"this",
"cell",
"."
] | a034d173083ffa602dc525699b97f753082eaef9 | https://github.com/jferard/fastods/blob/a034d173083ffa602dc525699b97f753082eaef9/fastods/src/main/java/com/github/jferard/fastods/style/TableCellStyleBuilder.java#L113-L118 |
103,416 | jferard/fastods | fastods/src/main/java/com/github/jferard/fastods/style/TableCellStyleBuilder.java | TableCellStyleBuilder.borderLeft | public TableCellStyleBuilder borderLeft(final Length size, final Color borderColor,
final BorderAttribute.Style style) {
final BorderAttribute bs = new BorderAttribute(size, borderColor, style);
this.bordersBuilder.left(bs);
return this;
} | java | public TableCellStyleBuilder borderLeft(final Length size, final Color borderColor,
final BorderAttribute.Style style) {
final BorderAttribute bs = new BorderAttribute(size, borderColor, style);
this.bordersBuilder.left(bs);
return this;
} | [
"public",
"TableCellStyleBuilder",
"borderLeft",
"(",
"final",
"Length",
"size",
",",
"final",
"Color",
"borderColor",
",",
"final",
"BorderAttribute",
".",
"Style",
"style",
")",
"{",
"final",
"BorderAttribute",
"bs",
"=",
"new",
"BorderAttribute",
"(",
"size",
... | Add a border style for the left border of this cell.
@param size the size of the line
@param borderColor the color to be used in format #rrggbb e.g. '#ff0000' for a red border
@param style the style of the border line, either BorderAttribute.BORDER_SOLID or BorderAttribute.BORDER_DOUBLE
@return this for f... | [
"Add",
"a",
"border",
"style",
"for",
"the",
"left",
"border",
"of",
"this",
"cell",
"."
] | a034d173083ffa602dc525699b97f753082eaef9 | https://github.com/jferard/fastods/blob/a034d173083ffa602dc525699b97f753082eaef9/fastods/src/main/java/com/github/jferard/fastods/style/TableCellStyleBuilder.java#L128-L133 |
103,417 | jferard/fastods | fastods/src/main/java/com/github/jferard/fastods/style/TableCellStyleBuilder.java | TableCellStyleBuilder.borderRight | public TableCellStyleBuilder borderRight(final Length size, final Color borderColor,
final BorderAttribute.Style style) {
final BorderAttribute bs = new BorderAttribute(size, borderColor, style);
this.bordersBuilder.right(bs);
return this;
} | java | public TableCellStyleBuilder borderRight(final Length size, final Color borderColor,
final BorderAttribute.Style style) {
final BorderAttribute bs = new BorderAttribute(size, borderColor, style);
this.bordersBuilder.right(bs);
return this;
} | [
"public",
"TableCellStyleBuilder",
"borderRight",
"(",
"final",
"Length",
"size",
",",
"final",
"Color",
"borderColor",
",",
"final",
"BorderAttribute",
".",
"Style",
"style",
")",
"{",
"final",
"BorderAttribute",
"bs",
"=",
"new",
"BorderAttribute",
"(",
"size",
... | Add a border style for the right border of this cell.
@param size the size of the line
@param borderColor the color to be used in format #rrggbb e.g. '#ff0000' for a red border
@param style the style of the border line, either BorderAttribute.BORDER_SOLID or BorderAttribute.BORDER_DOUBLE
@return this for ... | [
"Add",
"a",
"border",
"style",
"for",
"the",
"right",
"border",
"of",
"this",
"cell",
"."
] | a034d173083ffa602dc525699b97f753082eaef9 | https://github.com/jferard/fastods/blob/a034d173083ffa602dc525699b97f753082eaef9/fastods/src/main/java/com/github/jferard/fastods/style/TableCellStyleBuilder.java#L143-L148 |
103,418 | jferard/fastods | fastods/src/main/java/com/github/jferard/fastods/style/TableCellStyleBuilder.java | TableCellStyleBuilder.borderTop | public TableCellStyleBuilder borderTop(final Length size, final Color borderColor,
final BorderAttribute.Style style) {
final BorderAttribute bs = new BorderAttribute(size, borderColor, style);
this.bordersBuilder.top(bs);
return this;
} | java | public TableCellStyleBuilder borderTop(final Length size, final Color borderColor,
final BorderAttribute.Style style) {
final BorderAttribute bs = new BorderAttribute(size, borderColor, style);
this.bordersBuilder.top(bs);
return this;
} | [
"public",
"TableCellStyleBuilder",
"borderTop",
"(",
"final",
"Length",
"size",
",",
"final",
"Color",
"borderColor",
",",
"final",
"BorderAttribute",
".",
"Style",
"style",
")",
"{",
"final",
"BorderAttribute",
"bs",
"=",
"new",
"BorderAttribute",
"(",
"size",
... | Add a border style for the top border of this cell.
@param size the size of the line
@param borderColor the color to be used in format #rrggbb e.g. '#ff0000' for a red border
@param style the style of the border line, either BorderAttribute.BORDER_SOLID or BorderAttribute.BORDER_DOUBLE
@return this for fl... | [
"Add",
"a",
"border",
"style",
"for",
"the",
"top",
"border",
"of",
"this",
"cell",
"."
] | a034d173083ffa602dc525699b97f753082eaef9 | https://github.com/jferard/fastods/blob/a034d173083ffa602dc525699b97f753082eaef9/fastods/src/main/java/com/github/jferard/fastods/style/TableCellStyleBuilder.java#L158-L163 |
103,419 | jferard/fastods | fastods/src/main/java/com/github/jferard/fastods/util/Container.java | Container.add | public boolean add(final K key, final V value) {
final V curValue = this.valueByKey.get(key);
if (curValue == null) { // key does not exist
if (this.mode == Mode.UPDATE)
return false;
} else { // key exists
if (this.mode == Mode.CREATE)
return false;
}
if (this.closed && !this.valueByKey.conta... | java | public boolean add(final K key, final V value) {
final V curValue = this.valueByKey.get(key);
if (curValue == null) { // key does not exist
if (this.mode == Mode.UPDATE)
return false;
} else { // key exists
if (this.mode == Mode.CREATE)
return false;
}
if (this.closed && !this.valueByKey.conta... | [
"public",
"boolean",
"add",
"(",
"final",
"K",
"key",
",",
"final",
"V",
"value",
")",
"{",
"final",
"V",
"curValue",
"=",
"this",
".",
"valueByKey",
".",
"get",
"(",
"key",
")",
";",
"if",
"(",
"curValue",
"==",
"null",
")",
"{",
"// key does not ex... | If mode is update, then the key must exist. If the mode is create, then the key must not exist.
Otherwise, the key may exist. If the container is frozen, no new key-value pair is accepted.
@param key the key
@param value the value
@return true if the value was updated | [
"If",
"mode",
"is",
"update",
"then",
"the",
"key",
"must",
"exist",
".",
"If",
"the",
"mode",
"is",
"create",
"then",
"the",
"key",
"must",
"not",
"exist",
".",
"Otherwise",
"the",
"key",
"may",
"exist",
".",
"If",
"the",
"container",
"is",
"frozen",
... | a034d173083ffa602dc525699b97f753082eaef9 | https://github.com/jferard/fastods/blob/a034d173083ffa602dc525699b97f753082eaef9/fastods/src/main/java/com/github/jferard/fastods/util/Container.java#L71-L92 |
103,420 | jferard/fastods | fastods/src/main/java/com/github/jferard/fastods/util/XMLUtil.java | XMLUtil.appendEAttribute | public void appendEAttribute(final Appendable appendable,
final CharSequence attrName, final String attrRawValue)
throws IOException {
appendable.append(' ').append(attrName).append("=\"")
.append(this.escaper.escapeXMLAttribute(attrRawValue))
.append('"');
} | java | public void appendEAttribute(final Appendable appendable,
final CharSequence attrName, final String attrRawValue)
throws IOException {
appendable.append(' ').append(attrName).append("=\"")
.append(this.escaper.escapeXMLAttribute(attrRawValue))
.append('"');
} | [
"public",
"void",
"appendEAttribute",
"(",
"final",
"Appendable",
"appendable",
",",
"final",
"CharSequence",
"attrName",
",",
"final",
"String",
"attrRawValue",
")",
"throws",
"IOException",
"{",
"appendable",
".",
"append",
"(",
"'",
"'",
")",
".",
"append",
... | Append a space and new element to the appendable element, the name of the element is
attrName and the value is attrRawValue. The will be escaped if necessary
@param appendable The StringBuilder to which the new element should be added.
@param attrName The new element name
@param attrRawValue The value of the ele... | [
"Append",
"a",
"space",
"and",
"new",
"element",
"to",
"the",
"appendable",
"element",
"the",
"name",
"of",
"the",
"element",
"is",
"attrName",
"and",
"the",
"value",
"is",
"attrRawValue",
".",
"The",
"will",
"be",
"escaped",
"if",
"necessary"
] | a034d173083ffa602dc525699b97f753082eaef9 | https://github.com/jferard/fastods/blob/a034d173083ffa602dc525699b97f753082eaef9/fastods/src/main/java/com/github/jferard/fastods/util/XMLUtil.java#L65-L71 |
103,421 | jferard/fastods | fastods/src/main/java/com/github/jferard/fastods/util/XMLUtil.java | XMLUtil.appendAttribute | public void appendAttribute(final Appendable appendable,
final CharSequence attrName, final boolean attrValue) throws IOException {
this.appendAttribute(appendable, attrName,
Boolean.toString(attrValue));
} | java | public void appendAttribute(final Appendable appendable,
final CharSequence attrName, final boolean attrValue) throws IOException {
this.appendAttribute(appendable, attrName,
Boolean.toString(attrValue));
} | [
"public",
"void",
"appendAttribute",
"(",
"final",
"Appendable",
"appendable",
",",
"final",
"CharSequence",
"attrName",
",",
"final",
"boolean",
"attrValue",
")",
"throws",
"IOException",
"{",
"this",
".",
"appendAttribute",
"(",
"appendable",
",",
"attrName",
",... | Append a new element to the appendable element, the name of the element is
attrName and the value is the boolean attrValue.
@param appendable The StringBuilder to which the new element should be added.
@param attrName The new element name
@param attrValue The value of the element
@throws IOException If an I/O error... | [
"Append",
"a",
"new",
"element",
"to",
"the",
"appendable",
"element",
"the",
"name",
"of",
"the",
"element",
"is",
"attrName",
"and",
"the",
"value",
"is",
"the",
"boolean",
"attrValue",
"."
] | a034d173083ffa602dc525699b97f753082eaef9 | https://github.com/jferard/fastods/blob/a034d173083ffa602dc525699b97f753082eaef9/fastods/src/main/java/com/github/jferard/fastods/util/XMLUtil.java#L82-L86 |
103,422 | jferard/fastods | fastods/src/main/java/com/github/jferard/fastods/util/XMLUtil.java | XMLUtil.appendAttribute | public void appendAttribute(final Appendable appendable,
final CharSequence attrName, final CharSequence attrValue) throws IOException {
appendable.append(' ').append(attrName).append("=\"").append(attrValue)
.append('"');
} | java | public void appendAttribute(final Appendable appendable,
final CharSequence attrName, final CharSequence attrValue) throws IOException {
appendable.append(' ').append(attrName).append("=\"").append(attrValue)
.append('"');
} | [
"public",
"void",
"appendAttribute",
"(",
"final",
"Appendable",
"appendable",
",",
"final",
"CharSequence",
"attrName",
",",
"final",
"CharSequence",
"attrValue",
")",
"throws",
"IOException",
"{",
"appendable",
".",
"append",
"(",
"'",
"'",
")",
".",
"append",... | Append a space, then a new element to the appendable element, the name of the element is
attrName and the value is attrValue. The value won't be escaped.
@param appendable where to write
@param attrName the name of the attribute
@param attrValue escaped attribute
@throws IOException If an I/O error occurs | [
"Append",
"a",
"space",
"then",
"a",
"new",
"element",
"to",
"the",
"appendable",
"element",
"the",
"name",
"of",
"the",
"element",
"is",
"attrName",
"and",
"the",
"value",
"is",
"attrValue",
".",
"The",
"value",
"won",
"t",
"be",
"escaped",
"."
] | a034d173083ffa602dc525699b97f753082eaef9 | https://github.com/jferard/fastods/blob/a034d173083ffa602dc525699b97f753082eaef9/fastods/src/main/java/com/github/jferard/fastods/util/XMLUtil.java#L112-L116 |
103,423 | jferard/fastods | fastods/src/main/java/com/github/jferard/fastods/util/XMLUtil.java | XMLUtil.appendTag | public void appendTag(final Appendable appendable, final CharSequence tagName,
final String content) throws IOException {
appendable.append('<').append(tagName).append('>')
.append(this.escaper.escapeXMLContent(content)).append("</")
.append(tagName).append('>');
} | java | public void appendTag(final Appendable appendable, final CharSequence tagName,
final String content) throws IOException {
appendable.append('<').append(tagName).append('>')
.append(this.escaper.escapeXMLContent(content)).append("</")
.append(tagName).append('>');
} | [
"public",
"void",
"appendTag",
"(",
"final",
"Appendable",
"appendable",
",",
"final",
"CharSequence",
"tagName",
",",
"final",
"String",
"content",
")",
"throws",
"IOException",
"{",
"appendable",
".",
"append",
"(",
"'",
"'",
")",
".",
"append",
"(",
"tagN... | Append a content inside a tag
@param appendable the destination
@param tagName the tag name
@param content the content
@throws IOException if an I/O error occurs | [
"Append",
"a",
"content",
"inside",
"a",
"tag"
] | a034d173083ffa602dc525699b97f753082eaef9 | https://github.com/jferard/fastods/blob/a034d173083ffa602dc525699b97f753082eaef9/fastods/src/main/java/com/github/jferard/fastods/util/XMLUtil.java#L125-L130 |
103,424 | jferard/fastods | fastods/src/main/java/com/github/jferard/fastods/OdsFactory.java | OdsFactory.create | public static OdsFactory create(final Logger logger, final Locale locale) {
final PositionUtil positionUtil = new PositionUtil(new EqualityUtil(), new TableNameUtil());
final WriteUtil writeUtil = WriteUtil.create();
final XMLUtil xmlUtil = XMLUtil.create();
final DataStyles format =... | java | public static OdsFactory create(final Logger logger, final Locale locale) {
final PositionUtil positionUtil = new PositionUtil(new EqualityUtil(), new TableNameUtil());
final WriteUtil writeUtil = WriteUtil.create();
final XMLUtil xmlUtil = XMLUtil.create();
final DataStyles format =... | [
"public",
"static",
"OdsFactory",
"create",
"(",
"final",
"Logger",
"logger",
",",
"final",
"Locale",
"locale",
")",
"{",
"final",
"PositionUtil",
"positionUtil",
"=",
"new",
"PositionUtil",
"(",
"new",
"EqualityUtil",
"(",
")",
",",
"new",
"TableNameUtil",
"(... | create an ods factory
@param logger the logger
@param locale the locale
@return the factory | [
"create",
"an",
"ods",
"factory"
] | a034d173083ffa602dc525699b97f753082eaef9 | https://github.com/jferard/fastods/blob/a034d173083ffa602dc525699b97f753082eaef9/fastods/src/main/java/com/github/jferard/fastods/OdsFactory.java#L68-L74 |
103,425 | jferard/fastods | fastods/src/main/java/com/github/jferard/fastods/OdsFactory.java | OdsFactory.createAnonymousDocument | private AnonymousOdsDocument createAnonymousDocument() {
final OdsElements odsElements = OdsElements
.create(this.positionUtil, this.xmlUtil, this.writeUtil, this.format,
this.libreOfficeMode);
return AnonymousOdsDocument.create(this.logger, this.xmlUtil, odsE... | java | private AnonymousOdsDocument createAnonymousDocument() {
final OdsElements odsElements = OdsElements
.create(this.positionUtil, this.xmlUtil, this.writeUtil, this.format,
this.libreOfficeMode);
return AnonymousOdsDocument.create(this.logger, this.xmlUtil, odsE... | [
"private",
"AnonymousOdsDocument",
"createAnonymousDocument",
"(",
")",
"{",
"final",
"OdsElements",
"odsElements",
"=",
"OdsElements",
".",
"create",
"(",
"this",
".",
"positionUtil",
",",
"this",
".",
"xmlUtil",
",",
"this",
".",
"writeUtil",
",",
"this",
".",... | Create a new, empty document for an anonymous writer. Use addTable to add tables.
@return a new document | [
"Create",
"a",
"new",
"empty",
"document",
"for",
"an",
"anonymous",
"writer",
".",
"Use",
"addTable",
"to",
"add",
"tables",
"."
] | a034d173083ffa602dc525699b97f753082eaef9 | https://github.com/jferard/fastods/blob/a034d173083ffa602dc525699b97f753082eaef9/fastods/src/main/java/com/github/jferard/fastods/OdsFactory.java#L130-L135 |
103,426 | jferard/fastods | fastods/src/main/java/com/github/jferard/fastods/OdsFactory.java | OdsFactory.createNamedDocument | private NamedOdsDocument createNamedDocument() {
final OdsElements odsElements = OdsElements
.create(this.positionUtil, this.xmlUtil, this.writeUtil, this.format,
this.libreOfficeMode);
return NamedOdsDocument.create(this.logger, this.xmlUtil, odsElements);
... | java | private NamedOdsDocument createNamedDocument() {
final OdsElements odsElements = OdsElements
.create(this.positionUtil, this.xmlUtil, this.writeUtil, this.format,
this.libreOfficeMode);
return NamedOdsDocument.create(this.logger, this.xmlUtil, odsElements);
... | [
"private",
"NamedOdsDocument",
"createNamedDocument",
"(",
")",
"{",
"final",
"OdsElements",
"odsElements",
"=",
"OdsElements",
".",
"create",
"(",
"this",
".",
"positionUtil",
",",
"this",
".",
"xmlUtil",
",",
"this",
".",
"writeUtil",
",",
"this",
".",
"form... | Create a new, empty document for a normal writer. Use addTable to add tables.
@return a new document | [
"Create",
"a",
"new",
"empty",
"document",
"for",
"a",
"normal",
"writer",
".",
"Use",
"addTable",
"to",
"add",
"tables",
"."
] | a034d173083ffa602dc525699b97f753082eaef9 | https://github.com/jferard/fastods/blob/a034d173083ffa602dc525699b97f753082eaef9/fastods/src/main/java/com/github/jferard/fastods/OdsFactory.java#L142-L147 |
103,427 | jferard/fastods | fastods/src/main/java/com/github/jferard/fastods/OdsFactory.java | OdsFactory.createWriterAdapter | public OdsFileWriterAdapter createWriterAdapter(final File file) throws IOException {
final NamedOdsDocument document = this.createNamedDocument();
final ZipUTF8WriterBuilder zipUTF8Writer = ZipUTF8WriterImpl.builder().noWriterBuffer();
final OdsFileWriterAdapter writerAdapter = OdsFileWriter... | java | public OdsFileWriterAdapter createWriterAdapter(final File file) throws IOException {
final NamedOdsDocument document = this.createNamedDocument();
final ZipUTF8WriterBuilder zipUTF8Writer = ZipUTF8WriterImpl.builder().noWriterBuffer();
final OdsFileWriterAdapter writerAdapter = OdsFileWriter... | [
"public",
"OdsFileWriterAdapter",
"createWriterAdapter",
"(",
"final",
"File",
"file",
")",
"throws",
"IOException",
"{",
"final",
"NamedOdsDocument",
"document",
"=",
"this",
".",
"createNamedDocument",
"(",
")",
";",
"final",
"ZipUTF8WriterBuilder",
"zipUTF8Writer",
... | Create an adapter for a writer.
@param file the file
@return the adapter
@throws IOException if an I/O error occurs | [
"Create",
"an",
"adapter",
"for",
"a",
"writer",
"."
] | a034d173083ffa602dc525699b97f753082eaef9 | https://github.com/jferard/fastods/blob/a034d173083ffa602dc525699b97f753082eaef9/fastods/src/main/java/com/github/jferard/fastods/OdsFactory.java#L198-L207 |
103,428 | jferard/fastods | fastods/src/main/java/com/github/jferard/fastods/util/PositionUtil.java | PositionUtil.getPosition | public Position getPosition(final String pos) {
final String s = pos.toUpperCase(Locale.US);
final int len = s.length();
int status = 0;
int row = 0;
int col = 0;
int n = 0;
while (n < len) {
final char c = s.charAt(n);
switch (s... | java | public Position getPosition(final String pos) {
final String s = pos.toUpperCase(Locale.US);
final int len = s.length();
int status = 0;
int row = 0;
int col = 0;
int n = 0;
while (n < len) {
final char c = s.charAt(n);
switch (s... | [
"public",
"Position",
"getPosition",
"(",
"final",
"String",
"pos",
")",
"{",
"final",
"String",
"s",
"=",
"pos",
".",
"toUpperCase",
"(",
"Locale",
".",
"US",
")",
";",
"final",
"int",
"len",
"=",
"s",
".",
"length",
"(",
")",
";",
"int",
"status",
... | Convert a cell position string like B3 to the column number.
@param pos The cell position in the range 'A1' to 'IV65536'
@return The row, e.g. A1 will return 0, B1 will return 1, E1 will return
4 | [
"Convert",
"a",
"cell",
"position",
"string",
"like",
"B3",
"to",
"the",
"column",
"number",
"."
] | a034d173083ffa602dc525699b97f753082eaef9 | https://github.com/jferard/fastods/blob/a034d173083ffa602dc525699b97f753082eaef9/fastods/src/main/java/com/github/jferard/fastods/util/PositionUtil.java#L169-L217 |
103,429 | jferard/fastods | fastods/src/main/java/com/github/jferard/fastods/util/ColorHelper.java | ColorHelper.fromRGB | public static Color fromRGB(final int red, final int green, final int blue) {
if (ColorHelper.helper == null)
ColorHelper.helper = new ColorHelper();
return ColorHelper.helper.getFromRGB(red, green, blue);
} | java | public static Color fromRGB(final int red, final int green, final int blue) {
if (ColorHelper.helper == null)
ColorHelper.helper = new ColorHelper();
return ColorHelper.helper.getFromRGB(red, green, blue);
} | [
"public",
"static",
"Color",
"fromRGB",
"(",
"final",
"int",
"red",
",",
"final",
"int",
"green",
",",
"final",
"int",
"blue",
")",
"{",
"if",
"(",
"ColorHelper",
".",
"helper",
"==",
"null",
")",
"ColorHelper",
".",
"helper",
"=",
"new",
"ColorHelper",
... | Create a color from RGB values
@param red the red value, between 0-255
@param green the green value, between 0-255
@param blue the blue value, between 0-255
@return the color | [
"Create",
"a",
"color",
"from",
"RGB",
"values"
] | a034d173083ffa602dc525699b97f753082eaef9 | https://github.com/jferard/fastods/blob/a034d173083ffa602dc525699b97f753082eaef9/fastods/src/main/java/com/github/jferard/fastods/util/ColorHelper.java#L48-L52 |
103,430 | jferard/fastods | fastods/src/main/java/com/github/jferard/fastods/util/ColorHelper.java | ColorHelper.getFromRGB | public Color getFromRGB(final int red, final int green, final int blue) {
return this.getFromString("#" + this.toHexString(red) + this.toHexString(green) + this
.toHexString(blue));
} | java | public Color getFromRGB(final int red, final int green, final int blue) {
return this.getFromString("#" + this.toHexString(red) + this.toHexString(green) + this
.toHexString(blue));
} | [
"public",
"Color",
"getFromRGB",
"(",
"final",
"int",
"red",
",",
"final",
"int",
"green",
",",
"final",
"int",
"blue",
")",
"{",
"return",
"this",
".",
"getFromString",
"(",
"\"#\"",
"+",
"this",
".",
"toHexString",
"(",
"red",
")",
"+",
"this",
".",
... | Helper function to create any available color string from color values.
@param red The red value, 0-255
@param green The green value, 0-255
@param blue The blue value, 0-255
@return The hex string in the format '#rrggbb' | [
"Helper",
"function",
"to",
"create",
"any",
"available",
"color",
"string",
"from",
"color",
"values",
"."
] | a034d173083ffa602dc525699b97f753082eaef9 | https://github.com/jferard/fastods/blob/a034d173083ffa602dc525699b97f753082eaef9/fastods/src/main/java/com/github/jferard/fastods/util/ColorHelper.java#L87-L90 |
103,431 | jferard/fastods | fastods/src/main/java/com/github/jferard/fastods/datastyle/FractionStyleBuilder.java | FractionStyleBuilder.create | public static FractionStyleBuilder create(final String name, final Locale locale) {
checker.checkStyleName(name);
return new FractionStyleBuilder(name, locale);
} | java | public static FractionStyleBuilder create(final String name, final Locale locale) {
checker.checkStyleName(name);
return new FractionStyleBuilder(name, locale);
} | [
"public",
"static",
"FractionStyleBuilder",
"create",
"(",
"final",
"String",
"name",
",",
"final",
"Locale",
"locale",
")",
"{",
"checker",
".",
"checkStyleName",
"(",
"name",
")",
";",
"return",
"new",
"FractionStyleBuilder",
"(",
"name",
",",
"locale",
")",... | Create a new number style builder with the name name, minimum integer digits is
minIntDigits and decimal places is decPlaces.
@param name The name of the number style, this name must be unique.
@param locale The locale used
@return the builder | [
"Create",
"a",
"new",
"number",
"style",
"builder",
"with",
"the",
"name",
"name",
"minimum",
"integer",
"digits",
"is",
"minIntDigits",
"and",
"decimal",
"places",
"is",
"decPlaces",
"."
] | a034d173083ffa602dc525699b97f753082eaef9 | https://github.com/jferard/fastods/blob/a034d173083ffa602dc525699b97f753082eaef9/fastods/src/main/java/com/github/jferard/fastods/datastyle/FractionStyleBuilder.java#L46-L49 |
103,432 | jferard/fastods | fastods/src/main/java/com/github/jferard/fastods/style/TableColumnStyle.java | TableColumnStyle.appendXMLToTable | public void appendXMLToTable(final XMLUtil util, final Appendable appendable, final int count)
throws IOException {
appendable.append("<table:table-column");
util.appendEAttribute(appendable, "table:style-name", this.name);
if (count > 1) util.appendAttribute(appendable, "table:n... | java | public void appendXMLToTable(final XMLUtil util, final Appendable appendable, final int count)
throws IOException {
appendable.append("<table:table-column");
util.appendEAttribute(appendable, "table:style-name", this.name);
if (count > 1) util.appendAttribute(appendable, "table:n... | [
"public",
"void",
"appendXMLToTable",
"(",
"final",
"XMLUtil",
"util",
",",
"final",
"Appendable",
"appendable",
",",
"final",
"int",
"count",
")",
"throws",
"IOException",
"{",
"appendable",
".",
"append",
"(",
"\"<table:table-column\"",
")",
";",
"util",
".",
... | Append the XML to the table representation
@param util an util
@param appendable the destination
@param count the number of columns concerned
@throws IOException if an I/O error occurs | [
"Append",
"the",
"XML",
"to",
"the",
"table",
"representation"
] | a034d173083ffa602dc525699b97f753082eaef9 | https://github.com/jferard/fastods/blob/a034d173083ffa602dc525699b97f753082eaef9/fastods/src/main/java/com/github/jferard/fastods/style/TableColumnStyle.java#L109-L118 |
103,433 | jferard/fastods | fastods/src/main/java/com/github/jferard/fastods/style/TableColumnStyle.java | TableColumnStyle.addToContentStyles | public void addToContentStyles(final StylesContainer stylesContainer) {
stylesContainer.addContentStyle(this);
if (this.defaultCellStyle != null) {
stylesContainer.addContentStyle(this.defaultCellStyle);
}
} | java | public void addToContentStyles(final StylesContainer stylesContainer) {
stylesContainer.addContentStyle(this);
if (this.defaultCellStyle != null) {
stylesContainer.addContentStyle(this.defaultCellStyle);
}
} | [
"public",
"void",
"addToContentStyles",
"(",
"final",
"StylesContainer",
"stylesContainer",
")",
"{",
"stylesContainer",
".",
"addContentStyle",
"(",
"this",
")",
";",
"if",
"(",
"this",
".",
"defaultCellStyle",
"!=",
"null",
")",
"{",
"stylesContainer",
".",
"a... | Add this style to a styles container
@param stylesContainer the styles container | [
"Add",
"this",
"style",
"to",
"a",
"styles",
"container"
] | a034d173083ffa602dc525699b97f753082eaef9 | https://github.com/jferard/fastods/blob/a034d173083ffa602dc525699b97f753082eaef9/fastods/src/main/java/com/github/jferard/fastods/style/TableColumnStyle.java#L179-L184 |
103,434 | jferard/fastods | fastods/src/main/java/com/github/jferard/fastods/odselement/MetaElement.java | MetaElement.setDateTimeNow | private void setDateTimeNow() {
final Date dt = new Date();
this.dateTime = MetaElement.DF_DATE.format(dt) +
"T" + MetaElement.DF_TIME.format(dt);
} | java | private void setDateTimeNow() {
final Date dt = new Date();
this.dateTime = MetaElement.DF_DATE.format(dt) +
"T" + MetaElement.DF_TIME.format(dt);
} | [
"private",
"void",
"setDateTimeNow",
"(",
")",
"{",
"final",
"Date",
"dt",
"=",
"new",
"Date",
"(",
")",
";",
"this",
".",
"dateTime",
"=",
"MetaElement",
".",
"DF_DATE",
".",
"format",
"(",
"dt",
")",
"+",
"\"T\"",
"+",
"MetaElement",
".",
"DF_TIME",
... | Store the date and time of the document creation in the MetaElement data. | [
"Store",
"the",
"date",
"and",
"time",
"of",
"the",
"document",
"creation",
"in",
"the",
"MetaElement",
"data",
"."
] | a034d173083ffa602dc525699b97f753082eaef9 | https://github.com/jferard/fastods/blob/a034d173083ffa602dc525699b97f753082eaef9/fastods/src/main/java/com/github/jferard/fastods/odselement/MetaElement.java#L115-L120 |
103,435 | jferard/fastods | fastods/src/main/java/com/github/jferard/fastods/tool/FastOdsBus.java | FastOdsBus.get | synchronized public E get() {
if (this.isClosed())
throw new NoSuchElementException();
while (this.elements.isEmpty()) {
try {
this.wait();
} catch (final InterruptedException e) {
Thread.currentThread().interrupt();
throw new RuntimeException(e);
}
}
return this.elements.remove();
} | java | synchronized public E get() {
if (this.isClosed())
throw new NoSuchElementException();
while (this.elements.isEmpty()) {
try {
this.wait();
} catch (final InterruptedException e) {
Thread.currentThread().interrupt();
throw new RuntimeException(e);
}
}
return this.elements.remove();
} | [
"synchronized",
"public",
"E",
"get",
"(",
")",
"{",
"if",
"(",
"this",
".",
"isClosed",
"(",
")",
")",
"throw",
"new",
"NoSuchElementException",
"(",
")",
";",
"while",
"(",
"this",
".",
"elements",
".",
"isEmpty",
"(",
")",
")",
"{",
"try",
"{",
... | Get an element from the bus. Blocking method.
@return the next element in the bus | [
"Get",
"an",
"element",
"from",
"the",
"bus",
".",
"Blocking",
"method",
"."
] | a034d173083ffa602dc525699b97f753082eaef9 | https://github.com/jferard/fastods/blob/a034d173083ffa602dc525699b97f753082eaef9/fastods/src/main/java/com/github/jferard/fastods/tool/FastOdsBus.java#L81-L94 |
103,436 | jferard/fastods | fastods/src/main/java/com/github/jferard/fastods/tool/FastOds.java | FastOds.openFile | public static boolean openFile(final File f) {
if (desktop != null && f.exists() && f.isFile()) {
try {
desktop.open(f);
return true;
} catch (final IOException e) {
Logger.getLogger(FastOds.class.getName()).log(Level.SEVERE,
"Can't open file " + f + " in appropriate application",
e);
... | java | public static boolean openFile(final File f) {
if (desktop != null && f.exists() && f.isFile()) {
try {
desktop.open(f);
return true;
} catch (final IOException e) {
Logger.getLogger(FastOds.class.getName()).log(Level.SEVERE,
"Can't open file " + f + " in appropriate application",
e);
... | [
"public",
"static",
"boolean",
"openFile",
"(",
"final",
"File",
"f",
")",
"{",
"if",
"(",
"desktop",
"!=",
"null",
"&&",
"f",
".",
"exists",
"(",
")",
"&&",
"f",
".",
"isFile",
"(",
")",
")",
"{",
"try",
"{",
"desktop",
".",
"open",
"(",
"f",
... | Opens a file with the default application.
@param f
the file to open
@return true if succeeded, false otherwise. | [
"Opens",
"a",
"file",
"with",
"the",
"default",
"application",
"."
] | a034d173083ffa602dc525699b97f753082eaef9 | https://github.com/jferard/fastods/blob/a034d173083ffa602dc525699b97f753082eaef9/fastods/src/main/java/com/github/jferard/fastods/tool/FastOds.java#L68-L80 |
103,437 | jferard/fastods | fastods/src/main/java/com/github/jferard/fastods/AnonymousOdsFileWriter.java | AnonymousOdsFileWriter.saveAs | public void saveAs(final File file) throws IOException {
try {
final FileOutputStream out = new FileOutputStream(file);
try {
this.save(out);
} finally {
out.flush();
out.close();
}
} catch (final Fi... | java | public void saveAs(final File file) throws IOException {
try {
final FileOutputStream out = new FileOutputStream(file);
try {
this.save(out);
} finally {
out.flush();
out.close();
}
} catch (final Fi... | [
"public",
"void",
"saveAs",
"(",
"final",
"File",
"file",
")",
"throws",
"IOException",
"{",
"try",
"{",
"final",
"FileOutputStream",
"out",
"=",
"new",
"FileOutputStream",
"(",
"file",
")",
";",
"try",
"{",
"this",
".",
"save",
"(",
"out",
")",
";",
"... | Save the new file.
@param file the destination file
@throws IOException If an I/O error occurs | [
"Save",
"the",
"new",
"file",
"."
] | a034d173083ffa602dc525699b97f753082eaef9 | https://github.com/jferard/fastods/blob/a034d173083ffa602dc525699b97f753082eaef9/fastods/src/main/java/com/github/jferard/fastods/AnonymousOdsFileWriter.java#L111-L127 |
103,438 | jferard/fastods | fastods/src/main/java/com/github/jferard/fastods/AnonymousOdsFileWriter.java | AnonymousOdsFileWriter.saveAs | public void saveAs(final String filename, final ZipUTF8WriterBuilder builder)
throws IOException {
try {
final FileOutputStream out = new FileOutputStream(filename);
final ZipUTF8Writer writer = builder.build(out);
try {
this.save(writer);
... | java | public void saveAs(final String filename, final ZipUTF8WriterBuilder builder)
throws IOException {
try {
final FileOutputStream out = new FileOutputStream(filename);
final ZipUTF8Writer writer = builder.build(out);
try {
this.save(writer);
... | [
"public",
"void",
"saveAs",
"(",
"final",
"String",
"filename",
",",
"final",
"ZipUTF8WriterBuilder",
"builder",
")",
"throws",
"IOException",
"{",
"try",
"{",
"final",
"FileOutputStream",
"out",
"=",
"new",
"FileOutputStream",
"(",
"filename",
")",
";",
"final"... | Save the document to filename.
@param filename the name of the destination file
@param builder a builder for the ZipOutputStream and the Writer (buffers,
level, ...)
@throws IOException if the file was not saved | [
"Save",
"the",
"document",
"to",
"filename",
"."
] | a034d173083ffa602dc525699b97f753082eaef9 | https://github.com/jferard/fastods/blob/a034d173083ffa602dc525699b97f753082eaef9/fastods/src/main/java/com/github/jferard/fastods/AnonymousOdsFileWriter.java#L136-L150 |
103,439 | jferard/fastods | fastods/src/main/java/com/github/jferard/fastods/PageSectionBuilder.java | PageSectionBuilder.content | public F content(final String string) {
this.curRegionBox.set(Text.content(string));
return (F) this;
} | java | public F content(final String string) {
this.curRegionBox.set(Text.content(string));
return (F) this;
} | [
"public",
"F",
"content",
"(",
"final",
"String",
"string",
")",
"{",
"this",
".",
"curRegionBox",
".",
"set",
"(",
"Text",
".",
"content",
"(",
"string",
")",
")",
";",
"return",
"(",
"F",
")",
"this",
";",
"}"
] | Set the text content of the section
@param string the text
@return this for fluent style | [
"Set",
"the",
"text",
"content",
"of",
"the",
"section"
] | a034d173083ffa602dc525699b97f753082eaef9 | https://github.com/jferard/fastods/blob/a034d173083ffa602dc525699b97f753082eaef9/fastods/src/main/java/com/github/jferard/fastods/PageSectionBuilder.java#L87-L90 |
103,440 | jferard/fastods | fastods/src/main/java/com/github/jferard/fastods/PageSection.java | PageSection.simpleFooter | public static Footer simpleFooter(final String text, final TextStyle ts) {
return new SimplePageSectionBuilder().text(Text.styledContent(text, ts)).buildFooter();
} | java | public static Footer simpleFooter(final String text, final TextStyle ts) {
return new SimplePageSectionBuilder().text(Text.styledContent(text, ts)).buildFooter();
} | [
"public",
"static",
"Footer",
"simpleFooter",
"(",
"final",
"String",
"text",
",",
"final",
"TextStyle",
"ts",
")",
"{",
"return",
"new",
"SimplePageSectionBuilder",
"(",
")",
".",
"text",
"(",
"Text",
".",
"styledContent",
"(",
"text",
",",
"ts",
")",
")"... | Create a simple footer, with a styled text
@param text the text
@param ts the style
@return the footer | [
"Create",
"a",
"simple",
"footer",
"with",
"a",
"styled",
"text"
] | a034d173083ffa602dc525699b97f753082eaef9 | https://github.com/jferard/fastods/blob/a034d173083ffa602dc525699b97f753082eaef9/fastods/src/main/java/com/github/jferard/fastods/PageSection.java#L105-L107 |
103,441 | jferard/fastods | fastods/src/main/java/com/github/jferard/fastods/PageSection.java | PageSection.simpleHeader | public static Header simpleHeader(final String text, final TextStyle ts) {
return new SimplePageSectionBuilder().text(Text.styledContent(text, ts)).buildHeader();
} | java | public static Header simpleHeader(final String text, final TextStyle ts) {
return new SimplePageSectionBuilder().text(Text.styledContent(text, ts)).buildHeader();
} | [
"public",
"static",
"Header",
"simpleHeader",
"(",
"final",
"String",
"text",
",",
"final",
"TextStyle",
"ts",
")",
"{",
"return",
"new",
"SimplePageSectionBuilder",
"(",
")",
".",
"text",
"(",
"Text",
".",
"styledContent",
"(",
"text",
",",
"ts",
")",
")"... | Create a simple header, with a styled text
@param text the text
@param ts the style
@return the header | [
"Create",
"a",
"simple",
"header",
"with",
"a",
"styled",
"text"
] | a034d173083ffa602dc525699b97f753082eaef9 | https://github.com/jferard/fastods/blob/a034d173083ffa602dc525699b97f753082eaef9/fastods/src/main/java/com/github/jferard/fastods/PageSection.java#L116-L118 |
103,442 | jferard/fastods | fastods/src/main/java/com/github/jferard/fastods/style/BordersBuilder.java | BordersBuilder.all | public BordersBuilder all(final Length size, final Color color,
final BorderAttribute.Style style) {
return this.all(new BorderAttribute(size, color, style));
} | java | public BordersBuilder all(final Length size, final Color color,
final BorderAttribute.Style style) {
return this.all(new BorderAttribute(size, color, style));
} | [
"public",
"BordersBuilder",
"all",
"(",
"final",
"Length",
"size",
",",
"final",
"Color",
"color",
",",
"final",
"BorderAttribute",
".",
"Style",
"style",
")",
"{",
"return",
"this",
".",
"all",
"(",
"new",
"BorderAttribute",
"(",
"size",
",",
"color",
","... | Set all borders
@param size the size of the borders as a length
@param color the color fo the borders
@param style the style of the borders
@return this for fluent style | [
"Set",
"all",
"borders"
] | a034d173083ffa602dc525699b97f753082eaef9 | https://github.com/jferard/fastods/blob/a034d173083ffa602dc525699b97f753082eaef9/fastods/src/main/java/com/github/jferard/fastods/style/BordersBuilder.java#L58-L61 |
103,443 | jferard/fastods | fastods/src/main/java/com/github/jferard/fastods/odselement/ContentElement.java | ContentElement.addChildCellStyle | public TableCellStyle addChildCellStyle(final TableCellStyle style, final TableCell.Type type) {
final TableCellStyle newStyle;
final DataStyle dataStyle = this.format.getDataStyle(type);
if (dataStyle == null) {
newStyle = style;
} else {
newStyle = this.st... | java | public TableCellStyle addChildCellStyle(final TableCellStyle style, final TableCell.Type type) {
final TableCellStyle newStyle;
final DataStyle dataStyle = this.format.getDataStyle(type);
if (dataStyle == null) {
newStyle = style;
} else {
newStyle = this.st... | [
"public",
"TableCellStyle",
"addChildCellStyle",
"(",
"final",
"TableCellStyle",
"style",
",",
"final",
"TableCell",
".",
"Type",
"type",
")",
"{",
"final",
"TableCellStyle",
"newStyle",
";",
"final",
"DataStyle",
"dataStyle",
"=",
"this",
".",
"format",
".",
"g... | Create an automatic style for this TableCellStyle and this type of cell.
Do not produce any effect if the type is Type.STRING or Type.VOID.
@param style the style of the cell (color, data style, etc.)
@param type the type of the cell
@return the created style, or style if the type is Type.STRING or Type.VOID | [
"Create",
"an",
"automatic",
"style",
"for",
"this",
"TableCellStyle",
"and",
"this",
"type",
"of",
"cell",
".",
"Do",
"not",
"produce",
"any",
"effect",
"if",
"the",
"type",
"is",
"Type",
".",
"STRING",
"or",
"Type",
".",
"VOID",
"."
] | a034d173083ffa602dc525699b97f753082eaef9 | https://github.com/jferard/fastods/blob/a034d173083ffa602dc525699b97f753082eaef9/fastods/src/main/java/com/github/jferard/fastods/odselement/ContentElement.java#L87-L96 |
103,444 | jferard/fastods | fastods/src/main/java/com/github/jferard/fastods/odselement/ContentElement.java | ContentElement.flushRows | public void flushRows(final XMLUtil util, final ZipUTF8Writer writer,
final SettingsElement settingsElement) throws IOException {
this.ensureContentBegin(util, writer);
final int lastTableIndex = this.tables.size() - 1;
if (lastTableIndex == -1) return;
i... | java | public void flushRows(final XMLUtil util, final ZipUTF8Writer writer,
final SettingsElement settingsElement) throws IOException {
this.ensureContentBegin(util, writer);
final int lastTableIndex = this.tables.size() - 1;
if (lastTableIndex == -1) return;
i... | [
"public",
"void",
"flushRows",
"(",
"final",
"XMLUtil",
"util",
",",
"final",
"ZipUTF8Writer",
"writer",
",",
"final",
"SettingsElement",
"settingsElement",
")",
"throws",
"IOException",
"{",
"this",
".",
"ensureContentBegin",
"(",
"util",
",",
"writer",
")",
";... | Flush the rows from the last position to the current position
@param util the XML util
@param writer the destination
@param settingsElement the settings.xml representation
@throws IOException if the rows were not flushed | [
"Flush",
"the",
"rows",
"from",
"the",
"last",
"position",
"to",
"the",
"current",
"position"
] | a034d173083ffa602dc525699b97f753082eaef9 | https://github.com/jferard/fastods/blob/a034d173083ffa602dc525699b97f753082eaef9/fastods/src/main/java/com/github/jferard/fastods/odselement/ContentElement.java#L130-L154 |
103,445 | jferard/fastods | fastods/src/main/java/com/github/jferard/fastods/odselement/ContentElement.java | ContentElement.flushTables | public void flushTables(final XMLUtil util, final ZipUTF8Writer writer) throws IOException {
this.ensureContentBegin(util, writer);
final int lastTableIndex = this.tables.size() - 1;
if (lastTableIndex < 0)
return;
int tableIndex = this.flushPosition.getTableIndex();
... | java | public void flushTables(final XMLUtil util, final ZipUTF8Writer writer) throws IOException {
this.ensureContentBegin(util, writer);
final int lastTableIndex = this.tables.size() - 1;
if (lastTableIndex < 0)
return;
int tableIndex = this.flushPosition.getTableIndex();
... | [
"public",
"void",
"flushTables",
"(",
"final",
"XMLUtil",
"util",
",",
"final",
"ZipUTF8Writer",
"writer",
")",
"throws",
"IOException",
"{",
"this",
".",
"ensureContentBegin",
"(",
"util",
",",
"writer",
")",
";",
"final",
"int",
"lastTableIndex",
"=",
"this"... | Flush the tables.
@param util an XML util
@param writer destination
@throws IOException if the tables were not flushed | [
"Flush",
"the",
"tables",
"."
] | a034d173083ffa602dc525699b97f753082eaef9 | https://github.com/jferard/fastods/blob/a034d173083ffa602dc525699b97f753082eaef9/fastods/src/main/java/com/github/jferard/fastods/odselement/ContentElement.java#L163-L179 |
103,446 | jferard/fastods | fastods/src/main/java/com/github/jferard/fastods/odselement/ContentElement.java | ContentElement.writePostamble | public void writePostamble(final XMLUtil util, final ZipUTF8Writer writer) throws IOException {
if (this.autofilters != null) this.appendAutofilters(writer, util);
writer.write("</office:spreadsheet>");
writer.write("</office:body>");
writer.write("</office:document-content>");
... | java | public void writePostamble(final XMLUtil util, final ZipUTF8Writer writer) throws IOException {
if (this.autofilters != null) this.appendAutofilters(writer, util);
writer.write("</office:spreadsheet>");
writer.write("</office:body>");
writer.write("</office:document-content>");
... | [
"public",
"void",
"writePostamble",
"(",
"final",
"XMLUtil",
"util",
",",
"final",
"ZipUTF8Writer",
"writer",
")",
"throws",
"IOException",
"{",
"if",
"(",
"this",
".",
"autofilters",
"!=",
"null",
")",
"this",
".",
"appendAutofilters",
"(",
"writer",
",",
"... | Write the postamble into the given writer. Used by the FinalizeFlusher and by standard write method
@param util an XML util
@param writer the destination
@throws IOException if the postamble could not be written | [
"Write",
"the",
"postamble",
"into",
"the",
"given",
"writer",
".",
"Used",
"by",
"the",
"FinalizeFlusher",
"and",
"by",
"standard",
"write",
"method"
] | a034d173083ffa602dc525699b97f753082eaef9 | https://github.com/jferard/fastods/blob/a034d173083ffa602dc525699b97f753082eaef9/fastods/src/main/java/com/github/jferard/fastods/odselement/ContentElement.java#L241-L248 |
103,447 | jferard/fastods | fastods/src/main/java/com/github/jferard/fastods/odselement/ContentElement.java | ContentElement.writePreamble | public void writePreamble(final XMLUtil util, final ZipUTF8Writer writer) throws IOException {
writer.putNextEntry(new ZipEntry("content.xml"));
writer.write("<?xml version=\"1.0\" encoding=\"UTF-8\"?>");
writer.write(
"<office:document-content xmlns:office=\"urn:oasis:names:... | java | public void writePreamble(final XMLUtil util, final ZipUTF8Writer writer) throws IOException {
writer.putNextEntry(new ZipEntry("content.xml"));
writer.write("<?xml version=\"1.0\" encoding=\"UTF-8\"?>");
writer.write(
"<office:document-content xmlns:office=\"urn:oasis:names:... | [
"public",
"void",
"writePreamble",
"(",
"final",
"XMLUtil",
"util",
",",
"final",
"ZipUTF8Writer",
"writer",
")",
"throws",
"IOException",
"{",
"writer",
".",
"putNextEntry",
"(",
"new",
"ZipEntry",
"(",
"\"content.xml\"",
")",
")",
";",
"writer",
".",
"write"... | Write the preamble into the given writer. Used by the MetaAndStylesElementsFlusher and by standard write method
@param util an XML util
@param writer the destination
@throws IOException if the preamble was not written | [
"Write",
"the",
"preamble",
"into",
"the",
"given",
"writer",
".",
"Used",
"by",
"the",
"MetaAndStylesElementsFlusher",
"and",
"by",
"standard",
"write",
"method"
] | a034d173083ffa602dc525699b97f753082eaef9 | https://github.com/jferard/fastods/blob/a034d173083ffa602dc525699b97f753082eaef9/fastods/src/main/java/com/github/jferard/fastods/odselement/ContentElement.java#L257-L270 |
103,448 | jferard/fastods | fastods/src/main/java/com/github/jferard/fastods/TextBuilder.java | TextBuilder.parStyledContent | public TextBuilder parStyledContent(final String text, final TextStyle ts) {
return this.par().styledSpan(text, ts);
} | java | public TextBuilder parStyledContent(final String text, final TextStyle ts) {
return this.par().styledSpan(text, ts);
} | [
"public",
"TextBuilder",
"parStyledContent",
"(",
"final",
"String",
"text",
",",
"final",
"TextStyle",
"ts",
")",
"{",
"return",
"this",
".",
"par",
"(",
")",
".",
"styledSpan",
"(",
"text",
",",
"ts",
")",
";",
"}"
] | Create a new paragraph with a text content
@param text the text
@param ts the style
@return this for fluent style | [
"Create",
"a",
"new",
"paragraph",
"with",
"a",
"text",
"content"
] | a034d173083ffa602dc525699b97f753082eaef9 | https://github.com/jferard/fastods/blob/a034d173083ffa602dc525699b97f753082eaef9/fastods/src/main/java/com/github/jferard/fastods/TextBuilder.java#L98-L100 |
103,449 | jferard/fastods | fastods/src/main/java/com/github/jferard/fastods/NamedOdsDocument.java | NamedOdsDocument.addChildCellStyle | public void addChildCellStyle(final TableCellStyle style, final TableCell.Type type) {
this.odsElements.addChildCellStyle(style, type);
} | java | public void addChildCellStyle(final TableCellStyle style, final TableCell.Type type) {
this.odsElements.addChildCellStyle(style, type);
} | [
"public",
"void",
"addChildCellStyle",
"(",
"final",
"TableCellStyle",
"style",
",",
"final",
"TableCell",
".",
"Type",
"type",
")",
"{",
"this",
".",
"odsElements",
".",
"addChildCellStyle",
"(",
"style",
",",
"type",
")",
";",
"}"
] | Add a cell style for a given data type. Use only if you want to flush data before the end
of the document
construction.
Do not produce any effect if the type is Type.STRING or Type.VOID
@param style the style
@param type the data type | [
"Add",
"a",
"cell",
"style",
"for",
"a",
"given",
"data",
"type",
".",
"Use",
"only",
"if",
"you",
"want",
"to",
"flush",
"data",
"before",
"the",
"end",
"of",
"the",
"document",
"construction",
".",
"Do",
"not",
"produce",
"any",
"effect",
"if",
"the"... | a034d173083ffa602dc525699b97f753082eaef9 | https://github.com/jferard/fastods/blob/a034d173083ffa602dc525699b97f753082eaef9/fastods/src/main/java/com/github/jferard/fastods/NamedOdsDocument.java#L168-L170 |
103,450 | jferard/fastods | fastods/src/main/java/com/github/jferard/fastods/PreprocessedRowsFlusher.java | PreprocessedRowsFlusher.create | public static PreprocessedRowsFlusher create(final XMLUtil xmlUtil, final List<TableRow> tableRows) throws IOException {
return new PreprocessedRowsFlusher(xmlUtil, tableRows, new StringBuilder(STRING_BUILDER_SIZE));
} | java | public static PreprocessedRowsFlusher create(final XMLUtil xmlUtil, final List<TableRow> tableRows) throws IOException {
return new PreprocessedRowsFlusher(xmlUtil, tableRows, new StringBuilder(STRING_BUILDER_SIZE));
} | [
"public",
"static",
"PreprocessedRowsFlusher",
"create",
"(",
"final",
"XMLUtil",
"xmlUtil",
",",
"final",
"List",
"<",
"TableRow",
">",
"tableRows",
")",
"throws",
"IOException",
"{",
"return",
"new",
"PreprocessedRowsFlusher",
"(",
"xmlUtil",
",",
"tableRows",
"... | Create an new rows flusher
@param xmlUtil an util
@param tableRows the rows
@return the flusher
@throws IOException if an I/O error occurs | [
"Create",
"an",
"new",
"rows",
"flusher"
] | a034d173083ffa602dc525699b97f753082eaef9 | https://github.com/jferard/fastods/blob/a034d173083ffa602dc525699b97f753082eaef9/fastods/src/main/java/com/github/jferard/fastods/PreprocessedRowsFlusher.java#L48-L50 |
103,451 | jferard/fastods | fastods/src/main/java/com/github/jferard/fastods/Text.java | Text.styledContent | public static Text styledContent(final String text, final TextStyle ts) {
return Text.builder().parStyledContent(text, ts).build();
} | java | public static Text styledContent(final String text, final TextStyle ts) {
return Text.builder().parStyledContent(text, ts).build();
} | [
"public",
"static",
"Text",
"styledContent",
"(",
"final",
"String",
"text",
",",
"final",
"TextStyle",
"ts",
")",
"{",
"return",
"Text",
".",
"builder",
"(",
")",
".",
"parStyledContent",
"(",
"text",
",",
"ts",
")",
".",
"build",
"(",
")",
";",
"}"
] | Create a simple Text object with a style
@param text the text content
@param ts the style
@return the Text | [
"Create",
"a",
"simple",
"Text",
"object",
"with",
"a",
"style"
] | a034d173083ffa602dc525699b97f753082eaef9 | https://github.com/jferard/fastods/blob/a034d173083ffa602dc525699b97f753082eaef9/fastods/src/main/java/com/github/jferard/fastods/Text.java#L98-L100 |
103,452 | jferard/fastods | fastods/src/main/java/com/github/jferard/fastods/OdsFileWriterAdapter.java | OdsFileWriterAdapter.flushAdaptee | public synchronized void flushAdaptee() throws IOException {
OdsFlusher flusher = this.flushers.poll();
if (flusher == null) return;
while (flusher != null) {
this.adaptee.update(flusher);
if (flusher.isEnd()) {
this.stopped = true;
this.n... | java | public synchronized void flushAdaptee() throws IOException {
OdsFlusher flusher = this.flushers.poll();
if (flusher == null) return;
while (flusher != null) {
this.adaptee.update(flusher);
if (flusher.isEnd()) {
this.stopped = true;
this.n... | [
"public",
"synchronized",
"void",
"flushAdaptee",
"(",
")",
"throws",
"IOException",
"{",
"OdsFlusher",
"flusher",
"=",
"this",
".",
"flushers",
".",
"poll",
"(",
")",
";",
"if",
"(",
"flusher",
"==",
"null",
")",
"return",
";",
"while",
"(",
"flusher",
... | Flushes all available flushers to the adaptee writer.
The thread falls asleep if we reach the end of the queue without a FinalizeFlusher.
@throws IOException if the adaptee throws an IOException | [
"Flushes",
"all",
"available",
"flushers",
"to",
"the",
"adaptee",
"writer",
".",
"The",
"thread",
"falls",
"asleep",
"if",
"we",
"reach",
"the",
"end",
"of",
"the",
"queue",
"without",
"a",
"FinalizeFlusher",
"."
] | a034d173083ffa602dc525699b97f753082eaef9 | https://github.com/jferard/fastods/blob/a034d173083ffa602dc525699b97f753082eaef9/fastods/src/main/java/com/github/jferard/fastods/OdsFileWriterAdapter.java#L97-L117 |
103,453 | jferard/fastods | fastods/src/main/java/com/github/jferard/fastods/OdsFileWriterAdapter.java | OdsFileWriterAdapter.waitForData | public synchronized void waitForData() {
while (this.flushers.isEmpty() && this.isNotStopped()) {
try {
this.wait();
} catch (final InterruptedException e) {
Thread.currentThread().interrupt();
throw new RuntimeException(e);
}
... | java | public synchronized void waitForData() {
while (this.flushers.isEmpty() && this.isNotStopped()) {
try {
this.wait();
} catch (final InterruptedException e) {
Thread.currentThread().interrupt();
throw new RuntimeException(e);
}
... | [
"public",
"synchronized",
"void",
"waitForData",
"(",
")",
"{",
"while",
"(",
"this",
".",
"flushers",
".",
"isEmpty",
"(",
")",
"&&",
"this",
".",
"isNotStopped",
"(",
")",
")",
"{",
"try",
"{",
"this",
".",
"wait",
"(",
")",
";",
"}",
"catch",
"(... | wait for the data | [
"wait",
"for",
"the",
"data"
] | a034d173083ffa602dc525699b97f753082eaef9 | https://github.com/jferard/fastods/blob/a034d173083ffa602dc525699b97f753082eaef9/fastods/src/main/java/com/github/jferard/fastods/OdsFileWriterAdapter.java#L129-L138 |
103,454 | jferard/fastods | fastods/src/main/java/com/github/jferard/fastods/util/TableNameUtil.java | TableNameUtil.escapeTableName | public String escapeTableName(final String tableName) {
// step 1: to quote or no? how many single quotes?
boolean toQuote = false;
int apostropheCount = 0;
for (int i = 0; i < tableName.length(); i++) {
final char c = tableName.charAt(i);
if (Character.isWh... | java | public String escapeTableName(final String tableName) {
// step 1: to quote or no? how many single quotes?
boolean toQuote = false;
int apostropheCount = 0;
for (int i = 0; i < tableName.length(); i++) {
final char c = tableName.charAt(i);
if (Character.isWh... | [
"public",
"String",
"escapeTableName",
"(",
"final",
"String",
"tableName",
")",
"{",
"// step 1: to quote or no? how many single quotes?\r",
"boolean",
"toQuote",
"=",
"false",
";",
"int",
"apostropheCount",
"=",
"0",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
... | 9.2.1 Referencing Table Cells
@param tableName the name of the table
@return the name of the table escaped | [
"9",
".",
"2",
".",
"1",
"Referencing",
"Table",
"Cells"
] | a034d173083ffa602dc525699b97f753082eaef9 | https://github.com/jferard/fastods/blob/a034d173083ffa602dc525699b97f753082eaef9/fastods/src/main/java/com/github/jferard/fastods/util/TableNameUtil.java#L69-L101 |
103,455 | jferard/fastods | fastods/src/main/java/com/github/jferard/fastods/odselement/StylesContainer.java | StylesContainer.addChildCellStyle | public TableCellStyle addChildCellStyle(final TableCellStyle style, final DataStyle dataStyle) {
final ChildCellStyle childKey = new ChildCellStyle(style, dataStyle);
TableCellStyle anonymousStyle = this.anonymousStyleByChildCellStyle.get(childKey);
if (anonymousStyle == null) {
this... | java | public TableCellStyle addChildCellStyle(final TableCellStyle style, final DataStyle dataStyle) {
final ChildCellStyle childKey = new ChildCellStyle(style, dataStyle);
TableCellStyle anonymousStyle = this.anonymousStyleByChildCellStyle.get(childKey);
if (anonymousStyle == null) {
this... | [
"public",
"TableCellStyle",
"addChildCellStyle",
"(",
"final",
"TableCellStyle",
"style",
",",
"final",
"DataStyle",
"dataStyle",
")",
"{",
"final",
"ChildCellStyle",
"childKey",
"=",
"new",
"ChildCellStyle",
"(",
"style",
",",
"dataStyle",
")",
";",
"TableCellStyle... | Add a child style that mixes the cell style with a data style to the container
@param style the cell style
@param dataStyle the data style
@return the mixed cell style | [
"Add",
"a",
"child",
"style",
"that",
"mixes",
"the",
"cell",
"style",
"with",
"a",
"data",
"style",
"to",
"the",
"container"
] | a034d173083ffa602dc525699b97f753082eaef9 | https://github.com/jferard/fastods/blob/a034d173083ffa602dc525699b97f753082eaef9/fastods/src/main/java/com/github/jferard/fastods/odselement/StylesContainer.java#L124-L143 |
103,456 | jferard/fastods | fastods/src/main/java/com/github/jferard/fastods/odselement/StylesContainer.java | StylesContainer.addDataStyle | public boolean addDataStyle(final DataStyle dataStyle) {
if (dataStyle.isHidden()) {
return this.dataStylesContainer
.add(dataStyle.getName(), Dest.CONTENT_AUTOMATIC_STYLES, dataStyle);
} else {
return this.dataStylesContainer
.add(dataStyl... | java | public boolean addDataStyle(final DataStyle dataStyle) {
if (dataStyle.isHidden()) {
return this.dataStylesContainer
.add(dataStyle.getName(), Dest.CONTENT_AUTOMATIC_STYLES, dataStyle);
} else {
return this.dataStylesContainer
.add(dataStyl... | [
"public",
"boolean",
"addDataStyle",
"(",
"final",
"DataStyle",
"dataStyle",
")",
"{",
"if",
"(",
"dataStyle",
".",
"isHidden",
"(",
")",
")",
"{",
"return",
"this",
".",
"dataStylesContainer",
".",
"add",
"(",
"dataStyle",
".",
"getName",
"(",
")",
",",
... | Create a new data style into styles container. No duplicate style name is allowed.
Must be used if the table-cell style already exists.
@param dataStyle the data style to add
@return true if the style was added | [
"Create",
"a",
"new",
"data",
"style",
"into",
"styles",
"container",
".",
"No",
"duplicate",
"style",
"name",
"is",
"allowed",
".",
"Must",
"be",
"used",
"if",
"the",
"table",
"-",
"cell",
"style",
"already",
"exists",
"."
] | a034d173083ffa602dc525699b97f753082eaef9 | https://github.com/jferard/fastods/blob/a034d173083ffa602dc525699b97f753082eaef9/fastods/src/main/java/com/github/jferard/fastods/odselement/StylesContainer.java#L178-L186 |
103,457 | jferard/fastods | fastods/src/main/java/com/github/jferard/fastods/odselement/StylesContainer.java | StylesContainer.addMasterPageStyle | public boolean addMasterPageStyle(final MasterPageStyle masterPageStyle) {
if (this.masterPageStylesContainer.add(masterPageStyle.getName(), masterPageStyle)) {
masterPageStyle.addEmbeddedStyles(this);
return true;
} else return false;
} | java | public boolean addMasterPageStyle(final MasterPageStyle masterPageStyle) {
if (this.masterPageStylesContainer.add(masterPageStyle.getName(), masterPageStyle)) {
masterPageStyle.addEmbeddedStyles(this);
return true;
} else return false;
} | [
"public",
"boolean",
"addMasterPageStyle",
"(",
"final",
"MasterPageStyle",
"masterPageStyle",
")",
"{",
"if",
"(",
"this",
".",
"masterPageStylesContainer",
".",
"add",
"(",
"masterPageStyle",
".",
"getName",
"(",
")",
",",
"masterPageStyle",
")",
")",
"{",
"ma... | Create a new master page style into styles container. No duplicate style name is allowed.
@param masterPageStyle the data style to add
@return true if the style was created | [
"Create",
"a",
"new",
"master",
"page",
"style",
"into",
"styles",
"container",
".",
"No",
"duplicate",
"style",
"name",
"is",
"allowed",
"."
] | a034d173083ffa602dc525699b97f753082eaef9 | https://github.com/jferard/fastods/blob/a034d173083ffa602dc525699b97f753082eaef9/fastods/src/main/java/com/github/jferard/fastods/odselement/StylesContainer.java#L203-L208 |
103,458 | jferard/fastods | fastods/src/main/java/com/github/jferard/fastods/odselement/StylesContainer.java | StylesContainer.addNewDataStyleFromCellStyle | public boolean addNewDataStyleFromCellStyle(final TableCellStyle style) {
final boolean ret = this.addContentStyle(style);
return this.addDataStyle(style.getDataStyle()) && ret;
} | java | public boolean addNewDataStyleFromCellStyle(final TableCellStyle style) {
final boolean ret = this.addContentStyle(style);
return this.addDataStyle(style.getDataStyle()) && ret;
} | [
"public",
"boolean",
"addNewDataStyleFromCellStyle",
"(",
"final",
"TableCellStyle",
"style",
")",
"{",
"final",
"boolean",
"ret",
"=",
"this",
".",
"addContentStyle",
"(",
"style",
")",
";",
"return",
"this",
".",
"addDataStyle",
"(",
"style",
".",
"getDataStyl... | Add the data style taken from a cell style
@param style the cell style
@return true if the style was created | [
"Add",
"the",
"data",
"style",
"taken",
"from",
"a",
"cell",
"style"
] | a034d173083ffa602dc525699b97f753082eaef9 | https://github.com/jferard/fastods/blob/a034d173083ffa602dc525699b97f753082eaef9/fastods/src/main/java/com/github/jferard/fastods/odselement/StylesContainer.java#L225-L228 |
103,459 | jferard/fastods | fastods/src/main/java/com/github/jferard/fastods/odselement/StylesContainer.java | StylesContainer.addPageStyle | public boolean addPageStyle(final PageStyle ps) {
boolean ret = this.addMasterPageStyle(ps.getMasterPageStyle());
ret = this.addPageLayoutStyle(ps.getPageLayoutStyle()) && ret;
return ret;
} | java | public boolean addPageStyle(final PageStyle ps) {
boolean ret = this.addMasterPageStyle(ps.getMasterPageStyle());
ret = this.addPageLayoutStyle(ps.getPageLayoutStyle()) && ret;
return ret;
} | [
"public",
"boolean",
"addPageStyle",
"(",
"final",
"PageStyle",
"ps",
")",
"{",
"boolean",
"ret",
"=",
"this",
".",
"addMasterPageStyle",
"(",
"ps",
".",
"getMasterPageStyle",
"(",
")",
")",
";",
"ret",
"=",
"this",
".",
"addPageLayoutStyle",
"(",
"ps",
".... | Add a page style
@param ps the style
@return true if the master page style and the style layout where added | [
"Add",
"a",
"page",
"style"
] | a034d173083ffa602dc525699b97f753082eaef9 | https://github.com/jferard/fastods/blob/a034d173083ffa602dc525699b97f753082eaef9/fastods/src/main/java/com/github/jferard/fastods/odselement/StylesContainer.java#L267-L271 |
103,460 | jferard/fastods | fastods/src/main/java/com/github/jferard/fastods/odselement/StylesContainer.java | StylesContainer.writeContentAutomaticStyles | public void writeContentAutomaticStyles(final XMLUtil util, final Appendable appendable)
throws IOException {
final Iterable<ObjectStyle> styles = this.objectStylesContainer
.getValues(Dest.CONTENT_AUTOMATIC_STYLES);
for (final ObjectStyle style : styles)
assert s... | java | public void writeContentAutomaticStyles(final XMLUtil util, final Appendable appendable)
throws IOException {
final Iterable<ObjectStyle> styles = this.objectStylesContainer
.getValues(Dest.CONTENT_AUTOMATIC_STYLES);
for (final ObjectStyle style : styles)
assert s... | [
"public",
"void",
"writeContentAutomaticStyles",
"(",
"final",
"XMLUtil",
"util",
",",
"final",
"Appendable",
"appendable",
")",
"throws",
"IOException",
"{",
"final",
"Iterable",
"<",
"ObjectStyle",
">",
"styles",
"=",
"this",
".",
"objectStylesContainer",
".",
"... | Write the various styles in the automatic styles.
@param util an XML util
@param appendable the destination
@throws IOException if the styles can't be written | [
"Write",
"the",
"various",
"styles",
"in",
"the",
"automatic",
"styles",
"."
] | a034d173083ffa602dc525699b97f753082eaef9 | https://github.com/jferard/fastods/blob/a034d173083ffa602dc525699b97f753082eaef9/fastods/src/main/java/com/github/jferard/fastods/odselement/StylesContainer.java#L363-L371 |
103,461 | jferard/fastods | fastods/src/main/java/com/github/jferard/fastods/RegionPageSectionBuilder.java | RegionPageSectionBuilder.region | public RegionPageSectionBuilder region(final PageSectionContent.Region region) {
switch (region) {
case LEFT: // Use left region
this.curRegionBox = this.leftRegionBox;
break;
case CENTER: // Use center region
this.curRegionBox = this.centerRegionBox;
break;
case RIGHT: // Use right region
this.c... | java | public RegionPageSectionBuilder region(final PageSectionContent.Region region) {
switch (region) {
case LEFT: // Use left region
this.curRegionBox = this.leftRegionBox;
break;
case CENTER: // Use center region
this.curRegionBox = this.centerRegionBox;
break;
case RIGHT: // Use right region
this.c... | [
"public",
"RegionPageSectionBuilder",
"region",
"(",
"final",
"PageSectionContent",
".",
"Region",
"region",
")",
"{",
"switch",
"(",
"region",
")",
"{",
"case",
"LEFT",
":",
"// Use left region",
"this",
".",
"curRegionBox",
"=",
"this",
".",
"leftRegionBox",
"... | Switch to a new region
@param region the region that will be set
@return this for fluent style | [
"Switch",
"to",
"a",
"new",
"region"
] | a034d173083ffa602dc525699b97f753082eaef9 | https://github.com/jferard/fastods/blob/a034d173083ffa602dc525699b97f753082eaef9/fastods/src/main/java/com/github/jferard/fastods/RegionPageSectionBuilder.java#L69-L84 |
103,462 | jferard/fastods | fastods/src/main/java/com/github/jferard/fastods/util/MultiContainer.java | MultiContainer.add | public boolean add(final K key, final S subcontainer, final V value) {
final S curSubcontainer = this.subcontainerByKey.get(key);
if (curSubcontainer == null) { // key does not exist
if (this.mode == Mode.UPDATE)
return false;
} else { // key exists
if (this.mode == Mode.CREATE)
return false;
i... | java | public boolean add(final K key, final S subcontainer, final V value) {
final S curSubcontainer = this.subcontainerByKey.get(key);
if (curSubcontainer == null) { // key does not exist
if (this.mode == Mode.UPDATE)
return false;
} else { // key exists
if (this.mode == Mode.CREATE)
return false;
i... | [
"public",
"boolean",
"add",
"(",
"final",
"K",
"key",
",",
"final",
"S",
"subcontainer",
",",
"final",
"V",
"value",
")",
"{",
"final",
"S",
"curSubcontainer",
"=",
"this",
".",
"subcontainerByKey",
".",
"get",
"(",
"key",
")",
";",
"if",
"(",
"curSubc... | Add a value to this multi container
@param key the key
@param subcontainer the sub container
@param value the value
@return true | [
"Add",
"a",
"value",
"to",
"this",
"multi",
"container"
] | a034d173083ffa602dc525699b97f753082eaef9 | https://github.com/jferard/fastods/blob/a034d173083ffa602dc525699b97f753082eaef9/fastods/src/main/java/com/github/jferard/fastods/util/MultiContainer.java#L79-L111 |
103,463 | jferard/fastods | fastods/src/main/java/com/github/jferard/fastods/TableColdCell.java | TableColdCell.setTooltip | public void setTooltip(final String tooltip) {
String escapedXMLContent = this.xmlUtil.escapeXMLContent(tooltip);
if (escapedXMLContent.contains("\n")) {
escapedXMLContent = escapedXMLContent.replaceAll("\r?\n", "</text:p><text:p>");
}
this.tooltip = escapedXMLContent;
} | java | public void setTooltip(final String tooltip) {
String escapedXMLContent = this.xmlUtil.escapeXMLContent(tooltip);
if (escapedXMLContent.contains("\n")) {
escapedXMLContent = escapedXMLContent.replaceAll("\r?\n", "</text:p><text:p>");
}
this.tooltip = escapedXMLContent;
} | [
"public",
"void",
"setTooltip",
"(",
"final",
"String",
"tooltip",
")",
"{",
"String",
"escapedXMLContent",
"=",
"this",
".",
"xmlUtil",
".",
"escapeXMLContent",
"(",
"tooltip",
")",
";",
"if",
"(",
"escapedXMLContent",
".",
"contains",
"(",
"\"\\n\"",
")",
... | Set a tooltip
@param tooltip the content | [
"Set",
"a",
"tooltip"
] | a034d173083ffa602dc525699b97f753082eaef9 | https://github.com/jferard/fastods/blob/a034d173083ffa602dc525699b97f753082eaef9/fastods/src/main/java/com/github/jferard/fastods/TableColdCell.java#L94-L101 |
103,464 | jferard/fastods | fastods/src/main/java/com/github/jferard/fastods/TableColdCell.java | TableColdCell.setTooltip | public void setTooltip(final String tooltip, final Length width, final Length height, final boolean visible) {
this.setTooltip(tooltip);
this.tooltipParameter = TooltipParameter.create(width, height, visible);
} | java | public void setTooltip(final String tooltip, final Length width, final Length height, final boolean visible) {
this.setTooltip(tooltip);
this.tooltipParameter = TooltipParameter.create(width, height, visible);
} | [
"public",
"void",
"setTooltip",
"(",
"final",
"String",
"tooltip",
",",
"final",
"Length",
"width",
",",
"final",
"Length",
"height",
",",
"final",
"boolean",
"visible",
")",
"{",
"this",
".",
"setTooltip",
"(",
"tooltip",
")",
";",
"this",
".",
"tooltipPa... | Set a tooltip of a given size
@param tooltip the content
@param width the width of the tooltip
@param height the height of the tooltip
@param visible true if the tooltip is visible | [
"Set",
"a",
"tooltip",
"of",
"a",
"given",
"size"
] | a034d173083ffa602dc525699b97f753082eaef9 | https://github.com/jferard/fastods/blob/a034d173083ffa602dc525699b97f753082eaef9/fastods/src/main/java/com/github/jferard/fastods/TableColdCell.java#L111-L114 |
103,465 | jferard/fastods | fastods/src/main/java/com/github/jferard/fastods/ParagraphBuilder.java | ParagraphBuilder.span | public ParagraphBuilder span(final String text) {
final ParagraphElement paragraphElement = new Span(text);
this.paragraphElements.add(paragraphElement);
return this;
} | java | public ParagraphBuilder span(final String text) {
final ParagraphElement paragraphElement = new Span(text);
this.paragraphElements.add(paragraphElement);
return this;
} | [
"public",
"ParagraphBuilder",
"span",
"(",
"final",
"String",
"text",
")",
"{",
"final",
"ParagraphElement",
"paragraphElement",
"=",
"new",
"Span",
"(",
"text",
")",
";",
"this",
".",
"paragraphElements",
".",
"add",
"(",
"paragraphElement",
")",
";",
"return... | Create a span in the current paragraph.
@param text the text
@return this for fluent style | [
"Create",
"a",
"span",
"in",
"the",
"current",
"paragraph",
"."
] | a034d173083ffa602dc525699b97f753082eaef9 | https://github.com/jferard/fastods/blob/a034d173083ffa602dc525699b97f753082eaef9/fastods/src/main/java/com/github/jferard/fastods/ParagraphBuilder.java#L61-L65 |
103,466 | jferard/fastods | fastods/src/main/java/com/github/jferard/fastods/ParagraphBuilder.java | ParagraphBuilder.styledSpan | public ParagraphBuilder styledSpan(final String text, final TextStyle ts) {
final ParagraphElement paragraphElement = new Span(text, ts);
this.paragraphElements.add(paragraphElement);
return this;
} | java | public ParagraphBuilder styledSpan(final String text, final TextStyle ts) {
final ParagraphElement paragraphElement = new Span(text, ts);
this.paragraphElements.add(paragraphElement);
return this;
} | [
"public",
"ParagraphBuilder",
"styledSpan",
"(",
"final",
"String",
"text",
",",
"final",
"TextStyle",
"ts",
")",
"{",
"final",
"ParagraphElement",
"paragraphElement",
"=",
"new",
"Span",
"(",
"text",
",",
"ts",
")",
";",
"this",
".",
"paragraphElements",
".",... | Create a styled span with a text content
@param text the text
@param ts the style
@return this for fluent style | [
"Create",
"a",
"styled",
"span",
"with",
"a",
"text",
"content"
] | a034d173083ffa602dc525699b97f753082eaef9 | https://github.com/jferard/fastods/blob/a034d173083ffa602dc525699b97f753082eaef9/fastods/src/main/java/com/github/jferard/fastods/ParagraphBuilder.java#L183-L187 |
103,467 | jferard/fastods | fastods/src/main/java/com/github/jferard/fastods/TableBuilder.java | TableBuilder.create | public static TableBuilder create(final PositionUtil positionUtil, final WriteUtil writeUtil,
final XMLUtil xmlUtil, final StylesContainer stylesContainer,
final DataStyles format, final boolean libreOfficeMode, final String name,
... | java | public static TableBuilder create(final PositionUtil positionUtil, final WriteUtil writeUtil,
final XMLUtil xmlUtil, final StylesContainer stylesContainer,
final DataStyles format, final boolean libreOfficeMode, final String name,
... | [
"public",
"static",
"TableBuilder",
"create",
"(",
"final",
"PositionUtil",
"positionUtil",
",",
"final",
"WriteUtil",
"writeUtil",
",",
"final",
"XMLUtil",
"xmlUtil",
",",
"final",
"StylesContainer",
"stylesContainer",
",",
"final",
"DataStyles",
"format",
",",
"fi... | Create a new table builder
@param positionUtil an util
@param writeUtil an util
@param xmlUtil an util
@param stylesContainer the container
@param format the available data styles
@param name the name of the table
@param rowCapacity the row capacity of the table
@param columnCa... | [
"Create",
"a",
"new",
"table",
"builder"
] | a034d173083ffa602dc525699b97f753082eaef9 | https://github.com/jferard/fastods/blob/a034d173083ffa602dc525699b97f753082eaef9/fastods/src/main/java/com/github/jferard/fastods/TableBuilder.java#L93-L116 |
103,468 | jferard/fastods | fastods/src/main/java/com/github/jferard/fastods/TableBuilder.java | TableBuilder.flushEndTable | public void flushEndTable(final TableAppender appender) throws IOException {
this.observer.update(new EndTableFlusher(appender,
this.tableRows.subList(this.lastFlushedRowIndex, this.tableRows.usedSize())));
} | java | public void flushEndTable(final TableAppender appender) throws IOException {
this.observer.update(new EndTableFlusher(appender,
this.tableRows.subList(this.lastFlushedRowIndex, this.tableRows.usedSize())));
} | [
"public",
"void",
"flushEndTable",
"(",
"final",
"TableAppender",
"appender",
")",
"throws",
"IOException",
"{",
"this",
".",
"observer",
".",
"update",
"(",
"new",
"EndTableFlusher",
"(",
"appender",
",",
"this",
".",
"tableRows",
".",
"subList",
"(",
"this",... | Flush the end of the table
@param appender the destination
@throws IOException if an error occurs | [
"Flush",
"the",
"end",
"of",
"the",
"table"
] | a034d173083ffa602dc525699b97f753082eaef9 | https://github.com/jferard/fastods/blob/a034d173083ffa602dc525699b97f753082eaef9/fastods/src/main/java/com/github/jferard/fastods/TableBuilder.java#L200-L203 |
103,469 | jferard/fastods | fastods/src/main/java/com/github/jferard/fastods/TableBuilder.java | TableBuilder.nextRow | public TableRow nextRow(final Table table, final TableAppender appender) throws IOException {
return this.getRowSecure(table, appender, this.curRowIndex + 1, true);
} | java | public TableRow nextRow(final Table table, final TableAppender appender) throws IOException {
return this.getRowSecure(table, appender, this.curRowIndex + 1, true);
} | [
"public",
"TableRow",
"nextRow",
"(",
"final",
"Table",
"table",
",",
"final",
"TableAppender",
"appender",
")",
"throws",
"IOException",
"{",
"return",
"this",
".",
"getRowSecure",
"(",
"table",
",",
"appender",
",",
"this",
".",
"curRowIndex",
"+",
"1",
",... | Get the next row
@param table the table
@param appender the appender
@return the row
@throws IOException if an I/O error occurs | [
"Get",
"the",
"next",
"row"
] | a034d173083ffa602dc525699b97f753082eaef9 | https://github.com/jferard/fastods/blob/a034d173083ffa602dc525699b97f753082eaef9/fastods/src/main/java/com/github/jferard/fastods/TableBuilder.java#L309-L311 |
103,470 | jferard/fastods | fastods/src/main/java/com/github/jferard/fastods/TableBuilder.java | TableBuilder.setStyle | public void setStyle(final TableStyle style) {
this.stylesContainer.addPageStyle(style.getPageStyle());
this.stylesContainer.addContentStyle(style);
this.style = style;
} | java | public void setStyle(final TableStyle style) {
this.stylesContainer.addPageStyle(style.getPageStyle());
this.stylesContainer.addContentStyle(style);
this.style = style;
} | [
"public",
"void",
"setStyle",
"(",
"final",
"TableStyle",
"style",
")",
"{",
"this",
".",
"stylesContainer",
".",
"addPageStyle",
"(",
"style",
".",
"getPageStyle",
"(",
")",
")",
";",
"this",
".",
"stylesContainer",
".",
"addContentStyle",
"(",
"style",
")"... | Set a new TableFamilyStyle
@param style The new TableStyle to be used | [
"Set",
"a",
"new",
"TableFamilyStyle"
] | a034d173083ffa602dc525699b97f753082eaef9 | https://github.com/jferard/fastods/blob/a034d173083ffa602dc525699b97f753082eaef9/fastods/src/main/java/com/github/jferard/fastods/TableBuilder.java#L403-L407 |
103,471 | jferard/fastods | fastods/src/main/java/com/github/jferard/fastods/TableRow.java | TableRow.appendXMLToTable | public static void appendXMLToTable(final TableRow row, final XMLUtil xmlUtil,
final Appendable appendable) throws IOException {
if (row == null) appendable.append("<row />");
else row.appendXMLToTable(xmlUtil, appendable);
} | java | public static void appendXMLToTable(final TableRow row, final XMLUtil xmlUtil,
final Appendable appendable) throws IOException {
if (row == null) appendable.append("<row />");
else row.appendXMLToTable(xmlUtil, appendable);
} | [
"public",
"static",
"void",
"appendXMLToTable",
"(",
"final",
"TableRow",
"row",
",",
"final",
"XMLUtil",
"xmlUtil",
",",
"final",
"Appendable",
"appendable",
")",
"throws",
"IOException",
"{",
"if",
"(",
"row",
"==",
"null",
")",
"appendable",
".",
"append",
... | Append the XML corresponding to a given row to the appendable
@param row a TableRow
@param xmlUtil an instance of xml util
@param appendable where to append the row XML
@throws IOException if an error occurs | [
"Append",
"the",
"XML",
"corresponding",
"to",
"a",
"given",
"row",
"to",
"the",
"appendable"
] | a034d173083ffa602dc525699b97f753082eaef9 | https://github.com/jferard/fastods/blob/a034d173083ffa602dc525699b97f753082eaef9/fastods/src/main/java/com/github/jferard/fastods/TableRow.java#L52-L56 |
103,472 | jferard/fastods | fastods/src/main/java/com/github/jferard/fastods/TableRow.java | TableRow.setColumnsSpanned | public void setColumnsSpanned(final int colIndex, final int n) {
if (n <= 1) return;
final TableCell firstCell = this.getOrCreateCell(colIndex);
if (firstCell.isCovered()) // already spanned
return;
firstCell.markColumnsSpanned(n);
this.coverRightCells(colIn... | java | public void setColumnsSpanned(final int colIndex, final int n) {
if (n <= 1) return;
final TableCell firstCell = this.getOrCreateCell(colIndex);
if (firstCell.isCovered()) // already spanned
return;
firstCell.markColumnsSpanned(n);
this.coverRightCells(colIn... | [
"public",
"void",
"setColumnsSpanned",
"(",
"final",
"int",
"colIndex",
",",
"final",
"int",
"n",
")",
"{",
"if",
"(",
"n",
"<=",
"1",
")",
"return",
";",
"final",
"TableCell",
"firstCell",
"=",
"this",
".",
"getOrCreateCell",
"(",
"colIndex",
")",
";",
... | Add a span across columns
@param colIndex the index of the first column
@param n the number of columns in the span | [
"Add",
"a",
"span",
"across",
"columns"
] | a034d173083ffa602dc525699b97f753082eaef9 | https://github.com/jferard/fastods/blob/a034d173083ffa602dc525699b97f753082eaef9/fastods/src/main/java/com/github/jferard/fastods/TableRow.java#L179-L188 |
103,473 | jferard/fastods | fastods/src/main/java/com/github/jferard/fastods/TableRow.java | TableRow.setRowsSpanned | public void setRowsSpanned(final int rowIndex, final int n) throws IOException {
if (n <= 1) return;
final TableCell firstCell = this.getOrCreateCell(rowIndex);
if (firstCell.isCovered()) return;
this.parent.setRowsSpanned(this.rowIndex, rowIndex, n);
} | java | public void setRowsSpanned(final int rowIndex, final int n) throws IOException {
if (n <= 1) return;
final TableCell firstCell = this.getOrCreateCell(rowIndex);
if (firstCell.isCovered()) return;
this.parent.setRowsSpanned(this.rowIndex, rowIndex, n);
} | [
"public",
"void",
"setRowsSpanned",
"(",
"final",
"int",
"rowIndex",
",",
"final",
"int",
"n",
")",
"throws",
"IOException",
"{",
"if",
"(",
"n",
"<=",
"1",
")",
"return",
";",
"final",
"TableCell",
"firstCell",
"=",
"this",
".",
"getOrCreateCell",
"(",
... | Add a span across rows
@param rowIndex the index of the first row
@param n the number of rows in the span
@throws IOException if the cells can't be merged | [
"Add",
"a",
"span",
"across",
"rows"
] | a034d173083ffa602dc525699b97f753082eaef9 | https://github.com/jferard/fastods/blob/a034d173083ffa602dc525699b97f753082eaef9/fastods/src/main/java/com/github/jferard/fastods/TableRow.java#L216-L223 |
103,474 | jferard/fastods | fastods/src/main/java/com/github/jferard/fastods/TableRow.java | TableRow.getOrCreateCell | public TableCell getOrCreateCell(final int colIndex) {
TableCell cell = this.cells.get(colIndex);
if (cell == null) {
cell = new TableCellImpl(this.writeUtil, this.xmlUtil, this.stylesContainer, this.dataStyles,
this.libreOfficeMode, this,
colInde... | java | public TableCell getOrCreateCell(final int colIndex) {
TableCell cell = this.cells.get(colIndex);
if (cell == null) {
cell = new TableCellImpl(this.writeUtil, this.xmlUtil, this.stylesContainer, this.dataStyles,
this.libreOfficeMode, this,
colInde... | [
"public",
"TableCell",
"getOrCreateCell",
"(",
"final",
"int",
"colIndex",
")",
"{",
"TableCell",
"cell",
"=",
"this",
".",
"cells",
".",
"get",
"(",
"colIndex",
")",
";",
"if",
"(",
"cell",
"==",
"null",
")",
"{",
"cell",
"=",
"new",
"TableCellImpl",
... | Get the cell at given index. If the cell was not created before, then it is created by this method.
@param colIndex the index of the cell in the row
@return a cell | [
"Get",
"the",
"cell",
"at",
"given",
"index",
".",
"If",
"the",
"cell",
"was",
"not",
"created",
"before",
"then",
"it",
"is",
"created",
"by",
"this",
"method",
"."
] | a034d173083ffa602dc525699b97f753082eaef9 | https://github.com/jferard/fastods/blob/a034d173083ffa602dc525699b97f753082eaef9/fastods/src/main/java/com/github/jferard/fastods/TableRow.java#L231-L240 |
103,475 | jferard/fastods | fastods/src/main/java/com/github/jferard/fastods/TableRow.java | TableRow.setStyle | public void setStyle(final TableRowStyle rowStyle) {
this.stylesContainer.addContentFontFaceContainerStyle(rowStyle);
this.stylesContainer.addContentStyle(rowStyle);
this.rowStyle = rowStyle;
} | java | public void setStyle(final TableRowStyle rowStyle) {
this.stylesContainer.addContentFontFaceContainerStyle(rowStyle);
this.stylesContainer.addContentStyle(rowStyle);
this.rowStyle = rowStyle;
} | [
"public",
"void",
"setStyle",
"(",
"final",
"TableRowStyle",
"rowStyle",
")",
"{",
"this",
".",
"stylesContainer",
".",
"addContentFontFaceContainerStyle",
"(",
"rowStyle",
")",
";",
"this",
".",
"stylesContainer",
".",
"addContentStyle",
"(",
"rowStyle",
")",
";"... | Set the row style
@param rowStyle the style | [
"Set",
"the",
"row",
"style"
] | a034d173083ffa602dc525699b97f753082eaef9 | https://github.com/jferard/fastods/blob/a034d173083ffa602dc525699b97f753082eaef9/fastods/src/main/java/com/github/jferard/fastods/TableRow.java#L247-L251 |
103,476 | jferard/fastods | fastods/src/main/java/com/github/jferard/fastods/Table.java | Table.getRow | public TableRow getRow(final String pos) throws FastOdsException, IOException {
return this.builder.getRow(this, this.appender, pos);
} | java | public TableRow getRow(final String pos) throws FastOdsException, IOException {
return this.builder.getRow(this, this.appender, pos);
} | [
"public",
"TableRow",
"getRow",
"(",
"final",
"String",
"pos",
")",
"throws",
"FastOdsException",
",",
"IOException",
"{",
"return",
"this",
".",
"builder",
".",
"getRow",
"(",
"this",
",",
"this",
".",
"appender",
",",
"pos",
")",
";",
"}"
] | Return a row from a position
@param pos the position, e.g. A5
@return the row
@throws FastOdsException if the index is invalid
@throws IOException if the row was flushed | [
"Return",
"a",
"row",
"from",
"a",
"position"
] | a034d173083ffa602dc525699b97f753082eaef9 | https://github.com/jferard/fastods/blob/a034d173083ffa602dc525699b97f753082eaef9/fastods/src/main/java/com/github/jferard/fastods/Table.java#L222-L224 |
103,477 | jferard/fastods | fastods/src/main/java/com/github/jferard/fastods/Table.java | Table.setCellMerge | public void setCellMerge(final int rowIndex, final int colIndex, final int rowMerge,
final int columnMerge) throws IOException {
this.builder.setCellMerge(this, this.appender, rowIndex, colIndex, rowMerge, columnMerge);
} | java | public void setCellMerge(final int rowIndex, final int colIndex, final int rowMerge,
final int columnMerge) throws IOException {
this.builder.setCellMerge(this, this.appender, rowIndex, colIndex, rowMerge, columnMerge);
} | [
"public",
"void",
"setCellMerge",
"(",
"final",
"int",
"rowIndex",
",",
"final",
"int",
"colIndex",
",",
"final",
"int",
"rowMerge",
",",
"final",
"int",
"columnMerge",
")",
"throws",
"IOException",
"{",
"this",
".",
"builder",
".",
"setCellMerge",
"(",
"thi... | Set a span over cells
@param rowIndex the top row
@param colIndex the leftmost col
@param rowMerge the number of rows
@param columnMerge the number of cols
@throws IOException if an error occurs | [
"Set",
"a",
"span",
"over",
"cells"
] | a034d173083ffa602dc525699b97f753082eaef9 | https://github.com/jferard/fastods/blob/a034d173083ffa602dc525699b97f753082eaef9/fastods/src/main/java/com/github/jferard/fastods/Table.java#L252-L255 |
103,478 | jferard/fastods | fastods/src/main/java/com/github/jferard/fastods/style/MasterPageStyle.java | MasterPageStyle.addEmbeddedStyles | @Override
public void addEmbeddedStyles(final StylesContainer stylesContainer) {
if (this.header != null) this.header.addEmbeddedStyles(stylesContainer);
if (this.footer != null) this.footer.addEmbeddedStyles(stylesContainer);
} | java | @Override
public void addEmbeddedStyles(final StylesContainer stylesContainer) {
if (this.header != null) this.header.addEmbeddedStyles(stylesContainer);
if (this.footer != null) this.footer.addEmbeddedStyles(stylesContainer);
} | [
"@",
"Override",
"public",
"void",
"addEmbeddedStyles",
"(",
"final",
"StylesContainer",
"stylesContainer",
")",
"{",
"if",
"(",
"this",
".",
"header",
"!=",
"null",
")",
"this",
".",
"header",
".",
"addEmbeddedStyles",
"(",
"stylesContainer",
")",
";",
"if",
... | Add the style embedded in this master page style to a container
@param stylesContainer the container | [
"Add",
"the",
"style",
"embedded",
"in",
"this",
"master",
"page",
"style",
"to",
"a",
"container"
] | a034d173083ffa602dc525699b97f753082eaef9 | https://github.com/jferard/fastods/blob/a034d173083ffa602dc525699b97f753082eaef9/fastods/src/main/java/com/github/jferard/fastods/style/MasterPageStyle.java#L70-L74 |
103,479 | jferard/fastods | fastods/src/main/java/com/github/jferard/fastods/style/MasterPageStyle.java | MasterPageStyle.appendXMLToMasterStyle | public void appendXMLToMasterStyle(final XMLUtil util, final Appendable appendable)
throws IOException {
appendable.append("<style:master-page");
util.appendEAttribute(appendable, "style:name", this.name);
util.appendEAttribute(appendable, "style:page-layout-name", this.layoutName);
... | java | public void appendXMLToMasterStyle(final XMLUtil util, final Appendable appendable)
throws IOException {
appendable.append("<style:master-page");
util.appendEAttribute(appendable, "style:name", this.name);
util.appendEAttribute(appendable, "style:page-layout-name", this.layoutName);
... | [
"public",
"void",
"appendXMLToMasterStyle",
"(",
"final",
"XMLUtil",
"util",
",",
"final",
"Appendable",
"appendable",
")",
"throws",
"IOException",
"{",
"appendable",
".",
"append",
"(",
"\"<style:master-page\"",
")",
";",
"util",
".",
"appendEAttribute",
"(",
"a... | Return the master-style informations for this PageStyle.
@param util a util for XML writing
@param appendable where to write
@throws IOException If an I/O error occurs | [
"Return",
"the",
"master",
"-",
"style",
"informations",
"for",
"this",
"PageStyle",
"."
] | a034d173083ffa602dc525699b97f753082eaef9 | https://github.com/jferard/fastods/blob/a034d173083ffa602dc525699b97f753082eaef9/fastods/src/main/java/com/github/jferard/fastods/style/MasterPageStyle.java#L88-L106 |
103,480 | jferard/fastods | fastods/src/main/java/com/github/jferard/fastods/util/ZipUTF8WriterBuilder.java | ZipUTF8WriterBuilder.build | public ZipUTF8Writer build(final OutputStream out) {
final OutputStream bufferedOut;
switch (this.zipBufferSize) {
case NO_BUFFER:
bufferedOut = out;
break;
case DEFAULT_BUFFER:
bufferedOut = new BufferedOutputStream(out);
break;
default:
bufferedOut = new BufferedOutputStream(out, this.zipBuff... | java | public ZipUTF8Writer build(final OutputStream out) {
final OutputStream bufferedOut;
switch (this.zipBufferSize) {
case NO_BUFFER:
bufferedOut = out;
break;
case DEFAULT_BUFFER:
bufferedOut = new BufferedOutputStream(out);
break;
default:
bufferedOut = new BufferedOutputStream(out, this.zipBuff... | [
"public",
"ZipUTF8Writer",
"build",
"(",
"final",
"OutputStream",
"out",
")",
"{",
"final",
"OutputStream",
"bufferedOut",
";",
"switch",
"(",
"this",
".",
"zipBufferSize",
")",
"{",
"case",
"NO_BUFFER",
":",
"bufferedOut",
"=",
"out",
";",
"break",
";",
"ca... | Build the new writer, with a given output stream
@param out the destination
@return the writer | [
"Build",
"the",
"new",
"writer",
"with",
"a",
"given",
"output",
"stream"
] | a034d173083ffa602dc525699b97f753082eaef9 | https://github.com/jferard/fastods/blob/a034d173083ffa602dc525699b97f753082eaef9/fastods/src/main/java/com/github/jferard/fastods/util/ZipUTF8WriterBuilder.java#L61-L92 |
103,481 | jferard/fastods | fastods/src/main/java/com/github/jferard/fastods/util/EqualityUtil.java | EqualityUtil.hashObjects | public int hashObjects(final Object... objects) {
final int prime = 31;
int result = 1;
for (final Object object : objects) {
result = prime * result
+ ((object == null) ? 0 : object.hashCode());
}
return result;
} | java | public int hashObjects(final Object... objects) {
final int prime = 31;
int result = 1;
for (final Object object : objects) {
result = prime * result
+ ((object == null) ? 0 : object.hashCode());
}
return result;
} | [
"public",
"int",
"hashObjects",
"(",
"final",
"Object",
"...",
"objects",
")",
"{",
"final",
"int",
"prime",
"=",
"31",
";",
"int",
"result",
"=",
"1",
";",
"for",
"(",
"final",
"Object",
"object",
":",
"objects",
")",
"{",
"result",
"=",
"prime",
"*... | Hash a bunch of objects
@param objects the objects
@return a hash code | [
"Hash",
"a",
"bunch",
"of",
"objects"
] | a034d173083ffa602dc525699b97f753082eaef9 | https://github.com/jferard/fastods/blob/a034d173083ffa602dc525699b97f753082eaef9/fastods/src/main/java/com/github/jferard/fastods/util/EqualityUtil.java#L62-L70 |
103,482 | jferard/fastods | fastods/src/main/java/com/github/jferard/fastods/util/EqualityUtil.java | EqualityUtil.hashInts | public int hashInts(final int... integers) {
final int prime = 31;
int result = 1;
for (final int integer : integers)
result = prime * result + integer;
return result;
} | java | public int hashInts(final int... integers) {
final int prime = 31;
int result = 1;
for (final int integer : integers)
result = prime * result + integer;
return result;
} | [
"public",
"int",
"hashInts",
"(",
"final",
"int",
"...",
"integers",
")",
"{",
"final",
"int",
"prime",
"=",
"31",
";",
"int",
"result",
"=",
"1",
";",
"for",
"(",
"final",
"int",
"integer",
":",
"integers",
")",
"result",
"=",
"prime",
"*",
"result"... | Hash a bunch of integers
@param integers the integers
@return a hash code | [
"Hash",
"a",
"bunch",
"of",
"integers"
] | a034d173083ffa602dc525699b97f753082eaef9 | https://github.com/jferard/fastods/blob/a034d173083ffa602dc525699b97f753082eaef9/fastods/src/main/java/com/github/jferard/fastods/util/EqualityUtil.java#L77-L83 |
103,483 | jferard/fastods | fastods/src/main/java/com/github/jferard/fastods/AnonymousOdsDocument.java | AnonymousOdsDocument.create | static AnonymousOdsDocument create(final Logger logger, final XMLUtil xmlUtil,
final OdsElements odsElements) {
return new AnonymousOdsDocument(logger, xmlUtil, odsElements,
new CommonOdsDocument(odsElements));
} | java | static AnonymousOdsDocument create(final Logger logger, final XMLUtil xmlUtil,
final OdsElements odsElements) {
return new AnonymousOdsDocument(logger, xmlUtil, odsElements,
new CommonOdsDocument(odsElements));
} | [
"static",
"AnonymousOdsDocument",
"create",
"(",
"final",
"Logger",
"logger",
",",
"final",
"XMLUtil",
"xmlUtil",
",",
"final",
"OdsElements",
"odsElements",
")",
"{",
"return",
"new",
"AnonymousOdsDocument",
"(",
"logger",
",",
"xmlUtil",
",",
"odsElements",
",",... | Create a new anonymous ODS document.
@param logger the logger
@param xmlUtil a util for XML writing
@param odsElements the ods elements (file entries in zip archive) | [
"Create",
"a",
"new",
"anonymous",
"ODS",
"document",
"."
] | a034d173083ffa602dc525699b97f753082eaef9 | https://github.com/jferard/fastods/blob/a034d173083ffa602dc525699b97f753082eaef9/fastods/src/main/java/com/github/jferard/fastods/AnonymousOdsDocument.java#L56-L60 |
103,484 | jferard/fastods | fastods/src/main/java/com/github/jferard/fastods/datastyle/CoreDataStyle.java | CoreDataStyle.appendLVAttributes | public void appendLVAttributes(final XMLUtil util,
final Appendable appendable) throws IOException {
this.appendLocaleAttributes(util, appendable);
this.appendVolatileAttribute(util, appendable);
} | java | public void appendLVAttributes(final XMLUtil util,
final Appendable appendable) throws IOException {
this.appendLocaleAttributes(util, appendable);
this.appendVolatileAttribute(util, appendable);
} | [
"public",
"void",
"appendLVAttributes",
"(",
"final",
"XMLUtil",
"util",
",",
"final",
"Appendable",
"appendable",
")",
"throws",
"IOException",
"{",
"this",
".",
"appendLocaleAttributes",
"(",
"util",
",",
"appendable",
")",
";",
"this",
".",
"appendVolatileAttri... | Append locale and volatile attributes
@param util an util
@param appendable the destination
@throws IOException if an error occurs | [
"Append",
"locale",
"and",
"volatile",
"attributes"
] | a034d173083ffa602dc525699b97f753082eaef9 | https://github.com/jferard/fastods/blob/a034d173083ffa602dc525699b97f753082eaef9/fastods/src/main/java/com/github/jferard/fastods/datastyle/CoreDataStyle.java#L80-L84 |
103,485 | jferard/fastods | fastods/src/main/java/com/github/jferard/fastods/odselement/Settings.java | Settings.create | static Settings create(final ConfigItemSet viewSettings, final ConfigItemMapEntrySet firstView,
final ConfigItemSet configurationSettings) {
final List<ConfigBlock> rootBlocks = new ArrayList<ConfigBlock>();
final ConfigItemMapIndexed views = new ConfigItemMapIndexed("Vi... | java | static Settings create(final ConfigItemSet viewSettings, final ConfigItemMapEntrySet firstView,
final ConfigItemSet configurationSettings) {
final List<ConfigBlock> rootBlocks = new ArrayList<ConfigBlock>();
final ConfigItemMapIndexed views = new ConfigItemMapIndexed("Vi... | [
"static",
"Settings",
"create",
"(",
"final",
"ConfigItemSet",
"viewSettings",
",",
"final",
"ConfigItemMapEntrySet",
"firstView",
",",
"final",
"ConfigItemSet",
"configurationSettings",
")",
"{",
"final",
"List",
"<",
"ConfigBlock",
">",
"rootBlocks",
"=",
"new",
"... | Create a new settings representation
@param viewSettings inner view settings
@param firstView the view to display
@param configurationSettings the configuration
@return the settings representation | [
"Create",
"a",
"new",
"settings",
"representation"
] | a034d173083ffa602dc525699b97f753082eaef9 | https://github.com/jferard/fastods/blob/a034d173083ffa602dc525699b97f753082eaef9/fastods/src/main/java/com/github/jferard/fastods/odselement/Settings.java#L132-L140 |
103,486 | jferard/fastods | fastods/src/main/java/com/github/jferard/fastods/datastyle/FloatStyle.java | FloatStyle.appendXMLHelper | void appendXMLHelper(final XMLUtil util, final Appendable appendable, final String numberStyleName, final CharSequence number) throws IOException {
this.numberStyle.appendXMLHelper(util, appendable, numberStyleName, number);
} | java | void appendXMLHelper(final XMLUtil util, final Appendable appendable, final String numberStyleName, final CharSequence number) throws IOException {
this.numberStyle.appendXMLHelper(util, appendable, numberStyleName, number);
} | [
"void",
"appendXMLHelper",
"(",
"final",
"XMLUtil",
"util",
",",
"final",
"Appendable",
"appendable",
",",
"final",
"String",
"numberStyleName",
",",
"final",
"CharSequence",
"number",
")",
"throws",
"IOException",
"{",
"this",
".",
"numberStyle",
".",
"appendXMLH... | A helper to create the XML representation of the float style
@param util a util
@param appendable the destination
@param numberStyleName the style name ("currency-style", ...)
@param number the number itslef
@throws IOException if an I/O error occurs | [
"A",
"helper",
"to",
"create",
"the",
"XML",
"representation",
"of",
"the",
"float",
"style"
] | a034d173083ffa602dc525699b97f753082eaef9 | https://github.com/jferard/fastods/blob/a034d173083ffa602dc525699b97f753082eaef9/fastods/src/main/java/com/github/jferard/fastods/datastyle/FloatStyle.java#L104-L106 |
103,487 | jferard/fastods | fastods/src/main/java/com/github/jferard/fastods/datastyle/NumberStyleHelper.java | NumberStyleHelper.appendXMLHelper | void appendXMLHelper(final XMLUtil util, final Appendable appendable, final String numberStyleName,
final CharSequence number) throws IOException {
this.appendOpenTag(util, appendable, numberStyleName, this.dataStyle.getName());
appendable.append(number);
this.appendClos... | java | void appendXMLHelper(final XMLUtil util, final Appendable appendable, final String numberStyleName,
final CharSequence number) throws IOException {
this.appendOpenTag(util, appendable, numberStyleName, this.dataStyle.getName());
appendable.append(number);
this.appendClos... | [
"void",
"appendXMLHelper",
"(",
"final",
"XMLUtil",
"util",
",",
"final",
"Appendable",
"appendable",
",",
"final",
"String",
"numberStyleName",
",",
"final",
"CharSequence",
"number",
")",
"throws",
"IOException",
"{",
"this",
".",
"appendOpenTag",
"(",
"util",
... | A helper to append XML content
@param util an util
@param appendable destination
@param numberStyleName the name of the number syle
@param number the number itself
@throws IOException if an I/O error occurs | [
"A",
"helper",
"to",
"append",
"XML",
"content"
] | a034d173083ffa602dc525699b97f753082eaef9 | https://github.com/jferard/fastods/blob/a034d173083ffa602dc525699b97f753082eaef9/fastods/src/main/java/com/github/jferard/fastods/datastyle/NumberStyleHelper.java#L69-L83 |
103,488 | jferard/fastods | fastods/src/main/java/com/github/jferard/fastods/datastyle/NumberStyleHelper.java | NumberStyleHelper.appendNumberAttribute | public void appendNumberAttribute(final XMLUtil util, final Appendable appendable) throws IOException {
this.appendMinIntegerDigitsAttribute(util, appendable);
this.appendGroupingAttribute(util, appendable);
} | java | public void appendNumberAttribute(final XMLUtil util, final Appendable appendable) throws IOException {
this.appendMinIntegerDigitsAttribute(util, appendable);
this.appendGroupingAttribute(util, appendable);
} | [
"public",
"void",
"appendNumberAttribute",
"(",
"final",
"XMLUtil",
"util",
",",
"final",
"Appendable",
"appendable",
")",
"throws",
"IOException",
"{",
"this",
".",
"appendMinIntegerDigitsAttribute",
"(",
"util",
",",
"appendable",
")",
";",
"this",
".",
"appendG... | Append the attributes of the number
@param util an util
@param appendable the destination
@throws IOException if an I/O error occurs | [
"Append",
"the",
"attributes",
"of",
"the",
"number"
] | a034d173083ffa602dc525699b97f753082eaef9 | https://github.com/jferard/fastods/blob/a034d173083ffa602dc525699b97f753082eaef9/fastods/src/main/java/com/github/jferard/fastods/datastyle/NumberStyleHelper.java#L119-L122 |
103,489 | jferard/fastods | fastods/src/main/java/com/github/jferard/fastods/datastyle/NumberStyleHelper.java | NumberStyleHelper.appendStyleColor | private void appendStyleColor(final XMLUtil util, final Appendable appendable) throws IOException {
appendable.append("<style:text-properties");
util.appendAttribute(appendable, "fo:color", this.negativeValueColor.hexValue());
appendable.append("/>");
} | java | private void appendStyleColor(final XMLUtil util, final Appendable appendable) throws IOException {
appendable.append("<style:text-properties");
util.appendAttribute(appendable, "fo:color", this.negativeValueColor.hexValue());
appendable.append("/>");
} | [
"private",
"void",
"appendStyleColor",
"(",
"final",
"XMLUtil",
"util",
",",
"final",
"Appendable",
"appendable",
")",
"throws",
"IOException",
"{",
"appendable",
".",
"append",
"(",
"\"<style:text-properties\"",
")",
";",
"util",
".",
"appendAttribute",
"(",
"app... | Appends the style color.
@param util XML util
@param appendable where to write
@throws IOException If an I/O error occurs | [
"Appends",
"the",
"style",
"color",
"."
] | a034d173083ffa602dc525699b97f753082eaef9 | https://github.com/jferard/fastods/blob/a034d173083ffa602dc525699b97f753082eaef9/fastods/src/main/java/com/github/jferard/fastods/datastyle/NumberStyleHelper.java#L131-L135 |
103,490 | jferard/fastods | fastods/src/main/java/com/github/jferard/fastods/odselement/config/ConfigItemMapEntrySequence.java | ConfigItemMapEntrySequence.set | public String set(final int i, final String value) {
final ConfigBlock block = this.blocks.get(i);
if (block instanceof ConfigItem) {
final ConfigItem item = (ConfigItem) block;
final String previousValue = item.getValue();
item.setValue(value);
return previousValue;
}
return null;
} | java | public String set(final int i, final String value) {
final ConfigBlock block = this.blocks.get(i);
if (block instanceof ConfigItem) {
final ConfigItem item = (ConfigItem) block;
final String previousValue = item.getValue();
item.setValue(value);
return previousValue;
}
return null;
} | [
"public",
"String",
"set",
"(",
"final",
"int",
"i",
",",
"final",
"String",
"value",
")",
"{",
"final",
"ConfigBlock",
"block",
"=",
"this",
".",
"blocks",
".",
"get",
"(",
"i",
")",
";",
"if",
"(",
"block",
"instanceof",
"ConfigItem",
")",
"{",
"fi... | Set a value for an item at a given index
@param i the index
@param value the new value
@return the previous value
@throws IndexOutOfBoundsException if the index is out of range (index < 0 || index >= size()) | [
"Set",
"a",
"value",
"for",
"an",
"item",
"at",
"a",
"given",
"index"
] | a034d173083ffa602dc525699b97f753082eaef9 | https://github.com/jferard/fastods/blob/a034d173083ffa602dc525699b97f753082eaef9/fastods/src/main/java/com/github/jferard/fastods/odselement/config/ConfigItemMapEntrySequence.java#L119-L128 |
103,491 | jferard/fastods | fastods/src/main/java/com/github/jferard/fastods/odselement/OdsElements.java | OdsElements.addChildCellStyle | public void addChildCellStyle(final TableCellStyle style, final TableCell.Type type) {
this.contentElement.addChildCellStyle(style, type);
} | java | public void addChildCellStyle(final TableCellStyle style, final TableCell.Type type) {
this.contentElement.addChildCellStyle(style, type);
} | [
"public",
"void",
"addChildCellStyle",
"(",
"final",
"TableCellStyle",
"style",
",",
"final",
"TableCell",
".",
"Type",
"type",
")",
"{",
"this",
".",
"contentElement",
".",
"addChildCellStyle",
"(",
"style",
",",
"type",
")",
";",
"}"
] | Create an automatic style for this TableCellStyle and this type of cell.
Do not produce any effect if the type is Type.STRING or Type.VOID
@param style the style of the cell (color, data style, etc.)
@param type the type of the cell | [
"Create",
"an",
"automatic",
"style",
"for",
"this",
"TableCellStyle",
"and",
"this",
"type",
"of",
"cell",
".",
"Do",
"not",
"produce",
"any",
"effect",
"if",
"the",
"type",
"is",
"Type",
".",
"STRING",
"or",
"Type",
".",
"VOID"
] | a034d173083ffa602dc525699b97f753082eaef9 | https://github.com/jferard/fastods/blob/a034d173083ffa602dc525699b97f753082eaef9/fastods/src/main/java/com/github/jferard/fastods/odselement/OdsElements.java#L127-L129 |
103,492 | jferard/fastods | fastods/src/main/java/com/github/jferard/fastods/odselement/OdsElements.java | OdsElements.addTableToContent | public Table addTableToContent(final String name, final int rowCapacity,
final int columnCapacity) throws IOException {
final Table previousTable = this.contentElement.getLastTable();
final Table table = this.contentElement.addTable(name, rowCapacity, columnCapacity... | java | public Table addTableToContent(final String name, final int rowCapacity,
final int columnCapacity) throws IOException {
final Table previousTable = this.contentElement.getLastTable();
final Table table = this.contentElement.addTable(name, rowCapacity, columnCapacity... | [
"public",
"Table",
"addTableToContent",
"(",
"final",
"String",
"name",
",",
"final",
"int",
"rowCapacity",
",",
"final",
"int",
"columnCapacity",
")",
"throws",
"IOException",
"{",
"final",
"Table",
"previousTable",
"=",
"this",
".",
"contentElement",
".",
"get... | Add a new table to content. The config for this table is added to the settings.
If the OdsElements is observed, the previous table is flushed. If there is no previous table,
meta.xml, styles.xml and the preamble of content.xml are written to destination.
@param name name of the table
@param rowCapacity es... | [
"Add",
"a",
"new",
"table",
"to",
"content",
".",
"The",
"config",
"for",
"this",
"table",
"is",
"added",
"to",
"the",
"settings",
".",
"If",
"the",
"OdsElements",
"is",
"observed",
"the",
"previous",
"table",
"is",
"flushed",
".",
"If",
"there",
"is",
... | a034d173083ffa602dc525699b97f753082eaef9 | https://github.com/jferard/fastods/blob/a034d173083ffa602dc525699b97f753082eaef9/fastods/src/main/java/com/github/jferard/fastods/odselement/OdsElements.java#L214-L226 |
103,493 | jferard/fastods | fastods/src/main/java/com/github/jferard/fastods/odselement/OdsElements.java | OdsElements.createEmptyElements | public void createEmptyElements(final ZipUTF8Writer writer) throws IOException {
this.logger.log(Level.FINER, "Writing empty ods elements to zip file");
for (final String elementName : EMPTY_ELEMENT_NAMES) {
this.logger.log(Level.FINEST, "Writing odselement: {0} to zip file", elementName)... | java | public void createEmptyElements(final ZipUTF8Writer writer) throws IOException {
this.logger.log(Level.FINER, "Writing empty ods elements to zip file");
for (final String elementName : EMPTY_ELEMENT_NAMES) {
this.logger.log(Level.FINEST, "Writing odselement: {0} to zip file", elementName)... | [
"public",
"void",
"createEmptyElements",
"(",
"final",
"ZipUTF8Writer",
"writer",
")",
"throws",
"IOException",
"{",
"this",
".",
"logger",
".",
"log",
"(",
"Level",
".",
"FINER",
",",
"\"Writing empty ods elements to zip file\"",
")",
";",
"for",
"(",
"final",
... | Create empty elements for package. Used on save or by the ImmutableElementsFlusher.
@param writer destination
@throws IOException if the elements were not created. | [
"Create",
"empty",
"elements",
"for",
"package",
".",
"Used",
"on",
"save",
"or",
"by",
"the",
"ImmutableElementsFlusher",
"."
] | a034d173083ffa602dc525699b97f753082eaef9 | https://github.com/jferard/fastods/blob/a034d173083ffa602dc525699b97f753082eaef9/fastods/src/main/java/com/github/jferard/fastods/odselement/OdsElements.java#L234-L241 |
103,494 | jferard/fastods | fastods/src/main/java/com/github/jferard/fastods/odselement/OdsElements.java | OdsElements.finalizeContent | public void finalizeContent(final XMLUtil xmlUtil, final ZipUTF8Writer writer) throws IOException {
this.contentElement.flushTables(xmlUtil, writer);
this.contentElement.writePostamble(xmlUtil, writer);
} | java | public void finalizeContent(final XMLUtil xmlUtil, final ZipUTF8Writer writer) throws IOException {
this.contentElement.flushTables(xmlUtil, writer);
this.contentElement.writePostamble(xmlUtil, writer);
} | [
"public",
"void",
"finalizeContent",
"(",
"final",
"XMLUtil",
"xmlUtil",
",",
"final",
"ZipUTF8Writer",
"writer",
")",
"throws",
"IOException",
"{",
"this",
".",
"contentElement",
".",
"flushTables",
"(",
"xmlUtil",
",",
"writer",
")",
";",
"this",
".",
"conte... | Flush tables and write end of document
@param xmlUtil the util
@param writer the stream to write
@throws IOException when write fails | [
"Flush",
"tables",
"and",
"write",
"end",
"of",
"document"
] | a034d173083ffa602dc525699b97f753082eaef9 | https://github.com/jferard/fastods/blob/a034d173083ffa602dc525699b97f753082eaef9/fastods/src/main/java/com/github/jferard/fastods/odselement/OdsElements.java#L257-L260 |
103,495 | jferard/fastods | fastods/src/main/java/com/github/jferard/fastods/odselement/OdsElements.java | OdsElements.flushRows | public void flushRows(final XMLUtil util, final ZipUTF8Writer writer) throws IOException {
this.contentElement.flushRows(util, writer, this.settingsElement);
} | java | public void flushRows(final XMLUtil util, final ZipUTF8Writer writer) throws IOException {
this.contentElement.flushRows(util, writer, this.settingsElement);
} | [
"public",
"void",
"flushRows",
"(",
"final",
"XMLUtil",
"util",
",",
"final",
"ZipUTF8Writer",
"writer",
")",
"throws",
"IOException",
"{",
"this",
".",
"contentElement",
".",
"flushRows",
"(",
"util",
",",
"writer",
",",
"this",
".",
"settingsElement",
")",
... | Flush the rows
@param util the util
@param writer the stream to write
@throws IOException when write fails | [
"Flush",
"the",
"rows"
] | a034d173083ffa602dc525699b97f753082eaef9 | https://github.com/jferard/fastods/blob/a034d173083ffa602dc525699b97f753082eaef9/fastods/src/main/java/com/github/jferard/fastods/odselement/OdsElements.java#L269-L271 |
103,496 | jferard/fastods | fastods/src/main/java/com/github/jferard/fastods/odselement/OdsElements.java | OdsElements.flushTables | public void flushTables(final XMLUtil util, final ZipUTF8Writer writer) throws IOException {
this.contentElement.flushTables(util, writer);
} | java | public void flushTables(final XMLUtil util, final ZipUTF8Writer writer) throws IOException {
this.contentElement.flushTables(util, writer);
} | [
"public",
"void",
"flushTables",
"(",
"final",
"XMLUtil",
"util",
",",
"final",
"ZipUTF8Writer",
"writer",
")",
"throws",
"IOException",
"{",
"this",
".",
"contentElement",
".",
"flushTables",
"(",
"util",
",",
"writer",
")",
";",
"}"
] | Flush the tables
@param util the util
@param writer the stream to write
@throws IOException when write fails | [
"Flush",
"the",
"tables"
] | a034d173083ffa602dc525699b97f753082eaef9 | https://github.com/jferard/fastods/blob/a034d173083ffa602dc525699b97f753082eaef9/fastods/src/main/java/com/github/jferard/fastods/odselement/OdsElements.java#L280-L282 |
103,497 | jferard/fastods | fastods/src/main/java/com/github/jferard/fastods/odselement/OdsElements.java | OdsElements.save | public void save() throws IOException {
final Table previousTable = this.contentElement.getLastTable();
if (previousTable != null) previousTable.flush();
this.observer.update(new FinalizeFlusher(this.contentElement, this.settingsElement));
} | java | public void save() throws IOException {
final Table previousTable = this.contentElement.getLastTable();
if (previousTable != null) previousTable.flush();
this.observer.update(new FinalizeFlusher(this.contentElement, this.settingsElement));
} | [
"public",
"void",
"save",
"(",
")",
"throws",
"IOException",
"{",
"final",
"Table",
"previousTable",
"=",
"this",
".",
"contentElement",
".",
"getLastTable",
"(",
")",
";",
"if",
"(",
"previousTable",
"!=",
"null",
")",
"previousTable",
".",
"flush",
"(",
... | Save the elements
@throws IOException if the write fails | [
"Save",
"the",
"elements"
] | a034d173083ffa602dc525699b97f753082eaef9 | https://github.com/jferard/fastods/blob/a034d173083ffa602dc525699b97f753082eaef9/fastods/src/main/java/com/github/jferard/fastods/odselement/OdsElements.java#L339-L344 |
103,498 | jferard/fastods | fastods/src/main/java/com/github/jferard/fastods/odselement/OdsElements.java | OdsElements.writeContent | public void writeContent(final XMLUtil xmlUtil, final ZipUTF8Writer writer) throws IOException {
this.logger.log(Level.FINER, "Writing odselement: contentElement to zip file");
this.contentElement.write(xmlUtil, writer);
} | java | public void writeContent(final XMLUtil xmlUtil, final ZipUTF8Writer writer) throws IOException {
this.logger.log(Level.FINER, "Writing odselement: contentElement to zip file");
this.contentElement.write(xmlUtil, writer);
} | [
"public",
"void",
"writeContent",
"(",
"final",
"XMLUtil",
"xmlUtil",
",",
"final",
"ZipUTF8Writer",
"writer",
")",
"throws",
"IOException",
"{",
"this",
".",
"logger",
".",
"log",
"(",
"Level",
".",
"FINER",
",",
"\"Writing odselement: contentElement to zip file\""... | Write the content element to a writer.
@param xmlUtil the xml util
@param writer the writer
@throws IOException if write fails | [
"Write",
"the",
"content",
"element",
"to",
"a",
"writer",
"."
] | a034d173083ffa602dc525699b97f753082eaef9 | https://github.com/jferard/fastods/blob/a034d173083ffa602dc525699b97f753082eaef9/fastods/src/main/java/com/github/jferard/fastods/odselement/OdsElements.java#L373-L376 |
103,499 | jferard/fastods | fastods/src/main/java/com/github/jferard/fastods/odselement/OdsElements.java | OdsElements.writeImmutableElements | public void writeImmutableElements(final XMLUtil xmlUtil, final ZipUTF8Writer writer) throws IOException {
this.logger.log(Level.FINER, "Writing odselement: mimeTypeEntry to zip file");
this.mimetypeElement.write(xmlUtil, writer);
this.logger.log(Level.FINER, "Writing odselement: manifestElem... | java | public void writeImmutableElements(final XMLUtil xmlUtil, final ZipUTF8Writer writer) throws IOException {
this.logger.log(Level.FINER, "Writing odselement: mimeTypeEntry to zip file");
this.mimetypeElement.write(xmlUtil, writer);
this.logger.log(Level.FINER, "Writing odselement: manifestElem... | [
"public",
"void",
"writeImmutableElements",
"(",
"final",
"XMLUtil",
"xmlUtil",
",",
"final",
"ZipUTF8Writer",
"writer",
")",
"throws",
"IOException",
"{",
"this",
".",
"logger",
".",
"log",
"(",
"Level",
".",
"FINER",
",",
"\"Writing odselement: mimeTypeEntry to zi... | Write the mimetype and manifest elements to a writer.
@param xmlUtil the xml util
@param writer the writer
@throws IOException if write fails | [
"Write",
"the",
"mimetype",
"and",
"manifest",
"elements",
"to",
"a",
"writer",
"."
] | a034d173083ffa602dc525699b97f753082eaef9 | https://github.com/jferard/fastods/blob/a034d173083ffa602dc525699b97f753082eaef9/fastods/src/main/java/com/github/jferard/fastods/odselement/OdsElements.java#L385-L390 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.