wt.clients.tools.transfer
Class ImportPanel

java.lang.Object
  extended byjava.awt.Component
      extended byjava.awt.Container
          extended byjavax.swing.JComponent
              extended byjavax.swing.JPanel
                  extended bywt.clients.tools.transfer.ImportPanel
All Implemented Interfaces:
Accessible, ImageObserver, MenuContainer, Serializable

public class ImportPanel
extends JPanel

Import/Export Utility Import documents in the form of zipped XML into the Windchill database This utility provides the User Interface functionality, and passes off an Import Spec to transfer service.

See Also:
Serialized Form

Nested Class Summary
(package private)  class ImportPanel.MyTableModel
           
(package private)  class ImportPanel.SymAction
           
(package private)  class ImportPanel.SymPropertyChange
           
private  class ImportPanel.ZipFileFilter
          The *.zip file filter
 
Nested classes inherited from class javax.swing.JPanel
JPanel.AccessibleJPanel
 
Nested classes inherited from class javax.swing.JComponent
JComponent.AccessibleJComponent
 
Nested classes inherited from class java.awt.Container
Container.AccessibleAWTContainer
 
Nested classes inherited from class java.awt.Component
Component.AccessibleAWTComponent, Component.BltBufferStrategy, Component.FlipBufferStrategy
 
Field Summary
(package private)  JButton browseCancelButton
           
(package private)  JButton browseOkButton
           
(package private)  GridBagConstraints constraints
           
(package private)  Cursor cursor_default
           
(package private)  Cursor cursor_wait
           
(package private)  File EFile
           
(package private)  Font f1
           
(package private)  Font f2
           
(package private)  boolean fComponentsAdjusted
           
static int FILE_MODE
           
(package private)  ImportAdHocCriteria[] iac
           
(package private)  JButton IAddAllObjectButton
           
(package private)  JButton IAddObjectButton
           
(package private)  JButton IClearbutton
           
(package private)  JTextField IDestinanationFileNameField
           
(package private)  JLabel IDestinationLabel
           
(package private)  JLabel IFromLabel
           
(package private)  ImportPanel.MyTableModel IFromModel
           
(package private)  TableSorter IFromsorter
           
(package private)  JTable IFromTable
           
(package private)  JButton IGetLocationButton
           
(package private)  JButton IGetLogButton
           
(package private)  JRadioButton ILaterRadio
           
(package private)  JButton ILoadButton
           
(package private)  JLabel ILogLabel
           
(package private)  JTextField ILogNameField
           
(package private)  GridBagLayout importgb
           
(package private)  ImportSpec importspec
           
(package private)  JTabbedPane ImportTypeTabbedPanel
           
(package private)  Insets in_1
           
(package private)  Insets in_2
           
(package private)  Insets in_3
           
(package private)  Insets in_4
           
(package private)  JRadioButton INowRadio
           
(package private)  JLabel IQueryLabel
           
(package private)  JButton IRemoveAllSelectionButton
           
(package private)  JButton IRemoveObjectsButton
           
(package private)  JButton ISaveSet
           
(package private)  JTextField IScheduledTimeField
           
(package private)  JTextField ISearchField
           
(package private)  JLabel ISearchLabel
           
(package private)  JButton ISelectDirButton
           
(package private)  JLabel ISelectedObjectsLabel
           
(package private)  JScrollPane ISelectedPane
           
(package private)  JScrollPane ISelectFromTablePane
           
(package private)  JButton ISelectURLButton
           
(package private)  JTextField ISetNameField
           
(package private)  JLabel ISetNameLabel
           
(package private)  ImportPanel.MyTableModel IToModel
           
(package private)  TableSorter ITosorter
           
(package private)  JTable IToTable
           
(package private)  JDialog jd
           
(package private)  GridBagLayout jdgb
           
(package private)  JTextField jt
           
(package private) static boolean m_bInstalledDefaultButtonFix
           
(package private)  int mymode
           
(package private)  JTextField nameText
           
 JFileChooser openFileDialog1
           
(package private)  JButton optionsOkButton
           
(package private)  boolean saved
           
static int URL_MODE
           
(package private)  ImportPanel.ZipFileFilter zipff
           
 
Fields inherited from class javax.swing.JPanel
 
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
ImportPanel()
          Constructor
 
Method Summary
 void addNotify()
           
private  void Addto(TableSorter dlf, String name)
          Adds a name to a list alphabetically using binary search
(package private)  void browseCancelButton_actionPerformed()
          action performed by the cancel button on the browse dialog
(package private)  void browseOkButton_actionPerformed()
          action performed by the ok button on the browse dialog
private  void buildConstraints(GridBagConstraints gbc, int x, int y, int w, int h, double wx, double wy, int anchor, int fill)
           
 void buildspec()
          Build the spec with all new info.
 void clear()
          Clear the spec related info
private static String getExtension(File f)
          Get the file extension of a file
private static String getExtension(String s, String li)
          Get the file extension of a file
private static String getNameWithOutExtension(String s)
          Get the file extension of a file
 void getOptions()
          show the options dialog
(package private)  void IAddAllObjectButton_actionPerformed()
          add all button action
(package private)  void IAddObjectButton_actionPerformed()
          add button action
(package private)  void IGetLocationButton_actionPerformed()
          show the browse dialog
(package private)  void IGetLogButton_actionPerformed()
           
 void ImportButton_actionPerformed_Interaction1()
          import button action
(package private)  void ImportButton_actionPerformed()
          action performed to do the import
 int Importcheck()
          Check to see if import spec is ready for import
private static void installDefaultButtonFix()
           
(package private)  void IRemoveAllSelectionButton_actionPerformed()
           
(package private)  void IRemoveFrom()
          Remove an element in the From (left hand) pane
(package private)  void IRemoveObjectsButton_actionPerformed()
          Remvoe button action
(package private)  void IRemoveTo()
          Remove an element in the To (right hand) pane
(package private)  void ISearchButton_actionPerformed(boolean matchCase, boolean searchDown)
          find dialog search button action
(package private)  void ISelectDirButton_actionPerformed()
          show the file chooser
(package private)  void ISelectDirButton_actionPerformed2()
          set the directory chosen in the filechooser
(package private)  void ISelectURLButton_actionPerformed()
          action perpormed when a url is entered
(package private)  void ISelectURLButton_actionPerformed2(String outtext)
          action perpormed when a url is entered
 void newSpec()
          Create a new spec object
(package private)  void optionsOkButton_actionPerformed()
          action performed by the ok button on the options dialog
 void saveImportSpec()
          Save the current spec
 void setImportSpec(ImportSpec IS)
          Set an Import Spec
 void setVisible(boolean b)
          Shows or hides the component depending on the boolean flag b.
(package private)  void showErrorMessage(String errmes)
          Show an error dialog
(package private)  void showInputDialog(String mess)
          Show an input dialog, results returned in inputText global textfield
 void showmerow(int i)
          Scroll table to the row
(package private)  void showWithSize(int x, int y)
          Show a dialog with size x,y if it initially comes up with zero size
 
Methods inherited from class javax.swing.JPanel
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI
 
Methods inherited from class javax.swing.JComponent
addAncestorListener, 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, 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, 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, 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, transferFocusUpCycle
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

fComponentsAdjusted

boolean fComponentsAdjusted

m_bInstalledDefaultButtonFix

static boolean m_bInstalledDefaultButtonFix

importgb

GridBagLayout importgb

constraints

GridBagConstraints constraints

ImportTypeTabbedPanel

JTabbedPane ImportTypeTabbedPanel

ILaterRadio

JRadioButton ILaterRadio

INowRadio

JRadioButton INowRadio

IClearbutton

JButton IClearbutton

IAddObjectButton

JButton IAddObjectButton

IAddAllObjectButton

JButton IAddAllObjectButton

IRemoveObjectsButton

JButton IRemoveObjectsButton

IRemoveAllSelectionButton

JButton IRemoveAllSelectionButton

IGetLocationButton

JButton IGetLocationButton

IGetLogButton

JButton IGetLogButton

ISelectURLButton

JButton ISelectURLButton

ISelectDirButton

JButton ISelectDirButton

ILoadButton

JButton ILoadButton

ISaveSet

JButton ISaveSet

browseOkButton

JButton browseOkButton

browseCancelButton

JButton browseCancelButton

optionsOkButton

JButton optionsOkButton

IScheduledTimeField

JTextField IScheduledTimeField

IDestinanationFileNameField

JTextField IDestinanationFileNameField

ILogNameField

JTextField ILogNameField

ISearchField

JTextField ISearchField

ISetNameField

JTextField ISetNameField

jt

JTextField jt

nameText

JTextField nameText

ISearchLabel

JLabel ISearchLabel

IQueryLabel

JLabel IQueryLabel

ISetNameLabel

JLabel ISetNameLabel

ISelectedObjectsLabel

JLabel ISelectedObjectsLabel

ILogLabel

JLabel ILogLabel

IDestinationLabel

JLabel IDestinationLabel

IFromLabel

JLabel IFromLabel

IFromModel

ImportPanel.MyTableModel IFromModel

IToModel

ImportPanel.MyTableModel IToModel

ITosorter

TableSorter ITosorter

IFromsorter

TableSorter IFromsorter

IFromTable

JTable IFromTable

IToTable

JTable IToTable

ISelectFromTablePane

JScrollPane ISelectFromTablePane

ISelectedPane

JScrollPane ISelectedPane

EFile

File EFile

cursor_wait

Cursor cursor_wait

cursor_default

Cursor cursor_default

zipff

ImportPanel.ZipFileFilter zipff

importspec

ImportSpec importspec

f1

Font f1

f2

Font f2

in_1

Insets in_1

in_2

Insets in_2

in_3

Insets in_3

in_4

Insets in_4

mymode

int mymode

jd

JDialog jd

jdgb

GridBagLayout jdgb

iac

ImportAdHocCriteria[] iac

saved

boolean saved

openFileDialog1

public JFileChooser openFileDialog1

FILE_MODE

public static final int FILE_MODE
See Also:
Constant Field Values

URL_MODE

public static final int URL_MODE
See Also:
Constant Field Values
Constructor Detail

ImportPanel

public ImportPanel()
Constructor

Method Detail

setVisible

public void setVisible(boolean b)
Shows or hides the component depending on the boolean flag b.

Parameters:
b - if true, show the component; otherwise, hide the component.
See Also:
Component.isVisible()

addNotify

public void addNotify()

installDefaultButtonFix

private static void installDefaultButtonFix()

IGetLogButton_actionPerformed

void IGetLogButton_actionPerformed()

ISelectURLButton_actionPerformed

void ISelectURLButton_actionPerformed()
action perpormed when a url is entered


ISelectURLButton_actionPerformed2

void ISelectURLButton_actionPerformed2(String outtext)
action perpormed when a url is entered

Parameters:
outtext - text of the URL

ISelectDirButton_actionPerformed

void ISelectDirButton_actionPerformed()
show the file chooser


ISelectDirButton_actionPerformed2

void ISelectDirButton_actionPerformed2()
set the directory chosen in the filechooser


ImportButton_actionPerformed

void ImportButton_actionPerformed()
action performed to do the import


ImportButton_actionPerformed_Interaction1

public void ImportButton_actionPerformed_Interaction1()
import button action


IGetLocationButton_actionPerformed

void IGetLocationButton_actionPerformed()
show the browse dialog


browseOkButton_actionPerformed

void browseOkButton_actionPerformed()
action performed by the ok button on the browse dialog


browseCancelButton_actionPerformed

void browseCancelButton_actionPerformed()
action performed by the cancel button on the browse dialog


getOptions

public void getOptions()
show the options dialog


optionsOkButton_actionPerformed

void optionsOkButton_actionPerformed()
action performed by the ok button on the options dialog


ISearchButton_actionPerformed

void ISearchButton_actionPerformed(boolean matchCase,
                                   boolean searchDown)
find dialog search button action

Parameters:
searchDown - flat to searc up or down

IAddObjectButton_actionPerformed

void IAddObjectButton_actionPerformed()
add button action


IAddAllObjectButton_actionPerformed

void IAddAllObjectButton_actionPerformed()
add all button action


IRemoveObjectsButton_actionPerformed

void IRemoveObjectsButton_actionPerformed()
Remvoe button action


IRemoveFrom

void IRemoveFrom()
Remove an element in the From (left hand) pane


IRemoveTo

void IRemoveTo()
Remove an element in the To (right hand) pane


IRemoveAllSelectionButton_actionPerformed

void IRemoveAllSelectionButton_actionPerformed()

getExtension

private static String getExtension(File f)
Get the file extension of a file

Parameters:
f - File to get extension of
Returns:
extension of f

getExtension

private static String getExtension(String s,
                                   String li)
Get the file extension of a file

Parameters:
s - String representing a file to find the extension
li - string to denote the break to look for
Returns:
part of string after 'li' in 's'

getNameWithOutExtension

private static String getNameWithOutExtension(String s)
Get the file extension of a file

Parameters:
s - String representing a file to find the extension
Returns:
part of string after 'li' in 's'

showmerow

public void showmerow(int i)
Scroll table to the row

Parameters:
i - the row to scroll to

buildConstraints

private void buildConstraints(GridBagConstraints gbc,
                              int x,
                              int y,
                              int w,
                              int h,
                              double wx,
                              double wy,
                              int anchor,
                              int fill)

Addto

private void Addto(TableSorter dlf,
                   String name)
Adds a name to a list alphabetically using binary search

Parameters:
dlf - Table to add object
name - - object to add

setImportSpec

public void setImportSpec(ImportSpec IS)
Set an Import Spec

Parameters:
IS - the spec to set

saveImportSpec

public void saveImportSpec()
Save the current spec


clear

public void clear()
Clear the spec related info


buildspec

public void buildspec()
Build the spec with all new info.


Importcheck

public int Importcheck()
Check to see if import spec is ready for import


newSpec

public void newSpec()
Create a new spec object


showWithSize

void showWithSize(int x,
                  int y)
Show a dialog with size x,y if it initially comes up with zero size

Parameters:
x - width if 0
y - height if 0

showErrorMessage

void showErrorMessage(String errmes)
Show an error dialog

Parameters:
errmes - the error message

showInputDialog

void showInputDialog(String mess)
Show an input dialog, results returned in inputText global textfield

Parameters:
mess - the input message