Documentation of 'org.jgraph.graph.DefaultGraphCellEditor' Java class
DefaultGraphCellEditor
org.jgraph.graph

Class DefaultGraphCellEditor

    • Constructor Summary

      Constructors 
      Constructor and Description
      DefaultGraphCellEditor()
      Constructs a DefaultTreeCellEditor object for a JGraph using the specified renderer and a default editor.
      DefaultGraphCellEditor(GraphCellEditor editor)
      Constructs a DefaultTreeCellEditor object for a JTree using the specified renderer and the specified editor.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      void actionPerformed(java.awt.event.ActionEvent e)
      Messaged when the timer fires, this will start the editing session.
      void addCellEditorListener(javax.swing.event.CellEditorListener l)
      Adds the CellEditorListener.
      void cancelCellEditing()
      Messages cancelCellEditing to the realEditor and removes it from this instance.
      java.awt.Color getBorderSelectionColor()
      Returns the color the border is drawn.
      java.lang.Object getCellEditorValue()
      Returns the value currently being edited.
      java.awt.Font getFont()
      Gets the font used for editing.
      java.awt.Component getGraphCellEditorComponent(JGraph graph, java.lang.Object cell, boolean isSelected)
      Configures the editor.
      boolean isCellEditable(java.util.EventObject event)
      If the realEditor returns true to this message, prepareForEditing is messaged and true is returned.
      void removeCellEditorListener(javax.swing.event.CellEditorListener l)
      Removes the previously added CellEditorListener l.
      void setBorderSelectionColor(java.awt.Color newColor)
      Sets the color to use for the border.
      void setFont(java.awt.Font font)
      Sets the font to edit with.
      boolean shouldSelectCell(java.util.EventObject event)
      Messages the realEditor for the return value.
      boolean stopCellEditing()
      If the realEditor will allow editing to stop, the realEditor is removed and true is returned, otherwise false is returned.
      void valueChanged(GraphSelectionEvent e)
      Resets lastPath.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • DefaultGraphCellEditor

        public DefaultGraphCellEditor()
        Constructs a DefaultTreeCellEditor object for a JGraph using the specified renderer and a default editor. (Use this constructor for normal editing.)
      • DefaultGraphCellEditor

        public DefaultGraphCellEditor(GraphCellEditor editor)
        Constructs a DefaultTreeCellEditor object for a JTree using the specified renderer and the specified editor. (Use this constructor for specialized editing.)
        Parameters:
        editor - a TreeCellEditor object
    • Method Detail

      • setBorderSelectionColor

        public void setBorderSelectionColor(java.awt.Color newColor)
        Sets the color to use for the border.
      • getBorderSelectionColor

        public java.awt.Color getBorderSelectionColor()
        Returns the color the border is drawn.
      • setFont

        public void setFont(java.awt.Font font)
        Sets the font to edit with. null indicates the renderers font should be used. This will NOT override any font you have set in the editor the receiver was instantied with. If null for an editor was passed in a default editor will be created that will pick up this font.
        Parameters:
        font - the editing Font
        See Also:
        getFont()
      • getFont

        public java.awt.Font getFont()
        Gets the font used for editing.
        Returns:
        the editing Font
        See Also:
        setFont(java.awt.Font)
      • getGraphCellEditorComponent

        public java.awt.Component getGraphCellEditorComponent(JGraph graph,
                                                              java.lang.Object cell,
                                                              boolean isSelected)
        Configures the editor. Passed onto the realEditor.
        Specified by:
        getGraphCellEditorComponent in interface GraphCellEditor
        Parameters:
        graph - the JGraph that is asking the editor to edit This parameter can be null.
        cell - the value of the cell to be edited.
        isSelected - true if the cell is to be rendered with selection highlighting
        Returns:
        the component for editing
      • getCellEditorValue

        public java.lang.Object getCellEditorValue()
        Returns the value currently being edited.
        Specified by:
        getCellEditorValue in interface javax.swing.CellEditor
      • isCellEditable

        public boolean isCellEditable(java.util.EventObject event)
        If the realEditor returns true to this message, prepareForEditing is messaged and true is returned.
        Specified by:
        isCellEditable in interface javax.swing.CellEditor
      • shouldSelectCell

        public boolean shouldSelectCell(java.util.EventObject event)
        Messages the realEditor for the return value.
        Specified by:
        shouldSelectCell in interface javax.swing.CellEditor
      • stopCellEditing

        public boolean stopCellEditing()
        If the realEditor will allow editing to stop, the realEditor is removed and true is returned, otherwise false is returned.
        Specified by:
        stopCellEditing in interface javax.swing.CellEditor
      • cancelCellEditing

        public void cancelCellEditing()
        Messages cancelCellEditing to the realEditor and removes it from this instance.
        Specified by:
        cancelCellEditing in interface javax.swing.CellEditor
      • addCellEditorListener

        public void addCellEditorListener(javax.swing.event.CellEditorListener l)
        Adds the CellEditorListener.
        Specified by:
        addCellEditorListener in interface javax.swing.CellEditor
      • removeCellEditorListener

        public void removeCellEditorListener(javax.swing.event.CellEditorListener l)
        Removes the previously added CellEditorListener l.
        Specified by:
        removeCellEditorListener in interface javax.swing.CellEditor
      • actionPerformed

        public void actionPerformed(java.awt.event.ActionEvent e)
        Messaged when the timer fires, this will start the editing session.
        Specified by:
        actionPerformed in interface java.awt.event.ActionListener

DataMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.