Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

org.greenstone.gatherer.gui
Class CreatePane  view CreatePane download CreatePane.java

java.lang.Object
  extended byjava.awt.Component
      extended byjava.awt.Container
          extended byjavax.swing.JComponent
              extended byjavax.swing.JPanel
                  extended byorg.greenstone.gatherer.gui.CreatePane
All Implemented Interfaces:
javax.accessibility.Accessible, java.util.EventListener, org.greenstone.gatherer.shell.GShellListener, java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable

public class CreatePane
extends javax.swing.JPanel
implements org.greenstone.gatherer.shell.GShellListener

This class provides a GUI view showing some statistics on your current collection, and options for building it. As the collection is built this initial view is replaced with one showing progress bars and a message log of the creation process. This log can be later accessed via the options tree located in the center of the initial pane. This class is also responsible for creating the GShellProgressMonitors that are then attatched to external shell processes, and calling the methods in the CollectionManager for actually importing and building the collection.

The (i)mport and/or (b)uild options supported:
ScriptAssociated ArgumentControlComments
b-allclassificationsJCheckBox 
i/b-archivedirJTextField 
b-builddirJTextField 
i/b-debugJCheckBox 
i/b-collectdirJTextField 
b-create_imagesJCheckBox 
i-groupsizeJSpinner  
i-gzipJCheckBox 
i-importdirJTextField 
b-indexGCheckList 
i/b-keepoldJCheckBoxsanity check removeold
i/b-maxdocsJSpinner 
b-modeJComboBox"all", "compress_text", "infodb", "build_index"
b-no_textJCheckBox 
i-OIDtypeJComboBox"hash","incremental"
i/b-outJTextField 
i-removeoldJCheckBoxsanity check keepold
i-sortmetaJComboBox 
i/b-verbosityJSpinner1, 3

Version:
2.3

Nested Class Summary
private  class CreatePane.BuildButtonListener
          This class serves as the listener for actions on the build button.
private  class CreatePane.CancelButtonListener
          This class serves as the listener for actions on the cancel button.
private  class CreatePane.OptionTree
          The OptionTree is simply a tree structure that has a root node labelled "Options" and then has a child node for each available options screen.
private  class CreatePane.OptionTreeNode
          The OptionTree is built from these nodes, each of which has several methods used in creating the option panes.
private  class CreatePane.PreviewButtonListener
           
private  class CreatePane.ToolTipTreeCellRenderer
           
 
Nested classes inherited from class javax.swing.JPanel
javax.swing.JPanel.AccessibleJPanel
 
Nested classes inherited from class javax.swing.JComponent
javax.swing.JComponent.AccessibleJComponent
 
Nested classes inherited from class java.awt.Container
java.awt.Container.AccessibleAWTContainer
 
Nested classes inherited from class java.awt.Component
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy
 
Field Summary
private  java.lang.String[] args
          An array used to pass arguments with dictionary calls.
private  javax.swing.JButton build_button
          The button for begining the building processes.
private  org.greenstone.gatherer.shell.GShellProgressMonitor build_monitor
          This monitor tracks the build processes progress.
private static java.awt.Dimension BUTTON_SIZE
          The size of the buttons at the bottom of the screen.
private  javax.swing.JButton cancel_button
          The button for stopping the building processes.
private  java.awt.CardLayout card_layout
          A card layout is used to store the separate configuration and progress panes.
private static java.lang.String CONTROL
          An identifier for the control panel within the card layout.
private  javax.swing.JPanel control_pane
          The pane which contains the controls for configuration.
private  org.greenstone.gatherer.shell.GShellProgressMonitor copy_monitor
          This monitor tracks the copy processes progress.
private  org.greenstone.gatherer.util.AppendLineOnlyFileDocument document
           
private  javax.swing.JLabel document_count
          The label displaying the number of documents in this collection.
private  java.lang.String homepage
          The homepage address of the current collection
private  org.greenstone.gatherer.shell.GShellProgressMonitor import_monitor
          This monitor tracks the import processes progress.
private static java.awt.Dimension LABEL_SIZE
          The size of the labels on the progress pane.
private  javax.swing.JTextArea log_textarea
          The message log for the entire session.
private  javax.swing.JPanel main_pane
          The pane which has the card layout as its manager.
 OptionsPane options_pane
          The options pane generates all the various option sheet configuations.
private  javax.swing.JButton preview_button
          The button for viewing the collection.
private  org.greenstone.gatherer.collection.Collection previous_collection
          Stores a reference to the current collection.
 boolean processing
          Determines the current view that should be shown for this pane.
private static java.lang.String PROGRESS
          An identifier for the progress panel within the card layout.
private  javax.swing.JLabel progress_build_label
          The label alongside the build progress bar gets some special treatment so...
private  javax.swing.JLabel progress_copy_label
          The label alongside the copy progress bar gets some special treatment so...
private  javax.swing.JLabel progress_import_label
          The label alongside the import progress bar gets some special treatment so...
private  javax.swing.JPanel progress_pane
          The pane which contains the progress information.
private  javax.swing.JPanel right
          the pane on the right-hand side - shows the requested options view
private  javax.swing.JScrollPane scroll_pane
          the scrolling pane the righthand side is inside - only used for import and build options.
private  CreatePane.OptionTree tree
          A tree used to display the currently available option views.
 
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.Container
 
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
CreatePane()
          The constructor creates important helper classes, and initializes all the components.
 
Method Summary
 void collectionChanged(boolean ready)
          This method is invoked at any time there has been a significant change in the collection, such as saving, loading or creating.
private  void configureHomeURL()
           
 void display()
          This method is called to actually layout the components.
 void gainFocus()
          This method is called whenever the 'Create' tab is selected from the view bar.
 void loseFocus()
          We are informed when this view pane loses focus so we can update build options.
 void message(org.greenstone.gatherer.shell.GShellEvent event)
          All implementation of GShellListener must include this method so the listener can be informed of messages from the GShell.
 void processBegun(org.greenstone.gatherer.shell.GShellEvent event)
          All implementation of GShellListener must include this method so the listener can be informed when a GShell begins its task.
 void processComplete(org.greenstone.gatherer.shell.GShellEvent event)
          All implementation of GShellListener must include this method so the listener can be informed when a GShell completes its task.
 
Methods inherited from class javax.swing.JPanel
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI
 
Methods inherited from class javax.swing.JComponent
addAncestorListener, addNotify, addPropertyChangeListener, addPropertyChangeListener, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBorder, getBounds, getClientProperty, getComponentGraphics, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getGraphics, getHeight, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPreferredSize, getPropertyChangeListeners, getPropertyChangeListeners, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isOptimizedDrawingEnabled, isPaintingTile, isPreferredSizeSet, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFont, setForeground, 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, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setFocusCycleRoot, setFocusTraversalKeys, setFocusTraversalPolicy, setLayout, swapComponents, 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, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMouseWheelListeners, getName, getParent, getPeer, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, 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, processMouseEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

processing

public boolean processing
Determines the current view that should be shown for this pane.


options_pane

public OptionsPane options_pane
The options pane generates all the various option sheet configuations.


document

private org.greenstone.gatherer.util.AppendLineOnlyFileDocument document

card_layout

private java.awt.CardLayout card_layout
A card layout is used to store the separate configuration and progress panes.


previous_collection

private org.greenstone.gatherer.collection.Collection previous_collection
Stores a reference to the current collection.


build_monitor

private org.greenstone.gatherer.shell.GShellProgressMonitor build_monitor
This monitor tracks the build processes progress.


copy_monitor

private org.greenstone.gatherer.shell.GShellProgressMonitor copy_monitor
This monitor tracks the copy processes progress.


import_monitor

private org.greenstone.gatherer.shell.GShellProgressMonitor import_monitor
This monitor tracks the import processes progress.


build_button

private javax.swing.JButton build_button
The button for begining the building processes.


cancel_button

private javax.swing.JButton cancel_button
The button for stopping the building processes.


preview_button

private javax.swing.JButton preview_button
The button for viewing the collection.


document_count

private javax.swing.JLabel document_count
The label displaying the number of documents in this collection.


progress_build_label

private javax.swing.JLabel progress_build_label
The label alongside the build progress bar gets some special treatment so...


progress_copy_label

private javax.swing.JLabel progress_copy_label
The label alongside the copy progress bar gets some special treatment so...


progress_import_label

private javax.swing.JLabel progress_import_label
The label alongside the import progress bar gets some special treatment so...


control_pane

private javax.swing.JPanel control_pane
The pane which contains the controls for configuration.


main_pane

private javax.swing.JPanel main_pane
The pane which has the card layout as its manager.


progress_pane

private javax.swing.JPanel progress_pane
The pane which contains the progress information.


right

private javax.swing.JPanel right
the pane on the right-hand side - shows the requested options view


scroll_pane

private javax.swing.JScrollPane scroll_pane
the scrolling pane the righthand side is inside - only used for import and build options. the log and log list are not inside a scrollpane


log_textarea

private javax.swing.JTextArea log_textarea
The message log for the entire session.


tree

private CreatePane.OptionTree tree
A tree used to display the currently available option views.


args

private java.lang.String[] args
An array used to pass arguments with dictionary calls.


homepage

private java.lang.String homepage
The homepage address of the current collection


BUTTON_SIZE

private static java.awt.Dimension BUTTON_SIZE
The size of the buttons at the bottom of the screen.


LABEL_SIZE

private static java.awt.Dimension LABEL_SIZE
The size of the labels on the progress pane.


CONTROL

private static java.lang.String CONTROL
An identifier for the control panel within the card layout.


PROGRESS

private static java.lang.String PROGRESS
An identifier for the progress panel within the card layout.

Constructor Detail

CreatePane

public CreatePane()
The constructor creates important helper classes, and initializes all the components.

Method Detail

collectionChanged

public void collectionChanged(boolean ready)
This method is invoked at any time there has been a significant change in the collection, such as saving, loading or creating.


display

public void display()
This method is called to actually layout the components.


gainFocus

public void gainFocus()
This method is called whenever the 'Create' tab is selected from the view bar. It allows this view to perform any preactions required prior to display. In this case this entails gathering up to date information about the status of the collection including number of documents etc.


loseFocus

public void loseFocus()
We are informed when this view pane loses focus so we can update build options.


message

public void message(org.greenstone.gatherer.shell.GShellEvent event)
All implementation of GShellListener must include this method so the listener can be informed of messages from the GShell.

Specified by:
message in interface org.greenstone.gatherer.shell.GShellListener

processBegun

public void processBegun(org.greenstone.gatherer.shell.GShellEvent event)
All implementation of GShellListener must include this method so the listener can be informed when a GShell begins its task. Implementation side-effect, not actually used.

Specified by:
processBegun in interface org.greenstone.gatherer.shell.GShellListener

processComplete

public void processComplete(org.greenstone.gatherer.shell.GShellEvent event)
All implementation of GShellListener must include this method so the listener can be informed when a GShell completes its task.

Specified by:
processComplete in interface org.greenstone.gatherer.shell.GShellListener

configureHomeURL

private void configureHomeURL()