issrg.editor2
Class DomainTreeCellEditor
java.lang.Object
javax.swing.tree.DefaultTreeCellEditor
issrg.editor2.DomainTreeCellEditor
- All Implemented Interfaces:
- java.awt.event.ActionListener, java.awt.event.MouseListener, java.util.EventListener, javax.swing.CellEditor, javax.swing.event.TreeSelectionListener, javax.swing.tree.TreeCellEditor
public class DomainTreeCellEditor
- extends javax.swing.tree.DefaultTreeCellEditor
- implements java.awt.event.MouseListener
Class that extends the DefaultTreeCellEditor. This is used to correct
formatting in the trees of the two policies (Where Users Are From and
My protected Resources).
This Class will define the way the tree is edited.
When any element is edited we want the user to be able to directly modify
the XML. Therefore when editing the tree this class makes the tree elements
modifyable.
- Author:
- Christian Azzopardi
- See Also:
DefaultTreeCellEditor
Nested classes/interfaces inherited from class javax.swing.tree.DefaultTreeCellEditor |
javax.swing.tree.DefaultTreeCellEditor.DefaultTextField, javax.swing.tree.DefaultTreeCellEditor.EditorContainer |
Fields inherited from class javax.swing.tree.DefaultTreeCellEditor |
borderSelectionColor, canEdit, editingComponent, editingContainer, editingIcon, font, lastPath, lastRow, offset, realEditor, renderer, timer, tree |
Constructor Summary |
DomainTreeCellEditor(DomainPolicyEditor dpEditor,
javax.swing.JTree tree,
DomainTreeCellRenderer renderer,
java.lang.String domainSpecName,
java.lang.String ldapdn,
java.lang.String url,
java.lang.String objectClass,
java.lang.String include,
java.lang.String exclude)
Creates a new instance of DomainTreeCellEditor, Calls its
super constructor method, and stores the values the class needs in
the other method. |
Methods inherited from class javax.swing.tree.DefaultTreeCellEditor |
actionPerformed, addCellEditorListener, cancelCellEditing, canEditImmediately, createContainer, createTreeCellEditor, determineOffset, getBorderSelectionColor, getCellEditorListeners, getCellEditorValue, getFont, inHitRegion, isCellEditable, removeCellEditorListener, setBorderSelectionColor, setFont, setTree, shouldSelectCell, shouldStartEditingTimer, startEditingTimer, stopCellEditing |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DomainTreeCellEditor
public DomainTreeCellEditor(DomainPolicyEditor dpEditor,
javax.swing.JTree tree,
DomainTreeCellRenderer renderer,
java.lang.String domainSpecName,
java.lang.String ldapdn,
java.lang.String url,
java.lang.String objectClass,
java.lang.String include,
java.lang.String exclude)
- Creates a new instance of DomainTreeCellEditor, Calls its
super constructor method, and stores the values the class needs in
the other method.
getTreeCellEditorComponent
public java.awt.Component getTreeCellEditorComponent(javax.swing.JTree tree,
java.lang.Object value,
boolean isSelected,
boolean expanded,
boolean leaf,
int row)
- Method that returns the correct String to display when editing the tree.
Gets the correct Strings from the XML values.
- Specified by:
getTreeCellEditorComponent
in interface javax.swing.tree.TreeCellEditor
- Overrides:
getTreeCellEditorComponent
in class javax.swing.tree.DefaultTreeCellEditor
- Returns:
- a component that will normally be the String label that we want
to edit when editing the tree.
prepareForEditing
protected void prepareForEditing()
- Overrides:
prepareForEditing
in class javax.swing.tree.DefaultTreeCellEditor
valueChanged
public void valueChanged(javax.swing.event.TreeSelectionEvent e)
- Specified by:
valueChanged
in interface javax.swing.event.TreeSelectionListener
- Overrides:
valueChanged
in class javax.swing.tree.DefaultTreeCellEditor
mouseClicked
public void mouseClicked(java.awt.event.MouseEvent e)
- Specified by:
mouseClicked
in interface java.awt.event.MouseListener
mouseEntered
public void mouseEntered(java.awt.event.MouseEvent e)
- Specified by:
mouseEntered
in interface java.awt.event.MouseListener
mouseExited
public void mouseExited(java.awt.event.MouseEvent e)
- Specified by:
mouseExited
in interface java.awt.event.MouseListener
mousePressed
public void mousePressed(java.awt.event.MouseEvent e)
- Specified by:
mousePressed
in interface java.awt.event.MouseListener
mouseReleased
public void mouseReleased(java.awt.event.MouseEvent e)
- Specified by:
mouseReleased
in interface java.awt.event.MouseListener