xmltool.gui
Class NodePopUps

java.lang.Object
  |
  +--java.awt.Component
        |
        +--java.awt.Container
              |
              +--java.awt.Window
                    |
                    +--java.awt.Dialog
                          |
                          +--xmltool.gui.NodePopUps

public class NodePopUps
extends java.awt.Dialog
implements java.awt.event.ActionListener, java.awt.event.MouseListener, java.awt.event.MouseMotionListener, java.lang.Cloneable

Dialog box for updating a node's parameters. This is used to update parameters of elements/attributes of the node which are not the root of the DTD

See Also:
Serialized Form

Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
 
Constructor Summary
NodePopUps(java.awt.Frame inFrame, ParsedData parsedData, java.lang.String pNodeName, java.lang.String pFileName, int i, Node onNode, java.lang.String parentName)
          Construct a dialog box to adjust the parameter for a node.
 
Method Summary
 void actionPerformed(java.awt.event.ActionEvent evt)
          Handle button events.
 void addNewAttribute(int i, java.lang.String val, java.lang.String opVal)
          Add the attribute just created to the cp_bottom panel
 void addNewElement(java.lang.String val, java.lang.String opVal)
          Add the element just created to the cp_bottom panel
 void drawLinks()
          Draw the links set by initLinks
 void drawRects()
          Draw the rectangles intialized by the initRects() method
 void duplicate(int i)
          Duplicate the element
 void duplicate(int i, int j)
          Duplicate the attribute
 void initRects()
          Initialize rectangles to draw, where the AND/ OR conditions are represented
 void mouseClicked(java.awt.event.MouseEvent evt)
          Handle mouse click events
 void mouseDragged(java.awt.event.MouseEvent e)
          Not implemented
 void mouseEntered(java.awt.event.MouseEvent e)
          Not implemented
 void mouseExited(java.awt.event.MouseEvent e)
          Not implemented
 void mouseMoved(java.awt.event.MouseEvent e)
          Not implemented
 void mousePressed(java.awt.event.MouseEvent e)
          Not implemented
 void mouseReleased(java.awt.event.MouseEvent e)
          Not implemented
 
Methods inherited from class java.awt.Dialog
addNotify, getTitle, isModal, isResizable, paramString, setModal, setResizable, setTitle, show
 
Methods inherited from class java.awt.Window
addWindowListener, applyResourceBundle, applyResourceBundle, dispose, finalize, getFocusOwner, getInputContext, getLocale, getOwnedWindows, getOwner, getToolkit, getWarningString, isShowing, pack, postEvent, processEvent, processWindowEvent, removeWindowListener, toBack, toFront
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addImpl, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getInsets, getLayout, getMaximumSize, getMinimumSize, getPreferredSize, insets, invalidate, isAncestorOf, layout, list, list, locate, minimumSize, paint, paintComponents, preferredSize, print, printComponents, processContainerEvent, remove, remove, removeAll, removeContainerListener, removeNotify, setFont, setLayout, update, validate, validateTree
 
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addPropertyChangeListener, addPropertyChangeListener, bounds, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, disable, disableEvents, dispatchEvent, enable, enable, enableEvents, enableInputMethods, firePropertyChange, getBackground, getBounds, getBounds, getColorModel, getComponentOrientation, getCursor, getDropTarget, getFont, getFontMetrics, getForeground, getGraphics, getHeight, getInputMethodRequests, getLocation, getLocation, getLocationOnScreen, getName, getParent, getPeer, getSize, getSize, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isDisplayable, isDoubleBuffered, isEnabled, isFocusTraversable, 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, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, remove, removeComponentListener, removeFocusListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, reshape, resize, resize, setBackground, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setEnabled, setForeground, setLocale, setLocation, setLocation, setName, setSize, setSize, setVisible, show, size, toString, transferFocus
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

NodePopUps

public NodePopUps(java.awt.Frame inFrame,
                  ParsedData parsedData,
                  java.lang.String pNodeName,
                  java.lang.String pFileName,
                  int i,
                  Node onNode,
                  java.lang.String parentName)
Construct a dialog box to adjust the parameter for a node.
Parameters:
inFrame - containing frame
parsedData - The ParsedData parent object whose ith child is to be displayed
pNodeName - Name of the current node
pFileName - File name corresponding to the DTD under consideration
i - Which element of parsedData is the parent here
onNode - The node itself(We need this also, cause this represents saved data so far
parentName - Name of parent element (DTD terminology)
Method Detail

initRects

public void initRects()
Initialize rectangles to draw, where the AND/ OR conditions are represented

drawRects

public void drawRects()
Draw the rectangles intialized by the initRects() method

actionPerformed

public void actionPerformed(java.awt.event.ActionEvent evt)
Handle button events. Apply : update the nodes parameters and then dismiss dialog box. Cancel : dismiss dialog box. Get : Get the parsed dtd/ parse the dtd and get it Delete : Delete the link that is clicked after this Done : Draw the links if Link was pressed before Link : The fields clicked after this are to be linked Other : One of the popup buttons is pressed, so call the NodePopUps
Specified by:
actionPerformed in interface java.awt.event.ActionListener
Parameters:
evt - button action event

addNewAttribute

public void addNewAttribute(int i,
                            java.lang.String val,
                            java.lang.String opVal)
Add the attribute just created to the cp_bottom panel
Parameters:
i - Element whose attribute is to be displayed
val - Value to be put in the text field

addNewElement

public void addNewElement(java.lang.String val,
                          java.lang.String opVal)
Add the element just created to the cp_bottom panel
Parameters:
val - Value to be put in the text field

duplicate

public void duplicate(int i,
                      int j)
Duplicate the attribute
Parameters:
i - Element number whose attribute is to be duplicated
j - Attribute number to be duplicated

duplicate

public void duplicate(int i)
Duplicate the element
Parameters:
i - Element number to be duplicated

mouseClicked

public void mouseClicked(java.awt.event.MouseEvent evt)
Handle mouse click events
Specified by:
mouseClicked in interface java.awt.event.MouseListener
Parameters:
evt - MouseClicked event

drawLinks

public void drawLinks()
Draw the links set by initLinks

mouseDragged

public void mouseDragged(java.awt.event.MouseEvent e)
Not implemented
Specified by:
mouseDragged in interface java.awt.event.MouseMotionListener

mouseEntered

public void mouseEntered(java.awt.event.MouseEvent e)
Not implemented
Specified by:
mouseEntered in interface java.awt.event.MouseListener

mouseExited

public void mouseExited(java.awt.event.MouseEvent e)
Not implemented
Specified by:
mouseExited in interface java.awt.event.MouseListener

mousePressed

public void mousePressed(java.awt.event.MouseEvent e)
Not implemented
Specified by:
mousePressed in interface java.awt.event.MouseListener

mouseReleased

public void mouseReleased(java.awt.event.MouseEvent e)
Not implemented
Specified by:
mouseReleased in interface java.awt.event.MouseListener

mouseMoved

public void mouseMoved(java.awt.event.MouseEvent e)
Not implemented
Specified by:
mouseMoved in interface java.awt.event.MouseMotionListener