issrg.editor2
Class DomainPolicyEditor

java.lang.Object
  extended by java.awt.Component
      extended by java.awt.Container
          extended by javax.swing.JComponent
              extended by javax.swing.JPanel
                  extended by issrg.editor2.DomainPolicyEditor
All Implemented Interfaces:
DITSelectionListener, WebDAVMultiBrowser_Listener, XMLChangeListener, java.awt.event.ActionListener, java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable, java.util.EventListener, javax.accessibility.Accessible, javax.swing.event.TreeExpansionListener, javax.swing.event.TreeSelectionListener, javax.swing.tree.TreeModel
Direct Known Subclasses:
PWizardPanel3b, PWizardPanel7c, SubjectDomainPolicy, TargetDomainPolicy

public class DomainPolicyEditor
extends javax.swing.JPanel
implements XMLChangeListener, javax.swing.tree.TreeModel, java.awt.event.ActionListener, javax.swing.event.TreeSelectionListener, WebDAVMultiBrowser_Listener, DITSelectionListener, javax.swing.event.TreeExpansionListener

See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class javax.swing.JPanel
javax.swing.JPanel.AccessibleJPanel
 
Nested classes/interfaces inherited from class javax.swing.JComponent
javax.swing.JComponent.AccessibleJComponent
 
Nested classes/interfaces inherited from class java.awt.Container
java.awt.Container.AccessibleAWTContainer
 
Nested classes/interfaces inherited from class java.awt.Component
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy
 
Field Summary
 ConfigurationComponent config
           
 java.awt.GridBagConstraints constraints
           
 int count
           
 java.lang.String defaultName
           
 java.lang.String domainPolicy
           
 java.lang.String domainSpecName
           
 javax.swing.JTree domainTree
           
 javax.swing.JPanel domainViewDisplay
           
 javax.swing.JPanel editDisplay
           
 javax.swing.JTextField idTextField
           
 Editor2LDAPBrowser LDAP_Component
           
 javax.swing.JRadioButton LDAPComponent_Option
           
 javax.swing.JTextField ldapDirectly
           
 javax.swing.JPanel ldapLabelText
           
 javax.swing.JPanel listBoxDisplay
           
 javax.swing.JPanel readableDisplay
           
 java.lang.String readableNode
           
 javax.swing.JButton resourcesButton
           
 javax.swing.JTextField resTextField
           
 javax.swing.JTextField specTextField
           
 javax.swing.JSplitPane splitPane
           
 TargetsComboBox urlDropDownList
           
 javax.swing.JTextField urlTextField
           
 javax.swing.JRadioButton urlTextField_Option
           
 javax.swing.JPanel viewDisplay
           
 ReadablePERMISXML viewXML
           
 Editor2WebDAVBrowser WebDAV_Component
           
 XMLEditor xmlED
           
 
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.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
DomainPolicyEditor(PEComponent pec, java.lang.String readableNode, java.lang.String domainSpecName, ConfigurationComponent config)
          Creates a new instance of DomainPolicyEditor
DomainPolicyEditor(XMLEditor xmlED, java.lang.String readableNode, java.lang.String domainSpecName, ConfigurationComponent config)
           
 
Method Summary
 void actionPerformed(java.awt.event.ActionEvent ae)
           
 void addComponent(java.awt.Component component, javax.swing.JPanel pane, int row, int column, int width, int height, int anchor, double weightx, double weighty, int fill)
          Method that adds a component to a JPanel when the Layout is of GridBagLayout Type.
 void addDomainItem()
          Adds a new DomainSpec node.
 void addResource()
          Adds a new Resource
 void addTreeModelListener(javax.swing.event.TreeModelListener listener)
           
 void checkAttribute(org.w3c.dom.Element chosen)
           
 void communicationError(java.lang.Throwable tce)
          A communication error occured while attempting to expand the tree.
 void connectionError_WebDAVMultiBrowser()
           
 void copyDomainItem()
          Copies the currently selected node.
 void deleteDomainItem()
          Remove the currently selected node.
 void doubleclick(LDAP_DIT ldap)
          Something has been double-clicked in the tree.
 void excludeEditItem()
           
 void fireEvent(javax.swing.event.TreeModelEvent ev, int typeOfEvent)
           
 java.lang.Object getChild(java.lang.Object parent, int index)
           
 int getChildCount(java.lang.Object parent)
           
 javax.swing.JPanel getContentPanel()
           
 javax.swing.tree.TreePath getCurrentTreePath()
           
 org.w3c.dom.Element getCurrentTreeSelection()
           
 javax.swing.JPanel getDomainViewPanel()
           
 javax.swing.JPanel getEditPanel()
           
static int getElementIndex(org.w3c.dom.Element parent, int idx)
           
 int getIndexOfChild(java.lang.Object parent, java.lang.Object child)
           
 java.lang.Object getRoot()
           
 void includeEditItem()
           
 void initDomainPolicyEditor()
           
 javax.swing.JTree initDomainTree()
          Sets the initial settings of the tree
 boolean isChildOfLDAPElement(java.lang.String parent, java.lang.String child)
           
 boolean isDomainSpecID(java.lang.String str)
           
 boolean isInSubTree(org.w3c.dom.Element childToCheck, java.lang.String Attribute)
           
 boolean isLeaf(java.lang.Object node)
           
 boolean isValidLDAPDN(java.lang.String ldap)
           
 void notifyRoleAssignment(java.lang.String oldVal, java.lang.String newVal, java.lang.String tagName, java.lang.String tagName2)
           
 javax.swing.JButton removeExcludeEditButton()
           
 javax.swing.JButton removeIncludeEditButton()
           
 javax.swing.JTextField removeLDAPDirectly()
           
 javax.swing.JLabel removeLDAPLabel()
           
 javax.swing.JButton removeReplaceEditButton()
           
 void removeTreeModelListener(javax.swing.event.TreeModelListener listener)
           
 void replaceEditItem()
          Method that replaces the selected item in the multiLDAP Tree with the selected value of the Domain Policy Tree
 void replacePreviousEditingItem(int previousSelectedRow, java.lang.String editedValue)
           
 void select(LDAP_DIT ldap)
          Something gets selected in the tree.
 void setCaption(java.lang.String internalName, java.lang.String internationalName)
          Sets the text the component will show.
 void setCurrentTreePath(javax.swing.tree.TreePath path)
           
 void setCurrentTreeSelection(org.w3c.dom.Element e)
           
 void setInitialSettings()
           
 void treeCollapsed(javax.swing.event.TreeExpansionEvent event)
          When Tree is Collapsed it is important that the place at which was collapsed be selected.
 void treeExpanded(javax.swing.event.TreeExpansionEvent event)
           
 void unselect(LDAP_DIT ldap)
          User clicks outside the tree bounds.
 void valueChanged_WebDAVMultiBrowser(WebDAV_DIT_Event evt)
           
 void valueChanged(javax.swing.event.TreeSelectionEvent e)
           
 void valueForPathChanged(javax.swing.tree.TreePath path, java.lang.Object value)
           
 void XMLChanged(XMLChangeEvent ev)
          Invoked when an XMLChangeEvent is dispatched.
 
Methods inherited from class javax.swing.JPanel
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI
 
Methods inherited from class javax.swing.JComponent
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBorder, getBounds, getClientProperty, getComponentGraphics, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPopupLocation, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFocusTraversalKeys, setFont, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addImpl, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, 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, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, 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, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, 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

viewDisplay

public javax.swing.JPanel viewDisplay

editDisplay

public javax.swing.JPanel editDisplay

domainViewDisplay

public javax.swing.JPanel domainViewDisplay

readableDisplay

public javax.swing.JPanel readableDisplay

listBoxDisplay

public javax.swing.JPanel listBoxDisplay

ldapLabelText

public javax.swing.JPanel ldapLabelText

splitPane

public javax.swing.JSplitPane splitPane

resourcesButton

public javax.swing.JButton resourcesButton

urlDropDownList

public TargetsComboBox urlDropDownList

domainTree

public javax.swing.JTree domainTree

viewXML

public ReadablePERMISXML viewXML

xmlED

public XMLEditor xmlED

config

public ConfigurationComponent config

readableNode

public java.lang.String readableNode

domainSpecName

public java.lang.String domainSpecName

domainPolicy

public java.lang.String domainPolicy

constraints

public java.awt.GridBagConstraints constraints

LDAP_Component

public Editor2LDAPBrowser LDAP_Component

WebDAV_Component

public Editor2WebDAVBrowser WebDAV_Component

specTextField

public javax.swing.JTextField specTextField

ldapDirectly

public javax.swing.JTextField ldapDirectly

urlTextField

public javax.swing.JTextField urlTextField

resTextField

public javax.swing.JTextField resTextField

idTextField

public javax.swing.JTextField idTextField

urlTextField_Option

public javax.swing.JRadioButton urlTextField_Option

LDAPComponent_Option

public javax.swing.JRadioButton LDAPComponent_Option

count

public int count

defaultName

public java.lang.String defaultName
Constructor Detail

DomainPolicyEditor

public DomainPolicyEditor(PEComponent pec,
                          java.lang.String readableNode,
                          java.lang.String domainSpecName,
                          ConfigurationComponent config)
Creates a new instance of DomainPolicyEditor


DomainPolicyEditor

public DomainPolicyEditor(XMLEditor xmlED,
                          java.lang.String readableNode,
                          java.lang.String domainSpecName,
                          ConfigurationComponent config)
Method Detail

initDomainPolicyEditor

public void initDomainPolicyEditor()

getContentPanel

public javax.swing.JPanel getContentPanel()

getDomainViewPanel

public javax.swing.JPanel getDomainViewPanel()

getEditPanel

public javax.swing.JPanel getEditPanel()

removeIncludeEditButton

public javax.swing.JButton removeIncludeEditButton()

removeExcludeEditButton

public javax.swing.JButton removeExcludeEditButton()

removeReplaceEditButton

public javax.swing.JButton removeReplaceEditButton()

removeLDAPLabel

public javax.swing.JLabel removeLDAPLabel()

removeLDAPDirectly

public javax.swing.JTextField removeLDAPDirectly()

setInitialSettings

public void setInitialSettings()

initDomainTree

public javax.swing.JTree initDomainTree()
Sets the initial settings of the tree


setCurrentTreeSelection

public void setCurrentTreeSelection(org.w3c.dom.Element e)

getCurrentTreeSelection

public org.w3c.dom.Element getCurrentTreeSelection()

setCurrentTreePath

public void setCurrentTreePath(javax.swing.tree.TreePath path)

getCurrentTreePath

public javax.swing.tree.TreePath getCurrentTreePath()

valueChanged

public void valueChanged(javax.swing.event.TreeSelectionEvent e)
Specified by:
valueChanged in interface javax.swing.event.TreeSelectionListener

checkAttribute

public void checkAttribute(org.w3c.dom.Element chosen)

treeCollapsed

public void treeCollapsed(javax.swing.event.TreeExpansionEvent event)
When Tree is Collapsed it is important that the place at which was collapsed be selected. Otherwise, other operations would be held on invisible tree paths.

Specified by:
treeCollapsed in interface javax.swing.event.TreeExpansionListener

treeExpanded

public void treeExpanded(javax.swing.event.TreeExpansionEvent event)
Specified by:
treeExpanded in interface javax.swing.event.TreeExpansionListener

includeEditItem

public void includeEditItem()

excludeEditItem

public void excludeEditItem()

isInSubTree

public boolean isInSubTree(org.w3c.dom.Element childToCheck,
                           java.lang.String Attribute)

isChildOfLDAPElement

public boolean isChildOfLDAPElement(java.lang.String parent,
                                    java.lang.String child)

replaceEditItem

public void replaceEditItem()
Method that replaces the selected item in the multiLDAP Tree with the selected value of the Domain Policy Tree


replacePreviousEditingItem

public void replacePreviousEditingItem(int previousSelectedRow,
                                       java.lang.String editedValue)

addResource

public void addResource()
Adds a new Resource


addDomainItem

public void addDomainItem()
Adds a new DomainSpec node.


isValidLDAPDN

public boolean isValidLDAPDN(java.lang.String ldap)

copyDomainItem

public void copyDomainItem()
Copies the currently selected node.


deleteDomainItem

public void deleteDomainItem()
Remove the currently selected node.


actionPerformed

public void actionPerformed(java.awt.event.ActionEvent ae)
Specified by:
actionPerformed in interface java.awt.event.ActionListener

getElementIndex

public static int getElementIndex(org.w3c.dom.Element parent,
                                  int idx)

getChild

public java.lang.Object getChild(java.lang.Object parent,
                                 int index)
Specified by:
getChild in interface javax.swing.tree.TreeModel

getChildCount

public int getChildCount(java.lang.Object parent)
Specified by:
getChildCount in interface javax.swing.tree.TreeModel

getIndexOfChild

public int getIndexOfChild(java.lang.Object parent,
                           java.lang.Object child)
Specified by:
getIndexOfChild in interface javax.swing.tree.TreeModel

notifyRoleAssignment

public void notifyRoleAssignment(java.lang.String oldVal,
                                 java.lang.String newVal,
                                 java.lang.String tagName,
                                 java.lang.String tagName2)

isDomainSpecID

public boolean isDomainSpecID(java.lang.String str)

valueForPathChanged

public void valueForPathChanged(javax.swing.tree.TreePath path,
                                java.lang.Object value)
Specified by:
valueForPathChanged in interface javax.swing.tree.TreeModel

isLeaf

public boolean isLeaf(java.lang.Object node)
Specified by:
isLeaf in interface javax.swing.tree.TreeModel

getRoot

public java.lang.Object getRoot()
Specified by:
getRoot in interface javax.swing.tree.TreeModel

XMLChanged

public void XMLChanged(XMLChangeEvent ev)
Description copied from interface: XMLChangeListener
Invoked when an XMLChangeEvent is dispatched.

Specified by:
XMLChanged in interface XMLChangeListener

fireEvent

public void fireEvent(javax.swing.event.TreeModelEvent ev,
                      int typeOfEvent)

addTreeModelListener

public void addTreeModelListener(javax.swing.event.TreeModelListener listener)
Specified by:
addTreeModelListener in interface javax.swing.tree.TreeModel

removeTreeModelListener

public void removeTreeModelListener(javax.swing.event.TreeModelListener listener)
Specified by:
removeTreeModelListener in interface javax.swing.tree.TreeModel

setCaption

public void setCaption(java.lang.String internalName,
                       java.lang.String internationalName)
Sets the text the component will show. If component parameter is not found in the list of parameters, the method will call its super method to attempt to find the component there.

Parameters:
internalName - The internal name used in the program.
internationalName - The international name to set the text to.

addComponent

public void addComponent(java.awt.Component component,
                         javax.swing.JPanel pane,
                         int row,
                         int column,
                         int width,
                         int height,
                         int anchor,
                         double weightx,
                         double weighty,
                         int fill)
Method that adds a component to a JPanel when the Layout is of GridBagLayout Type.

Parameters:
component - The component to add the the JPanel.
pane - The JPanel to add the component on.
row - The Row to start placing the component in.
column - The Column to start placing the component in.
width - The amount of rows the component can be placed on.
height - The amount of columns the component can be placed on.
anchor - The anchor GridBagLayout constraints.
weightx - The proportion to grow in the x direction.
weighty - The proportion to grow in the y direction.
fill - The Directions GridBagLayout Constant for which to fill.

doubleclick

public void doubleclick(LDAP_DIT ldap)
Description copied from interface: DITSelectionListener
Something has been double-clicked in the tree.

Specified by:
doubleclick in interface DITSelectionListener

select

public void select(LDAP_DIT ldap)
Description copied from interface: DITSelectionListener
Something gets selected in the tree.

Specified by:
select in interface DITSelectionListener

unselect

public void unselect(LDAP_DIT ldap)
Description copied from interface: DITSelectionListener
User clicks outside the tree bounds.

Specified by:
unselect in interface DITSelectionListener

communicationError

public void communicationError(java.lang.Throwable tce)
Description copied from interface: DITSelectionListener
A communication error occured while attempting to expand the tree. Note that if the error occurs at any other time, the corresponding methods will throw the exception.

Specified by:
communicationError in interface DITSelectionListener

valueChanged_WebDAVMultiBrowser

public void valueChanged_WebDAVMultiBrowser(WebDAV_DIT_Event evt)
Specified by:
valueChanged_WebDAVMultiBrowser in interface WebDAVMultiBrowser_Listener

connectionError_WebDAVMultiBrowser

public void connectionError_WebDAVMultiBrowser()
Specified by:
connectionError_WebDAVMultiBrowser in interface WebDAVMultiBrowser_Listener