wt.clients.iba.container
Class AttributeValueDetailsDialog

java.lang.Object
  extended byjava.awt.Component
      extended byjava.awt.Container
          extended byjava.awt.Window
              extended byjava.awt.Dialog
                  extended byjavax.swing.JDialog
                      extended bywt.clients.iba.container.AttributeValueDetailsDialog
All Implemented Interfaces:
Accessible, ImageObserver, MeasurementSystemChangeListener, MenuContainer, RootPaneContainer, Serializable, WindowConstants

public class AttributeValueDetailsDialog
extends JDialog
implements MeasurementSystemChangeListener

------------------------------------------------------------ This class extends JDialog. The Dialog is called from the Container Editor Its passed the current AttributeDefinition ,the containerHolder and the single entry widget. ------------------------------------------------------------

See Also:
Serialized Form

Nested Class Summary
(package private)  class AttributeValueDetailsDialog.DefaultButtonPanelListener
           
 
Nested classes inherited from class javax.swing.JDialog
JDialog.AccessibleJDialog
 
Nested classes inherited from class java.awt.Dialog
Dialog.AccessibleAWTDialog
 
Nested classes inherited from class java.awt.Window
Window.AccessibleAWTWindow
 
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
protected  Vector addedObjs
           
protected  DefaultAttributeContainer attributeContainer
           
protected  AttributeDefDefaultView attributeDefinition
           
protected  DefaultEditorButtonPanel buttonPanel
          reference to buttonPanel
protected  Vector changedObjs
           
private static String CONTAINER_RESOURCE
          String containing the Resource Bundle
private static boolean debug
           
(package private)  boolean errorFlag
           
protected  IBAHolder ibaHolder
          reference to IBAHolder and AttributeContainer and AttributeDefinition
protected static String measurementSystem
           
(package private)  boolean mode
          boolean to determine if editable or not true means editable false means noeditable
protected  Vector originalObjs
          Data structure shared by all the tabs contains four vectors originalObjs vector has all the original value objects addedObjs vector has newly added value objects removedObjs vector has objects removed value objects changedObjs vector maintains value objects changed.
protected  JTabbedPane pane
          reference to JTabbedPane
protected  Vector removedObjs
           
protected  ResourceBundle resource
           
protected  ValueDetailsConstraintsPanel valueDetailsConstraintsPanel
           
protected  ValueDetailsDependencyPanel valueDetailsDependencyPanel
           
protected  ValueDetailsMainPanel valueDetailsMainPanel
          JAttrValueDetailsTabbedPanel is a interface which all Tab panel have to implement.
protected  InlineValueEditorWidgetInterface widget
          reference to InlineValueEditorWidget
 
Fields inherited from class javax.swing.JDialog
accessibleContext, rootPane, rootPaneCheckingEnabled
 
Fields inherited from class java.awt.Dialog
 
Fields inherited from class java.awt.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 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, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
 
Constructor Summary
AttributeValueDetailsDialog(AttributeDefDefaultView attributeDefDefaultView, DefaultAttributeContainer attributeContainer, InlineValueEditorWidgetInterface widget)
           
AttributeValueDetailsDialog(AttributeDefDefaultView attributeDefDefaultView, IBAHolder ibaHolder, InlineValueEditorWidgetInterface widget)
          This constructor will create the AttributeValueDetailsEditor, initializeData and Components.
AttributeValueDetailsDialog(Frame parent, AttributeDefDefaultView attributeDefDefaultView, DefaultAttributeContainer attributeContainer, InlineValueEditorWidgetInterface widget, String measurementSystem, boolean mode)
           
AttributeValueDetailsDialog(Frame parent, AttributeDefDefaultView attributeDefDefaultView, IBAHolder ibaHolder, InlineValueEditorWidgetInterface widget, String measurementSystem, boolean mode)
           
 
Method Summary
private  void addEachValueToContainer()
          This method adds all the values in the addedObjs vector to the container On success it moves the objects to originalObjs
protected  void allTabPanelApply()
          calls apply of all tabs
protected  boolean anyTabPanelDirty()
          check if valueDetailsDependencyPanel is dirty or valueDetailsMainPanel is dirty
protected  void applyToContainer()
          This method applies all the cached objects in the four vectors to the container
protected  void buttonApply()
          buttonApply method called when Apply button clicked
protected  void buttonCancel()
          buttonCancel method called when Cancel button clicked
protected  void buttonOk()
          buttonOk method called when Ok button clicked
private  void changeEachValueToContainer()
          This method updates all values in the changedObjs vector On success it moves the objects to originalObjs
private  DefaultEditorButtonPanel createButtonPanel()
          This method is a private helper method which creates the button Panel
 void displayAllValues()
          display contents of the container
 void displayAllVectors()
          display contents of all Vectors
private  void displayValue(Object ab)
           
 Vector getAddedObjs()
           
 DefaultAttributeContainer getAttributeContainer()
           
 AttributeDefDefaultView getAttributeDefinition()
           
 Vector getChangedObjs()
           
 IBAHolder getIBAHolder()
           
 Vector getOriginalObjs()
           
 Vector getRemovedObjs()
           
 ResourceBundle getResourceBundle()
           
 JTabbedPane getTabbedPane()
           
 ValueDetailsConstraintsPanel getValueDetailsConstraintsPanel()
           
 ValueDetailsDependencyPanel getValueDetailsDependencyPanel()
           
 ValueDetailsMainPanel getValueDetailsMainPanel()
          getter method's
 InlineValueEditorWidgetInterface getWidget()
           
private  void initializeData()
          This method is a private helper method which initializes the data structure i.e.
protected  void initResource()
           
 void moveTo(Vector dest, Object obj)
          This method moves an object from one of the four vectors to the specified the destination Vector
 void moveTo(Vector dest, Object[] objs)
          This method moves objects stored in a array from one of the four vectors to the specified the destination Vector
 void moveTo(Vector dest, Vector objs)
          This method moves objects stored in Vector from one of the four vectors to the specified the destination Vector
protected  void placeComponents()
          This method is a private helper method which places all the components inside the dialog
private  void placeInCenter()
          This method is a private helper method which places the Dialog in the centre of the Screen
private  void removeEachValueFromContainer()
          This method removes all the values in removedObjs vector from the container
 void removeObject(Object obj)
           
 void removeObjects(Vector objs)
           
protected  void setAllTabPanelDirty(boolean flag)
          resets dirty flag of all tabs
 void setMeasurementSystem(String measurementSystem)
           
 void showDialog()
          This method is called to show the modal Dialog
 
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, setEnabled, setFocusable, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, 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

CONTAINER_RESOURCE

private static final String CONTAINER_RESOURCE
String containing the Resource Bundle

See Also:
Constant Field Values

resource

protected ResourceBundle resource

debug

private static final boolean debug

mode

boolean mode
boolean to determine if editable or not true means editable false means noeditable


errorFlag

boolean errorFlag

originalObjs

protected Vector originalObjs
Data structure shared by all the tabs contains four vectors originalObjs vector has all the original value objects addedObjs vector has newly added value objects removedObjs vector has objects removed value objects changedObjs vector maintains value objects changed.


addedObjs

protected Vector addedObjs

removedObjs

protected Vector removedObjs

changedObjs

protected Vector changedObjs

valueDetailsMainPanel

protected ValueDetailsMainPanel valueDetailsMainPanel
JAttrValueDetailsTabbedPanel is a interface which all Tab panel have to implement. valueDetailsMainPanel holds the reference to ValueDetailsMainPanel valueDetailsConstraintsPanel holds the reference to ValueDetailsConstraintsPanel valueDetailsDependencyPanel holds the reference to ValueDetailsDependencyPanel


valueDetailsConstraintsPanel

protected ValueDetailsConstraintsPanel valueDetailsConstraintsPanel

valueDetailsDependencyPanel

protected ValueDetailsDependencyPanel valueDetailsDependencyPanel

pane

protected JTabbedPane pane
reference to JTabbedPane


buttonPanel

protected DefaultEditorButtonPanel buttonPanel
reference to buttonPanel


ibaHolder

protected IBAHolder ibaHolder
reference to IBAHolder and AttributeContainer and AttributeDefinition


attributeContainer

protected DefaultAttributeContainer attributeContainer

attributeDefinition

protected AttributeDefDefaultView attributeDefinition

widget

protected InlineValueEditorWidgetInterface widget
reference to InlineValueEditorWidget


measurementSystem

protected static String measurementSystem
Constructor Detail

AttributeValueDetailsDialog

public AttributeValueDetailsDialog(AttributeDefDefaultView attributeDefDefaultView,
                                   IBAHolder ibaHolder,
                                   InlineValueEditorWidgetInterface widget)
This constructor will create the AttributeValueDetailsEditor, initializeData and Components.


AttributeValueDetailsDialog

public AttributeValueDetailsDialog(AttributeDefDefaultView attributeDefDefaultView,
                                   DefaultAttributeContainer attributeContainer,
                                   InlineValueEditorWidgetInterface widget)

AttributeValueDetailsDialog

public AttributeValueDetailsDialog(Frame parent,
                                   AttributeDefDefaultView attributeDefDefaultView,
                                   IBAHolder ibaHolder,
                                   InlineValueEditorWidgetInterface widget,
                                   String measurementSystem,
                                   boolean mode)

AttributeValueDetailsDialog

public AttributeValueDetailsDialog(Frame parent,
                                   AttributeDefDefaultView attributeDefDefaultView,
                                   DefaultAttributeContainer attributeContainer,
                                   InlineValueEditorWidgetInterface widget,
                                   String measurementSystem,
                                   boolean mode)
Method Detail

showDialog

public void showDialog()
This method is called to show the modal Dialog


initResource

protected void initResource()

initializeData

private void initializeData()
This method is a private helper method which initializes the data structure i.e. the four vectors and creates the tabs


placeComponents

protected void placeComponents()
This method is a private helper method which places all the components inside the dialog


placeInCenter

private void placeInCenter()
This method is a private helper method which places the Dialog in the centre of the Screen


getValueDetailsMainPanel

public ValueDetailsMainPanel getValueDetailsMainPanel()
getter method's


getValueDetailsConstraintsPanel

public ValueDetailsConstraintsPanel getValueDetailsConstraintsPanel()

getValueDetailsDependencyPanel

public ValueDetailsDependencyPanel getValueDetailsDependencyPanel()

getResourceBundle

public ResourceBundle getResourceBundle()

getOriginalObjs

public Vector getOriginalObjs()

getAddedObjs

public Vector getAddedObjs()

getRemovedObjs

public Vector getRemovedObjs()

getChangedObjs

public Vector getChangedObjs()

getWidget

public InlineValueEditorWidgetInterface getWidget()

getTabbedPane

public JTabbedPane getTabbedPane()

getIBAHolder

public IBAHolder getIBAHolder()

getAttributeContainer

public DefaultAttributeContainer getAttributeContainer()

getAttributeDefinition

public AttributeDefDefaultView getAttributeDefinition()

removeObject

public void removeObject(Object obj)

removeObjects

public void removeObjects(Vector objs)

moveTo

public void moveTo(Vector dest,
                   Object obj)
This method moves an object from one of the four vectors to the specified the destination Vector


moveTo

public void moveTo(Vector dest,
                   Vector objs)
This method moves objects stored in Vector from one of the four vectors to the specified the destination Vector


moveTo

public void moveTo(Vector dest,
                   Object[] objs)
This method moves objects stored in a array from one of the four vectors to the specified the destination Vector


createButtonPanel

private DefaultEditorButtonPanel createButtonPanel()
This method is a private helper method which creates the button Panel


buttonApply

protected void buttonApply()
buttonApply method called when Apply button clicked


buttonCancel

protected void buttonCancel()
buttonCancel method called when Cancel button clicked


buttonOk

protected void buttonOk()
buttonOk method called when Ok button clicked


applyToContainer

protected void applyToContainer()
This method applies all the cached objects in the four vectors to the container


addEachValueToContainer

private void addEachValueToContainer()
This method adds all the values in the addedObjs vector to the container On success it moves the objects to originalObjs


removeEachValueFromContainer

private void removeEachValueFromContainer()
This method removes all the values in removedObjs vector from the container


changeEachValueToContainer

private void changeEachValueToContainer()
This method updates all values in the changedObjs vector On success it moves the objects to originalObjs


anyTabPanelDirty

protected boolean anyTabPanelDirty()
check if valueDetailsDependencyPanel is dirty or valueDetailsMainPanel is dirty


allTabPanelApply

protected void allTabPanelApply()
calls apply of all tabs


setAllTabPanelDirty

protected void setAllTabPanelDirty(boolean flag)
resets dirty flag of all tabs


displayAllValues

public void displayAllValues()
display contents of the container


displayAllVectors

public void displayAllVectors()
display contents of all Vectors


displayValue

private void displayValue(Object ab)

setMeasurementSystem

public void setMeasurementSystem(String measurementSystem)
Specified by:
setMeasurementSystem in interface MeasurementSystemChangeListener
Parameters:
measurementSystem -