wt.clients.tools.transfer
Class ImportPolicyPanel

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

public class ImportPolicyPanel
extends JPanel

Import Policy Panel Import Policies determine the actions to be taken during an Import for a specific type of object: 1) Action for when Import Object does not exist in the database 2) Action for when Import Object already exists in the database This utility provides the User Interface functionality for editing/saving/creating of Import Policies

See Also:
Serialized Form

Nested Class Summary
(package private)  class ImportPolicyPanel.MyRenderer1
           
(package private)  class ImportPolicyPanel.MyTableModel
           
(package private)  class ImportPolicyPanel.MyTableModel2
           
(package private)  class ImportPolicyPanel.SymAction
           
(package private)  class ImportPolicyPanel.SymPropertyChange
           
(package private)  class ImportPolicyPanel.SymWindow
           
 
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)  JLabel action1
           
(package private)  JLabel action2
           
(package private)  JLabel actionLabel
           
(package private)  JButton addAttributesButton
           
(package private)  JButton attributeOkButton
           
(package private)  JScrollPane attributePane
           
(package private)  JButton browseCancelButton
           
(package private)  JScrollPane classPane
           
(package private)  GridBagConstraints constraints
           
(package private)  Cursor cursor_default
           
(package private)  Cursor cursor_wait
           
(package private)  ImportPolicyPanel.MyTableModel2 EFromModel
           
(package private)  TableSorter EFromsorter
           
(package private)  JTable EFromTable
           
(package private)  JButton ELoadButton
           
(package private)  JTextField EScheduledTimeField
           
(package private)  JTextField ESearchField
           
(package private)  JLabel ESearchLabel
           
(package private)  JLabel ESetNameLabel
           
(package private)  ImportPolicyPanel.MyTableModel EToModel
           
(package private)  TableSorter ETosorter
           
(package private)  JTable EToTable
           
(package private)  JRadioButton existDoNothing
           
(package private)  JRadioButton existDuplicate
           
(package private)  JRadioButton existUpdate
           
(package private)  GridBagLayout exportgb
           
(package private)  Font f1
           
(package private)  Font f2
           
(package private)  boolean fComponentsAdjusted
           
(package private)  ImportPolicy importPolicy
           
(package private)  Insets in_1
           
(package private)  Insets in_5
           
(package private)  JTextField inputText
           
(package private)  JDialog jd
           
(package private)  GridBagLayout jdgb
           
(package private)  JTextField jt
           
(package private) static boolean m_bInstalledDefaultButtonFix
           
(package private)  Hashtable nameHash
           
(package private)  JRadioButton notExistCreate
           
(package private)  JRadioButton notExistDoNothing
           
private  Object object
           
(package private)  JButton optionsOkButton
           
(package private)  Hashtable piHash
           
(package private)  boolean saved
           
(package private)  int stop
           
(package private)  int WS_SIZE
           
 
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
ImportPolicyPanel()
          Constructor
 
Method Summary
 void addNotify()
           
 void Addto(TableSorter dlf, String display_name, String class_name, String filter_name, String last_modified)
          Adds a name to a Table alphabetically using binary search
(package private)  void attributeOkButton_actionPerformed()
          Action performed by the OK button on the output location dialog
(package private)  void browseCancelButton_actionPerformed()
          Action performed by the Cancel button on the output location dialog
private  void buildConstraints(GridBagConstraints gbc, int x, int y, int w, int h, double wx, double wy, int anchor, int fill)
          Utility method to aid in the creation of gridbag layout
private  void buildPolicy()
           
 boolean checkIsIn(TableSorter dlf, String clname)
          Determine if the class is already in the table
(package private)  void ESearchButton_actionPerformed(boolean matchCase, boolean searchDown)
          find dialog search button action
 void expandnode(String nodename)
          Get the file extension of a file
 Vector getclassinfos(String clname)
           
 int getRow(TableSorter dlf, String clname)
          Determine the row of a class in the table
(package private)  void ImportPolicyPanel_WindowClosing(WindowEvent event)
           
private static void installDefaultButtonFix()
           
 void makeTables()
          Make the tree and list view, of all persistable classes
 void newPolicy()
          Create a new policy object
(package private)  void optionsOkButton_actionPerformed()
          Action performed by the OK button on the options dialog
private  void populateTableFromClass(String classname)
          Populate the table with all the attributes from a given class
 void saveImportPolicy()
          Save the current Policy
 void setPolicy(ImportPolicy a_policy)
          load a policy object
 void setVisible(boolean b)
          Shows or hides the component depending on the boolean flag b.
(package private)  void showClassSelector()
          Show an input dialog, results returned in inputText global textfield
(package private)  void showErrorMessage(String errmes)
          Show an error dialog
 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

WS_SIZE

final int WS_SIZE
See Also:
Constant Field Values

fComponentsAdjusted

boolean fComponentsAdjusted

m_bInstalledDefaultButtonFix

static boolean m_bInstalledDefaultButtonFix

importPolicy

ImportPolicy importPolicy

ELoadButton

JButton ELoadButton

addAttributesButton

JButton addAttributesButton

attributeOkButton

JButton attributeOkButton

browseCancelButton

JButton browseCancelButton

optionsOkButton

JButton optionsOkButton

ESetNameLabel

JLabel ESetNameLabel

ESearchLabel

JLabel ESearchLabel

actionLabel

JLabel actionLabel

action1

JLabel action1

action2

JLabel action2

existUpdate

JRadioButton existUpdate

existDuplicate

JRadioButton existDuplicate

existDoNothing

JRadioButton existDoNothing

notExistCreate

JRadioButton notExistCreate

notExistDoNothing

JRadioButton notExistDoNothing

EScheduledTimeField

JTextField EScheduledTimeField

jt

JTextField jt

inputText

JTextField inputText

EFromModel

ImportPolicyPanel.MyTableModel2 EFromModel

EToModel

ImportPolicyPanel.MyTableModel EToModel

ETosorter

TableSorter ETosorter

EFromsorter

TableSorter EFromsorter

EFromTable

JTable EFromTable

EToTable

JTable EToTable

ESearchField

JTextField ESearchField

attributePane

JScrollPane attributePane

classPane

JScrollPane classPane

exportgb

GridBagLayout exportgb

constraints

GridBagConstraints constraints

jdgb

GridBagLayout jdgb

cursor_wait

Cursor cursor_wait

cursor_default

Cursor cursor_default

nameHash

Hashtable nameHash

piHash

Hashtable piHash

f1

Font f1

f2

Font f2

in_1

Insets in_1

in_5

Insets in_5

jd

JDialog jd

stop

int stop

saved

boolean saved

object

private Object object
Constructor Detail

ImportPolicyPanel

public ImportPolicyPanel()
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()

ImportPolicyPanel_WindowClosing

void ImportPolicyPanel_WindowClosing(WindowEvent event)

optionsOkButton_actionPerformed

void optionsOkButton_actionPerformed()
Action performed by the OK button on the options dialog


ESearchButton_actionPerformed

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

Parameters:
searchDown - flat to searc up or down

buildConstraints

private void buildConstraints(GridBagConstraints gbc,
                              int x,
                              int y,
                              int w,
                              int h,
                              double wx,
                              double wy,
                              int anchor,
                              int fill)
Utility method to aid in the creation of gridbag layout


checkIsIn

public boolean checkIsIn(TableSorter dlf,
                         String clname)
Determine if the class is already in the table

Parameters:
dlf - table to search in
clname - name to search for

getRow

public int getRow(TableSorter dlf,
                  String clname)
Determine the row of a class in the table

Parameters:
dlf - table to search in
clname - name to search for
Returns:
the row number

Addto

public void Addto(TableSorter dlf,
                  String display_name,
                  String class_name,
                  String filter_name,
                  String last_modified)
Adds a name to a Table alphabetically using binary search

Parameters:
dlf - Table to add object

makeTables

public void makeTables()
Make the tree and list view, of all persistable classes


expandnode

public void expandnode(String nodename)
Get the file extension of a file

Returns:
part of string after 'li' is 's'

saveImportPolicy

public void saveImportPolicy()
Save the current Policy


buildPolicy

private void buildPolicy()

showmerow

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

Parameters:
i - the row to scroll to

getclassinfos

public Vector getclassinfos(String clname)

attributeOkButton_actionPerformed

void attributeOkButton_actionPerformed()
Action performed by the OK button on the output location dialog


populateTableFromClass

private void populateTableFromClass(String classname)
Populate the table with all the attributes from a given class

Parameters:
classname - the class

browseCancelButton_actionPerformed

void browseCancelButton_actionPerformed()
Action performed by the Cancel button on the output location dialog


newPolicy

public void newPolicy()
Create a new policy object


setPolicy

public void setPolicy(ImportPolicy a_policy)
load a policy 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

showClassSelector

void showClassSelector()
Show an input dialog, results returned in inputText global textfield