You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by us...@apache.org on 2019/04/07 12:31:10 UTC
[lucene-solr] 30/34: Add the hyperlink to 20 Newsgroups corpus page
This is an automated email from the ASF dual-hosted git repository.
uschindler pushed a commit to branch jira/lucene-2562-luke-swing-3
in repository https://gitbox.apache.org/repos/asf/lucene-solr.git
commit 7fd769889a271e6ded582caae506f59d8901689b
Author: Tomoko Uchida <to...@gmail.com>
AuthorDate: Sun Apr 7 14:06:33 2019 +0900
Add the hyperlink to 20 Newsgroups corpus page
---
.../dialog/menubar/CreateIndexDialogFactory.java | 40 +++++++++++++++++-----
.../luke/app/desktop/messages/messages.properties | 5 ++-
2 files changed, 36 insertions(+), 9 deletions(-)
diff --git a/lucene/luke/src/java/org/apache/lucene/luke/app/desktop/components/dialog/menubar/CreateIndexDialogFactory.java b/lucene/luke/src/java/org/apache/lucene/luke/app/desktop/components/dialog/menubar/CreateIndexDialogFactory.java
index f12198f..0735c09 100644
--- a/lucene/luke/src/java/org/apache/lucene/luke/app/desktop/components/dialog/menubar/CreateIndexDialogFactory.java
+++ b/lucene/luke/src/java/org/apache/lucene/luke/app/desktop/components/dialog/menubar/CreateIndexDialogFactory.java
@@ -53,6 +53,7 @@ import org.apache.lucene.luke.app.desktop.util.DialogOpener;
import org.apache.lucene.luke.app.desktop.util.FontUtils;
import org.apache.lucene.luke.app.desktop.util.MessageUtils;
import org.apache.lucene.luke.app.desktop.util.StyleConstants;
+import org.apache.lucene.luke.app.desktop.util.URLLabel;
import org.apache.lucene.luke.models.tools.IndexTools;
import org.apache.lucene.luke.models.tools.IndexToolsFactory;
import org.apache.lucene.luke.util.LoggerFactory;
@@ -169,15 +170,38 @@ public class CreateIndexDialogFactory implements DialogOpener.DialogFactory {
JPanel panel = new JPanel(new BorderLayout());
panel.setOpaque(false);
- JPanel description = new JPanel(new FlowLayout(FlowLayout.LEADING));
+ JPanel description = new JPanel();
+ description.setLayout(new BoxLayout(description, BoxLayout.Y_AXIS));
description.setOpaque(false);
- JTextArea descTA = new JTextArea(MessageUtils.getLocalizedMessage("createindex.label.data_help"));
- descTA.setPreferredSize(new Dimension(550, 100));
- descTA.setBorder(BorderFactory.createEmptyBorder(5, 5, 5, 5));
- descTA.setOpaque(false);
- descTA.setLineWrap(true);
- descTA.setEditable(false);
- description.add(descTA);
+
+ JPanel name = new JPanel(new FlowLayout(FlowLayout.LEADING));
+ name.setOpaque(false);
+ JLabel nameLbl = new JLabel(MessageUtils.getLocalizedMessage("createindex.label.option"));
+ name.add(nameLbl);
+ description.add(name);
+
+ JTextArea descTA1 = new JTextArea(MessageUtils.getLocalizedMessage("createindex.textarea.data_help1"));
+ descTA1.setPreferredSize(new Dimension(550, 20));
+ descTA1.setBorder(BorderFactory.createEmptyBorder(2, 10, 10, 5));
+ descTA1.setOpaque(false);
+ descTA1.setLineWrap(true);
+ descTA1.setEditable(false);
+ description.add(descTA1);
+
+ JPanel link = new JPanel(new FlowLayout(FlowLayout.LEADING, 10, 1));
+ link.setOpaque(false);
+ JLabel linkLbl = FontUtils.toLinkText(new URLLabel(MessageUtils.getLocalizedMessage("createindex.label.data_link")));
+ link.add(linkLbl);
+ description.add(link);
+
+ JTextArea descTA2 = new JTextArea(MessageUtils.getLocalizedMessage("createindex.textarea.data_help2"));
+ descTA2.setPreferredSize(new Dimension(550, 50));
+ descTA2.setBorder(BorderFactory.createEmptyBorder(10, 10, 10, 5));
+ descTA2.setOpaque(false);
+ descTA2.setLineWrap(true);
+ descTA2.setEditable(false);
+ description.add(descTA2);
+
panel.add(description, BorderLayout.PAGE_START);
JPanel dataDirPath = new JPanel(new FlowLayout(FlowLayout.LEADING));
diff --git a/lucene/luke/src/resources/org/apache/lucene/luke/app/desktop/messages/messages.properties b/lucene/luke/src/resources/org/apache/lucene/luke/app/desktop/messages/messages.properties
index 5ce5872..3323f10 100644
--- a/lucene/luke/src/resources/org/apache/lucene/luke/app/desktop/messages/messages.properties
+++ b/lucene/luke/src/resources/org/apache/lucene/luke/app/desktop/messages/messages.properties
@@ -78,8 +78,11 @@ openindex.message.dirctory_opened=Directory opened. There is no IndexReader - mo
createindex.dialog.title=Choose new index directory path
createindex.label.location=Location:
createindex.label.dirname=Index directory name:
-createindex.label.data_help=(Optional)\n You can index sample documents from 20 Newsgroups data that is available at here:\n http://kdd.ics.uci.edu/databases/20newsgroups/20newsgroups.html\n Download and extract the tgz file, then select the extracted directory path.\n Creating an index with the sample documents can take 10 seconds or so :)
+createindex.label.option=(Options)
+createindex.label.data_link=http://kdd.ics.uci.edu/databases/20newsgroups/20newsgroups.html
createindex.label.datadir=Data directory:
+createindex.textarea.data_help1=You can index sample documents from 20 Newsgroups corpus that is available at here:
+createindex.textarea.data_help2=Download and extract the tgz file, then select the extracted directory path.\nCreating an index with the full size corpus can take 30 seconds or so :)
# Optimize index
optimize.dialog.title=Optimize index
optimize.label.index_path=Index directory path: