ru.biosoft.access.support
Class AbstractImportDialog

java.lang.Object
  extended byjava.awt.Component
      extended byjava.awt.Container
          extended byjava.awt.Window
              extended byjava.awt.Dialog
                  extended byjavax.swing.JDialog
                      extended bycom.developmentontheedge.application.dialog.OkCancelDialog
                          extended byru.biosoft.access.support.AbstractImportDialog
All Implemented Interfaces:
javax.accessibility.Accessible, java.awt.image.ImageObserver, java.awt.MenuContainer, javax.swing.RootPaneContainer, java.io.Serializable, javax.swing.WindowConstants

public abstract class AbstractImportDialog
extends OkCancelDialog

Abstract dialog for import

See Also:
Serialized Form

Nested Class Summary
protected  class AbstractImportDialog.ImportController
           
protected  class AbstractImportDialog.MPanel
          Inner class for dialog panel implementation
 
Nested classes inherited from class javax.swing.JDialog
javax.swing.JDialog.AccessibleJDialog
 
Nested classes inherited from class java.awt.Dialog
java.awt.Dialog.AccessibleAWTDialog
 
Nested classes inherited from class java.awt.Window
java.awt.Window.AccessibleAWTWindow
 
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
protected  TextPaneAppender appender
           
static int AUTODETECT_FORMAT
          Format identifier
protected  BrowseTextField browseTextField
          Browse text
protected static org.apache.log4j.Category cat
          A category
protected static java.lang.String[] CATEGORY_LIST
           
protected  java.lang.String[] categoryList
           
protected  javax.swing.JCheckBox checkBoxCopyFile
          copy file select box
protected  javax.swing.JComboBox comboBoxFormat
          Format selection combobox
protected  CreateDataCollectionController controller
           
protected  JobControlPane controlPane
          JobControlPane to control import process.
protected  javax.swing.JTextField editName
          Name editor text field
protected  ApplicationFrame frame
          A frame for dialog
protected  FunctionJobControl jobControl
           
static int NONE_FORMAT
          Format identifier
 
Fields inherited from class com.developmentontheedge.application.dialog.OkCancelDialog
buttonPanel, cancelButton, ERROR, okButton, result, SUCCESS
 
Fields inherited from class javax.swing.JDialog
accessibleContext, rootPane, rootPaneCheckingEnabled
 
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
 
Fields inherited from interface javax.swing.WindowConstants
DISPOSE_ON_CLOSE, DO_NOTHING_ON_CLOSE, EXIT_ON_CLOSE, HIDE_ON_CLOSE
 
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
 
Constructor Summary
AbstractImportDialog(ApplicationFrame frame, java.lang.String dialogName)
          A constructor of AbstractImportDialog
AbstractImportDialog(ApplicationFrame frame, java.lang.String dialogName, java.lang.String[] formatList, java.lang.String[] categoryList, boolean haveCheckBox, javax.swing.JMenuItem menu)
          A constructor of AbstractImportDialog
AbstractImportDialog(ApplicationFrame frame, java.lang.String dialogName, java.lang.String[] formatList, java.lang.String[] categoryList, javax.swing.JMenuItem menu)
          A constructor of AbstractImportDialog
 
Method Summary
protected  void cancelPressed()
          Invoked when "Cancel" button is pressed.
protected abstract  BrowseTextField createBrowseTextField()
           
protected abstract  boolean doConvert(java.lang.String name, java.io.File file, boolean copyFile, int format, CreateDataCollectionController controller)
          Abstract function, which is called when ok button is pressed.
protected abstract  boolean doValidate(java.lang.String name, int format, FunctionJobControl jobControl)
          Abstract function, which is called when ok button is pressed.
protected  CreateDataCollectionController getController()
           
 java.lang.String getDcName()
          Get output data collection name
 java.io.File getFile()
          Get selected file
 java.lang.String getFileName()
          Get input file name
 int getFormat()
          Get format identifier
 JobControl getJobControl()
          JobControl for Match - allows to control Match
protected  void importFinished(java.lang.String message, int status)
           
protected  void importThread(java.lang.String dcName, int format, java.lang.String filePath, java.lang.String fileName, boolean copyFile, FunctionJobControl jobControl)
          Starts #convert(String,String,String,mgl3.jobcontrol.FunctionJobControl) function in separated thread
Function disables menu, connected with this action.
 void init(java.lang.String[] formatList, java.lang.String[] categoryList, boolean haveCheckBox, ApplicationFrame frame, javax.swing.JMenuItem menu)
          Initialization function
 void initWindowListeners()
           
 boolean isCopyFile()
          Do user want to copy file?
protected  void okPressed()
          overrided okPressed function
 void setController(CreateDataCollectionController c)
           
 void setCopyFile(boolean f)
          Set copy file checkbox value
 void setEnabled(boolean b)
           
 void setFileName(java.lang.String name)
          Set input file name
 void setFormat(int idx)
          Set format index
 void setName(java.lang.String name)
          Set output dc name
static void sleep()
           
protected  void updateOkButton()
           
 
Methods inherited from class com.developmentontheedge.application.dialog.OkCancelDialog
doModal, exited, getCancelButton, getOkButton, setContent
 
Methods inherited from class javax.swing.JDialog
addImpl, createRootPane, dialogInit, getAccessibleContext, getContentPane, getDefaultCloseOperation, getGlassPane, getJMenuBar, getLayeredPane, getRootPane, isDefaultLookAndFeelDecorated, isRootPaneCheckingEnabled, paramString, processWindowEvent, remove, setContentPane, setDefaultCloseOperation, setDefaultLookAndFeelDecorated, setGlassPane, setJMenuBar, setLayeredPane, setLayout, setRootPane, setRootPaneCheckingEnabled, update
 
Methods inherited from class java.awt.Dialog
addNotify, dispose, getTitle, hide, isModal, isResizable, isUndecorated, setModal, setResizable, setTitle, setUndecorated, show
 
Methods inherited from class java.awt.Window
addPropertyChangeListener, addPropertyChangeListener, addWindowFocusListener, addWindowListener, addWindowStateListener, applyResourceBundle, applyResourceBundle, createBufferStrategy, createBufferStrategy, finalize, getBufferStrategy, getFocusableWindowState, getFocusCycleRootAncestor, getFocusOwner, getFocusTraversalKeys, getGraphicsConfiguration, getInputContext, getListeners, getLocale, getMostRecentFocusOwner, getOwnedWindows, getOwner, getToolkit, getWarningString, getWindowFocusListeners, getWindowListeners, getWindowStateListeners, isActive, isFocusableWindow, isFocusCycleRoot, isFocused, isShowing, pack, postEvent, processEvent, processWindowFocusEvent, processWindowStateEvent, removeWindowFocusListener, removeWindowListener, removeWindowStateListener, setCursor, setFocusableWindowState, setFocusCycleRoot, setLocationRelativeTo, toBack, toFront
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getContainerListeners, getFocusTraversalPolicy, getInsets, getLayout, getMaximumSize, getMinimumSize, getPreferredSize, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paint, paintComponents, preferredSize, print, printComponents, processContainerEvent, remove, removeAll, removeContainerListener, removeNotify, setFocusTraversalKeys, setFocusTraversalPolicy, setFont, 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, contains, createImage, createImage, createVolatileImage, createVolatileImage, disable, disableEvents, dispatchEvent, enable, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphics, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocation, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isOpaque, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, prepareImage, prepareImage, printAll, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, reshape, resize, resize, setBackground, setBounds, setBounds, setComponentOrientation, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setSize, setSize, setVisible, show, size, toString, transferFocus, transferFocusUpCycle
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

controller

protected CreateDataCollectionController controller

frame

protected ApplicationFrame frame
A frame for dialog


browseTextField

protected BrowseTextField browseTextField
Browse text

Pendung:
(cher) variable browseTextField ought to be initialized in inner classes in future

comboBoxFormat

protected javax.swing.JComboBox comboBoxFormat
Format selection combobox


editName

protected javax.swing.JTextField editName
Name editor text field


checkBoxCopyFile

protected javax.swing.JCheckBox checkBoxCopyFile
copy file select box


NONE_FORMAT

public static final int NONE_FORMAT
Format identifier

See Also:
Constant Field Values

AUTODETECT_FORMAT

public static final int AUTODETECT_FORMAT
Format identifier

See Also:
Constant Field Values

controlPane

protected JobControlPane controlPane
JobControlPane to control import process.


cat

protected static org.apache.log4j.Category cat
A category


appender

protected TextPaneAppender appender

categoryList

protected java.lang.String[] categoryList

CATEGORY_LIST

protected static java.lang.String[] CATEGORY_LIST

jobControl

protected FunctionJobControl jobControl
Constructor Detail

AbstractImportDialog

public AbstractImportDialog(ApplicationFrame frame,
                            java.lang.String dialogName)
A constructor of AbstractImportDialog

Parameters:
frame - a frame
dialogName - a name of dialog

AbstractImportDialog

public AbstractImportDialog(ApplicationFrame frame,
                            java.lang.String dialogName,
                            java.lang.String[] formatList,
                            java.lang.String[] categoryList,
                            javax.swing.JMenuItem menu)
A constructor of AbstractImportDialog

Parameters:
frame - a frame
dialogName - a name of dialog
formatList - list of stings for format selection combobox
categoryList - list of category names specifies what messages will be shown on log window

AbstractImportDialog

public AbstractImportDialog(ApplicationFrame frame,
                            java.lang.String dialogName,
                            java.lang.String[] formatList,
                            java.lang.String[] categoryList,
                            boolean haveCheckBox,
                            javax.swing.JMenuItem menu)
A constructor of AbstractImportDialog

Parameters:
frame - a frame
dialogName - a dialog name
formatList - list of stings for format selection combobox
haveCheckBox - have checkbox....
Method Detail

createBrowseTextField

protected abstract BrowseTextField createBrowseTextField()

setController

public void setController(CreateDataCollectionController c)

init

public void init(java.lang.String[] formatList,
                 java.lang.String[] categoryList,
                 boolean haveCheckBox,
                 ApplicationFrame frame,
                 javax.swing.JMenuItem menu)
Initialization function

Parameters:
formatList - list of stings for format selection combobox
haveCheckBox - does dialog have checkbox
frame - a frame

initWindowListeners

public void initWindowListeners()

updateOkButton

protected void updateOkButton()

getFile

public java.io.File getFile()
                     throws java.lang.Exception
Get selected file

Returns:
a file
Throws:
java.lang.Exception

getDcName

public java.lang.String getDcName()
                           throws java.lang.Exception
Get output data collection name

Returns:
data collection name
Throws:
java.lang.Exception

getFormat

public int getFormat()
Get format identifier

Returns:
format identifier

getFileName

public java.lang.String getFileName()
                             throws java.lang.Exception
Get input file name

Returns:
a file name
Throws:
java.lang.Exception

isCopyFile

public boolean isCopyFile()
Do user want to copy file?

Returns:
is copy file selector choosed?

importThread

protected void importThread(java.lang.String dcName,
                            int format,
                            java.lang.String filePath,
                            java.lang.String fileName,
                            boolean copyFile,
                            FunctionJobControl jobControl)
Starts #convert(String,String,String,mgl3.jobcontrol.FunctionJobControl) function in separated thread
Function disables menu, connected with this action.
When thread ends converting, menu will be enabled.

Parameters:
dcName - destination DataCollection name
format - not used
filePath - source directory path
fileName - source file name
copyFile - not used

doConvert

protected abstract boolean doConvert(java.lang.String name,
                                     java.io.File file,
                                     boolean copyFile,
                                     int format,
                                     CreateDataCollectionController controller)
Abstract function, which is called when ok button is pressed. Implement this fuction to make an action of this dialog

Parameters:
name - a data collection name
file - a source file
copyFile - is file copied
format - selected format
controller - CreateDataCollectionController

doValidate

protected abstract boolean doValidate(java.lang.String name,
                                      int format,
                                      FunctionJobControl jobControl)
Abstract function, which is called when ok button is pressed. Implement this fuction to make an action of this dialog

Parameters:
name - a data collection name
format - selected format

cancelPressed

protected void cancelPressed()
Invoked when "Cancel" button is pressed.

Overrides:
cancelPressed in class OkCancelDialog

okPressed

protected void okPressed()
overrided okPressed function

Overrides:
okPressed in class OkCancelDialog

setEnabled

public void setEnabled(boolean b)

importFinished

protected void importFinished(java.lang.String message,
                              int status)

getJobControl

public JobControl getJobControl()
JobControl for Match - allows to control Match


setFileName

public void setFileName(java.lang.String name)
Set input file name

Parameters:
name - a file name

setName

public void setName(java.lang.String name)
Set output dc name

Parameters:
name - a name

setFormat

public void setFormat(int idx)
Set format index

Parameters:
idx - a index

setCopyFile

public void setCopyFile(boolean f)
Set copy file checkbox value

Parameters:
f - should file be copied?

getController

protected CreateDataCollectionController getController()

sleep

public static void sleep()


Copyright © 2001-2003 Biosof.Ru. All Rights Reserved.