On 18 September 2010 04:48, Greg Brown <[email protected]> wrote: > > 2. (Improvement / New Feature) > > org.apache.pivot.wtk.skin.ComponentSkin.keyPressed() handles TAB & > SHIFT+TAB > > keys to transfer focus between components > > It doesn't care whether any or all of ALT, CTRL, META are also pressed. > > > http://svn.apache.org/repos/asf/pivot/trunk/wtk/src/org/apache/pivot/wtk/skin/ComponentSkin.java > > > > (SHIFT+)ALT+TAB is commonly used in MS Windows to switch between running > > applications (Task Switcher) > > http://en.wikipedia.org/wiki/Alt-Tab > > > > and (SHIFT+)CTRL+TAB is often used to navigate between tabs > > http://en.wikipedia.org/wiki/Table_of_keyboard_shortcuts#Tab_management > > I'm not sure if this is a bug or an improvement. If you press Shift-Alt-Tab > on Windows, what happens? What do you think should happen? > > The SHIFT keys reverses direction, just like with focus traversal. ALT+TAB on Windows will show the task switcher dialog and advance to the next icon(application). Adding SHIFT into the mix will move in the reverse direction
My point here was that unless the intent was to process focus traversal when ALT/META/CTRL are also pressed, then it is better to check what modifiers are pressed and only proceed if the (optional) SHIFT modifier is pressed or none at all. > 3. (Improvement / New Feature) > > XXX.keyTyped() methods which select the next item matching the keypress > > should probably > > - Move in the opposite direction when SHIFT is pressed > > This seems weird to me, but maybe it is a standard I am not familiar with. > Just as before, it is a continuation of the SHIFT key reversing direction > 4. (Improvement / New Feature) > Pressing SPACE in TerraListViewSkin & TerraTreeViewSkin will toggle check > mark state only when selection mode is SelectMode.SINGLE > > Why not process all selected items, and therefore work SelectMode.MULTI? > This could either just invert each individual item, or set them all to a > common state before toggling between checked and unchecked. What would be the use case? Checkboxes are often used as a more > "user-friendly" alternative to multi-select lists - it is less common to see > them combined. > > It just seems insconsistent to me. I see the SPACE key as a means to toggle the selection state. If I can select multiple checkboxes (or list items in this case) I would expect the toggle to have an effect on the entire selection. As long as the ListView or whatever can be configured to have checkboxes *and* multiple selections, it seems like it should support the processing of the entire selection. Currently SPACE wont toggle the checkbox state in multiselect mode even if only a single item is selected. > > 5. (Bug) > > TAB & SHIFT+TAB have no effect in MenuBarItemSkin, but should perform > like > > LEFT & RIGHT arrows and change the activated menu > > > http://svn.apache.org/repos/asf/pivot/trunk/wtk/src/org/apache/pivot/wtk/skin/MenuBarItemSkin.java > > > > This looks to be because ComponentSkin.keyPressed() consumes the TAB > > keypresses, so they never reach MenuBarItemSkin > > Consuming an event only prevents it from propagating up the container > hierarchy - it doesn't stop it from reaching a subclass (or superclass). > That needs to be done programmatically. Either way, it sounds like it could > be a bug (or an oversight). I'll take a look. > >From memory I think there is an early call to super.keyPressed(). > > > 6. (Question) > > In TerraFileBrowserSkin, the ENTER key only works if > > keyboardFolderTraversalEnabled has been set, but > > DELETE & BACKSPACE work regardless. > > > > For consistency, should DELETE & BACKSPACE require > > keyboardFolderTraversalEnabled to be true if ENTER does? > > > http://svn.apache.org/repos/asf/pivot/trunk/wtk-terra/src/org/apache/pivot/wtk/skin/terra/TerraFileBrowserSkin.java > > Hm. That's a good question. I don't remember why that style exists. None of > the sample apps or tests seem to use it. > I'd vote to lose the style altogether, combine the 2 behaviours, or rename the property to reflect what it actually does. Chris
