|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.JPanel
lemurproject.indri.ui.IndexUI
public class IndexUI
User interface for building Indri indexes.
Nested Class Summary | |
---|---|
(package private) class |
IndexUI.UIIndexStatus
|
Nested classes/interfaces inherited from class javax.swing.JPanel |
---|
javax.swing.JPanel.AccessibleJPanel |
Nested classes/interfaces inherited from class javax.swing.JComponent |
---|
javax.swing.JComponent.AccessibleJComponent |
Nested classes/interfaces inherited from class java.awt.Container |
---|
java.awt.Container.AccessibleAWTContainer |
Nested classes/interfaces inherited from class java.awt.Component |
---|
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BaselineResizeBehavior, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy |
Field Summary | |
---|---|
private static java.lang.String |
aboutText
About the indexer. |
private static java.lang.String[] |
annotationsColumnTooltips
|
(package private) boolean |
appendIndex
are we appending? |
private boolean |
blinking
Is the blinker running? |
private javax.swing.JButton |
browse
Action Buttons |
private javax.swing.JButton |
btnAddField
|
private javax.swing.JButton |
btnHarvestLinks
|
private javax.swing.JButton |
btnRemoveField
|
private javax.swing.JButton |
cfbrowse
Action Buttons |
private javax.swing.DefaultListModel |
cfModel
hold the file names |
private javax.swing.JButton |
cfRemove
Action Buttons |
private javax.swing.JTextField |
colFields
field names |
private javax.swing.JList |
collectionFiles
browse multiple filenames |
private java.util.Vector |
dataFilesOffsetFiles
|
private javax.swing.JComboBox |
docFormat
Multiple choices |
private javax.swing.JCheckBox |
doRecurse
Single choice |
private javax.swing.JCheckBox |
doStem
Single choice |
private javax.swing.JFileChooser |
fc
File chooser starting in current directory |
private static java.lang.String[] |
fieldColumnTooltips
|
private javax.swing.JTable |
fieldTable
|
private FieldTableModel |
fieldTableModel
|
private javax.swing.JMenu |
fileMenu
Menus |
private javax.swing.JTextField |
filterString
filename filter |
private javax.swing.JMenuItem |
fOpen
Menu Items |
private static java.lang.String[] |
formats
Indri FileClassEnvironments |
private javax.swing.JMenuItem |
fPrefs
Menu Items |
private javax.swing.JMenuItem |
fQuit
Menu Items |
private javax.swing.JMenuItem |
fSave
Menu Items |
private javax.swing.JButton |
go
Action Buttons |
private javax.swing.JMenuItem |
hAbout
Menu Items |
private static java.lang.String |
helpFile
Help file for the application |
private javax.swing.JFrame |
helpFrame
Frame for help window |
private javax.swing.JMenu |
helpMenu
Menus |
private javax.swing.JMenuItem |
hHelp
Menu Items |
private static java.lang.String |
iconFile
The little icon |
private javax.swing.JTextField |
iname
input/browseable filename |
private javax.swing.JPanel |
indexFieldPanel
Fields and Metadata items |
private javax.swing.ImageIcon |
indriIcon
The Indri Icon. |
private static java.lang.String[] |
lims
Memory limit choices |
private static java.lang.String |
logoFile
The big logo |
private javax.swing.JComboBox |
memoryLim
Multiple choices |
private javax.swing.JMenuBar |
menuBar
MenuBar |
private javax.swing.JTextArea |
messages
Messages pane for prog output |
private OffsetAnnotationTableModel |
offsetAnnotationFilesTableModel
|
private javax.swing.JTable |
offsetAnnotationFileTable
|
private javax.swing.JLabel |
status
Status line messages visible for all tabs. |
private javax.swing.JComboBox |
stemmers
Multiple choices |
private javax.swing.JButton |
stop
Action Buttons |
private javax.swing.JButton |
stopBrowse
Action Buttons |
private javax.swing.JTextField |
stopwordlist
input/browseable filename |
private java.lang.String |
stopwords
data directory paths |
private static java.lang.String[] |
sTypes
Stemmer types |
private javax.swing.JTabbedPane |
tabbedPane
Top level container |
private javax.swing.JTextField |
txtPathToHarvestLinks
|
Fields inherited from class javax.swing.JComponent |
---|
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW |
Fields inherited from class java.awt.Component |
---|
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT |
Fields inherited from interface java.awt.image.ImageObserver |
---|
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
Constructor Summary | |
---|---|
IndexUI()
Get the ball rolling. |
Method Summary | |
---|---|
void |
actionPerformed(java.awt.event.ActionEvent e)
Omnibus for responding to user actions. |
private java.lang.Thread |
blinker(java.lang.String s1,
java.lang.String s2)
Make the status line blink while working. |
private void |
buildIndex()
Ask the IndexEnvironment to add the files. |
void |
caretUpdate(javax.swing.event.CaretEvent event)
Listens to the index name text field. |
private static void |
createAndShowGUI()
Create the GUI and show it. |
protected static javax.swing.ImageIcon |
createImageIcon(java.lang.String path)
Returns an ImageIcon, or null if the path was invalid. |
private void |
deleteDirectory(java.io.File dir)
remove a directory and all of its files and subdirectories |
private long |
encodeMem()
|
private java.lang.String |
encodeRegexp(java.lang.String regexp)
Rewrite a shell filename pattern to a regular expression. |
private void |
ensureMessagesVisible()
Keeps the message pane showing the last line appended. |
private java.lang.String[] |
formatDataFiles()
Create the datafiles list of strings. |
private void |
formatDataFiles(java.io.File file,
java.io.FileFilter f,
java.util.Vector accum,
java.lang.String offsetFile)
Accumulate filenames for the input list. |
private void |
initGUI()
Initialize the GUI elements, including preloading the help frame. |
void |
itemStateChanged(java.awt.event.ItemEvent e)
Listens to the check boxes. |
static void |
main(java.lang.String[] args)
Fire it up. |
private void |
makeHelp()
Create the frame that shows the help file and render the html. |
private javax.swing.JMenuBar |
makeMenuBar()
Create the applications menu bar. |
private javax.swing.JMenuItem |
makeMenuItem(java.lang.String label)
Creates a JMenuItem with this as its ActionListener. |
private javax.swing.JPanel |
makePanel()
Create a JPanel with BorderLayout. |
private boolean |
safeToBuildIndex()
Tests for likely failure scenarios. |
private void |
showException(java.lang.Exception e)
Format an exception message in the messages text area. |
void |
tableChanged(javax.swing.event.TableModelEvent e)
Listens for table model changes |
Methods inherited from class javax.swing.JPanel |
---|
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI |
Methods inherited from class javax.swing.JComponent |
---|
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBaseline, getBaselineResizeBehavior, getBorder, getBounds, getClientProperty, getComponentGraphics, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPopupLocation, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFocusTraversalKeys, setFont, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update |
Methods inherited from class java.awt.Container |
---|
add, add, add, add, add, addContainerListener, addImpl, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, transferFocusBackward, transferFocusDownCycle, validate, validateTree |
Methods inherited from class java.awt.Component |
---|
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusUpCycle |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
private javax.swing.JLabel status
private javax.swing.JTextArea messages
private javax.swing.JTabbedPane tabbedPane
private javax.swing.JCheckBox doRecurse
private javax.swing.JCheckBox doStem
private javax.swing.JComboBox stemmers
private javax.swing.JComboBox memoryLim
private javax.swing.JComboBox docFormat
private javax.swing.JButton browse
private javax.swing.JButton cfbrowse
private javax.swing.JButton stopBrowse
private javax.swing.JButton cfRemove
private javax.swing.JButton go
private javax.swing.JButton stop
private javax.swing.JTextField iname
private javax.swing.JTextField stopwordlist
private javax.swing.JTextField colFields
private javax.swing.JTextField filterString
private javax.swing.JList collectionFiles
private javax.swing.DefaultListModel cfModel
private final javax.swing.JFileChooser fc
private java.lang.String stopwords
private static final java.lang.String helpFile
private static final java.lang.String iconFile
private static final java.lang.String logoFile
private static final java.lang.String[] formats
private static final java.lang.String[] lims
private static final java.lang.String[] sTypes
boolean appendIndex
private javax.swing.JMenuBar menuBar
private javax.swing.JMenu fileMenu
private javax.swing.JMenu helpMenu
private javax.swing.JMenuItem fOpen
private javax.swing.JMenuItem fSave
private javax.swing.JMenuItem fPrefs
private javax.swing.JMenuItem fQuit
private javax.swing.JMenuItem hHelp
private javax.swing.JMenuItem hAbout
private javax.swing.ImageIcon indriIcon
private static final java.lang.String aboutText
private javax.swing.JFrame helpFrame
private javax.swing.JPanel indexFieldPanel
private javax.swing.JTable fieldTable
private FieldTableModel fieldTableModel
private javax.swing.JButton btnAddField
private javax.swing.JButton btnRemoveField
private javax.swing.JTable offsetAnnotationFileTable
private OffsetAnnotationTableModel offsetAnnotationFilesTableModel
private javax.swing.JTextField txtPathToHarvestLinks
private javax.swing.JButton btnHarvestLinks
private static java.lang.String[] fieldColumnTooltips
private static java.lang.String[] annotationsColumnTooltips
private java.util.Vector dataFilesOffsetFiles
private volatile boolean blinking
Constructor Detail |
---|
public IndexUI()
Method Detail |
---|
private void initGUI()
private javax.swing.JMenuBar makeMenuBar()
private javax.swing.JMenuItem makeMenuItem(java.lang.String label)
label
- the label for the item.
private javax.swing.JPanel makePanel()
protected static javax.swing.ImageIcon createImageIcon(java.lang.String path)
path
- the image file to load.
public void actionPerformed(java.awt.event.ActionEvent e)
actionPerformed
in interface java.awt.event.ActionListener
public void tableChanged(javax.swing.event.TableModelEvent e)
tableChanged
in interface javax.swing.event.TableModelListener
public void itemStateChanged(java.awt.event.ItemEvent e)
itemStateChanged
in interface java.awt.event.ItemListener
public void caretUpdate(javax.swing.event.CaretEvent event)
caretUpdate
in interface javax.swing.event.CaretListener
private void makeHelp()
private static void createAndShowGUI()
private java.lang.String encodeRegexp(java.lang.String regexp)
regexp
- the filename pattern, eg "*.dat"
private boolean safeToBuildIndex()
private void deleteDirectory(java.io.File dir)
private void ensureMessagesVisible()
private void buildIndex()
private java.lang.String[] formatDataFiles()
private void formatDataFiles(java.io.File file, java.io.FileFilter f, java.util.Vector accum, java.lang.String offsetFile)
accum
- Vector to accumulate file names recusively.file
- a File (either a file or directory)f
- the filename filter to apply.private long encodeMem()
private void showException(java.lang.Exception e)
e
- the exceptionprivate java.lang.Thread blinker(java.lang.String s1, java.lang.String s2)
public static void main(java.lang.String[] args)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |