[jira] Updated: (CAY-911) CM Usability: JComboBox Autocompletion

From: Andrey Razumovsky (JIRA) ("Andrey)
Date: Sat May 17 2008 - 11:01:52 EDT

  • Next message: Andrus Adamchik: "Re: 3.0 M4 artifacts"

         [ https://issues.apache.org/cayenne/browse/CAY-911?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

    Andrey Razumovsky updated CAY-911:
    ----------------------------------

        Attachment: patch-CAY-911.txt

    The patch contains the implementation of the feature (the first one is discarded since it contains other functionality). Few notes:

    1. Auto-completion implemented for entities, attributes and DB types selections (not objattr type selections since the combo is not sorted and auto-completion will lose its effect).
    2. Auto-completion is a automatic selecting of matching item in combo. For existing selections, you cannot type items not present in the list.
    3. For entities, the icon is hidden during editing.
    4. Four classes from org.apache.cayenne.modeler.util.combo are responsible for auto-completion.
    5. I've spent tons of time trying to figure out why *sometimes* editor in table is not fired or fired incorrectly (BTW, i think someone from the Team had already encountered this problem, because there are a lot of DefaultCellEditor.setClickToStart(1) lines. 1 is by default for comboboxes :) ).

    Turns out this is because-of cancelEditing() invocation in CayenneTable, which is fired in the middle of showing editor. I removed that line and placed it in tableChanged() and also in popup handling. In most cases when changing selected line, editing is stopped automatically by Swing.

    > CM Usability: JComboBox Autocompletion
    > --------------------------------------
    >
    > Key: CAY-911
    > URL: https://issues.apache.org/cayenne/browse/CAY-911
    > Project: Cayenne
    > Issue Type: New Feature
    > Components: CayenneModeler GUI
    > Reporter: Thomas Bernhard
    > Assignee: Kevin Menard
    > Attachments: patch-2008-05-11.txt, patch-CAY-911.txt
    >
    >
    > Please use JComBox with autocompletion in CM at least in places that are very repetitive like selecting Field Types.
    > It is very simple to implement it and there are several extremly well documented examples how to do it. E.g.:
    > http://www.orbital-computer.de/JComboBox/

    -- 
    This message is automatically generated by JIRA.
    -
    You can reply to this email to add a comment to the issue online.
    



    This archive was generated by hypermail 2.0.0 : Sat May 17 2008 - 11:02:25 EDT