Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
core
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
LibreOffice
core
Commits
58c603a0
Kaydet (Commit)
58c603a0
authored
Nis 11, 2003
tarafından
Vladimir Glazounov
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
INTEGRATION: CWS vcl07 (1.7.2); FILE ADDED
2003/04/08 14:28:29 obr 1.7.2.1: re-added accessibility workbench
üst
3484a653
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
102 additions
and
0 deletions
+102
-0
AccessibleComponentHandler.java
toolkit/test/accessibility/AccessibleComponentHandler.java
+102
-0
No files found.
toolkit/test/accessibility/AccessibleComponentHandler.java
0 → 100644
Dosyayı görüntüle @
58c603a0
import
com.sun.star.uno.UnoRuntime
;
import
drafts.com.sun.star.accessibility.XAccessibleContext
;
import
drafts.com.sun.star.accessibility.XAccessibleComponent
;
class
AccessibleComponentHandler
extends
NodeHandler
{
public
NodeHandler
createHandler
(
XAccessibleContext
xContext
)
{
XAccessibleComponent
xComponent
=
(
XAccessibleComponent
)
UnoRuntime
.
queryInterface
(
XAccessibleComponent
.
class
,
xContext
);
if
(
xComponent
!=
null
)
return
new
AccessibleComponentHandler
(
xComponent
);
else
return
null
;
}
public
AccessibleComponentHandler
()
{
}
public
AccessibleComponentHandler
(
XAccessibleComponent
xComponent
)
{
if
(
xComponent
!=
null
)
maChildList
.
setSize
(
6
);
}
public
AccessibleTreeNode
createChild
(
AccessibleTreeNode
aParent
,
int
nIndex
)
{
AccessibleTreeNode
aChild
=
null
;
if
(
aParent
instanceof
AccTreeNode
)
{
XAccessibleComponent
xComponent
=
((
AccTreeNode
)
aParent
).
getComponent
();
if
(
xComponent
!=
null
)
{
int
nColor
;
switch
(
nIndex
)
{
case
0
:
com
.
sun
.
star
.
awt
.
Point
aLocation
=
xComponent
.
getLocation
();
aChild
=
new
StringNode
(
"Location: "
+
aLocation
.
X
+
", "
+
aLocation
.
Y
,
aParent
);
break
;
case
1
:
com
.
sun
.
star
.
awt
.
Point
aScreenLocation
=
xComponent
.
getLocationOnScreen
();
aChild
=
new
StringNode
(
"Location on Screen: "
+
aScreenLocation
.
X
+
", "
+
aScreenLocation
.
Y
,
aParent
);
break
;
case
2
:
com
.
sun
.
star
.
awt
.
Size
aSize
=
xComponent
.
getSize
();
aChild
=
new
StringNode
(
"Size: "
+
aSize
.
Width
+
", "
+
aSize
.
Height
,
aParent
);
break
;
case
3
:
com
.
sun
.
star
.
awt
.
Rectangle
aBBox
=
xComponent
.
getBounds
();
aChild
=
new
StringNode
(
"Bounding Box: "
+
aBBox
.
X
+
", "
+
aBBox
.
Y
+
","
+
aBBox
.
Width
+
", "
+
aBBox
.
Height
,
aParent
);
break
;
case
4
:
nColor
=
xComponent
.
getForeground
();
aChild
=
new
StringNode
(
"Foreground color: R"
+
(
nColor
>>
16
&
0xff
)
+
"G"
+
(
nColor
>>
8
&
0xff
)
+
"B"
+
(
nColor
>>
0
&
0xff
)
+
"A"
+
(
nColor
>>
24
&
0xff
),
aParent
);
break
;
case
5
:
nColor
=
xComponent
.
getBackground
();
aChild
=
new
StringNode
(
"Background color: R"
+
(
nColor
>>
16
&
0xff
)
+
"G"
+
(
nColor
>>
8
&
0xff
)
+
"B"
+
(
nColor
>>
0
&
0xff
)
+
"A"
+
(
nColor
>>
24
&
0xff
),
aParent
);
break
;
}
}
}
return
aChild
;
}
public
void
update
(
AccessibleTreeNode
aNode
)
{
maChildList
.
clear
();
if
(
aNode
instanceof
AccTreeNode
)
if
(((
AccTreeNode
)
aNode
).
getComponent
()
!=
null
)
maChildList
.
setSize
(
4
);
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment