You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by ma...@apache.org on 2013/09/13 19:18:17 UTC
svn commit: r1523019 [1/2] -
/lucene/sandbox/luke/src/org/apache/lucene/luke/ui/
Author: markrmiller
Date: Fri Sep 13 17:18:16 2013
New Revision: 1523019
URL: http://svn.apache.org/r1523019
Log:
LUCENE-2562: Ajay Bhat
Support for 5 themes, through a recursive style change function
Exit option in File menu
Status bar
Analyzer tokenstream reset call
Documentation for above features
Modified:
lucene/sandbox/luke/src/org/apache/lucene/luke/ui/AnalyzersTab.bxml
lucene/sandbox/luke/src/org/apache/lucene/luke/ui/AnalyzersTab.java
lucene/sandbox/luke/src/org/apache/lucene/luke/ui/DocumentsTab.bxml
lucene/sandbox/luke/src/org/apache/lucene/luke/ui/DocumentsTab.java
lucene/sandbox/luke/src/org/apache/lucene/luke/ui/FilesTab.bxml
lucene/sandbox/luke/src/org/apache/lucene/luke/ui/FilesTab.java
lucene/sandbox/luke/src/org/apache/lucene/luke/ui/LukeApplication.java
lucene/sandbox/luke/src/org/apache/lucene/luke/ui/LukeApplication_en.json
lucene/sandbox/luke/src/org/apache/lucene/luke/ui/LukeInitWindow.bxml
lucene/sandbox/luke/src/org/apache/lucene/luke/ui/LukeInitWindow.java
lucene/sandbox/luke/src/org/apache/lucene/luke/ui/LukeWindow.bxml
lucene/sandbox/luke/src/org/apache/lucene/luke/ui/LukeWindow.java
lucene/sandbox/luke/src/org/apache/lucene/luke/ui/OverviewTab.bxml
lucene/sandbox/luke/src/org/apache/lucene/luke/ui/OverviewTab.java
lucene/sandbox/luke/src/org/apache/lucene/luke/ui/SearchTab.bxml
lucene/sandbox/luke/src/org/apache/lucene/luke/ui/SearchTab.java
Modified: lucene/sandbox/luke/src/org/apache/lucene/luke/ui/AnalyzersTab.bxml
URL: http://svn.apache.org/viewvc/lucene/sandbox/luke/src/org/apache/lucene/luke/ui/AnalyzersTab.bxml?rev=1523019&r1=1523018&r2=1523019&view=diff
==============================================================================
--- lucene/sandbox/luke/src/org/apache/lucene/luke/ui/AnalyzersTab.bxml (original)
+++ lucene/sandbox/luke/src/org/apache/lucene/luke/ui/AnalyzersTab.bxml Fri Sep 13 17:18:16 2013
@@ -1,12 +1,12 @@
-<luke:AnalyzersTab styles="{backgroundColor:11}"
+<luke:AnalyzersTab bxml:id="AnalyzersTab"
xmlns:bxml="http://pivot.apache.org/bxml" xmlns:content="org.apache.pivot.wtk.content"
xmlns="org.apache.pivot.wtk" xmlns:luke="org.apache.lucene.luke.ui">
<columns>
- <TablePane.Column width="1*"/>
+ <TablePane.Column width="1*" />
</columns>
<rows>
- <TablePane.Row>
+ <TablePane.Row bxml:id="givenRow">
<BoxPane styles="{fill:true, padding:3}" orientation="vertical">
<TablePane styles="{horizontalSpacing:3, verticalSpacing:3}">
<columns>
Modified: lucene/sandbox/luke/src/org/apache/lucene/luke/ui/AnalyzersTab.java
URL: http://svn.apache.org/viewvc/lucene/sandbox/luke/src/org/apache/lucene/luke/ui/AnalyzersTab.java?rev=1523019&r1=1523018&r2=1523019&view=diff
==============================================================================
--- lucene/sandbox/luke/src/org/apache/lucene/luke/ui/AnalyzersTab.java (original)
+++ lucene/sandbox/luke/src/org/apache/lucene/luke/ui/AnalyzersTab.java Fri Sep 13 17:18:16 2013
@@ -140,6 +140,7 @@ public class AnalyzersTab extends TableP
TokenStream ts = analyzer.tokenStream("text",
new StringReader(inputText.getText()));
List<String> listData = new ArrayList<String>();
+ ts.reset();
int cnt = 0;
while (ts.incrementToken()) {
@@ -228,4 +229,4 @@ public class AnalyzersTab extends TableP
}
}
-}
+}
\ No newline at end of file
Modified: lucene/sandbox/luke/src/org/apache/lucene/luke/ui/DocumentsTab.bxml
URL: http://svn.apache.org/viewvc/lucene/sandbox/luke/src/org/apache/lucene/luke/ui/DocumentsTab.bxml?rev=1523019&r1=1523018&r2=1523019&view=diff
==============================================================================
--- lucene/sandbox/luke/src/org/apache/lucene/luke/ui/DocumentsTab.bxml (original)
+++ lucene/sandbox/luke/src/org/apache/lucene/luke/ui/DocumentsTab.bxml Fri Sep 13 17:18:16 2013
@@ -1,6 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
-<luke:DocumentsTab styles="{verticalSpacing:2,horizontalSpacing:2,padding:4,backgroundColor:11}"
+<luke:DocumentsTab bxml:id="DocumentsTab"
+ styles="{verticalSpacing:2,horizontalSpacing:2,padding:4,backgroundColor:11}"
xmlns:bxml="http://pivot.apache.org/bxml" xmlns:content="org.apache.pivot.wtk.content"
xmlns="org.apache.pivot.wtk" xmlns:luke="org.apache.lucene.luke.ui">
@@ -165,4 +166,4 @@
</ScrollPane>
</TablePane.Row>
</rows>
-</luke:DocumentsTab>
\ No newline at end of file
+</luke:DocumentsTab>
Modified: lucene/sandbox/luke/src/org/apache/lucene/luke/ui/DocumentsTab.java
URL: http://svn.apache.org/viewvc/lucene/sandbox/luke/src/org/apache/lucene/luke/ui/DocumentsTab.java?rev=1523019&r1=1523018&r2=1523019&view=diff
==============================================================================
--- lucene/sandbox/luke/src/org/apache/lucene/luke/ui/DocumentsTab.java (original)
+++ lucene/sandbox/luke/src/org/apache/lucene/luke/ui/DocumentsTab.java Fri Sep 13 17:18:16 2013
@@ -66,7 +66,7 @@ import org.apache.pivot.wtk.TextArea;
import org.apache.pivot.wtk.TextInput;
public class DocumentsTab extends TablePane implements Bindable {
-
+
private int iNum;
@BXML
private TableView docTable;
@@ -90,17 +90,17 @@ public class DocumentsTab extends TableP
private Label docNum2;
@BXML
private TextArea decText;
-
+
private java.util.List<String> fieldNames = null;
-
+
// this gets injected by LukeWindow at init
private LukeMediator lukeMediator;
-
+
private Resources resources;
-
+
private TermsEnum te;
private DocsAndPositionsEnum td;
-
+
private String fld;
private Term lastTerm;
private IndexReader ir;
@@ -108,8 +108,9 @@ public class DocumentsTab extends TableP
private java.util.List<String> indexFields;
private IndexInfo idxInfo;
private FieldInfos infos;
-
+
public DocumentsTab() {
+
Action.getNamedActions().put("nextDoc", new Action() {
@Override
public void perform(Component component) {
@@ -131,7 +132,7 @@ public class DocumentsTab extends TableP
Action.getNamedActions().put("deleteTermDoc", new Action() {
@Override
public void perform(Component component) {
-
+
}
});
Action.getNamedActions().put("showFirstTerm", new Action() {
@@ -155,7 +156,7 @@ public class DocumentsTab extends TableP
Action.getNamedActions().put("showAllTermDoc", new Action() {
@Override
public void perform(Component component) {
-
+
}
});
Action.getNamedActions().put("showNextTermDoc", new Action() {
@@ -167,22 +168,21 @@ public class DocumentsTab extends TableP
Action.getNamedActions().put("showPositions", new Action() {
@Override
public void perform(Component component) {
-
+
}
});
-
+
}
-
+
@Override
- public void initialize(Map<String,Object> namespace, URL location,
- Resources resources) {
+ public void initialize(Map<String,Object> namespace, URL location, Resources resources) {
this.resources = resources;
}
-
+
public void initLukeMediator(LukeMediator lukeMediator) {
this.lukeMediator = lukeMediator;
}
-
+
/**
* Initialize GUI elements. This method is called when a new index is opened.
*
@@ -191,26 +191,24 @@ public class DocumentsTab extends TableP
public void onOpenIndex() throws Exception {
this.idxInfo = lukeMediator.getIndexInfo();
this.ir = idxInfo.getReader();
-
if (ir instanceof CompositeReader) {
- ar = new SlowCompositeReaderWrapper((CompositeReader)ir);
+ ar = new SlowCompositeReaderWrapper((CompositeReader) ir);
} else if (ir instanceof AtomicReader) {
- ar = (AtomicReader)ir;
+ ar = (AtomicReader) ir;
}
-
+
if (ar != null) {
infos = ar.getFieldInfos();
}
-
+
this.indexFields = idxInfo.getFieldNames();
-
-
+
List<String> fields = new ArrayList<String>(indexFields.size());
for (String s : indexFields) {
fields.add(s);
}
fieldsList.setListData(fields);
-
+
fieldNames = idxInfo.getFieldNames();
if (fieldNames.size() == 0) {
// TODO:
@@ -220,7 +218,7 @@ public class DocumentsTab extends TableP
}
maxDocs.setText(String.valueOf(ir.maxDoc() - 1));
}
-
+
private void showDoc(int incr) {
if (ir == null) {
// showStatus(resources.get("documentsTab_noOrClosedIndex"));
@@ -228,9 +226,10 @@ public class DocumentsTab extends TableP
System.out.println(resources.get("documentsTab_noOrClosedIndex"));
return;
}
-
+
String num = docNum.getText();
- if (num.trim().equals("")) num = String.valueOf(-incr);
+ if (num.trim().equals(""))
+ num = String.valueOf(-incr);
try {
iNum = Integer.parseInt(num);
iNum += incr;
@@ -241,11 +240,11 @@ public class DocumentsTab extends TableP
return;
}
docNum.setText(String.valueOf(iNum));
-
+
org.apache.lucene.util.Bits live = ar.getLiveDocs();
if (live == null || live.get(iNum)) {
Task<Object> populateTableTask = new Task<Object>() {
-
+
@Override
public Object execute() throws TaskExecutionException {
return null;
@@ -263,18 +262,18 @@ public class DocumentsTab extends TableP
// showStatus(e.getMessage());
}
}
-
+
@Override
public void executeFailed(Task<Object> task) {
-
+
}
};
populateTableTask.execute(new TaskAdapter<Object>(tl));
-
+
} else {
Task<Object> populateTableTask = new Task<Object>() {
-
+
@Override
public Object execute() throws TaskExecutionException {
return null;
@@ -283,19 +282,18 @@ public class DocumentsTab extends TableP
TaskListener<Object> tl = new TaskListener<Object>() {
@Override
public void taskExecuted(Task<Object> task) {
-
+
// TODO:
// showStatus("Deleted document - not available.");
popTableWithDoc(iNum, null);
}
-
+
@Override
public void executeFailed(Task<Object> task) {
-
+
}
};
populateTableTask.execute(new TaskAdapter<Object>(tl));
-
}
} catch (Exception e) {
@@ -304,15 +302,15 @@ public class DocumentsTab extends TableP
// showStatus(e.getMessage());
}
}
-
+
private void nextDoc() {
showDoc(1);
}
-
+
private void prevDoc() {
showDoc(-1);
}
-
+
public void popTableWithDoc(int docid, Document doc) {
docNum.setText(String.valueOf(docid));
List<Map<String,String>> tableData = new ArrayList<Map<String,String>>();
@@ -328,7 +326,7 @@ public class DocumentsTab extends TableP
docNum2.setText(String.valueOf(docid));
for (int i = 0; i < indexFields.size(); i++) {
Map<String,String> row = new HashMap<String,String>();
-
+
IndexableField[] fields = doc.getFields(indexFields.get(i));
if (fields == null) {
tableData.add(row);
@@ -345,23 +343,22 @@ public class DocumentsTab extends TableP
}
}
}
-
- private void addFieldRow(Map<String,String> row, String fName, IndexableField field,
- int docid) {
+
+ private void addFieldRow(Map<String,String> row, String fName, IndexableField field, int docid) {
java.util.Map<String,Decoder> decoders = lukeMediator.getDecoders();
Decoder defDecoder = lukeMediator.getDefDecoder();
-
+
Field f = (Field) field;
// putProperty(row, "field", f);
// putProperty(row, "fName", fName);
-
+
row.put("field", fName);
row.put("itsvopfolb", Util.fieldFlags(f));
-
+
// if (f == null) {
// setBoolean(cell, "enabled", false);
// }
-
+
if (f != null) {
try {
FieldInfo info = infos.fieldInfo(fName);
@@ -380,7 +377,7 @@ public class DocumentsTab extends TableP
row.put("norm", "---");
// setBoolean(cell, "enabled", false);
}
-
+
if (f != null) {
String text = f.stringValue();
if (text == null) {
@@ -391,7 +388,8 @@ public class DocumentsTab extends TableP
}
}
Decoder dec = decoders.get(f.name());
- if (dec == null) dec = defDecoder;
+ if (dec == null)
+ dec = defDecoder;
try {
if (f.fieldType().stored()) {
text = dec.decodeStored(f.name(), f);
@@ -408,7 +406,7 @@ public class DocumentsTab extends TableP
// setBoolean(cell, "enabled", false);
}
}
-
+
public void showFirstTerm() {
if (ir == null) {
// TODO:
@@ -416,18 +414,18 @@ public class DocumentsTab extends TableP
return;
}
Task<Object> showFirstTermTask = new Task<Object>() {
-
+
@Override
public Object execute() throws TaskExecutionException {
return null;
}
};
-
+
TaskListener<Object> taskListener = new TaskListener<Object>() {
@Override
public void taskExecuted(Task<Object> task) {
try {
-
+
fld = (String) fieldsList.getSelectedItem();
System.out.println("fld:" + fld);
Terms terms = MultiFields.getTerms(ir, fld);
@@ -441,39 +439,39 @@ public class DocumentsTab extends TableP
}
// ai.setActive(false);
}
-
+
@Override
public void executeFailed(Task<Object> task) {
// ai.setActive(false);
}
};
-
+
showFirstTermTask.execute(new TaskAdapter<Object>(taskListener));
-
+
}
-
+
public void showFirstTermDoc() {
-
- if (lastTerm == null) return;
+
+ if (lastTerm == null)
+ return;
if (ir == null) {
// TODO:
// showStatus(resources.get("documentsTab_noOrClosedIndex"));
return;
}
Task<Object> showFirstTermDocTask = new Task<Object>() {
-
+
@Override
public Object execute() throws TaskExecutionException {
return null;
}
};
-
+
TaskListener<Object> taskListener = new TaskListener<Object>() {
@Override
public void taskExecuted(Task<Object> task) {
try {
- DocsAndPositionsEnum td = MultiFields.getTermPositionsEnum(ir, null,
- lastTerm.field(), lastTerm.bytes());
+ DocsAndPositionsEnum td = MultiFields.getTermPositionsEnum(ir, null, lastTerm.field(), lastTerm.bytes());
td.nextDoc();
tdNum.setText("1");
DocumentsTab.this.td = td;
@@ -485,32 +483,33 @@ public class DocumentsTab extends TableP
}
// ai.setActive(false);
}
-
+
@Override
public void executeFailed(Task<Object> task) {
// ai.setActive(false);
}
};
-
+
showFirstTermDocTask.execute(new TaskAdapter<Object>(taskListener));
-
+
}
-
+
public void showNextTermDoc() {
- if (lastTerm == null) return;
+ if (lastTerm == null)
+ return;
if (ir == null) {
// TODO:
// showStatus(MSG_NOINDEX);
return;
}
Task<Object> showNextTermDocTask = new Task<Object>() {
-
+
@Override
public Object execute() throws TaskExecutionException {
return null;
}
};
-
+
TaskListener<Object> taskListener = new TaskListener<Object>() {
@Override
public void taskExecuted(Task<Object> task) {
@@ -519,16 +518,17 @@ public class DocumentsTab extends TableP
showFirstTermDoc();
return;
}
- if (td.nextDoc() == DocsEnum.NO_MORE_DOCS) return;
-
+ if (td.nextDoc() == DocsEnum.NO_MORE_DOCS)
+ return;
+
String sCnt = tdNum.getText();
int cnt = 1;
try {
cnt = Integer.parseInt(sCnt);
} catch (Exception e) {}
-
+
tdNum.setText(String.valueOf(cnt + 1));
-
+
showTermDoc();
} catch (Exception e) {
e.printStackTrace();
@@ -537,17 +537,17 @@ public class DocumentsTab extends TableP
}
// ai.setActive(false);
}
-
+
@Override
public void executeFailed(Task<Object> task) {
// ai.setActive(false);
}
};
-
+
showNextTermDocTask.execute(new TaskAdapter<Object>(taskListener));
-
+
}
-
+
private void showTerm(final Term t) {
if (t == null) {
// TODO:
@@ -559,12 +559,13 @@ public class DocumentsTab extends TableP
// showStatus(resources.get("documentsTab_noOrClosedIndex"));
return;
}
-
+
lastTerm = t;
-
+
fieldsList.setSelectedItem(t.field());
Decoder dec = lukeMediator.getDecoders().get(t.field());
- if (dec == null) dec = lukeMediator.getDefDecoder();
+ if (dec == null)
+ dec = lukeMediator.getDefDecoder();
String s = null;
boolean decodeErr = false;
try {
@@ -573,12 +574,12 @@ public class DocumentsTab extends TableP
s = e.getMessage();
decodeErr = true;
}
-
+
termText.setText(t.text());
-
+
if (!s.equals(t.text())) {
decText.setText(s);
-
+
if (decodeErr) {
// setColor(rawText, "foreground", Color.RED);
} else {
@@ -588,30 +589,30 @@ public class DocumentsTab extends TableP
decText.setText("");
// setColor(rawText, "foreground", Color.BLACK);
}
-
+
lastTerm = t;
// putProperty(fText, "decText", s);
-
+
td = null;
tdNum.setText("?");
tFreq.setText("?");
-
+
Task<Object> updateDfTdTask = new Task<Object>() {
-
+
@Override
public Object execute() throws TaskExecutionException {
return null;
}
};
-
+
TaskListener<Object> taskListener = new TaskListener<Object>() {
@Override
public void taskExecuted(Task<Object> task) {
-
+
try {
int freq = ir.docFreq(t);
dFreq.setText(String.valueOf(freq));
-
+
tdMax.setText(String.valueOf(freq));
} catch (Exception e) {
e.printStackTrace();
@@ -621,17 +622,17 @@ public class DocumentsTab extends TableP
}
// ai.setActive(false);
}
-
+
@Override
public void executeFailed(Task<Object> task) {
// ai.setActive(false);
}
};
-
+
updateDfTdTask.execute(new TaskAdapter<Object>(taskListener));
}
-
+
public void showNextTerm() {
if (ir == null) {
// TODO:
@@ -639,13 +640,13 @@ public class DocumentsTab extends TableP
return;
}
Task<Object> showNextTermTask = new Task<Object>() {
-
+
@Override
public Object execute() throws TaskExecutionException {
return null;
}
};
-
+
TaskListener<Object> taskListener = new TaskListener<Object>() {
@Override
public void taskExecuted(Task<Object> task) {
@@ -656,21 +657,20 @@ public class DocumentsTab extends TableP
showFirstTerm();
return;
}
-
+
String fld = (String) fieldsList.getSelectedItem();
-
+
SeekStatus status;
BytesRef rawTerm = null;
if (te != null) {
rawTerm = te.term();
}
String rawString = rawTerm != null ? rawTerm.utf8ToString() : null;
-
- if (te == null || !DocumentsTab.this.fld.equals(fld)
- || !text.equals(rawString)) {
+
+ if (te == null || !DocumentsTab.this.fld.equals(fld) || !text.equals(rawString)) {
Terms terms = MultiFields.getTerms(ir, fld);
te = terms.iterator(null);
-
+
DocumentsTab.this.fld = fld;
status = te.seekCeil(new BytesRef(text));
if (status.equals(SeekStatus.FOUND)) {
@@ -702,7 +702,7 @@ public class DocumentsTab extends TableP
// showStatus("No more terms");
return;
}
-
+
showTerm(new Term(fld, rawTerm));
} catch (Exception e) {
e.printStackTrace();
@@ -711,17 +711,17 @@ public class DocumentsTab extends TableP
}
// ai.setActive(false);
}
-
+
@Override
public void executeFailed(Task<Object> task) {
// ai.setActive(false);
}
};
-
+
showNextTermTask.execute(new TaskAdapter<Object>(taskListener));
-
+
}
-
+
private void showTermDoc() {
if (ir == null) {
// TODO:
@@ -729,42 +729,42 @@ public class DocumentsTab extends TableP
return;
}
Task<Object> showTermDocTask = new Task<Object>() {
-
+
@Override
public Object execute() throws TaskExecutionException {
return null;
}
};
-
+
TaskListener<Object> taskListener = new TaskListener<Object>() {
@Override
public void taskExecuted(Task<Object> task) {
try {
Document doc = ir.document(td.docID());
docNum.setText(String.valueOf(td.docID()));
-
+
tFreq.setText(String.valueOf(td.freq()));
-
+
popTableWithDoc(td.docID(), doc);
} catch (Exception e) {
e.printStackTrace();
// TODO:
// showStatus(e.getMessage());
}
-
+
// ai.setActive(false);
}
-
+
@Override
public void executeFailed(Task<Object> task) {
// ai.setActive(false);
}
};
-
+
showTermDocTask.execute(new TaskAdapter<Object>(taskListener));
-
+
}
-
+
public void showAllTermDoc() {
final IndexReader ir = lukeMediator.getIndexInfo().getReader();
if (ir == null) {
@@ -786,13 +786,13 @@ public class DocumentsTab extends TableP
final Query q = new TermQuery(lastTerm);
// parsedQueryLabel.setText(q.toString());
Task<Object> showAllTermDocTask = new Task<Object>() {
-
+
@Override
public Object execute() throws TaskExecutionException {
return null;
}
};
-
+
TaskListener<Object> taskListener = new TaskListener<Object>() {
@Override
public void taskExecuted(Task<Object> task) {
@@ -811,16 +811,16 @@ public class DocumentsTab extends TableP
// ai.setActive(false);
// lukeWindow.setEnabled(true);
}
-
+
@Override
public void executeFailed(Task<Object> task) {
// ai.setActive(false);
// lukeWindow.setEnabled(true);
}
};
-
+
showAllTermDocTask.execute(new TaskAdapter<Object>(taskListener));
-
+
}
-
+
}
Modified: lucene/sandbox/luke/src/org/apache/lucene/luke/ui/FilesTab.bxml
URL: http://svn.apache.org/viewvc/lucene/sandbox/luke/src/org/apache/lucene/luke/ui/FilesTab.bxml?rev=1523019&r1=1523018&r2=1523019&view=diff
==============================================================================
--- lucene/sandbox/luke/src/org/apache/lucene/luke/ui/FilesTab.bxml (original)
+++ lucene/sandbox/luke/src/org/apache/lucene/luke/ui/FilesTab.bxml Fri Sep 13 17:18:16 2013
@@ -1,86 +1,90 @@
<?xml version="1.0" encoding="UTF-8"?>
-<luke:FilesTab orientation="vertical"
- splitRatio="0.2"
- xmlns:bxml="http://pivot.apache.org/bxml"
- xmlns:content="org.apache.pivot.wtk.content"
- xmlns="org.apache.pivot.wtk" xmlns:luke="org.apache.lucene.luke.ui">
+<luke:FilesTab orientation="vertical" splitRatio="0.2"
+ xmlns:bxml="http://pivot.apache.org/bxml" xmlns:content="org.apache.pivot.wtk.content"
+ xmlns="org.apache.pivot.wtk" xmlns:luke="org.apache.lucene.luke.ui">
<left>
- <Border styles="{padding:6}">
- <content>
- <BoxPane orientation="vertical" styles="{fill:true}">
- <Label text="%filesTab_selectCommitPoint" />
- <Separator />
- <Label
- text="%filesTab_selectHint" />
- <ScrollPane horizontalScrollBarPolicy="fill_to_capacity">
- <view>
- <TableView bxml:id="commitsTable">
- <columns>
- <TableView.Column name="gen" width="1*"
- headerData="%filesTab_commitsTable_col1" />
- <TableView.Column name="flags" width="1*"
- headerData="%filesTab_commitsTable_col2" />
- <TableView.Column name="version" width="1*"
- headerData="%filesTab_commitsTable_col3" />
- <TableView.Column name="timestamp" width="1*"
- headerData="%filesTab_commitsTable_col4" />
- <TableView.Column name="userdata" width="1*"
- headerData="%filesTab_commitsTable_col5" />
- </columns>
- </TableView>
- </view>
- <columnHeader>
- <TableViewHeader tableView="$commitsTable" />
- </columnHeader>
- </ScrollPane>
- </BoxPane>
- </content>
- </Border>
+ <TablePane>
+ <columns>
+ <TablePane.Column width="1*" />
+ </columns>
+ <rows>
+ <TablePane.Row height="1*">
+ <BoxPane orientation="vertical" styles="{fill:true}">
+ <Label text="%filesTab_selectCommitPoint" />
+ <Separator />
+ <Label text="%filesTab_selectHint" />
+ <ScrollPane horizontalScrollBarPolicy="fill_to_capacity">
+ <view>
+ <TableView bxml:id="commitsTable">
+ <columns>
+ <TableView.Column name="gen" width="1*"
+ headerData="%filesTab_commitsTable_col1" />
+ <TableView.Column name="flags" width="1*"
+ headerData="%filesTab_commitsTable_col2" />
+ <TableView.Column name="version" width="1*"
+ headerData="%filesTab_commitsTable_col3" />
+ <TableView.Column name="timestamp" width="1*"
+ headerData="%filesTab_commitsTable_col4" />
+ <TableView.Column name="userdata" width="1*"
+ headerData="%filesTab_commitsTable_col5" />
+ </columns>
+ </TableView>
+ </view>
+ <columnHeader>
+ <TableViewHeader tableView="$commitsTable" />
+ </columnHeader>
+ </ScrollPane>
+ </BoxPane>
+ </TablePane.Row>
+ </rows>
+ </TablePane>
</left>
<right>
- <Border styles="{padding:6}">
- <content>
- <TablePane>
-
- <columns>
- <TablePane.Column width="1*" />
- </columns>
- <rows>
- <TablePane.Row>
-
- <Label text="%filesTab_commitsSize" />
- </TablePane.Row>
- <TablePane.Row>
- <Label bxml:id="iFileSize" text="?" />
- </TablePane.Row>
- <TablePane.Row height="1*">
- <ScrollPane horizontalScrollBarPolicy="fill_to_capacity">
- <view>
- <TableView bxml:id="filesTable">
- <columns>
- <TableView.Column name="filename" width="1*"
- headerData="%filesTab_filesTable_col1" />
- <TableView.Column name="size" width="1*"
- headerData="%filesTab_filesTable_col2" />
- <TableView.Column name="unit" width="1*"
- headerData="%filesTab_filesTable_col3" />
- <TableView.Column name="deletable" width="1*"
- headerData="%filesTab_filesTable_col4" />
- <TableView.Column name="inusefunction"
- width="1*" headerData="%filesTab_filesTable_col5" />
- </columns>
- </TableView>
- </view>
- <columnHeader>
- <TableViewHeader tableView="$filesTable" />
- </columnHeader>
- </ScrollPane>
- </TablePane.Row>
- </rows>
- </TablePane>
-
- </content>
- </Border>
+ <TablePane>
+ <columns>
+ <TablePane.Column width="1*" />
+ </columns>
+ <rows>
+ <TablePane.Row height="1*">
+ <TablePane>
+ <columns>
+ <TablePane.Column width="1*" />
+ </columns>
+ <rows>
+ <TablePane.Row>
+ <Label text="%filesTab_commitsSize" />
+ </TablePane.Row>
+ <TablePane.Row>
+ <Label bxml:id="iFileSize" text="?" />
+ </TablePane.Row>
+ <TablePane.Row height="1*">
+ <ScrollPane horizontalScrollBarPolicy="fill_to_capacity">
+ <view>
+ <TableView bxml:id="filesTable">
+ <columns>
+ <TableView.Column name="filename" width="1*"
+ headerData="%filesTab_filesTable_col1" />
+ <TableView.Column name="size" width="1*"
+ headerData="%filesTab_filesTable_col2" />
+ <TableView.Column name="unit" width="1*"
+ headerData="%filesTab_filesTable_col3" />
+ <TableView.Column name="deletable" width="1*"
+ headerData="%filesTab_filesTable_col4" />
+ <TableView.Column name="inusefunction"
+ width="1*" headerData="%filesTab_filesTable_col5" />
+ </columns>
+ </TableView>
+ </view>
+ <columnHeader>
+ <TableViewHeader tableView="$filesTable" />
+ </columnHeader>
+ </ScrollPane>
+ </TablePane.Row>
+ </rows>
+ </TablePane>
+ </TablePane.Row>
+ </rows>
+ </TablePane>
</right>
-</luke:FilesTab>
\ No newline at end of file
+</luke:FilesTab>
Modified: lucene/sandbox/luke/src/org/apache/lucene/luke/ui/FilesTab.java
URL: http://svn.apache.org/viewvc/lucene/sandbox/luke/src/org/apache/lucene/luke/ui/FilesTab.java?rev=1523019&r1=1523018&r2=1523019&view=diff
==============================================================================
--- lucene/sandbox/luke/src/org/apache/lucene/luke/ui/FilesTab.java (original)
+++ lucene/sandbox/luke/src/org/apache/lucene/luke/ui/FilesTab.java Fri Sep 13 17:18:16 2013
@@ -23,13 +23,11 @@ import java.net.URL;
import java.util.Arrays;
import java.util.Collection;
import java.util.Collections;
-import java.util.Date;
import java.util.Iterator;
import org.apache.lucene.index.DirectoryReader;
import org.apache.lucene.index.IndexCommit;
import org.apache.lucene.index.IndexGate;
-import org.apache.lucene.index.IndexReader;
import org.apache.lucene.luke.core.IndexInfo;
import org.apache.lucene.luke.core.Util;
import org.apache.lucene.luke.ui.LukeWindow.LukeMediator;
Modified: lucene/sandbox/luke/src/org/apache/lucene/luke/ui/LukeApplication.java
URL: http://svn.apache.org/viewvc/lucene/sandbox/luke/src/org/apache/lucene/luke/ui/LukeApplication.java?rev=1523019&r1=1523018&r2=1523019&view=diff
==============================================================================
--- lucene/sandbox/luke/src/org/apache/lucene/luke/ui/LukeApplication.java (original)
+++ lucene/sandbox/luke/src/org/apache/lucene/luke/ui/LukeApplication.java Fri Sep 13 17:18:16 2013
@@ -33,43 +33,39 @@ import org.apache.pivot.wtk.Theme;
public class LukeApplication implements Application {
public static final String LANGUAGE_KEY = "language";
-
+
LukeWindow lukeWindow = null;
-
+
@Override
- public void startup(Display display, Map<String,String> properties)
- throws Exception {
+ public void startup(Display display, Map<String,String> properties) throws Exception {
try {
- String language = properties.get(LANGUAGE_KEY);
- Locale locale = (language == null) ? Locale.getDefault() : new Locale(
- language);
- Resources resources = new Resources(getClass().getName(), locale);
-
- Theme theme = Theme.getTheme();
- Font font = theme.getFont();
-
- // Search for a font that can support the sample string
- String sampleResource = (String) resources.get("sampleText");
- if (font.canDisplayUpTo(sampleResource) != -1) {
- Font[] fonts = GraphicsEnvironment.getLocalGraphicsEnvironment()
- .getAllFonts();
-
- for (int i = 0; i < fonts.length; i++) {
- if (fonts[i].canDisplayUpTo(sampleResource) == -1) {
- theme.setFont(fonts[i].deriveFont(Font.PLAIN, 12));
- break;
+ String language = properties.get(LANGUAGE_KEY);
+ Locale locale = (language == null) ? Locale.getDefault() : new Locale(language);
+ Resources resources = new Resources(getClass().getName(), locale);
+
+ Theme theme = Theme.getTheme();
+ Font font = theme.getFont();
+
+ // Search for a font that can support the sample string
+ String sampleResource = (String) resources.get("sampleText");
+ if (font.canDisplayUpTo(sampleResource) != -1) {
+ Font[] fonts = GraphicsEnvironment.getLocalGraphicsEnvironment().getAllFonts();
+
+ for (int i = 0; i < fonts.length; i++) {
+ if (fonts[i].canDisplayUpTo(sampleResource) == -1) {
+ theme.setFont(fonts[i].deriveFont(Font.PLAIN, 12));
+ break;
+ }
}
}
- }
-
- BXMLSerializer bxmlSerializer = new BXMLSerializer();
-
- lukeWindow = (LukeWindow) bxmlSerializer.readObject(LukeApplication.class,
- "LukeWindow.bxml", true);
-
- lukeWindow.openLukeWindow(display);
- } catch(Exception e) {
+
+ BXMLSerializer bxmlSerializer = new BXMLSerializer();
+
+ lukeWindow = (LukeWindow) bxmlSerializer.readObject(LukeApplication.class, "LukeWindow.bxml", true);
+
+ lukeWindow.openLukeWindow(display);
+ } catch (Exception e) {
if (lukeWindow != null) {
e.printStackTrace();
Alert.alert(MessageType.ERROR, e.getMessage(), lukeWindow);
@@ -78,22 +74,22 @@ public class LukeApplication implements
}
}
}
-
+
@Override
public boolean shutdown(boolean optional) {
if (lukeWindow != null) {
lukeWindow.close();
}
-
+
return false;
}
-
+
@Override
public void suspend() {}
-
+
@Override
public void resume() {}
-
+
public static void main(String[] args) {
DesktopApplicationContext.main(LukeApplication.class, args);
}
Modified: lucene/sandbox/luke/src/org/apache/lucene/luke/ui/LukeApplication_en.json
URL: http://svn.apache.org/viewvc/lucene/sandbox/luke/src/org/apache/lucene/luke/ui/LukeApplication_en.json?rev=1523019&r1=1523018&r2=1523019&view=diff
==============================================================================
--- lucene/sandbox/luke/src/org/apache/lucene/luke/ui/LukeApplication_en.json (original)
+++ lucene/sandbox/luke/src/org/apache/lucene/luke/ui/LukeApplication_en.json Fri Sep 13 17:18:16 2013
@@ -7,6 +7,7 @@
tools: "Tools",
settings: "Settings",
help: "Help",
+ about: "About",
lukeWindow_overviewTabText: "Overview",
lukeWindow_documentsTabText: "Documents",
@@ -17,8 +18,14 @@
openLuceneIndex: "Open Lucene Index",
commitChanges: "Commit Changes",
+ exit: "Exit Luke",
undeleteAll: "Undelete All",
optimizeIndex: "Optimize Index",
+ defaultTheme: "Default Theme",
+ grayTheme: "Gray Theme",
+ sandstoneTheme: "Sandstone Theme",
+ skyTheme: "Sky Theme",
+ navyTheme: "Navy Theme",
lukeInitWindow_title: "Path to index directory:",
lukeInitWindow_path: "Path:",
@@ -83,7 +90,6 @@
documentsTab_docTable_col3: "Norm",
documentsTab_docTable_col4: "Value",
-
searchTab_searchPrompt: "Enter search expression here:",
searchTab_update: "Update",
searchTab_explainStructure: "Explain Structure",
Modified: lucene/sandbox/luke/src/org/apache/lucene/luke/ui/LukeInitWindow.bxml
URL: http://svn.apache.org/viewvc/lucene/sandbox/luke/src/org/apache/lucene/luke/ui/LukeInitWindow.bxml?rev=1523019&r1=1523018&r2=1523019&view=diff
==============================================================================
--- lucene/sandbox/luke/src/org/apache/lucene/luke/ui/LukeInitWindow.bxml (original)
+++ lucene/sandbox/luke/src/org/apache/lucene/luke/ui/LukeInitWindow.bxml Fri Sep 13 17:18:16 2013
@@ -1,9 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
-<luke:LukeInitWindow bxml:id="lukeinit" icon="/img/luke.gif" title="%lukeInitWindow_title"
- xmlns:bxml="http://pivot.apache.org/bxml" xmlns:luke="org.apache.lucene.luke.ui"
- xmlns:content="org.apache.pivot.wtk.content"
- xmlns="org.apache.pivot.wtk">
+<luke:LukeInitWindow bxml:id="lukeinit" icon="/img/luke.gif"
+ title="%lukeInitWindow_title" xmlns:bxml="http://pivot.apache.org/bxml"
+ xmlns:luke="org.apache.lucene.luke.ui" xmlns:content="org.apache.pivot.wtk.content"
+ xmlns="org.apache.pivot.wtk">
<content>
<BoxPane orientation="vertical" styles="{padding:6, spacing:8, fill:true}">
<TablePane bxml:id="tablePane1"
@@ -41,10 +41,8 @@
<Checkbox bxml:id="ramDir" buttonData="%lukeInitWindow_ramDirectory" />
<Checkbox bxml:id="keepCommits" buttonData="%lukeInitWindow_keepCommitPoints"
selected="true" />
- <Checkbox bxml:id="dontOpenReader"
- buttonData="%lukeInitWindow_dontOpenReader" />
- <Checkbox bxml:id="slowIO"
- buttonData="%lukeInitWindow_slowIO" />
+ <Checkbox bxml:id="dontOpenReader" buttonData="%lukeInitWindow_dontOpenReader" />
+ <Checkbox bxml:id="slowIO" buttonData="%lukeInitWindow_slowIO" />
<BoxPane orientation="horizontal">
<Label text="%lukeInitWindow_termInfosDiv" />
<Spinner bxml:id="tiiDiv" preferredWidth="40"
@@ -58,11 +56,13 @@
</BoxPane>
<Separator />
<BoxPane orientation="horizontal" styles="{horizontalAlignment:'right'}">
- <PushButton buttonData="OK" action="openIndex" ButtonPressListener.buttonPressed="lukeinit.close()">
+ <PushButton buttonData="OK" action="openIndex"
+ ButtonPressListener.buttonPressed="lukeinit.close()">
</PushButton>
- <PushButton buttonData="Cancel" ButtonPressListener.buttonPressed="lukeinit.close()">
-
+ <PushButton buttonData="Cancel"
+ ButtonPressListener.buttonPressed="lukeinit.close()">
+
</PushButton>
</BoxPane>
Modified: lucene/sandbox/luke/src/org/apache/lucene/luke/ui/LukeInitWindow.java
URL: http://svn.apache.org/viewvc/lucene/sandbox/luke/src/org/apache/lucene/luke/ui/LukeInitWindow.java?rev=1523019&r1=1523018&r2=1523019&view=diff
==============================================================================
--- lucene/sandbox/luke/src/org/apache/lucene/luke/ui/LukeInitWindow.java (original)
+++ lucene/sandbox/luke/src/org/apache/lucene/luke/ui/LukeInitWindow.java Fri Sep 13 17:18:16 2013
@@ -39,16 +39,22 @@ import org.apache.pivot.wtk.Spinner;
import org.apache.pivot.wtk.TextInput;
public class LukeInitWindow extends Dialog implements Bindable {
- @BXML TextInput indexPath;
- @BXML Checkbox ramDir;
- @BXML Checkbox ram;
- @BXML Checkbox readOnly;
- @BXML Checkbox keepCommits;
- @BXML Spinner tiiDiv;
- @BXML TextInput directory;
+ @BXML
+ TextInput indexPath;
+ @BXML
+ Checkbox ramDir;
+ @BXML
+ Checkbox ram;
+ @BXML
+ Checkbox readOnly;
+ @BXML
+ Checkbox keepCommits;
+ @BXML
+ Spinner tiiDiv;
+ @BXML
+ TextInput directory;
private LukeMediator lukeMediator;
-
public LukeInitWindow() {
Action.getNamedActions().put("browse", new Action() {
@Override
@@ -59,29 +65,25 @@ public class LukeInitWindow extends Dial
Action.getNamedActions().put("openIndex", new Action() {
@Override
public void perform(Component component) {
- lukeMediator.getLukeWindow().openIndex(false, directory.getText(),
- readOnly.isSelected(), false,
- keepCommits.isSelected(), null,
- (Integer)tiiDiv.getSelectedItem());
+ lukeMediator.getLukeWindow().openIndex(false, directory.getText(), readOnly.isSelected(), false, keepCommits.isSelected(), null,
+ (Integer) tiiDiv.getSelectedItem());
}
});
}
-
+
public void initLukeMediator(LukeMediator lukeMediator) {
this.lukeMediator = lukeMediator;
}
-
+
@Override
- public void initialize(Map<String,Object> namespace, URL location,
- Resources resources) {
+ public void initialize(Map<String,Object> namespace, URL location, Resources resources) {
}
-
+
private void openDialogue() {
-
- final FileBrowserSheet fileBrowserSheet = new FileBrowserSheet(
- FileBrowserSheet.Mode.SAVE_TO);
-
+
+ final FileBrowserSheet fileBrowserSheet = new FileBrowserSheet(FileBrowserSheet.Mode.SAVE_TO);
+
fileBrowserSheet.open(this, new SheetCloseListener() {
@Override
public void sheetClosed(Sheet sheet) {
@@ -94,5 +96,4 @@ public class LukeInitWindow extends Dial
}
});
}
-
}
Modified: lucene/sandbox/luke/src/org/apache/lucene/luke/ui/LukeWindow.bxml
URL: http://svn.apache.org/viewvc/lucene/sandbox/luke/src/org/apache/lucene/luke/ui/LukeWindow.bxml?rev=1523019&r1=1523018&r2=1523019&view=diff
==============================================================================
--- lucene/sandbox/luke/src/org/apache/lucene/luke/ui/LukeWindow.bxml (original)
+++ lucene/sandbox/luke/src/org/apache/lucene/luke/ui/LukeWindow.bxml Fri Sep 13 17:18:16 2013
@@ -1,10 +1,10 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<luke:LukeWindow bxml:id="lukeWindow"
- title="%lukeWindow_title" icon="/img/luke.gif"
- xmlns:bxml="http://pivot.apache.org/bxml" xmlns:luke="org.apache.lucene.luke.ui"
- xmlns:content="org.apache.pivot.wtk.content" xmlns="org.apache.pivot.wtk"
- maximized="true" styles="{backgroundColor:11, showWindowControls:false}">
+<luke:LukeWindow bxml:id="lukeWindow" title="%lukeWindow_title"
+ icon="/img/luke.gif" xmlns:bxml="http://pivot.apache.org/bxml"
+ xmlns:luke="org.apache.lucene.luke.ui" xmlns:content="org.apache.pivot.wtk.content"
+ xmlns="org.apache.pivot.wtk" maximized="true"
+ styles="{backgroundColor:11, showWindowControls:false}">
<bxml:define>
<bxml:include bxml:id="lukeInitWindow" src="LukeInitWindow.bxml" />
@@ -23,8 +23,9 @@
</Menu.Item>
<Menu.Item buttonData="%commitChanges">
<buttonData />
-
-
+ </Menu.Item>
+ <Menu.Item buttonData="%exit"
+ ButtonPressListener.buttonPressed="lukeWindow.exitLuke()">
</Menu.Item>
</Menu.Section>
</sections>
@@ -50,8 +51,17 @@
<Menu>
<sections>
<Menu.Section>
- <Menu.Item buttonData="Display Font..." />
- <Menu.Item buttonData="Color Schemes">
+ <Menu.Item buttonData="Display Font" />
+ <Menu.Item bxml:id="colormenu" buttonData="Color Schemes">
+ <Menu>
+ <Menu.Section>
+ <Menu.Item action="defaulttheme" buttonData="%defaultTheme" />
+ <Menu.Item action="graytheme" buttonData="%grayTheme" />
+ <Menu.Item action="sandstonetheme" buttonData="%sandstoneTheme" />
+ <Menu.Item action="skytheme" buttonData="%skyTheme" />
+ <Menu.Item action="navytheme" buttonData="%navyTheme" />
+ </Menu.Section>
+ </Menu>
<buttonData />
</Menu.Item>
</Menu.Section>
@@ -74,64 +84,85 @@
</MenuBar>
</menuBar>
<content>
- <TabPane bxml:id="tabPane">
- <tabs>
- <Border styles="{backgroundColor:11,thickness:0}">
- <TabPane.tabData>
- <content:ButtonData icon="/img/info.gif" text="%lukeWindow_overviewTabText" />
- </TabPane.tabData>
- <content>
- <bxml:include bxml:id="overviewTab" src="OverviewTab.bxml" />
- </content>
- </Border>
-
- <Border>
- <TabPane.tabData>
- <content:ButtonData icon="/img/docs.gif" text="%lukeWindow_documentsTabText" />
- </TabPane.tabData>
- <content>
- <bxml:include bxml:id="documentsTab" src="DocumentsTab.bxml" />
- </content>
-
- </Border>
-
- <Border styles="{backgroundColor:11}">
- <TabPane.tabData>
- <content:ButtonData icon="/img/search.gif" text="%lukeWindow_searchTabText" />
- </TabPane.tabData>
-
- <content>
- <bxml:include bxml:id="searchTab" src="SearchTab.bxml" />
- </content>
- </Border>
-
- <Border styles="{backgroundColor:11}">
- <TabPane.tabData>
- <content:ButtonData icon="/img/terms.gif" text="%lukeWindow_analyzersTabText" />
- </TabPane.tabData>
-
- <content>
- <bxml:include bxml:id="analyzersTab" src="AnalyzersTab.bxml" />
- </content>
- </Border>
-
- <Border>
- <TabPane.tabData>
- <content:ButtonData icon="/img/files.gif" text="%lukeWindow_filesTabText" />
- </TabPane.tabData>
- <content>
- <bxml:include bxml:id="filesTab" src="FilesTab.bxml" />
- </content>
- </Border>
- <BoxPane styles="{fill:true}">
- <TabPane.tabData>
- <content:ButtonData icon="/img/tools.gif" text="%lukeWindow_pluginsTabText" />
-
- </TabPane.tabData>
- <Label text="Coming..."/>
- </BoxPane>
- </tabs>
- </TabPane>
+ <TablePane>
+ <columns>
+ <TablePane.Column width="1*" />
+ </columns>
+ <rows>
+ <TablePane.Row height="1*">
+ <TabPane bxml:id="tabPane">
+ <tabs>
+ <Border styles="{backgroundColor:11,thickness:0}">
+ <TabPane.tabData>
+ <content:ButtonData icon="/img/info.gif"
+ text="%lukeWindow_overviewTabText" />
+ </TabPane.tabData>
+ <content>
+ <bxml:include bxml:id="overviewTab" src="OverviewTab.bxml"
+ inline="true" />
+ </content>
+ </Border>
+
+ <Border>
+ <TabPane.tabData>
+ <content:ButtonData icon="/img/docs.gif"
+ text="%lukeWindow_documentsTabText" />
+ </TabPane.tabData>
+ <content>
+ <bxml:include bxml:id="documentsTab" src="DocumentsTab.bxml"
+ inline="true" />
+ </content>
+
+ </Border>
+
+ <Border styles="{backgroundColor:11}">
+ <TabPane.tabData>
+ <content:ButtonData icon="/img/search.gif"
+ text="%lukeWindow_searchTabText" />
+ </TabPane.tabData>
+
+ <content>
+ <bxml:include bxml:id="searchTab" src="SearchTab.bxml"
+ inline="true" />
+ </content>
+ </Border>
+
+ <Border styles="{backgroundColor:11}">
+ <TabPane.tabData>
+ <content:ButtonData icon="/img/terms.gif"
+ text="%lukeWindow_analyzersTabText" />
+ </TabPane.tabData>
+
+ <content>
+ <bxml:include bxml:id="analyzersTab" src="AnalyzersTab.bxml"
+ inline="true" />
+ </content>
+ </Border>
+
+ <Border>
+ <TabPane.tabData>
+ <content:ButtonData icon="/img/files.gif"
+ text="%lukeWindow_filesTabText" />
+ </TabPane.tabData>
+ <content>
+ <bxml:include bxml:id="filesTab" src="FilesTab.bxml"
+ inline="true" />
+ </content>
+ </Border>
+ <BoxPane styles="{fill:true}">
+ <TabPane.tabData>
+ <content:ButtonData icon="/img/tools.gif"
+ text="%lukeWindow_pluginsTabText" />
+ </TabPane.tabData>
+ <Label text="Coming..." />
+ </BoxPane>
+ </tabs>
+ </TabPane>
+ </TablePane.Row>
+ <TablePane.Row>
+ <Label bxml:id="statusLabel" text="" styles="{padding:2}" />
+ </TablePane.Row>
+ </rows>
+ </TablePane>
</content>
-</luke:LukeWindow>
-
+</luke:LukeWindow>
Modified: lucene/sandbox/luke/src/org/apache/lucene/luke/ui/LukeWindow.java
URL: http://svn.apache.org/viewvc/lucene/sandbox/luke/src/org/apache/lucene/luke/ui/LukeWindow.java?rev=1523019&r1=1523018&r2=1523019&view=diff
==============================================================================
--- lucene/sandbox/luke/src/org/apache/lucene/luke/ui/LukeWindow.java (original)
+++ lucene/sandbox/luke/src/org/apache/lucene/luke/ui/LukeWindow.java Fri Sep 13 17:18:16 2013
@@ -17,6 +17,7 @@ package org.apache.lucene.luke.ui;
* limitations under the License.
*/
+import java.awt.Color;
import java.io.File;
import java.io.IOException;
import java.lang.reflect.Constructor;
@@ -46,20 +47,55 @@ import org.apache.lucene.store.FSDirecto
import org.apache.lucene.store.RAMDirectory;
import org.apache.lucene.util.Version;
import org.apache.pivot.beans.BXML;
+import org.apache.pivot.beans.BXMLSerializer;
import org.apache.pivot.beans.Bindable;
import org.apache.pivot.collections.Map;
+import org.apache.pivot.serialization.SerializationException;
import org.apache.pivot.util.Resources;
+import org.apache.pivot.wtk.Action;
import org.apache.pivot.wtk.Alert;
+import org.apache.pivot.wtk.Border;
+import org.apache.pivot.wtk.BoxPane;
+import org.apache.pivot.wtk.Checkbox;
+import org.apache.pivot.wtk.Component;
+import org.apache.pivot.wtk.ComponentMouseButtonListener;
+import org.apache.pivot.wtk.ComponentMouseListener;
+import org.apache.pivot.wtk.Container;
+import org.apache.pivot.wtk.DesktopApplicationContext;
import org.apache.pivot.wtk.Display;
+import org.apache.pivot.wtk.FillPane;
+import org.apache.pivot.wtk.FlowPane;
import org.apache.pivot.wtk.Frame;
+import org.apache.pivot.wtk.GridPane;
+import org.apache.pivot.wtk.ImageView;
+import org.apache.pivot.wtk.Label;
+import org.apache.pivot.wtk.LinkButton;
+import org.apache.pivot.wtk.ListButton;
+import org.apache.pivot.wtk.ListView;
+import org.apache.pivot.wtk.MenuBar;
import org.apache.pivot.wtk.MessageType;
+import org.apache.pivot.wtk.Mouse.Button;
+import org.apache.pivot.wtk.PushButton;
+import org.apache.pivot.wtk.RadioButton;
+import org.apache.pivot.wtk.ScrollBar;
+import org.apache.pivot.wtk.ScrollPane;
+import org.apache.pivot.wtk.Separator;
+import org.apache.pivot.wtk.SplitPane;
+import org.apache.pivot.wtk.TabPane;
+import org.apache.pivot.wtk.TablePane;
+import org.apache.pivot.wtk.TablePane.Row;
+import org.apache.pivot.wtk.TableView;
+import org.apache.pivot.wtk.TextArea;
+import org.apache.pivot.wtk.TextInput;
+import org.apache.pivot.wtk.Window;
public class LukeWindow extends Frame implements Bindable {
-
-// private static final String MSG_READONLY = "FAILED: Read-Only index.";
-// private static final String MSG_CONV_ERROR = "Some values could not be properly represented in this format. "
-// + "They are marked in grey and presented as a hex dump.";
-
+
+ // private static final String MSG_READONLY = "FAILED: Read-Only index.";
+ // private static final String MSG_CONV_ERROR =
+ // "Some values could not be properly represented in this format. "
+ // + "They are marked in grey and presented as a hex dump.";
+
@BXML
private LukeInitWindow lukeInitWindow;
@BXML
@@ -72,35 +108,165 @@ public class LukeWindow extends Frame im
private OverviewTab overviewTab;
@BXML
private AnalyzersTab analyzersTab;
-
+
private LukeMediator lukeMediator = new LukeMediator();
-
+
private Class[] analyzers = null;
- private Class[] defaultAnalyzers = { SimpleAnalyzer.class, StandardAnalyzer.class, StopAnalyzer.class,
- WhitespaceAnalyzer.class };
-
+ private Class[] defaultAnalyzers = {SimpleAnalyzer.class, StandardAnalyzer.class, StopAnalyzer.class, WhitespaceAnalyzer.class};
+
private String baseDir;
private String[] analyzerNames;
-
+ /**
+ * Set of themes given as hexadecimal color codes
+ */
+ private final int[][] themes = { {0xece9d0, 0x000000, 0xf5f4f0, 0x919b9a, 0xb0b0b0, 0xeeeeee, 0xb9b9b9, 0xff8080, 0xc5c5dd}, // default
+ {0xe6e6e6, 0x000000, 0xffffff, 0x909090, 0xb0b0b0, 0xededed, 0xb9b9b9, 0x89899a, 0xc5c5dd}, // gray
+ {0xeeeecc, 0x000000, 0xffffff, 0x999966, 0xb0b096, 0xededcb, 0xcccc99, 0xcc6600, 0xffcc66}, // sandstone
+ {0xf0f0ff, 0x0000a0, 0xffffff, 0x8080ff, 0xb0b0b0, 0xededed, 0xb0b0ff, 0xff0000, 0xfde0e0}, // sky
+ {0x6375d6, 0xffffff, 0x7f8fdd, 0xd6dff5, 0x9caae5, 0x666666, 0x003399, 0xff3333, 0x666666} // navy
+ };
+
+ /**
+ * Listener for coloring buttons when pressed
+ */
+ ComponentMouseButtonListener mouseButtonPressedListener = new ComponentMouseButtonListener() {
+
+ int theme[];
+
+ public boolean mouseUp(Component component, Button button, int x, int y) {
+ theme = themes[getActiveThemeIndex(Window.getActiveWindow())];
+ setComponentColor(component, "backgroundColor", theme[0]);
+ return false;
+ }
+
+ public boolean mouseDown(Component component, Button button, int x, int y) {
+ theme = themes[getActiveThemeIndex(Window.getActiveWindow())];
+ setComponentColor(component, "backgroundColor", theme[6]);
+ return false;
+ }
+
+ public boolean mouseClick(Component component, Button button, int x, int y, int count) {
+ return false;
+ }
+
+ };
+ /**
+ * Listener for coloring buttons when MouseOver event occurs
+ */
+ ComponentMouseListener mouseMoveListener = new ComponentMouseListener() {
+ int theme[];
+
+ public void mouseOver(Component component) {
+ theme = themes[getActiveThemeIndex(Window.getActiveWindow())];
+ setComponentColor(component, "backgroundColor", theme[5]);
+ }
+
+ public void mouseOut(Component component) {
+ theme = themes[getActiveThemeIndex(Window.getActiveWindow())];
+ setComponentColor(component, "backgroundColor", theme[0]);
+ }
+
+ public boolean mouseMove(Component component, int x, int y) {
+ theme = themes[getActiveThemeIndex(Window.getActiveWindow())];
+ setComponentColor(component, "backgroundColor", theme[5]);
+ return false;
+ }
+ };
+
+ /**
+ * Default constructor for populating analyzers and defining actions when themes are selected
+ *
+ * @throws IOException
+ * @throws ClassNotFoundException
+ */
public LukeWindow() throws IOException, ClassNotFoundException {
populateAnalyzers();
+ close();
+ Action.getNamedActions().put("defaulttheme", new Action() {
+ public void perform(Component source) {
+ recColorChange(Window.getActiveWindow(), themes[0]);
+ }
+ });
+ Action.getNamedActions().put("graytheme", new Action() {
+ public void perform(Component source) {
+ recColorChange(Window.getActiveWindow(), themes[1]);
+ }
+ });
+ Action.getNamedActions().put("sandstonetheme", new Action() {
+ public void perform(Component source) {
+ recColorChange(Window.getActiveWindow(), themes[2]);
+ }
+ });
+ Action.getNamedActions().put("skytheme", new Action() {
+ public void perform(Component source) {
+ recColorChange(Window.getActiveWindow(), themes[3]);
+ }
+ });
+ Action.getNamedActions().put("navytheme", new Action() {
+ public void perform(Component source) {
+ recColorChange(Window.getActiveWindow(), themes[4]);
+ }
+ });
}
-
+
+ /**
+ * Open the Luke main window, color to default theme and open dialog for index
+ *
+ * @param display
+ */
public void openLukeWindow(Display display) {
open(display, null);
+ recColorChange(Window.getActiveWindow(), themes[0]);
onOpen();
}
-
+
+ /**
+ * Opens the dialog for getting index and color the dialog to default theme
+ */
public void onOpen() {
lukeInitWindow.open(this);
+ recColorChange(Window.getActiveWindow(), themes[0]);
}
-
+
+ /**
+ * Exits the Luke application
+ */
+ public void exitLuke() {
+ DesktopApplicationContext.exit();
+ }
+
+ /**
+ * Convenience method for getting currently active theme
+ *
+ * @param activeWindow
+ * Currently active window
+ * @return Index of currently active theme, got from themes[][]
+ */
+ private int getActiveThemeIndex(Window activeWindow) {
+ if (activeWindow == null)
+ return 0;
+ else {
+ String colorHexString = Integer.toHexString(((Color) activeWindow.getStyles().get("backgroundColor")).getRGB()).substring(2);
+ if (colorHexString.equals(Integer.toHexString(themes[1][0])))
+ return 1;
+ else if (colorHexString.equals(Integer.toHexString(themes[2][0])))
+ return 2;
+ else if (colorHexString.equals(Integer.toHexString(themes[3][0])))
+ return 3;
+ else if (colorHexString.equals(Integer.toHexString(themes[4][0])))
+ return 4;
+ else
+ return 0;
+ }
+ }
+
/**
* Populate a combobox with the current list of analyzers.
+ *
* @param combo
- * @throws ClassNotFoundException
- * @throws IOException
+ * @throws ClassNotFoundException
+ * @throws IOException
*/
public void populateAnalyzers() throws IOException, ClassNotFoundException {
Class[] an = ClassFinder.getInstantiableSubclasses(Analyzer.class);
@@ -109,7 +275,7 @@ public class LukeWindow extends Frame im
analyzers = defaultAnalyzers;
} else {
HashSet<Class> uniq = new HashSet<Class>(Arrays.asList(an));
- analyzers = (Class[])uniq.toArray(new Class[uniq.size()]);
+ analyzers = (Class[]) uniq.toArray(new Class[uniq.size()]);
}
analyzerNames = new String[analyzers.length];
for (int i = 0; i < analyzers.length; i++) {
@@ -117,23 +283,20 @@ public class LukeWindow extends Frame im
}
Arrays.sort(analyzerNames);
}
-
+
/**
* Open indicated index and re-initialize all GUI and plugins.
*
* @param pName
* path to index
* @param force
- * if true, and the index is locked, unlock it first. If false, and
- * the index is locked, an error will be reported.
+ * if true, and the index is locked, unlock it first. If false, and the index is locked, an error will be reported.
* @param readOnly
* open in read-only mode, and disallow modifications.
*/
- public void openIndex(boolean force, String dirImpl, boolean readOnly,
- boolean ramDir, boolean keepCommits, IndexCommit point, int tiiDivisor) {
+ public void openIndex(boolean force, String dirImpl, boolean readOnly, boolean ramDir, boolean keepCommits, IndexCommit point, int tiiDivisor) {
String indexPath = lukeInitWindow.indexPath.getText();
this.indexPath = indexPath;
-
// removeAll();
File baseFileDir = new File(indexPath);
@@ -142,16 +305,18 @@ public class LukeWindow extends Frame im
// statmsg = find("statmsg");
if (this.directory != null) {
try {
- if (indexReader != null) indexReader.close();
+ if (indexReader != null)
+ indexReader.close();
} catch (Exception e) {}
-
+
try {
- if (directory != null) directory.close();
+ if (directory != null)
+ directory.close();
} catch (Exception e) {}
}
java.util.ArrayList<Directory> dirs = new java.util.ArrayList<Directory>();
try {
- Directory d = openDirectory(dirImpl, this.indexPath , false);
+ Directory d = openDirectory(dirImpl, this.indexPath, false);
if (d == null) {
return;
}
@@ -179,7 +344,7 @@ public class LukeWindow extends Frame im
} catch (Throwable e) {
e.printStackTrace();
}
-
+
if (!existsSingle) { // try multi
File[] files = baseFileDir.listFiles();
for (File f : files) {
@@ -219,22 +384,22 @@ public class LukeWindow extends Frame im
} else {
dirs.add(d);
}
-
+
if (dirs.size() == 0) {
errorMsg("No valid directory at the location, try another location.");
return;
}
-
+
if (ramDir) {
- //TODO:
- //showStatus("Loading index into RAMDirectory ...");
+ // TODO:
+ showStatus("Loading index into RAMDirectory ...");
Directory dir1 = new RAMDirectory();
IndexWriterConfig config = new IndexWriterConfig(Version.LUCENE_31, new SimpleAnalyzer(Version.LUCENE_31));
IndexWriter iw1 = new IndexWriter(dir1, config);
- iw1.addIndexes((Directory[])dirs.toArray(new Directory[dirs.size()]));
+ iw1.addIndexes((Directory[]) dirs.toArray(new Directory[dirs.size()]));
iw1.close();
- //TODO:
- //showStatus("RAMDirectory loading done!");
+ // TODO:
+ showStatus("RAMDirectory loading done!");
directory.close();
directory = dir1;
}
@@ -251,46 +416,44 @@ public class LukeWindow extends Frame im
if (readers.size() == 1) {
indexReader = readers.get(0);
IndexReader ir = readers.get(0);
- directory = ((DirectoryReader)ir).directory();
+ directory = ((DirectoryReader) ir).directory();
} else {
- indexReader = new MultiReader(
- (IndexReader[]) readers.toArray(new IndexReader[readers.size()]));
+ indexReader = new MultiReader((IndexReader[]) readers.toArray(new IndexReader[readers.size()]));
}
-
+
lukeMediator.indexInfo = new IndexInfo(indexReader, this.indexPath);
-
- // TODO:
-// Collection<String> fieldNames = indexReader.getFieldNames(IndexReader.FieldOption.ALL);
-//
-// if (fieldNames.size() == 0) {
-// // showStatus("Empty index.");
-// }
-
+
+ // TODO:
+ // Collection<String> fieldNames =
+ // indexReader.getFieldNames(IndexReader.FieldOption.ALL);
+ //
+ // if (fieldNames.size() == 0) {
+ // // showStatus("Empty index.");
+ // }
+
// call onOpenIndex for all tabs
overviewTab.onOpenIndex();
documentsTab.onOpenIndex();
searchTab.onOpenIndex();
filesTab.onOpenIndex();
-
+
// initPlugins();
- // showStatus("Index successfully open.");
+ showStatus("Index successfully open.");
} catch (Exception e) {
e.printStackTrace();
errorMsg(e.getMessage());
return;
}
}
-
- public FSDirectory openDirectory(String dirImpl, String file, boolean create)
- throws Exception {
+
+ public FSDirectory openDirectory(String dirImpl, String file, boolean create) throws Exception {
File f = new File(file);
if (!f.exists()) {
errorMsg("Index directory doesn't exist.");
return null;
}
FSDirectory res = null;
- if (dirImpl == null || dirImpl.equals(FSDirectory.class.getName())
- || dirImpl.equals(FSDirectory.class.getSimpleName())) {
+ if (dirImpl == null || dirImpl.equals(FSDirectory.class.getName()) || dirImpl.equals(FSDirectory.class.getSimpleName())) {
return FSDirectory.open(f);
}
try {
@@ -301,11 +464,12 @@ public class LukeWindow extends Frame im
errorMsg("Invalid directory implementation class: " + dirImpl);
throw new RuntimeException(e);
}
- if (res != null) return res;
+ if (res != null)
+ return res;
// fall-back to FSDirectory.
return FSDirectory.open(f);
}
-
+
public void showCommitFiles(Object commitTable) throws Exception {
// List commits = new ArrayList();
// Object[] rows = getSelectedItems(commitTable);
@@ -321,14 +485,185 @@ public class LukeWindow extends Frame im
// }
// showFiles(directory, commits);
}
-
+
+ /**
+ * Shows an alert dialog with an error message
+ *
+ * @param error
+ * Error message
+ */
private void errorMsg(String error) {
Alert.alert(MessageType.ERROR, error, this);
}
-
+
+ /**
+ * Shows a message on status bar
+ *
+ * @param message
+ * Message to display on status bar
+ * @throws SerializationException
+ * @throws IOException
+ */
+ protected void showStatus(String message) throws IOException, SerializationException {
+ // BXMLSerializer bxmlSerializer = new BXMLSerializer();
+ // Window window = (Window) bxmlSerializer.readObject(LukeWindow.class, "LukeWindow.bxml");
+ // Label label = (Label) bxmlSerializer.getNamespace().get("statusLabel");
+ // label.setTextOrEmpty(message);
+ }
+
+ /**
+ * Convenience method for coloring component
+ *
+ * @param component
+ * component to color
+ * @param style
+ * style to apply (Example : color, backgroundColor)
+ * @param colorRGB
+ * color code passed as hexadecimal integer
+ *
+ */
+ private void setComponentColor(Component component, String style, int colorRGB) {
+ Color color = Color.decode(Integer.toString(colorRGB));
+ component.getStyles().put(style, color);
+ }
+
+ /**
+ * Method for recursively coloring all components. If a component is a container, all children are obtained and styles set to get that theme
+ *
+ * @param component
+ * component to color and get children
+ * @param theme
+ * theme, passed as array of hexadecimal represented integer color codes
+ */
+ private void recColorChange(Component component, int[] theme) {
+ if (component instanceof Window) {
+ setComponentColor(component, "backgroundColor", theme[0]);
+ for (int i = 0; i < ((Container) component).getLength(); i++) {
+ recColorChange(((Window) component).get(i), theme);
+ }
+ } else if (component instanceof TabPane) {
+ setComponentColor(component, "activeTabColor", theme[0]);
+ setComponentColor(component, "backgroundColor", theme[0]);
+ setComponentColor(component, "inactiveTabColor", theme[0]);
+ setComponentColor(component, "buttonColor", theme[1]);
+ setComponentColor(component, "borderColor", theme[3]);
+ setComponentColor(component, "inactiveBorderColor", theme[3]);
+ for (Component tab : ((TabPane) component).getTabs()) {
+ recColorChange(tab, theme);
+ }
+ } else if (component instanceof Border) {
+ setComponentColor(component, "backgroundColor", theme[0]);
+ component = ((Border) component).getContent();
+ recColorChange(component, theme);
+ } else if (component instanceof Label) {
+ setComponentColor(component, "color", theme[1]);
+ setComponentColor(component, "backgroundColor", theme[0]);
+ } else if (component instanceof MenuBar) {
+ setComponentColor(component, "color", theme[1]);
+ setComponentColor(component, "backgroundColor", theme[0]);
+ setComponentColor(component, "activeBackgroundColor", theme[6]);
+ } else if (component instanceof TextInput || component instanceof TextArea) {
+ setComponentColor(component, "color", theme[1]);
+ setComponentColor(component, "backgroundColor", theme[2]);
+ setComponentColor(component, "borderColor", theme[3]);
+ setComponentColor(component, "activeBackgroundColor", theme[6]);
+ setComponentColor(component, "selectionBackgroundColor", theme[8]);
+ setComponentColor(component, "inactiveSelectionBackgroundColor", theme[8]);
+ } else if (component instanceof TableView) {
+ setComponentColor(component, "color", theme[1]);
+ setComponentColor(component, "backgroundColor", theme[2]);
+ setComponentColor(component, "alternateRowBackgroundColor", theme[2]);
+ setComponentColor(component, "horizontalGridColor", theme[3]);
+ setComponentColor(component, "verticalGridColor", theme[3]);
+ setComponentColor(component, "inactiveSelectionBackgroundColor", theme[8]);
+ setComponentColor(component, "selectionBackgroundColor", theme[8]);
+ setComponentColor(component, "highlightBackgroundColor", theme[8]);
+ } else if (component instanceof TablePane) {
+ setComponentColor(component, "backgroundColor", theme[0]);
+ setComponentColor(component, "horizontalGridColor", theme[3]);
+ setComponentColor(component, "verticalGridColor", theme[3]);
+ for (Row row : ((TablePane) component).getRows()) {
+ for (int i = 0; i < row.getLength(); i++) {
+ recColorChange(row.get(i), theme);
+ }
+ }
+ } else if (component instanceof Separator) {
+ setComponentColor(component, "color", theme[0]);
+ setComponentColor(component, "headingColor", theme[1]);
+ } else if (component instanceof ListView) {
+ setComponentColor(component, "color", theme[1]);
+ setComponentColor(component, "backgroundColor", theme[2]);
+ setComponentColor(component, "selectionBackgroundColor", theme[8]);
+ setComponentColor(component, "inactiveSelectionBackgroundColor", theme[8]);
+ setComponentColor(component, "highlightBackgroundColor", theme[8]);
+ } else if (component.toString().startsWith("org.apache.lucene.luke.ui")) {
+ if (component.toString().endsWith("OverviewTab"))
+ component = (Container) new BXMLSerializer().getNamespace().get("OverviewTab");
+ else if (component.toString().endsWith("AnalyzersTab"))
+ component = (Container) new BXMLSerializer().getNamespace().get("AnalyzersTab");
+ else if (component.toString().endsWith("DocumentsTab"))
+ component = (Container) new BXMLSerializer().getNamespace().get("DocumentsTab");
+ else if (component.toString().endsWith("SearchTab"))
+ component = (Container) new BXMLSerializer().getNamespace().get("SearchTab");
+ else if (component.toString().endsWith("FilesTab"))
+ component = (Container) new BXMLSerializer().getNamespace().get("FilesTab");
+
+ } else if (component instanceof SplitPane) {
+ if (((SplitPane) component).getLeft() != null) {
+ recColorChange(((SplitPane) component).getLeft(), theme);
+ recColorChange(((SplitPane) component).getRight(), theme);
+ } else {
+ System.out.println("TOP of : " + component.getParent());
+ recColorChange(((SplitPane) component).getTop(), theme);
+ recColorChange(((SplitPane) component).getBottom(), theme);
+ }
+ } else if (component instanceof ScrollBar) {
+ setComponentColor(component, "backgroundColor", theme[0]);
+ setComponentColor(component, "scrollButtonBackgroundColor", theme[2]);
+ setComponentColor(component, "borderColor", theme[3]);
+ } else if (component instanceof PushButton || component instanceof ListButton) {
+ component.getComponentMouseButtonListeners().add(mouseButtonPressedListener);
+ component.getComponentMouseListeners().add(mouseMoveListener);
+ setComponentColor(component, "color", theme[1]);
+ setComponentColor(component, "backgroundColor", theme[0]);
+ setComponentColor(component, "borderColor", theme[3]);
+ } else if (component instanceof RadioButton || component instanceof Checkbox || component instanceof LinkButton) {
+ setComponentColor(component, "color", theme[1]);
+ } else if (component instanceof ScrollPane) {
+ setComponentColor(component, "backgroundColor", theme[0]);
+ for (int i = 0; i < ((ScrollPane) component).getLength(); i++) {
+ recColorChange(((ScrollPane) component).get(i), theme);
+ }
+ } else if (component instanceof FlowPane) {
+ setComponentColor(component, "backgroundColor", theme[0]);
+ for (int i = 0; i < ((FlowPane) component).getLength(); i++) {
+ recColorChange(((FlowPane) component).get(i), theme);
+ }
+ } else if (component instanceof BoxPane) {
+ setComponentColor(component, "backgroundColor", theme[0]);
+ for (int i = 0; i < ((BoxPane) component).getLength(); i++) {
+ recColorChange(((BoxPane) component).get(i), theme);
+ }
+ } else if (component instanceof GridPane) {
+ setComponentColor(component, "backgroundColor", theme[0]);
+ for (int i = 0; i < ((GridPane) component).getLength(); i++) {
+ recColorChange(((GridPane) component).get(i), theme);
+ }
+ } else if (component instanceof FillPane) {
+ setComponentColor(component, "backgroundColor", theme[0]);
+ for (int i = 0; i < ((FillPane) component).getLength(); i++) {
+ recColorChange(((FillPane) component).get(i), theme);
+ }
+ } else if (component instanceof ScrollPane.Corner) {
+ setComponentColor(component, "backgroundColor", theme[0]);
+ } else if (!(component instanceof ImageView)) {
+ setComponentColor(component, "color", theme[1]);
+ setComponentColor(component, "backgroundColor", theme[0]);
+ }
+ }
+
@Override
- public void initialize(Map<String,Object> namespace, URL location,
- Resources resources) {
+ public void initialize(Map<String,Object> namespace, URL location, Resources resources) {
documentsTab.initLukeMediator(lukeMediator);
overviewTab.initLukeMediator(lukeMediator);
filesTab.initLukeMediator(lukeMediator);
@@ -336,14 +671,14 @@ public class LukeWindow extends Frame im
analyzersTab.initLukeMediator(lukeMediator);
lukeInitWindow.initLukeMediator(lukeMediator);
}
-
+
private IndexReader indexReader;
private java.util.Map<String,Decoder> decoders = new HashMap<String,Decoder>();
private Decoder defDecoder = new StringDecoder();
private String indexPath;
private Directory directory;
-
+
class LukeMediator {
// populated by LukeWindow#openIndex
@@ -360,18 +695,18 @@ public class LukeWindow extends Frame im
public Decoder getDefDecoder() {
return defDecoder;
}
-
+
public OverviewTab getOverViewTab() {
return overviewTab;
}
-
+
public LukeWindow getLukeWindow() {
return LukeWindow.this;
}
-
+
public String[] getAnalyzerNames() {
return analyzerNames;
}
}
-}
\ No newline at end of file
+}