<?xml version="1.0" encoding="UTF-8"?>
<panel columns="1" weightx="1" halign="fill" weighty="1" valign="fill" gap="2">
	<panel weightx="1" halign="fill">
		<menubar halign="fill" weightx="1">
			<menu text="File" mnemonic="0">
                                <menuitem text="Open Lucene index" action="actionOpen"/>
                                <menuitem text="Commit changes" action="actionCommit"/>
				<menuitem text="Re-open current index" action="actionReopen"/>
				<menuitem text="Close current index" action="actionClose"/>
				<separator/>
				<menuitem text="Exit" action="actionExit"/>
			</menu>
			<menu text="Tools" mnemonic="0">
				<menuitem text="Undelete All" tooltip="Undelete all deleted documents" action="actionUndelete"/>
				<menuitem text="Optimize Index" tooltip="Optimize Index" action="actionOptimize"/>
                                <menuitem text="Cleanup Index Dir" tooltip="Remove all non-index files from index dir" action="actionCleanup"/>
                                <menuitem text="Check Index tool" tooltip="Run Lucene CheckIndex tool" action="actionCheckIndex"/>
                                <menuitem text="Export index to XML" tooltip="Export all stored fields to XML" action="actionExport"/>
			</menu>
			<menu text="Settings" mnemonic="0">
				<menuitem text="Display font..." action="actionShowFonts"/>
				<separator/>
				<menu text="Color themes">
					<menuitem text="Default theme" property="t=0" action="actionTheme(this)"/>
					<menuitem text="Gray theme" property="t=1" action="actionTheme(this)"/>
					<menuitem text="Sandstone theme" property="t=2" action="actionTheme(this)"/>
					<menuitem text="Sky theme" property="t=3" action="actionTheme(this)"/>
					<menuitem text="Navy theme" property="t=4" action="actionTheme(this)"/>
				</menu>
			</menu>
			<menu text="Help" mnemonic="0">
				<menuitem text="About..." action="actionAbout"/>
			</menu>
		</menubar>
	</panel>
	<tabbedpane name="maintpane" weightx="1" weighty="1" halign="fill" valign="fill">
		<tab name="overTab" text="Overview" icon="/img/info.gif">
			<panel name="pOver" gap="6" top="2" left="2" bottom="2" right="2" columns="1" weightx="1" weighty="1" halign="fill" valign="fill">
				<panel columns="3" gap="2" halign="fill" valign="fill" weightx="1">
					<label halign="right" text="Index name:"/><label font="12 bold" name="iName" text="?"/>
						<panel columns="1" gap="2" halign="right" valign="top" weighty="1" weightx="1" rowspan="12">
							<button name="bReload" icon="/img/refresh.png" text="Re-open" enabled="false" halign="fill" valign="top" tooltip="Close &amp; Open current index" action="actionReopen"/>
                                                        <button name="bCommit" icon="/img/files.gif" text="Commit" enabled="false" halign="fill" valign="top" action="actionCommit" tooltip="Commit changes in current index"/>
                                                        <button name="bClose" icon="/img/close.png" text="Close" enabled="false" halign="fill" valign="top" action="actionClose" tooltip="Close current index"/>
						</panel>
					<label halign="right" text="Number of fields:"/><label font="12 bold" name="iFields" text="?"/>
					<label halign="right" text="Number of documents:"/><label font="12 bold" name="iDocs" text="?"/>
					<label halign="right" text="Number of terms:"/><label font="12 bold" name="iTerms" text="?"/>
					<label halign="right" text="Has deletions? / Optimized?:"/><label font="12 bold" name="iDelOpt" text="? / ?"/>
					<label halign="right" text="Last modified:"/><label font="12 bold" name="iMod" text="?"/>
                                        <label halign="right" font="10" text="Index version:"/><label font="10" name="iVer" text="?"/>
                                        <label halign="right" font="10" text="Index format:"/><label font="10" name="iFormat" text="?"/>
                                        <label halign="right" font="10" text="Index functionality:"/><label font="10" name="iCaps" text="?"/>
                                        <label halign="right" font="10" text="TermInfos index divisor:"/><label font="10" name="iTiiDiv" text="?"/>
                                        <label halign="right" font="10" text="Directory implementation:"/><label font="10" name="dirImpl" text="?"/>
                                        <label halign="right" font="10" text="Currently opened commit point:"/><label font="10" name="iCommit" text=""/>
                                        <label halign="right" font="10" text="Current commit user data:"/><label font="10" name="iUser" text=""/>
				</panel>
				<separator/>
				<label halign="fill" text="Select fields from the list below, and press button to view top terms in these fields. No selection means all fields."/>
				<splitpane weightx="1" weighty="1" halign="fill" valign="fill">
				  <panel columns="1" gap="2" valign="fill" weighty="1">
						<label text="Available fields and term counts per field:"/>
						<table name="fList" selection="multiple" weighty="1" valign="fill" weightx="1" halign="fill">
						  <header>
						          <column text="Name" sort="ascent"/>
						          <column text="Term count" alignment="center"/>
						          <column text=" % " alignment="center"/>
						  </header>
						</table>
				  </panel>
				  <panel columns="2" gap="6" valign="fill" weighty="1" halign="fill" weightx="1">
					<panel columns="1" gap="4" valign="fill" top="35">
						<button text="Show top terms &gt;&gt;" action="actionTopTerms(nTerms)"/>
						<label text="Number of top terms:"/>
						<spinbox columns="5" name="nTerms" halign="center" text="50" value="50" minimum="0" maximum="999999"/>
						<panel valign="fill" weighty="1"/>
						<textarea halign="fill" border="false" wrap="true" font="10" text="Hint: use Shift-Click to select ranges, or Ctrl-Click to select multiple fields (or unselect all)."/>
					</panel>
					<panel columns="1" gap="2" valign="fill" weighty="1" halign="fill" weightx="1">
						<label text="Top ranking terms. (Right-click for more options)"/>
						<table name="tTable" valign="fill" weighty="1" halign="fill" weightx="1" perform="browseTermDocs(tTable)">
							<header>
								<column text="No" width="35"/>
								<column text="Rank" width="60" sort="ascent"/>
								<column text="Field"/>
								<column text="Text"/>
							</header>
							<popupmenu>
								<menuitem text="Browse term docs" action="browseTermDocs(tTable)"/>
								<menuitem text="Show all term docs" action="showTermDocs(tTable)"/>
								<separator/>
								<menuitem text="Copy to clipboard" action="clipTopTerms(tTable)"/>
							</popupmenu>
						</table>
					</panel>
				  </panel>
				</splitpane>
			</panel>
		</tab>
		<tab name="docsTab" text="Documents" icon="/img/docs.gif">
			<panel gap="4" weightx="1" halign="fill" weighty="1" valign="fill" columns="1" top="4" bottom="2" left="2" right="2">
				<panel halign="fill" columns="3" weightx="1" gap="4">
					<panel columns="1" halign="fill" weightx="1" gap="3">
						<label font="bold" text="Browse by document number:"/>
						<panel gap="3">
							<label text="Doc. #:"/>
							<label text="0"/>
							<button icon="/img/prev.png" action="showPrevDoc(docNum)"/>
							<textfield name="docNum" columns="10" perform="showDoc(this)"/>
							<button icon="/img/next.png" action="showNextDoc(docNum)"/>
							<label name="iDocs1" text="?"/>
						</panel>
                                                <label text=" "/>
						<panel gap="4" halign="center">
                                                        <button text="Add" tooltip="Add new document" action="actionAddDocument(docTable)"/>
							<button text="Reconstruct &amp; Edit" tooltip="Reconstruct all field contents &amp; edit doc" action="actionReconstruct(docNum)"/>
							<button text="Delete" halign="center" tooltip="Delete this document (NO WARNING)" icon="/img/delete.gif" action="deleteDoc(docNum)"/>
						</panel>
						<label text=" "/>
						<label text="Delete specified list of documents:"/>
						<panel gap="2" halign="fill" weightx="1">
						  <textfield name="delList" weightx="1" halign="fill"/>
						  <button text="Del List" tooltip="Delete specified list" action="actionDeleteDocList(delList)"/>
						</panel>
						<label font="10" text="Example: 0,12,45-90,17,123,30-32"/>
					</panel>
					<separator/>
					<panel halign="fill" columns="1" weightx="1" gap="2">
						<label font="bold" text="Browse by term:"/>
						<label  font="10" text="(Hint: enter a substring and press Next to start at the nearest term)."/>
						<panel gap="4" halign="fill" weightx="1">
							<button text="First Term" action="showFirstTerm(fCombo,fText)"/>
							<label text="Term:"/>
							<combobox name="fCombo" columns="12" editable="false" selected="0"/>
							<textfield name="fText" columns="20" halign="fill" weightx="1" perform="showTerm(fCombo, fText)"/>
							<button icon="/img/next.png" text="Next Term" action="showNextTerm(fCombo,fText)"/>
						</panel>
						<panel gap="2" halign="fill" weightx="1" bottom="3">
							<label text="Doc freq of this term:"/>
							<label name="dFreq" text="?"/>
						</panel>
						<separator/>
						<panel text="Browse documents with this term" columns="1" gap="4" halign="right" weightx="1">
							<panel gap="4">
								<button text="First Doc" action="showFirstTermDoc(fText)"/>
								<button icon="/img/next.png" text="Next Doc" action="showNextTermDoc(fText)"/>
								<button text="Show All Docs" tooltip="Show all docs with this term" action="showAllTermDoc(fText)"/>
								<button text="Delete All Docs" icon="/img/delete.gif" tooltip="Delete all docs with this term (NO WARNING!)" action="deleteTermDoc(fText)"/>
							</panel>
							<panel gap="3" halign="fill" weightx="1">
								<label text="Document:" halign="right"/>
								<label name="tdNum" text="?"/>
								<label text=" of "/>
								<label name="tdMax" text="?"/>
								<label text="  "/>
								<separator/>
								<label text=" Term freq in this doc:" halign="right"/>
								<label name="tFreq" text="?"/>
								<label text="  " halign="fill" weightx="1"/>
								<button name="bPos" text="Show Positions" action="showPositions(fText)"/>
							</panel>
						</panel>
					</panel>
				</panel>
				<separator/>
				<panel gap="3">
					<label text="Doc #:" font="bold"/>
					<label name="docNum1" text="?" font="bold"/>
					<label halign="fill" weightx="1" text=" "/>
					<label text="Flags: " font="bold"/>
					<panel columns="5" gap="1">
						<label text="I - Indexed;" font="10"/>
						<label text="  T - Tokenized;" font="10"/>
						<label text="  S - Stored;" font="10"/>
						<label text="  V - Term Vector " font="10"/>
						<label text="(o - offsets; p - positions)" font="10"/>
                                                <label text="O - Omit Norms;" font="10"/>
                                                <label text="  f - Omit TF;" font="10"/>
						<label text="  L - Lazy;" font="10"/>
						<label text="  B - Binary;" font="10"/>
						<label text="  C - Compressed" font="10"/>
					</panel>
				</panel>
				<table name="docTable" halign="fill" selection="multiple" weightx="1" valign="fill" weighty="1">
					<header>
						<column text=" Field"/>
						<column text="ITSVopfOLBC" alignment="center" width="90" font="Courier"/>
						<column text="Norm" width="50" alignment="center"/>
						<column text=" Value"/>
					</header>
					<popupmenu>
						<menuitem text="Field's Term Vector" action="showTV(docTable)"/>
                                                <menuitem text="Show Full Text" action="showTField(docTable)"/>
                                                <menuitem text="Set norm" action="actionSetNorm(docTable)"/>
						<menuitem text="Save binary field" action="saveField(docTable)"/>
					</popupmenu>
				</table>
				<panel halign="fill" weightx="1" gap="4">
				    <label text="Selected field: "/>
					<button text="TV" tooltip="Show Term Vector of selected field" action="showTV(docTable)"/>
                                        <button text="Show" tooltip="Show full text of selected field" action="showTField(docTable)"/>
                                        <button text="Set norm" tooltip="Set norm value of selected field" action="actionSetNorm(docTable)"/>
					<button text="Save" tooltip="Save binary value of selected field" action="saveField(docTable)"/>
					<label text=" " weightx="1" halign="fill"/>
					<label text="Copy text to Clipboard:"/>
					<button text="Selected fields" tooltip="Copy selected fields to Clipboard" action="clipCopyFields(docTable)"/>
					<button text="Complete document" tooltip="Copy all fields to Clipboard" action="clipCopyDoc(docTable)"/>
				</panel>
			</panel>
		</tab>
		<tab name="srchTab" text="Search" icon="/img/search.gif">
			<panel weightx="1" halign="fill" weighty="1" valign="fill" columns="1" top="2" bottom="2" left="2" right="2">
				<panel weightx="1" gap="8" halign="fill" columns="2" bottom="8">
					<panel columns="1" weightx="1" halign="fill" gap="2">
						<label font="bold" text="Enter search expression here:"/>
						<textarea wrap="true" weightx="1" weighty="1" halign="fill" valign="fill" name="qField"/>
						<panel gap="4">
							<label text="Query details:  "/>
						    <button font="10" width="45" height="15" text="Update" tooltip="Updates the result of query parsing" action="showParsed"/>
						    <button font="10" width="95" height="15" text="Explain structure" tooltip="Explain the structure of the query" action="explainStructure(queryTabs)"/>
						</panel>
						<tabbedpane name="queryTabs" placement="right" weightx="1" weighty="1" halign="fill" valign="fill">
							<tab text="Parsed" font="10">
								<panel>
								<textarea wrap="true" weightx="1" weighty="1" halign="fill" valign="fill" editable="false" border="false" name="qFieldParsed"/>
								</panel>
							</tab>
							<tab text="Rewritten" font="10">
								<panel>
								<textarea wrap="true" weightx="1" weighty="1" halign="fill" valign="fill" editable="false" border="false" name="qFieldRewritten"/>
								</panel>
							</tab>
						</tabbedpane>
					</panel>
					<panel gap="4" columns="1" halign="fill" weightx="1">
					   <tabbedpane name="srchOptTabs" placement="top" weightx="1" weighty="1" halign="fill" valign="fill">
					     <tab text="Analysis">
					        <panel columns="2" gap="3" top="2" bottom="2" left="2" right="2">
						  <label colspan="2" font="bold" text="Analyzer to use for query parsing:"/>
						  <label font="10" text="NOTE: use fully-qualified class name here." halign="fill" weightx="1"/>
                                                  <label text="Default field:"/>
						  <combobox weightx="1" halign="fill" name="cbType"
							text="org.apache.lucene.analysis.standard.StandardAnalyzer"
							editable="true" perform="showParsed"/>
                                                  <combobox editable="false" selected="0" name="defFld" text="?" halign="fill" action="showParsed"/>
                                                  <panel colspan="2" gap="2">
                                                    <label text="Optional constructor argument:"/>
  						    <textfield name="snoName"/>
  						  </panel>
                                                </panel>
  					      </tab>
  					      <tab text="QueryParser">
						  <panel weighty="1" weightx="1" valign="fill" halign="fill"
						   columns="2" gap="4" top="2" bottom="2" left="2" right="2">
						          <label font="bold" text="Additional QueryParser settings:"/>
        						  <checkbox colspan="2" action="showParsed" name="ckWild" text="Allow leading * in wildcard queries"/>
                                                          <checkbox colspan="2" action="showParsed" name="ckPosIncr" text="Enable positionIncrements"/>
                                                          <checkbox colspan="2" action="showParsed" name="ckLoExp" text="Lowercase expanded terms in wildcard / prefix queries"/>
                                                          <label colspan="2" text=" "/>
	               					  <label text="Set Date resolution:"/>
			             			  <combobox editable="false" name="cbDateRes" text="millisecond" selected="0"
			             			     perform="showParsed">
					           	       <choice text="millisecond"/>
                                                               <choice text="second"/>
                                                               <choice text="minute"/>
                                                               <choice text="hour"/>
                                                               <choice text="day"/>
                                                               <choice text="month"/>
                                                               <choice text="year"/>
						          </combobox>
						          <label text="Default query operator:"/>
						          <combobox editable="false" perform="showParsed" name="cbOp" text="OR" selected="0">
                                                               <choice text="OR"/>
                                                               <choice text="AND"/>
						          </combobox>
                                                          <label text="BooleanQuery maxClauseCount:"/>
                                                          <spinbox name="bqMaxCount" columns="6" text="1024"/> 
					            </panel>
					      </tab>
					      <tab text="Similarity">
						<panel columns="2" gap="4" halign="fill" weightx="1" weighty="1" valign="fill" top="2" left="2" right="2" bottom="2">
						        <label colspan="2" font="bold" text="Expert: Similarity implementation:"/>
                                                        <checkbox colspan="2" name="ckSimDef" text="Default Similarity" selected="true" group="simil"/>
                                                        <checkbox colspan="2" name="ckSimSweet" text="SweetSpotSimilarity" group="simil"/>
                                                        <checkbox colspan="2" name="ckSimOther" text="Other Similarity (fully qualified class name)" group="simil"/>
                                                        <panel colspan="2" gap="2">
                                                          <label text="   "/>
                                                          <textfield name="simClass" weightx="1" halign="fill"/>
                                                        </panel>
                                                        <label colspan="2" text=" "/>
                                                        <checkbox name="ckSimCust" enabled="false" text="Current custom Similarity" group="simil"/>
                                			  <button type="link" halign="left" weightx="0" text=" Design..." tooltip="Design custom similarity" action="actionDesignSimilarity"/>
							<panel colspan="2" gap="2">
								<label text="   Current: "/>
								<label name="simName" text="?"/>
							</panel>
						</panel>
					      </tab>
					      <tab text="HitCollector">
						<panel columns="1" gap="2" halign="fill" weightx="1" weighty="1" valign="fill" top="2" left="2" right="2" bottom="2">
						        <label font="bold" text="Expert: HitCollector implementation:"/>
                                                        <checkbox name="ckNormRes" group="cbColl" text="Return top matching results (&lt; 1000)" selected="true"/>
                                                        <checkbox name="ckAllRes" group="cbColl" text="Return all matching results, even low-scored (unsorted)"/>
                                                        <checkbox name="ckLimRes" group="cbColl" text="Limit result collection:"/>
                                                        <panel columns="2" gap="2" left="10" right="0" top="0" bottom="0">
                                                                <checkbox group="ckLim" name="ckLimTime" text="by max search time [ms]:" selected="true"/>
                                                                <spinbox columns="5" name="limTime" halign="center" step="50" text="200" value="200" minimum="0" maximum="999999"/>
                                                                <checkbox group="ckLim" name="ckLimCount" text="by max # of docs:"/>
                                                                <spinbox columns="6" name="limCount" halign="center" step="100" text="1000" value="1000" minimum="0" maximum="9999999"/>
                                                        </panel>
                                                </panel>
                                              </tab>
                                            </tabbedpane>
					<button valign="center" weightx="1" font="bold 16" icon="/img/search.gif" text="Search" halign="center" action="search(qField)"/>
				    </panel>
				</panel>
				<separator/>
				<panel columns="1" gap="4" halign="fill" weightx="1" valign="fill" weighty="1" top="1" bottom="1">
					<panel halign="fill" valign="fill" weightx="1" weighty="1" columns="1" gap="2">
						<panel gap="4" weightx="1" halign="fill">
							<label font="bold" text="Results:"/>
							<label font="10" text="  (Hint: Double-click on results to display all fields)" weightx="1" halign="fill"/>
							<separator/>
							<button text="Explain" icon="/img/info.gif" tooltip="Explain selected result" action="explainResult(sTable)"/>
                                                        <separator/>
                                                        <button text="Delete" icon="/img/delete.gif" tooltip="Delete selected docs" action="deleteDocList(sTable)"/>
                                                        <separator/>
							<label name="resNum" text="0"/>
							<label text="doc(s) "/>
							<separator/>
							<label name="resPos" text=""/>
							<button name="bsPrev" icon="/img/prev.png" tooltip="Previous page" enabled="false" action="prevPage(sTable)"/>
							<button name="bsNext" icon="/img/next.png" tooltip="Next page" enabled="false" action="nextPage(sTable)"/>
						</panel>
						<table name="sTable" halign="fill" valign="fill" weightx="1" weighty="1" perform="gotoDoc(this)">
							<header>
								<column text="#" width="50"/>
								<column text="Score" width="60"/>
								<column text="Doc. Id" width="60"/>
							</header>
						</table>
					</panel>
				</panel>
			</panel>
		</tab>
		<tab name="commitsTab" text="Files" icon="/img/files.gif">
				<splitpane weightx="1" weighty="1" halign="fill" valign="fill" orientation="vertical">
				    <panel weighty="1" weightx="1" halign="fill" valign="fill" gap="5" top="2" left="2"
				            right="2" bottom="2" columns="1">
				        <panel gap="10">
        				        <label font="bold" text="Select commit point (or all):"/>
        				        <separator/>
                                                <label font="10" text="Hint: use Shift-Click to select ranges, or Ctrl-Click to select multiple fields (or unselect all)."/>
        				</panel>
                                        <table name="commitsTable" halign="fill" valign="fill" weightx="1" weighty="1"
                                                action="showCommitFiles(commitsTable)">
                                                <header>
                                                        <column text=" Gen" width="30"/>
                                                        <column text=" Flags" width="35"/>
                                                        <column text=" Version" width="90"/>
                                                        <column text=" Timestamp" width="210"/>
                                                        <column text=" User data"/>
                                                </header>
                                        </table>
                                    </panel>
                                    <panel weighty="1" halign="fill" valign="fill" gap="5" top="2" left="2"
                                            right="2" bottom="2" columns="1">
                                        <panel columns="2" gap="3" weightx="1" bottom="3" top="3">
                                                <label halign="right" text=" Total size of selected commits (or all):"/>
                                                <label font="13 bold" name="iFileSize" text="?"/>
                                        </panel>
					<table name="filesTable" halign="fill" weightx="1" valign="fill" weighty="1">
						<header>
							<column text=" Filename" width="90"/>
							<column text=" Size"/>
							<column text=" Unit"/>
							<column text=" Deletable?"/>
							<column text=" In Use / Function"/>
						</header>
					</table>
				    </panel>
				</splitpane>
		</tab>		
		<tab name="pluginsTab" text="Plugins" icon="/img/tools.gif">
			<tabbedpane name="pluginsTabs" halign="fill" valign="fill"
				weightx="1" weighty="1" placement="left"/>
		</tab>
		
	</tabbedpane>
	<panel name="status" weightx="1" halign="fill" left="2" right="2" gap="4">
		<label text="Index name:"/>
		<label font="bold" name="idx" text="?"/>
		<separator/>
		<label halign="fill" weightx="1" foreground="#aa0000" font="bold" name="statmsg"/>
		<separator/>
		<button type="link" valign="center" icon="/img/luke.gif" action="goUrl(this)" property="url=http://www.getopt.org/luke" tooltip="Go to Luke home page"/>
	</panel>
</panel>
