1 import com
.sun
.star
.uno
.UnoRuntime
;
2 import com
.sun
.star
.accessibility
.XAccessibleContext
;
3 import com
.sun
.star
.accessibility
.XAccessibleExtendedComponent
;
6 class AccessibleExtendedComponentHandler
9 public NodeHandler
createHandler (XAccessibleContext xContext
)
11 XAccessibleExtendedComponent xEComponent
=
12 (XAccessibleExtendedComponent
) UnoRuntime
.queryInterface (
13 XAccessibleExtendedComponent
.class, xContext
);
14 if (xEComponent
!= null)
15 return new AccessibleExtendedComponentHandler (xEComponent
);
20 public AccessibleExtendedComponentHandler ()
24 public AccessibleExtendedComponentHandler (XAccessibleExtendedComponent xEComponent
)
26 if (xEComponent
!= null)
27 maChildList
.setSize (0);
30 private static XAccessibleExtendedComponent
getComponent (AccTreeNode aNode
)
32 return (XAccessibleExtendedComponent
) UnoRuntime
.queryInterface (
33 XAccessibleExtendedComponent
.class,
38 public AccessibleTreeNode
createChild (AccessibleTreeNode aParent
, int nIndex
)
40 AccessibleTreeNode aChild
= null;
41 if (aParent
instanceof AccTreeNode
)
43 XAccessibleExtendedComponent xEComponent
= getComponent ((AccTreeNode
)aParent
);
45 if (xEComponent
!= null)
51 nColor
= xEComponent
.getForeground();
52 aChild
= new StringNode ("Depricated Foreground color: R"
54 + "G" + (nColor
>>8&0xff)
55 + "B" + (nColor
>>0&0xff)
56 + "A" + (nColor
>>24&0xff),
60 nColor
= xEComponent
.getBackground();
61 aChild
= new StringNode ("Depricated Background color: R"
63 + "G" + (nColor
>>8&0xff)
64 + "B" + (nColor
>>0&0xff)
65 + "A" + (nColor
>>24&0xff),