[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [cp-patches]: FYI: JTree editing fix
From: |
Lillian Angel |
Subject: |
Re: [cp-patches]: FYI: JTree editing fix |
Date: |
Fri, 02 Sep 2005 14:43:43 -0400 |
2005-09-02 Lillian Angel <address@hidden>
* javax/swing/plaf/basic/BasicTreeUI.java
(mousepressed): Fixed, so that clicking on control icon will not
start editing.
On Fri, 2005-09-02 at 14:00 -0400, Lillian Angel wrote:
> JTree editing is complete and key handling is also complete.
> - F2 starts editing, Enter completes the editing.
> - Triple clicking and click-pause-click also start editing.
> - clicking anywhere while editing, cancels the editing.
>
> The patch is really annoying to read. Alot of code was moved around and
> many comments were reformatted. If you need further clarification on how
> I implemented some of these functions, feel free to ask.
>
> 2005-09-02 Lillian Angel <address@hidden>
>
> * javax/swing/JTree.java
> (installUI): TreeSelectionListener removed because added too
> many times.
> * javax/swing/plaf/basic/BasicLookAndFeel.java:
> Fixed names for some tree defaults.
> * javax/swing/plaf/basic/BasicTreeUI.java:
> Added new fields for editing and keyboard actions.
> (setCellEditor): Took out unneeded if statement.
> (isEditing): Returned boolean instead.
> (updateCellEditor): Used set method.
> (installDefaults): Set focus to tree.
> (installKeyBoardActions): Implemented.
> (convertModifiers): New function implemented.
> (installUI): Used set method and initialized isEditing.
> (startEditing): set isEditing.
> (TreeAction): New class implemented to perform keyboard actions.
> (ActionListenerProxy): New private class used to distribute the
> keyboard actions to the true receiver.
> (editingStopped): Added code to prevent NPEs. set isEditing and
> focus to tree. Also, removed TreeSelectionListeners for
> cellEditor.
> (editingCanceled): Likewise.
> (keyPressed): Removed code, not needed anymore.
> (actionPerformed): Implemented for up/down keyboard actions.
> (actionPerformed): Implemented for left/right keyboard actions.
> * javax/swing/tree/DefaultTreeCellEditor.java
> (DefaultTreeCellEditor): Set lastPath.
> (isCellEditable): editingComponent should be configured if has
> not been.
> (stopCellEditing): No need to set cell editor to null here.
> (cancelCellEditing): Likewise.
> (valueChanged): Set tPath to the path that was last selected.
> Used for the click-pause-click implementation.
> (actionPerformed): Re-implemented in a simplier fashion.
> * javax/swing/tree/DefaultTreeCellRenderer.java
> (getTreeCellRendererComponent): Only set border color if val is
> lead selection path.
>
> _______________________________________________
> Classpath-patches mailing list
> address@hidden
> http://lists.gnu.org/mailman/listinfo/classpath-patches
patch.diff
Description: Text Data