changeset 6902:ea134f222605

RT-36636: [Accessibility] SELECT action implemented on Mac
author Felipe Heidrich <felipe.heidrich@oracle.com>
date Fri, 25 Apr 2014 15:40:14 -0700
parents c9c58499ca05
children 8979d8ffbc06
files modules/graphics/src/main/java/com/sun/glass/ui/mac/MacAccessible.java
diffstat 1 files changed, 10 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/modules/graphics/src/main/java/com/sun/glass/ui/mac/MacAccessible.java	Fri Apr 25 11:44:38 2014 -0700
+++ b/modules/graphics/src/main/java/com/sun/glass/ui/mac/MacAccessible.java	Fri Apr 25 15:40:14 2014 -0700
@@ -1042,6 +1042,7 @@
             case NSAccessibilitySelectedAttribute:
             case NSAccessibilitySelectedRowsAttribute:
             case NSAccessibilitySelectedCellsAttribute:
+            case NSAccessibilitySelectedTextRangeAttribute:
                 return true;
             default:
         }
@@ -1489,6 +1490,15 @@
                     }
                     break;
                 }
+                case NSAccessibilitySelectedTextRangeAttribute: {
+                    MacVariant variant = idToMacVariant(value, MacVariant.NSValue_range);
+                    if (variant != null) {
+                        int start = variant.int1; /* range.location */
+                        int end = variant.int1 + variant.int2; /* range.location + range.length */
+                        executeAction(Action.SELECT, start, end);
+                    }
+                    break;
+                }
                 default:
             }
         }