Add stylesheet to openxml excel file - openxml

I'm trying to insert some styles in a excel file. Right now the data part works perfectly, but the style throws an error when I open the excel. It complains that the stylesheet file has an error in line 19 of the xml. I don't know what is wrong with that line. It is where the font collection node start.
Any ideas why...
This is the xml for the style
<?xml version="1.0" encoding="utf-8"?>
<x:styleSheet xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:x14ac="http://schemas.microsoft.com/office/spreadsheetml/2009/9/ac" xmlns:x="http://schemas.openxmlformats.org/spreadsheetml/2006/main" mc:Ignorable="x14ac">
<x:borders count="1">
<x:border>
<x:left style="thin">
<x:color indexed="64" rgb="000000" />
</x:left>
<x:right style="thin">
<x:color indexed="64" rgb="000000" />
</x:right>
<x:top style="thin">
<x:color indexed="64" rgb="000000" />
</x:top>
<x:bottom style="thin">
<x:color indexed="64" rgb="000000" />
</x:bottom>
</x:border>
</x:borders>
<x:fonts count="1">
<x:font>
<x:b />
<x:sz val="12" />
<x:color rgb="000000" />
<x:name val="Arial" />
</x:font>
</x:fonts>
<x:cellXfs>
<x:xf fontId="0" borderId="0" applyFont="1" applyBorder="1" />
<x:xf fontId="0" borderId="0" applyFont="1" applyBorder="1" />
<x:xf fontId="0" borderId="0" applyFont="1" applyBorder="1" />
<x:xf fontId="0" borderId="0" applyFont="1" applyBorder="1" />
<x:xf fontId="0" borderId="0" applyFont="1" applyBorder="1" />
<x:xf borderId="0" applyBorder="1" />
<x:xf borderId="0" applyBorder="1" />
<x:xf borderId="0" applyBorder="1" />
<x:xf fontId="0" borderId="0" applyFont="1" applyBorder="1" />
<x:xf borderId="0" applyBorder="1" />
<x:xf borderId="0" applyBorder="1" />
<x:xf borderId="0" applyBorder="1" />
<x:xf fontId="0" borderId="0" applyFont="1" applyBorder="1" />
<x:xf borderId="0" applyBorder="1" />
<x:xf borderId="0" applyBorder="1" />
<x:xf borderId="0" applyBorder="1" />
<x:xf fontId="0" borderId="0" applyFont="1" applyBorder="1" />
<x:xf borderId="0" applyBorder="1" />
<x:xf borderId="0" applyBorder="1" />
<x:xf borderId="0" applyBorder="1" />
<x:xf fontId="0" borderId="0" applyFont="1" applyBorder="1" />
<x:xf borderId="0" applyBorder="1" />
<x:xf borderId="0" applyBorder="1" />
<x:xf borderId="0" applyBorder="1" />
<x:xf fontId="0" borderId="0" applyFont="1" applyBorder="1" />
<x:xf borderId="0" applyBorder="1" />
<x:xf borderId="0" applyBorder="1" />
<x:xf borderId="0" applyBorder="1" />
<x:xf fontId="0" borderId="0" applyFont="1" applyBorder="1" />
<x:xf borderId="0" applyBorder="1" />
<x:xf borderId="0" applyBorder="1" />
<x:xf borderId="0" applyBorder="1" />
</x:cellXfs>
</x:styleSheet>
UPDATE
After some testing, googling, head banging.... I came up with the following stylesheet xml
<?xml version="1.0" encoding="utf-8"?>
<x:styleSheet xmlns:x="http://schemas.openxmlformats.org/spreadsheetml/2006/main" xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:x14ac="http://schemas.microsoft.com/office/spreadsheetml/2009/9/ac" xmlns:x16r2="http://schemas.microsoft.com/office/spreadsheetml/2015/02/main" xmlns:xr="http://schemas.microsoft.com/office/spreadsheetml/2014/revision" mc:Ignorable="x14ac x16r2 xr">
<x:fonts count="2" x14ac:knownFonts="1">
<x:font />
<x:font>
<x:b />
<x:sz val="12" />
<x:color rgb="FF000000" />
<x:name val="Arial" />
<x:family val="2" />
<x:scheme val="minor" />
</x:font>
</x:fonts>
<x:borders count="2">
<x:border />
<x:border>
<x:left style="thin">
<x:color rgb="FF000000" />
</x:left>
<x:right style="thin">
<x:color rgb="FF000000" />
</x:right>
<x:top style="thin">
<x:color rgb="FF000000" />
</x:top>
<x:bottom style="thin">
<x:color rgb="FF000000" />
</x:bottom>
</x:border>
</x:borders>
<x:cellXfs count="3">
<x:xf />
<x:xf fontId="1" borderId="1" applyFont="1" applyBorder="1" />
<x:xf borderId="1" applyBorder="1" />
</x:cellXfs>
</x:styleSheet>
Still excel complains that the file is corrupt after recovering the file it displays the styles applied to each cell gives the error "Repaired Records: Format from /xl/styles.xml part (Styles)" .
LibreOffice opens the file correctly, OPEN XML SDK 2.0 Productivity Tool validates the file as correct...Why excel complains.....
UPDATE
After playing around with the code I solved the problem.
This two questions also helped
Stylesheet 1
Stylesheet 2
It seems that there is an order to create the nodes, specially the cellStyleXfs and cellXfs, the cellStyleXfs as to come before the cellXfs
The working XML
<?xml version="1.0" encoding="utf-8"?>
<x:styleSheet xmlns:x="http://schemas.openxmlformats.org/spreadsheetml/2006/main" xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:x14ac="http://schemas.microsoft.com/office/spreadsheetml/2009/9/ac" xmlns:x16r2="http://schemas.microsoft.com/office/spreadsheetml/2015/02/main" xmlns:xr="http://schemas.microsoft.com/office/spreadsheetml/2014/revision" mc:Ignorable="x14ac x16r2 xr">
<x:fonts count="3" x14ac:knownFonts="1">
<x:font />
<x:font>
<x:b />
<x:sz val="12" />
<x:color rgb="FF000000" />
<x:name val="Arial" />
<x:family val="2" />
<x:scheme val="minor" />
</x:font>
<x:font>
<x:b />
<x:sz val="12" />
<x:color rgb="FFFF0000" />
<x:name val="Arial" />
<x:family val="2" />
<x:scheme val="minor" />
</x:font>
</x:fonts>
<x:fills count="1">
<x:fill />
</x:fills>
<x:borders count="2">
<x:border />
<x:border>
<x:left style="thin">
<x:color rgb="FF000000" />
</x:left>
<x:right style="thin">
<x:color rgb="FF000000" />
</x:right>
<x:top style="thin">
<x:color rgb="FF000000" />
</x:top>
<x:bottom style="thin">
<x:color rgb="FF000000" />
</x:bottom>
<x:diagonal />
</x:border>
</x:borders>
<x:cellStyleXfs count="1">
<x:xf numFmtId="0" fontId="0" fillId="0" borderId="0" xfId="0" />
</x:cellStyleXfs>
<x:cellXfs count="4">
<x:xf numFmtId="0" fontId="0" fillId="0" borderId="0" xfId="0" />
<x:xf numFmtId="0" fontId="1" fillId="0" borderId="1" xfId="0" applyNumberFormat="1" applyFont="1" applyFill="1" applyBorder="1" />
<x:xf numFmtId="0" fontId="2" fillId="0" borderId="1" xfId="0" applyNumberFormat="1" applyFont="1" applyFill="1" applyBorder="1" />
<x:xf numFmtId="0" fontId="0" fillId="0" borderId="1" xfId="0" applyNumberFormat="1" applyFont="1" applyFill="1" applyBorder="1" />
</x:cellXfs>
</x:styleSheet>

Excel is limited to a palette of 56 colors. The indexes are stored rather than the actual RGB value as you have provided. I don't know how you are generating the xmls, but your font node should look something like this:
<x:fonts count="1">
<x:font>
<x:b />
<x:sz val="12" />
<x:color theme="1" />
<x:name val="Arial" />
</x:font>
</x:fonts>
If you use C# or VBA then you can set Colors to your liking by accessing Workbook.Colors Property
EDIT
Like for fonts, borders need to store indexes rather than the actual RGB value as you have provided. Your border node should be something like:
<x:left style="thin">
<x:color indexed="64" />
</x:left>
also note, borders need to defined in the correct order: left, right, top, bottom, diagonal. Seems correct in your xml but nevertheless thought of mentioning it here.
This is a good example

Related

ContentControl.insertOoxml adds extra paragraphs

I am trying to add to my Word document a new content control with a table inside. I have the Ooxml of the table and I am inserting this to a new content control with insertOoxml. But it is adding a new paragraph before the table and another one after it, as shown in the following image.
This is my code:
Word.run(function (context) {
var range = context.document.getSelection();
var myContentControl = range.insertContentControl();
myContentControl.title = "ZZZ";
myContentControl.insertOoxml(dataXml, 'end');
myContentControl.cannotEdit = false;
myContentControl.cannotDelete = false;
context.load(myContentControl, 'id, title, tag');
return context.sync().then(function () {
console.log("Success");
});
});
This is the main part of dataXml content:
<?mso-application progid="Word.Document"?>
<pkg:package xmlns:pkg="http://schemas.microsoft.com/office/2006/xmlPackage">
<!-- ... -->
<pkg:part pkg:name="/word/document.xml" pkg:contentType="application/vnd.openxmlformats-officedocument.wordprocessingml.document.main+xml">
<pkg:xmlData>
<w:document xmlns:wpc="http://schemas.microsoft.com/office/word/2010/wordprocessingCanvas" xmlns:cx="http://schemas.microsoft.com/office/drawing/2014/chartex" xmlns:cx1="http://schemas.microsoft.com/office/drawing/2015/9/8/chartex" xmlns:cx2="http://schemas.microsoft.com/office/drawing/2015/10/21/chartex" xmlns:cx3="http://schemas.microsoft.com/office/drawing/2016/5/9/chartex" xmlns:cx4="http://schemas.microsoft.com/office/drawing/2016/5/10/chartex" xmlns:cx5="http://schemas.microsoft.com/office/drawing/2016/5/11/chartex" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:r="http://purl.oclc.org/ooxml/officeDocument/relationships" xmlns:m="http://purl.oclc.org/ooxml/officeDocument/math" xmlns:v="urn:schemas-microsoft-com:vml" xmlns:wp14="http://schemas.microsoft.com/office/word/2010/wordprocessingDrawing" xmlns:wp="http://purl.oclc.org/ooxml/drawingml/wordprocessingDrawing" xmlns:w10="urn:schemas-microsoft-com:office:word" xmlns:w="http://purl.oclc.org/ooxml/wordprocessingml/main" xmlns:w14="http://schemas.microsoft.com/office/word/2010/wordml" xmlns:w15="http://schemas.microsoft.com/office/word/2012/wordml" xmlns:wne="http://schemas.microsoft.com/office/word/2006/wordml" xmlns:wpg="http://schemas.microsoft.com/office/word/2010/wordprocessingGroup" xmlns:wpi="http://schemas.microsoft.com/office/word/2010/wordprocessingInk" xmlns:wps="http://schemas.microsoft.com/office/word/2010/wordprocessingShape" mc:Ignorable="w14 w15 wp14" w:conformance="strict">
<w:body>
<w:tbl>
<w:tblPr>
<w:tblStyle w:val="table" />
<w:tblW w:w="95.25pt" w:type="dxa" />
<w:tblInd w:w="0.8pt" w:type="dxa" />
<w:tblCellMar>
<w:top w:w="0pt" w:type="dxa" />
<w:start w:w="0pt" w:type="dxa" />
<w:bottom w:w="0pt" w:type="dxa" />
<w:end w:w="0pt" w:type="dxa" />
</w:tblCellMar>
<w:tblLook w:firstColumn="1" w:firstRow="1" w:lastColumn="1" w:lastRow="1" w:noVBand="1" />
</w:tblPr>
<w:tblGrid>
<w:gridCol w:w="952" />
<w:gridCol w:w="953" />
</w:tblGrid>
<w:tr>
<w:tblPrEx>
<w:tblW w:w="95.25pt" w:type="dxa" />
<w:tblInd w:w="0.8pt" w:type="dxa" />
<w:tblCellMar>
<w:top w:w="0pt" w:type="dxa" />
<w:start w:w="0pt" w:type="dxa" />
<w:bottom w:w="0pt" w:type="dxa" />
<w:end w:w="0pt" w:type="dxa" />
</w:tblCellMar>
<w:tblLook w:firstColumn="1" w:firstRow="1" w:lastColumn="1" w:lastRow="1" w:noVBand="1" />
</w:tblPrEx>
<w:trPr>
<w:trHeight w:hRule="exact" w:val="288" />
</w:trPr>
<w:tc>
<w:tcPr>
<w:tcW w:w="48.75pt" w:type="dxa" />
<w:tcBorders>
<w:top w:val="single" w:sz="6" w:space="0" w:color="B6B6B6" />
<w:start w:val="single" w:sz="6" w:space="0" w:color="B6B6B6" />
<w:bottom w:val="single" w:sz="6" w:space="0" w:color="B6B6B6" />
<w:end w:val="single" w:sz="6" w:space="0" w:color="B6B6B6" />
</w:tcBorders>
<w:shd w:val="clear" w:color="auto" w:fill="FFFFFF" />
<w:noWrap />
<w:tcMar>
<w:top w:w="0.4pt" w:type="dxa" />
<w:start w:w="0.4pt" w:type="dxa" />
<w:bottom w:w="0.4pt" w:type="dxa" />
<w:end w:w="0.4pt" w:type="dxa" />
</w:tcMar>
<w:vAlign w:val="bottom" />
<w:hideMark />
</w:tcPr>
<w:p>
<w:pPr>
<w:rPr>
<w:rFonts w:ascii="Calibri" w:eastAsia="Calibri" w:hAnsi="Calibri" w:cs="Calibri" />
<w:b w:val="0" />
<w:bCs w:val="0" />
<w:i w:val="0" />
<w:iCs w:val="0" />
<w:smallCaps w:val="0" />
<w:color w:val="000000" />
<w:sz w:val="22" />
<w:szCs w:val="22" />
</w:rPr>
</w:pPr>
<w:r>
<w:rPr>
<w:rFonts w:ascii="Calibri" w:eastAsia="Calibri" w:hAnsi="Calibri" w:cs="Calibri" />
<w:b w:val="0" />
<w:bCs w:val="0" />
<w:i w:val="0" />
<w:iCs w:val="0" />
<w:smallCaps w:val="0" />
<w:color w:val="000000" />
<w:sz w:val="22" />
<w:szCs w:val="22" />
</w:rPr>
<w:t>A</w:t>
</w:r>
</w:p>
</w:tc>
<w:tc>
<w:tcPr>
<w:tcW w:w="48.75pt" w:type="dxa" />
<w:tcBorders>
<w:top w:val="single" w:sz="6" w:space="0" w:color="B6B6B6" />
<w:start w:val="single" w:sz="6" w:space="0" w:color="B6B6B6" />
<w:bottom w:val="single" w:sz="6" w:space="0" w:color="B6B6B6" />
<w:end w:val="single" w:sz="6" w:space="0" w:color="B6B6B6" />
</w:tcBorders>
<w:shd w:val="clear" w:color="auto" w:fill="FFFFFF" />
<w:noWrap />
<w:tcMar>
<w:top w:w="0.4pt" w:type="dxa" />
<w:start w:w="0.4pt" w:type="dxa" />
<w:bottom w:w="0.4pt" w:type="dxa" />
<w:end w:w="0.4pt" w:type="dxa" />
</w:tcMar>
<w:vAlign w:val="bottom" />
<w:hideMark />
</w:tcPr>
<w:p>
<w:pPr>
<w:rPr>
<w:rFonts w:ascii="Calibri" w:eastAsia="Calibri" w:hAnsi="Calibri" w:cs="Calibri" />
<w:b w:val="0" />
<w:bCs w:val="0" />
<w:i w:val="0" />
<w:iCs w:val="0" />
<w:smallCaps w:val="0" />
<w:color w:val="000000" />
<w:sz w:val="22" />
<w:szCs w:val="22" />
</w:rPr>
</w:pPr>
<w:r>
<w:rPr>
<w:rFonts w:ascii="Calibri" w:eastAsia="Calibri" w:hAnsi="Calibri" w:cs="Calibri" />
<w:b w:val="0" />
<w:bCs w:val="0" />
<w:i w:val="0" />
<w:iCs w:val="0" />
<w:smallCaps w:val="0" />
<w:color w:val="000000" />
<w:sz w:val="22" />
<w:szCs w:val="22" />
</w:rPr>
<w:t>B</w:t>
</w:r>
</w:p>
</w:tc>
</w:tr>
<w:tr>
<w:tblPrEx>
<w:tblW w:w="95.25pt" w:type="dxa" />
<w:tblInd w:w="0.8pt" w:type="dxa" />
<w:tblCellMar>
<w:top w:w="0pt" w:type="dxa" />
<w:start w:w="0pt" w:type="dxa" />
<w:bottom w:w="0pt" w:type="dxa" />
<w:end w:w="0pt" w:type="dxa" />
</w:tblCellMar>
<w:tblLook w:firstColumn="1" w:firstRow="1" w:lastColumn="1" w:lastRow="1" w:noVBand="1" />
</w:tblPrEx>
<w:trPr>
<w:trHeight w:hRule="exact" w:val="288" />
</w:trPr>
<w:tc>
<w:tcPr>
<w:tcW w:w="48.75pt" w:type="dxa" />
<w:tcBorders>
<w:top w:val="single" w:sz="6" w:space="0" w:color="B6B6B6" />
<w:start w:val="single" w:sz="6" w:space="0" w:color="B6B6B6" />
<w:bottom w:val="single" w:sz="6" w:space="0" w:color="B6B6B6" />
<w:end w:val="single" w:sz="6" w:space="0" w:color="B6B6B6" />
</w:tcBorders>
<w:shd w:val="clear" w:color="auto" w:fill="FFFFFF" />
<w:noWrap />
<w:tcMar>
<w:top w:w="0.4pt" w:type="dxa" />
<w:start w:w="0.4pt" w:type="dxa" />
<w:bottom w:w="0.4pt" w:type="dxa" />
<w:end w:w="0.4pt" w:type="dxa" />
</w:tcMar>
<w:vAlign w:val="bottom" />
<w:hideMark />
</w:tcPr>
<w:p>
<w:pPr>
<w:rPr>
<w:rFonts w:ascii="Calibri" w:eastAsia="Calibri" w:hAnsi="Calibri" w:cs="Calibri" />
<w:b w:val="0" />
<w:bCs w:val="0" />
<w:i w:val="0" />
<w:iCs w:val="0" />
<w:smallCaps w:val="0" />
<w:color w:val="000000" />
<w:sz w:val="22" />
<w:szCs w:val="22" />
</w:rPr>
</w:pPr>
<w:r>
<w:rPr>
<w:rFonts w:ascii="Calibri" w:eastAsia="Calibri" w:hAnsi="Calibri" w:cs="Calibri" />
<w:b w:val="0" />
<w:bCs w:val="0" />
<w:i w:val="0" />
<w:iCs w:val="0" />
<w:smallCaps w:val="0" />
<w:color w:val="000000" />
<w:sz w:val="22" />
<w:szCs w:val="22" />
</w:rPr>
<w:t>C</w:t>
</w:r>
</w:p>
</w:tc>
<w:tc>
<w:tcPr>
<w:tcW w:w="48.75pt" w:type="dxa" />
<w:tcBorders>
<w:top w:val="single" w:sz="6" w:space="0" w:color="B6B6B6" />
<w:start w:val="single" w:sz="6" w:space="0" w:color="B6B6B6" />
<w:bottom w:val="single" w:sz="6" w:space="0" w:color="B6B6B6" />
<w:end w:val="single" w:sz="6" w:space="0" w:color="B6B6B6" />
</w:tcBorders>
<w:shd w:val="clear" w:color="auto" w:fill="FFFFFF" />
<w:noWrap />
<w:tcMar>
<w:top w:w="0.4pt" w:type="dxa" />
<w:start w:w="0.4pt" w:type="dxa" />
<w:bottom w:w="0.4pt" w:type="dxa" />
<w:end w:w="0.4pt" w:type="dxa" />
</w:tcMar>
<w:vAlign w:val="bottom" />
<w:hideMark />
</w:tcPr>
<w:p>
<w:pPr>
<w:rPr>
<w:rFonts w:ascii="Calibri" w:eastAsia="Calibri" w:hAnsi="Calibri" w:cs="Calibri" />
<w:b w:val="0" />
<w:bCs w:val="0" />
<w:i w:val="0" />
<w:iCs w:val="0" />
<w:smallCaps w:val="0" />
<w:color w:val="000000" />
<w:sz w:val="22" />
<w:szCs w:val="22" />
</w:rPr>
</w:pPr>
<w:r>
<w:rPr>
<w:rFonts w:ascii="Calibri" w:eastAsia="Calibri" w:hAnsi="Calibri" w:cs="Calibri" />
<w:b w:val="0" />
<w:bCs w:val="0" />
<w:i w:val="0" />
<w:iCs w:val="0" />
<w:smallCaps w:val="0" />
<w:color w:val="000000" />
<w:sz w:val="22" />
<w:szCs w:val="22" />
</w:rPr>
<w:t>D</w:t>
</w:r>
</w:p>
</w:tc>
</w:tr>
</w:tbl>
<w:p />
<w:sectPr>
<w:pgMar w:header="708" w:footer="708" />
<w:cols w:space="708" />
</w:sectPr>
</w:body>
</w:document>
</pkg:xmlData>
</pkg:part>
<!-- ... -->
</pkg:package>
I manage to remove the first extra paragraph with this code:
var paragraphs = myContentControl.paragraphs;
context.load(paragraphs, 'items');
return context.sync().then(function () {
paragraphs.items[0].delete();
return context.sync().then(function () {
console.log("Success");
});
});
But if I try to remove the last paragraph as in the following line, it removes the content control and doesn't delete the extra paragraph.
paragraphs.items[paragraphs.items.length - 1].delete();
How can I delete the last extra paragraph using Office.js and without removing the content control?
In all "modern" versions of Word (modern = versions that support text wrapping / free positioning of tables on the page) a paragraph following the table is required.
The paragraph mark is visible in the Word Open XML in the question:
</w:tbl>
<w:p />
<w:sectPr>
So it will not be possible to delete this paragraph.
It should be possible, however, to format it with a very small font size (as I recall, Word supports .5 pt as the minimum size) with no Space Before or Space After.
Background as to why the paragraph mark is needed: Word stores the placement information of the table on the page, as well as some other structural information "in" the paragraph mark. We can't see it, but it's what's happening "under the covers". Very similar to a Shape object's Anchor.
I found this workaround: insert directly to the document selection an Ooxml string containing also the content control and the table without paragraphs inside it.
So, this is the code:
Word.run(function (context) {
context.document.getSelection().insertOoxml(dataXml, 'Start');
return context.sync().then(function () {
console.log("Success");
});
});
This is the main part of dataXml content:
<pkg:package xmlns:pkg="http://schemas.microsoft.com/office/2006/xmlPackage">
<!-- ... -->
<pkg:xmlData>
<w:document xmlns:w="http://schemas.openxmlformats.org/wordprocessingml/2006/main">
<w:body>
<w:sdt>
<w:sdtPr>
<w:alias w:val="ZZZ"/>
<w:id w:val="0"/>
</w:sdtPr>
<w:sdtEndPr/>
<w:sdtContent>
<w:tbl>
<!-- ... TABLE CONTENT ... -->
</w:tbl>
</w:sdtContent>
</w:sdt>
</w:body>
</w:document>
</pkg:xmlData>
</pkg:part>
</pkg:package>
And this is the result:
At least tha last paragraph is outside the content control.

Insert Hyperlink button not visible in Word CustomUI

I have created the following XML for our Word CustomUI:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<customUI xmlns="http://schemas.microsoft.com/office/2009/07/customui">
<ribbon>
<tabs>
<tab idMso="TabHome">
<group idMso="GroupFont" visible="false" />
<group idMso="GroupParagraph" visible="false" />
<group idMso="GroupInsertTables" insertBeforeMso="GroupStyles" />
<group id="CustGrp1" label="Next" insertBeforeMso="GroupStyles">
<toggleButton idMso="AlignLeft" showLabel="false" />
<toggleButton idMso="AlignCenter" showLabel="false" />
<toggleButton idMso="AlignRight" showLabel="false" />
<button idMso="IndentDecreaseWord" showLabel="false" />
<button idMso="IndentIncreaseWord" showLabel="false" />
<gallery idMso="MultilevelListGallery" showLabel="false" />
<gallery idMso="FontColorPicker" showLabel="false" />
<gallery idMso="ShadingColorPicker" showLabel="false" />
<toggleButton idMso="Superscript" showLabel="false" />
<button idMso="SpellingAndGrammar" showLabel="false" />
<splitButton idMso="TableBordersMenu" showLabel="false" />
<button idMso="SymbolsDialog" showLabel="false" />
<button idMso="HyperlinkInsert" showLabel="true" />
<gallery idMso="AutoTextGallery" showLabel="true" />
<button idMso="BookmarkInsert" showLabel="true" />
<button id="ReferenceInsert" label="Referentie" imageMso="CrossReferenceInsert" onAction="modCode.ButtonOnAction" />
<button idMso="ReviewNewComment" showLabel="false" />
<toggleButton idMso="ParagraphMarks" showLabel="false" />
</group>
</tab>
</tabs>
</ribbon>
The HyperlinkInsert button is not visible. Does anybody know what I am doing wrong?
screenshot CustomUI

Default controller not work with my fxml

I have no clue why this code does not work. I have created an fxml document using Scene Builder and all it does is add a borderpane. So far I only get errors when trying to call my fxml. I think it might be because the program dose not think I initialized some of my variables, but I don;t know why.
import javafx.application.Application;
import javafx.stage.Stage;
import javafx.scene.Scene;
import javafx.scene.layout.BorderPane;
import javafx.fxml.FXMLLoader;
public class Main extends Application {
#Override
public void start(Stage primaryStage) {
try {
BorderPane root = (BorderPane)FXMLLoader.load(getClass().getResource("Sample.fxml"));
Scene scene = new Scene(root,400,400);
scene.getStylesheets().add(getClass().getResource("application.css").toExternalForm());
primaryStage.setScene(scene);
primaryStage.show();
} catch(Exception e) {
e.printStackTrace();
}
}
public static void main(String[] args) {
launch(args);
}
}
import javafx.fxml.FXML;
import javafx.scene.layout.Pane;
public class SampleController {
#FXML
Pane mainPane;
#FXML
private void initialize() {
System.out.println(mainPane.getHeight());
}
}
hears the fxml file created.
<?import javafx.geometry.Insets?>
<?import javafx.scene.control.Button?>
<?import javafx.scene.control.Label?>
<?import javafx.scene.control.Menu?>
<?import javafx.scene.control.MenuBar?>
<?import javafx.scene.control.MenuItem?>
<?import javafx.scene.control.ScrollPane?>
<?import javafx.scene.layout.AnchorPane?>
<?import javafx.scene.layout.BorderPane?>
<?import javafx.scene.layout.Pane?>
<?import javafx.scene.layout.VBox?>
<?import javafx.scene.text.Font?>
<BorderPane maxHeight="-Infinity" minHeight="-Infinity" minWidth="-Infinity" xmlns="http://javafx.com/javafx/8.0.141" xmlns:fx="http://javafx.com/fxml/1" fx:controller="application.SampleController">
<top>
<MenuBar BorderPane.alignment="CENTER">
<menus>
<Menu mnemonicParsing="false" text="File">
<items>
<MenuItem mnemonicParsing="false" text="Close" />
</items>
</Menu>
<Menu mnemonicParsing="false" text="Edit">
<items>
<MenuItem mnemonicParsing="false" text="Delete" />
</items>
</Menu>
<Menu mnemonicParsing="false" text="Help">
<items>
<MenuItem mnemonicParsing="false" text="About" />
</items>
</Menu>
</menus>
</MenuBar>
</top>
<center>
<BorderPane prefHeight="200.0" BorderPane.alignment="CENTER">
<center>
<AnchorPane prefHeight="273.0" prefWidth="1104.0" BorderPane.alignment="CENTER">
<children>
<Pane fx:id="taskPane" layoutX="10.0" layoutY="4.0" minHeight="259.0" AnchorPane.bottomAnchor="10.0" AnchorPane.topAnchor="0.0">
<children>
<ScrollPane layoutX="19.0" layoutY="54.0" prefHeight="205.0" prefWidth="337.0">
<content>
<AnchorPane minHeight="0.0" minWidth="0.0" prefHeight="235.0" prefWidth="290.0">
<children>
<VBox layoutX="1.0" prefHeight="238.0" prefWidth="297.0" />
</children>
</AnchorPane>
</content>
</ScrollPane>
<Button layoutX="39.0" layoutY="16.0" mnemonicParsing="false" text="New Habit" />
<Label layoutX="152.0" layoutY="21.0" text="Habits">
<font>
<Font size="22.0" />
</font>
</Label>
</children>
</Pane>
<Pane layoutX="376.0" layoutY="7.0" minHeight="259.0" AnchorPane.bottomAnchor="10.0" AnchorPane.topAnchor="0.0">
<children>
<ScrollPane layoutX="19.0" layoutY="54.0" prefHeight="205.0" prefWidth="337.0">
<content>
<AnchorPane minHeight="0.0" minWidth="0.0" prefHeight="235.0" prefWidth="290.0">
<children>
<VBox layoutX="1.0" prefHeight="238.0" prefWidth="297.0" />
</children>
</AnchorPane>
</content>
</ScrollPane>
<Button layoutX="39.0" layoutY="16.0" mnemonicParsing="false" text="New Task" />
<Label layoutX="152.0" layoutY="21.0" text="Dayley Tasks">
<font>
<Font size="22.0" />
</font>
</Label>
</children>
</Pane>
<Pane layoutX="748.0" layoutY="15.0" minHeight="259.0" prefHeight="259.0" prefWidth="356.0" AnchorPane.bottomAnchor="20.0" AnchorPane.topAnchor="0.0">
<children>
<ScrollPane layoutX="19.0" layoutY="54.0" prefHeight="205.0" prefWidth="337.0">
<content>
<AnchorPane minHeight="0.0" minWidth="0.0" prefHeight="235.0" prefWidth="290.0">
<children>
<VBox layoutX="1.0" prefHeight="238.0" prefWidth="297.0" />
</children>
</AnchorPane>
</content>
</ScrollPane>
<Button layoutX="39.0" layoutY="16.0" mnemonicParsing="false" text="New ToDo" />
<Label layoutX="152.0" layoutY="21.0" text="To Do List">
<font>
<Font size="22.0" />
</font>
</Label>
</children>
</Pane>
</children>
<padding>
<Insets bottom="10.0" />
</padding>
</AnchorPane>
</center>
<top>
<Pane prefHeight="150.0" prefWidth="400.0" BorderPane.alignment="CENTER" />
</top>
<BorderPane.margin>
<Insets left="10.0" right="10.0" top="10.0" />
</BorderPane.margin>
</BorderPane>
</center>
</BorderPane>
this is what my project looks like.
[enter image description here][1]
[Main (3) [Java Application]
application.Main at localhost:34867
Thread [main] (Suspended (exception NullPointerException))
SystemProperties.setVersions() line: 81
SystemProperties.lambda$static$55() line: 67
1917513796.run() line: not available
AccessController.doPrivileged(PrivilegedAction<T>) line: not available [native method]
SystemProperties.<clinit>() line: 64
LauncherImpl.startToolkit() line: 668
LauncherImpl.launchApplicationWithArgs(String, String, String[]) line: 337
LauncherImpl.launchApplication(String, String, String[]) line: 328
NativeMethodAccessorImpl.invoke0(Method, Object, Object[]) line: not available [native method]
NativeMethodAccessorImpl.invoke(Object, Object[]) line: 62
DelegatingMethodAccessorImpl.invoke(Object, Object[]) line: 43
Method.invoke(Object, Object...) line: 498
LauncherHelper$FXHelper.main(String...) line: 767
/usr/lib/jvm/java-8-openjdk-amd64/bin/java (Mar 24, 2018, 5:19:54 PM)
][2]
[1]: https://i.stack.imgur.com/ThjM6.png
[2]: http://eror.com
I think I have fixed it try replacing your fxml with this
<?import javafx.geometry.Insets?>
<?import javafx.scene.control.Button?>
<?import javafx.scene.control.Label?>
<?import javafx.scene.control.Menu?>
<?import javafx.scene.control.MenuBar?>
<?import javafx.scene.control.MenuItem?>
<?import javafx.scene.control.ScrollPane?>
<?import javafx.scene.layout.AnchorPane?>
<?import javafx.scene.layout.BorderPane?>
<?import javafx.scene.layout.Pane?>
<?import javafx.scene.layout.VBox?>
<?import javafx.scene.text.Font?>
<BorderPane maxHeight="-Infinity" minHeight="-Infinity" minWidth="-Infinity" xmlns="http://javafx.com/javafx/8.0.141" xmlns:fx="http://javafx.com/fxml/1" fx:controller="application.SampleController">
<top>
<MenuBar BorderPane.alignment="CENTER">
<menus>
<Menu mnemonicParsing="false" text="File">
<items>
<MenuItem mnemonicParsing="false" text="Close" />
</items>
</Menu>
<Menu mnemonicParsing="false" text="Edit">
<items>
<MenuItem mnemonicParsing="false" text="Delete" />
</items>
</Menu>
<Menu mnemonicParsing="false" text="Help">
<items>
<MenuItem mnemonicParsing="false" text="About" />
</items>
</Menu>
</menus>
</MenuBar>
</top>
<center>
<BorderPane prefHeight="200.0" BorderPane.alignment="CENTER">
<center>
<AnchorPane prefHeight="273.0" prefWidth="1104.0" BorderPane.alignment="CENTER">
<children>
<Pane fx:id="taskPane" layoutX="10.0" layoutY="4.0" minHeight="259.0" AnchorPane.bottomAnchor="10.0" AnchorPane.topAnchor="0.0">
<children>
<ScrollPane layoutX="19.0" layoutY="54.0" prefHeight="205.0" prefWidth="337.0">
<content>
<AnchorPane minHeight="0.0" minWidth="0.0" prefHeight="235.0" prefWidth="290.0">
<children>
<VBox layoutX="1.0" prefHeight="238.0" prefWidth="297.0" />
</children>
</AnchorPane>
</content>
</ScrollPane>
<Button layoutX="39.0" layoutY="16.0" mnemonicParsing="false" text="New Habit" />
<Label layoutX="152.0" layoutY="21.0" text="Habits">
<font>
<Font size="22.0" />
</font>
</Label>
</children>
</Pane>
<Pane layoutX="376.0" layoutY="7.0" minHeight="259.0" AnchorPane.bottomAnchor="10.0" AnchorPane.topAnchor="0.0">
<children>
<ScrollPane layoutX="19.0" layoutY="54.0" prefHeight="205.0" prefWidth="337.0">
<content>
<AnchorPane minHeight="0.0" minWidth="0.0" prefHeight="235.0" prefWidth="290.0">
<children>
<VBox layoutX="1.0" prefHeight="238.0" prefWidth="297.0" />
</children>
</AnchorPane>
</content>
</ScrollPane>
<Button layoutX="39.0" layoutY="16.0" mnemonicParsing="false" text="New Task" />
<Label layoutX="152.0" layoutY="21.0" text="Dayley Tasks">
<font>
<Font size="22.0" />
</font>
</Label>
</children>
</Pane>
<Pane layoutX="748.0" layoutY="15.0" minHeight="259.0" prefHeight="259.0" prefWidth="356.0" AnchorPane.bottomAnchor="20.0" AnchorPane.topAnchor="0.0">
<children>
<ScrollPane layoutX="19.0" layoutY="54.0" prefHeight="205.0" prefWidth="337.0">
<content>
<AnchorPane minHeight="0.0" minWidth="0.0" prefHeight="235.0" prefWidth="290.0">
<children>
<VBox layoutX="1.0" prefHeight="238.0" prefWidth="297.0" />
</children>
</AnchorPane>
</content>
</ScrollPane>
<Button layoutX="39.0" layoutY="16.0" mnemonicParsing="false" text="New ToDo" />
<Label layoutX="152.0" layoutY="21.0" text="To Do List">
<font>
<Font size="22.0" />
</font>
</Label>
</children>
</Pane>
</children>
<padding>
<Insets bottom="10.0" />
</padding>
</AnchorPane>
</center>
<top>
<Pane fx:id="mainPane" prefHeight="150.0" prefWidth="400.0" BorderPane.alignment="CENTER" />
</top>
<BorderPane.margin>
<Insets left="10.0" right="10.0" top="10.0" />
</BorderPane.margin>
</BorderPane>
</center>

Anyway to remove white screen after splash screen

When on a slow connection, my Ionic app shows a white screen briefly on a slow connection. I am not importing any providers and the page does not have cordova plugins so it should not be an issue.
Is there any way to 100% remove this. What I was thinking, is to add an output to the pages the app can load on. When and event is emitted on ionViewDidEnter(), I hide the splash screen. This should hide the splash screen when the page is rendered.
Note that I have uncommented the service worker code in index.html and building as prod to create the necessary files.
What do you think?
EDIT: add config.xml
<?xml version='1.0' encoding='utf-8'?>
<widget id="com.ionicframework.ionic" version="0.0.1" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">
<name>ionic</name>
<description>Ionic</description>
<author email="ionic#gmail.com" href="http://www.ionic.com/">Ionic</author>
<content src="index.html" />
<access origin="*" />
<allow-intent href="http://*/*" />
<allow-intent href="https://*/*" />
<allow-intent href="tel:*" />
<allow-intent href="sms:*" />
<allow-intent href="mailto:*" />
<allow-intent href="geo:*" />
<platform name="android">
<allow-intent href="market:*" />
<icon density="ldpi" src="resources/android/icon/drawable-ldpi-icon.png" />
<icon density="mdpi" src="resources/android/icon/drawable-mdpi-icon.png" />
<icon density="hdpi" src="resources/android/icon/drawable-hdpi-icon.png" />
<icon density="xhdpi" src="resources/android/icon/drawable-xhdpi-icon.png" />
<icon density="xxhdpi" src="resources/android/icon/drawable-xxhdpi-icon.png" />
<icon density="xxxhdpi" src="resources/android/icon/drawable-xxxhdpi-icon.png" />
<splash density="land-ldpi" src="resources/android/splash/drawable-land-ldpi-screen.png" />
<splash density="land-mdpi" src="resources/android/splash/drawable-land-mdpi-screen.png" />
<splash density="land-hdpi" src="resources/android/splash/drawable-land-hdpi-screen.png" />
<splash density="land-xhdpi" src="resources/android/splash/drawable-land-xhdpi-screen.png" />
<splash density="land-xxhdpi" src="resources/android/splash/drawable-land-xxhdpi-screen.png" />
<splash density="land-xxxhdpi" src="resources/android/splash/drawable-land-xxxhdpi-screen.png" />
<splash density="port-ldpi" src="resources/android/splash/drawable-port-ldpi-screen.png" />
<splash density="port-mdpi" src="resources/android/splash/drawable-port-mdpi-screen.png" />
<splash density="port-hdpi" src="resources/android/splash/drawable-port-hdpi-screen.png" />
<splash density="port-xhdpi" src="resources/android/splash/drawable-port-xhdpi-screen.png" />
<splash density="port-xxhdpi" src="resources/android/splash/drawable-port-xxhdpi-screen.png" />
<splash density="port-xxxhdpi" src="resources/android/splash/drawable-port-xxxhdpi-screen.png" />
</platform>
<platform name="ios">
<allow-intent href="itms:*" />
<allow-intent href="itms-apps:*" />
<icon height="57" src="resources/ios/icon/icon.png" width="57" />
<icon height="114" src="resources/ios/icon/icon#2x.png" width="114" />
<icon height="40" src="resources/ios/icon/icon-40.png" width="40" />
<icon height="80" src="resources/ios/icon/icon-40#2x.png" width="80" />
<icon height="120" src="resources/ios/icon/icon-40#3x.png" width="120" />
<icon height="50" src="resources/ios/icon/icon-50.png" width="50" />
<icon height="100" src="resources/ios/icon/icon-50#2x.png" width="100" />
<icon height="60" src="resources/ios/icon/icon-60.png" width="60" />
<icon height="120" src="resources/ios/icon/icon-60#2x.png" width="120" />
<icon height="180" src="resources/ios/icon/icon-60#3x.png" width="180" />
<icon height="72" src="resources/ios/icon/icon-72.png" width="72" />
<icon height="144" src="resources/ios/icon/icon-72#2x.png" width="144" />
<icon height="76" src="resources/ios/icon/icon-76.png" width="76" />
<icon height="152" src="resources/ios/icon/icon-76#2x.png" width="152" />
<icon height="167" src="resources/ios/icon/icon-83.5#2x.png" width="167" />
<icon height="29" src="resources/ios/icon/icon-small.png" width="29" />
<icon height="58" src="resources/ios/icon/icon-small#2x.png" width="58" />
<icon height="87" src="resources/ios/icon/icon-small#3x.png" width="87" />
<splash height="1136" src="resources/ios/splash/Default-568h#2x~iphone.png" width="640" />
<splash height="1334" src="resources/ios/splash/Default-667h.png" width="750" />
<splash height="2208" src="resources/ios/splash/Default-736h.png" width="1242" />
<splash height="1242" src="resources/ios/splash/Default-Landscape-736h.png" width="2208" />
<splash height="1536" src="resources/ios/splash/Default-Landscape#2x~ipad.png" width="2048" />
<splash height="2048" src="resources/ios/splash/Default-Landscape#~ipadpro.png" width="2732" />
<splash height="768" src="resources/ios/splash/Default-Landscape~ipad.png" width="1024" />
<splash height="2048" src="resources/ios/splash/Default-Portrait#2x~ipad.png" width="1536" />
<splash height="2732" src="resources/ios/splash/Default-Portrait#~ipadpro.png" width="2048" />
<splash height="1024" src="resources/ios/splash/Default-Portrait~ipad.png" width="768" />
<splash height="960" src="resources/ios/splash/Default#2x~iphone.png" width="640" />
<splash height="480" src="resources/ios/splash/Default~iphone.png" width="320" />
<icon height="1024" src="resources/ios/icon/icon-1024.png" width="1024" />
<splash height="2732" src="resources/ios/splash/Default#2x~universal~anyany.png" width="2732" />
</platform>
<preference name="webviewbounce" value="false" />
<preference name="UIWebViewBounce" value="false" />
<preference name="DisallowOverscroll" value="true" />
<preference name="android-minSdkVersion" value="16" />
<preference name="BackupWebStorage" value="none" />
<preference name="SplashScreenDelay" value="3000" />
<preference name="FadeSplashScreen" value="true" />
<preference name="FadeSplashScreenDuration" value="1000" />
<preference name="SplashScreenBackgroundColor" value="0xFFFFFFFF" />
<preference name="SplashScreen" value="screen" />
<feature name="StatusBar">
<param name="ios-package" onload="true" value="CDVStatusBar" />
</feature>
<icon src="resources/android/icon/drawable-xhdpi-icon.png" />
<preference name="SplashShowOnlyFirstTime" value="false" />
<plugin name="cordova-plugin-console" spec="^1.1.0" />
<plugin name="cordova-plugin-device" spec="^1.1.7" />
<plugin name="cordova-plugin-geolocation" spec="^2.4.3">
<variable name="GEOLOCATION_USAGE_DESCRIPTION" value=" " />
</plugin>
<plugin name="cordova-plugin-network-information" spec="^1.3.4" />
<plugin name="cordova-plugin-whitelist" spec="^1.3.3" />
<plugin name="cordova-sqlite-storage" spec="^2.1.2" />
<plugin name="ionic-plugin-deeplinks" spec="^1.0.15">
<variable name="URL_SCHEME" value="ionic" />
<variable name="DEEPLINK_SCHEME" value="https" />
<variable name="DEEPLINK_HOST" value="ionic.com" />
<variable name="ANDROID_PATH_PREFIX" value="/" />
<variable name="ANDROID_2_PATH_PREFIX" value="/" />
<variable name="ANDROID_3_PATH_PREFIX" value="/" />
<variable name="ANDROID_4_PATH_PREFIX" value="/" />
<variable name="ANDROID_5_PATH_PREFIX" value="/" />
<variable name="DEEPLINK_2_SCHEME" value=" " />
<variable name="DEEPLINK_2_HOST" value=" " />
<variable name="DEEPLINK_3_SCHEME" value=" " />
<variable name="DEEPLINK_3_HOST" value=" " />
<variable name="DEEPLINK_4_SCHEME" value=" " />
<variable name="DEEPLINK_4_HOST" value=" " />
<variable name="DEEPLINK_5_SCHEME" value=" " />
<variable name="DEEPLINK_5_HOST" value=" " />
</plugin>
<plugin name="cordova-plugin-google-analytics" spec="^1.8.3" />
<plugin name="uk.co.workingedge.phonegap.plugin.launchnavigator" spec="^4.1.0">
<variable name="LOCATION_USAGE_DESCRIPTION" value="This app requires access to your location for navigation purposes" />
</plugin>
<plugin name="cordova-plugin-ionic-webview" spec="^1.1.16" />
<plugin name="cordova-plugin-camera" spec="^3.0.0" />
<plugin name="cordova-plugin-splashscreen" spec="^4.1.0" />
<plugin name="cordova-plugin-badge" spec="^0.8.5" />
<plugin name="cordova-plugin-statusbar" spec="^2.3.0" />
<engine name="ios" spec="4.5.4" />
<engine name="android" spec="6.3.0" />
</widget>
[Solution] - Seems removing the splashscreen.hide() fixes the issue.
You need to decrease value of Fade Screen duration
<preference name="FadeSplashScreenDuration" value="300" />
and do below steps.
Remove platform : ionic cordova platform rm <android|ios>
Add platform : ionic cordova platform add >android|ios>
Run your app : ionic run <android|ios> --prod --device
Hope this will remove your white screen issue after splash.

NullPointerException when loading FXML file

So, Ive done it many times without problem and yet this time when I moved fxml and its controller from one project to another I cannot load it. Directory to fxml is fine, directory to controller in fxml file is also good, and I dont see why theres a problem to load it.
<?xml version="1.0" encoding="UTF-8"?>
<?import javafx.scene.effect.*?>
<?import javafx.scene.text.*?>
<?import javafx.geometry.*?>
<?import javafx.scene.*?>
<?import javafx.scene.control.*?>
<?import java.lang.*?>
<?import javafx.scene.layout.*?>
<?import javafx.scene.layout.BorderPane?>
<BorderPane fx:id="borderPane" prefHeight="340.0" prefWidth="230.0" xmlns="http://javafx.com/javafx/8" xmlns:fx="http://javafx.com/fxml/1" fx:controller="com.controller.tomaszm.SpokenNumbersController">
<center>
<Pane prefHeight="389.0" prefWidth="241.0" BorderPane.alignment="CENTER">
<children>
<Pane layoutY="233.0" prefHeight="75.0" prefWidth="244.0" style="-fx-background-color: linear-gradient( from 0.0% 0.0% to 100.0% 100.0%, rgba(255,255,255,0.1034482792019844) 0.0, rgba(241,255,20,0.2068965584039688) 100.0);">
<children>
<CheckBox layoutX="5.0" layoutY="55.0" mnemonicParsing="false" opacity="0.8" text="Test me when finished" />
<ToggleButton fx:id="toggbuttSTART" layoutX="5.0" layoutY="5.0" mnemonicParsing="false" onAction="#toggbuttSTARTAction" opacity="0.94" prefHeight="42.0" prefWidth="230.0" text="START">
<cursor>
<Cursor fx:constant="HAND" />
</cursor>
<effect>
<InnerShadow height="35.83" radius="21.119999999999997" width="50.65" />
</effect>
<font>
<Font name="System Bold" size="12.0" />
</font>
</ToggleButton>
</children>
</Pane>
<AnchorPane layoutY="145.0" prefHeight="88.0" prefWidth="245.0" style="-fx-background-color: linear-gradient( from 0.0% 0.0% to 100.0% 100.0%, rgba(255,255,255,0.10000000149011612) 0.0, rgba(6,56,255,0.30000000298023224) 100.0);">
<children>
<CheckBox fx:id="checkExtra" layoutX="5.0" mnemonicParsing="false" onAction="#checkExtraAction" opacity="0.96" prefHeight="23.0" prefWidth="230.0" text="Make extra breaks">
<padding>
<Insets bottom="15.0" left="4.0" top="1.0" />
</padding>
</CheckBox>
<Pane fx:id="breaksPane" disable="true" layoutY="32.0" prefHeight="56.0" prefWidth="230.0">
<children>
<ComboBox fx:id="comboboxEach" layoutX="5.0" layoutY="20.0" prefHeight="25.0" prefWidth="90.0" promptText="each" />
<ComboBox fx:id="comboboxExtraInterval" layoutX="116.0" layoutY="20.0" onAction="#checkExtraAction" prefHeight="25.0" prefWidth="90.0" promptText="interval" />
<Label layoutX="5.0" text="Cycle lenght:">
<font>
<Font name="System Italic" size="12.0" />
</font>
</Label>
<Label layoutX="116.0" layoutY="2.0" text="Delay:">
<font>
<Font name="System Italic" size="12.0" />
</font>
</Label>
</children>
</Pane>
</children>
</AnchorPane>
<AnchorPane prefHeight="68.0" prefWidth="245.0" style="-fx-background-color: linear-gradient( from 0.0% 0.0% to 100.0% 100.0%, rgba(255,255,255,0.10000000149011612) 0.0, rgba(255,0,0,0.22000000298023224) 100.0);">
<children>
<ComboBox fx:id="comboboxInterval" layoutX="5.0" layoutY="27.0" opacity="0.8" prefHeight="25.0" prefWidth="152.0" promptText="interval" AnchorPane.leftAnchor="8.0" />
<Label layoutX="5.0" layoutY="6.0" opacity="0.9" prefHeight="17.0" prefWidth="77.0" text="Interval:" AnchorPane.leftAnchor="7.0">
<font>
<Font name="System Bold" size="12.0" />
</font>
</Label>
</children>
</AnchorPane>
<Pane layoutY="68.0" prefHeight="77.0" prefWidth="247.0" style="-fx-background-color: linear-gradient( from 0.0% 0.0% to 100.0% 100.0%, rgba(255,255,255,0.10000000149011612) 0.0, rgba(48,213,48,0.30000000298023224) 100.0);">
<children>
<Slider fx:id="sliderCountdown" layoutX="2.0" layoutY="27.0" majorTickUnit="10.0" max="500.0" minorTickCount="0" prefHeight="37.0" prefWidth="179.0" showTickLabels="true" showTickMarks="true" snapToTicks="true" value="100.0" />
<Button fx:id="buttPlus" alignment="CENTER" layoutX="177.0" layoutY="25.0" minHeight="-Infinity" minWidth="-Infinity" mnemonicParsing="false" onAction="#buttPlusAction" prefHeight="31.0" prefWidth="31.0" style="-fx-background-insets: 4;" text="+" textFill="RED">
<font>
<Font size="14.0" />
</font>
</Button>
<Button fx:id="buttMinus" alignment="CENTER" layoutX="201.0" layoutY="25.0" minHeight="-Infinity" minWidth="-Infinity" mnemonicParsing="false" onAction="#buttMinusAction" prefHeight="31.0" prefWidth="31.0" style="-fx-background-insets: 4;" text="–" textFill="RED">
<font>
<Font size="14.0" />
</font>
</Button>
<Label layoutX="5.0" layoutY="6.0" opacity="0.9" prefHeight="17.0" prefWidth="74.0" text="Countdown:">
<font>
<Font name="System Bold" size="12.0" />
</font>
</Label>
<Label fx:id="labCountdown" layoutX="81.0" layoutY="6.0" opacity="0.9" text="100" textFill="RED" />
</children>
</Pane>
<Separator layoutY="310.0" opacity="0.5" prefHeight="3.0" prefWidth="241.0" />
</children>
</Pane>
</center>
<top>
<MenuBar BorderPane.alignment="CENTER">
<menus>
<Menu mnemonicParsing="false" text="Options">
<items>
<Menu mnemonicParsing="false" text="Language">
<items>
<RadioMenuItem fx:id="radiomenuPolish" mnemonicParsing="false" onAction="#selectLanguageAction" selected="true" text="Polski">
<toggleGroup>
<ToggleGroup fx:id="languageGroup" />
</toggleGroup>
</RadioMenuItem>
<RadioMenuItem fx:id="radiomenuEnglish" mnemonicParsing="false" onAction="#selectLanguageAction" text="English" toggleGroup="$languageGroup" />
<RadioMenuItem fx:id="radiomenuDeutsch" mnemonicParsing="false" onAction="#selectLanguageAction" text="Deutsch" toggleGroup="$languageGroup" />
<RadioMenuItem fx:id="radiomenuChinesse" mnemonicParsing="false" onAction="#selectLanguageAction" text="Chinesse" toggleGroup="$languageGroup" />
</items>
</Menu>
<MenuItem mnemonicParsing="false" text="Close" />
</items>
</Menu>
<Menu mnemonicParsing="false" text="Help">
<items>
<MenuItem mnemonicParsing="false" text="About" />
</items>
</Menu>
</menus>
</MenuBar>
</top>
<bottom>
<HBox opacity="0.6" prefHeight="10.0" prefWidth="241.0" BorderPane.alignment="CENTER">
<children>
<Label prefHeight="4.0" prefWidth="74.0" text="Counted digits: ">
<font>
<Font name="Cambria" size="11.0" />
</font>
</Label>
<Label fx:id="labNumber" prefHeight="14.0" prefWidth="73.0" text="0">
<font>
<Font name="Cambria" size="11.0" />
</font>
</Label>
</children>
</HBox>
</bottom>
</BorderPane>