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
0f1dba83
Kaydet (Commit)
0f1dba83
authored
Eyl 07, 2012
tarafından
Noel Grandin
Kaydeden (comit)
Michael Stahl
Eyl 10, 2012
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Java5 cleanup, cleanup Vector and ArrayList to use generics
Change-Id: I7c2a3346f5c089424377302e1029b6f6aa971d76
üst
b89ae706
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
24 additions
and
24 deletions
+24
-24
EventHandler.java
odk/examples/DevelopersGuide/Accessibility/EventHandler.java
+5
-5
EventListenerProxy.java
...les/DevelopersGuide/Accessibility/EventListenerProxy.java
+5
-5
TextualDisplay.java
...xamples/DevelopersGuide/Accessibility/TextualDisplay.java
+4
-4
ButtonOperator.java
odk/examples/DevelopersGuide/Forms/ButtonOperator.java
+5
-5
TableCellTextBinding.java
odk/examples/DevelopersGuide/Forms/TableCellTextBinding.java
+5
-5
No files found.
odk/examples/DevelopersGuide/Accessibility/EventHandler.java
Dosyayı görüntüle @
0f1dba83
...
...
@@ -52,7 +52,7 @@ public class EventHandler
mnTopWindowCount
=
0
;
maListenerProxy
=
new
EventListenerProxy
(
this
);
maConnectionTask
=
new
ConnectionTask
(
maListenerProxy
);
maObjectDisplays
=
new
Vector
();
maObjectDisplays
=
new
Vector
<
IAccessibleObjectDisplay
>
();
}
public
synchronized
void
addObjectDisplay
(
IAccessibleObjectDisplay
aDisplay
)
...
...
@@ -148,7 +148,7 @@ public class EventHandler
for
(
int
i
=
0
;
i
<
maObjectDisplays
.
size
();
i
++)
{
IAccessibleObjectDisplay
aDisplay
=
(
IAccessibleObjectDisplay
)
maObjectDisplays
.
get
(
i
);
maObjectDisplays
.
get
(
i
);
if
(
aDisplay
!=
null
)
aDisplay
.
setAccessibleObject
(
xContext
);
}
...
...
@@ -179,7 +179,7 @@ public class EventHandler
for
(
int
i
=
0
;
i
<
maObjectDisplays
.
size
();
i
++)
{
IAccessibleObjectDisplay
aDisplay
=
(
IAccessibleObjectDisplay
)
maObjectDisplays
.
get
(
i
);
maObjectDisplays
.
get
(
i
);
if
(
aDisplay
!=
null
)
aDisplay
.
setAccessibleObject
(
null
);
}
...
...
@@ -285,7 +285,7 @@ public class EventHandler
for
(
int
i
=
0
;
i
<
maObjectDisplays
.
size
();
i
++)
{
IAccessibleObjectDisplay
aDisplay
=
(
IAccessibleObjectDisplay
)
maObjectDisplays
.
get
(
i
);
maObjectDisplays
.
get
(
i
);
if
(
aDisplay
!=
null
)
aDisplay
.
updateAccessibleObject
(
mxFocusedObject
);
}
...
...
@@ -437,7 +437,7 @@ public class EventHandler
ways such as showing a graphical representation or some textual
descriptions.
*/
private
Vector
maObjectDisplays
;
private
Vector
<
IAccessibleObjectDisplay
>
maObjectDisplays
;
/** The timer task that attempts in regular intervals to connect to a
running Office application.
...
...
odk/examples/DevelopersGuide/Accessibility/EventListenerProxy.java
Dosyayı görüntüle @
0f1dba83
...
...
@@ -66,7 +66,7 @@ class EventListenerProxy
mbAsynchron
=
true
;
if
(
mbAsynchron
)
{
maEventQueue
=
new
LinkedList
();
maEventQueue
=
new
LinkedList
<
Runnable
>
();
new
Thread
(
this
,
"EventListenerProxy"
).
start
();
}
}
...
...
@@ -105,7 +105,7 @@ class EventListenerProxy
synchronized
(
maEventQueue
)
{
if
(
maEventQueue
.
size
()
>
0
)
aEvent
=
(
Runnable
)
maEventQueue
.
removeFirst
();
aEvent
=
maEventQueue
.
removeFirst
();
else
aEvent
=
null
;
}
...
...
@@ -174,7 +174,7 @@ class EventListenerProxy
public
void
run
()
{
maListener
.
windowOpened
(
(
XAccessible
)
UnoRuntime
.
queryInterface
(
UnoRuntime
.
queryInterface
(
XAccessible
.
class
,
aEvent
.
Source
));
}
...
...
@@ -192,7 +192,7 @@ class EventListenerProxy
public
void
run
()
{
maListener
.
windowClosed
(
(
XAccessible
)
UnoRuntime
.
queryInterface
(
UnoRuntime
.
queryInterface
(
XAccessible
.
class
,
aEvent
.
Source
));
}
...
...
@@ -219,7 +219,7 @@ class EventListenerProxy
The queue object will also serve as lock for the consumer/producer type
syncronization.
*/
private
LinkedList
maEventQueue
;
private
LinkedList
<
Runnable
>
maEventQueue
;
/** This is the actual listener that the events will eventually forwarded to.
*/
...
...
odk/examples/DevelopersGuide/Accessibility/TextualDisplay.java
Dosyayı görüntüle @
0f1dba83
...
...
@@ -154,8 +154,8 @@ class TextualDisplay
// Try to cast the given accessible context to the
// XAccessibleComponent interface.
XAccessibleComponent
xComponent
=
(
XAccessibleComponent
)
UnoRuntime
.
queryInterface
(
XAccessibleComponent
.
class
,
xContext
);
UnoRuntime
.
queryInterface
(
XAccessibleComponent
.
class
,
xContext
);
if
(
xComponent
!=
null
)
{
Point
aLocation
=
xComponent
.
getLocationOnScreen
();
...
...
@@ -179,7 +179,7 @@ class TextualDisplay
private
String
showParents
(
XAccessibleContext
xContext
)
{
// Create the path from the given object to its tree's root.
Vector
aPathToRoot
=
new
Vector
();
Vector
<
XAccessibleContext
>
aPathToRoot
=
new
Vector
<
XAccessibleContext
>
();
while
(
xContext
!=
null
)
{
aPathToRoot
.
add
(
xContext
);
...
...
@@ -203,7 +203,7 @@ class TextualDisplay
String
sIndentation
=
new
String
();
for
(
int
i
=
aPathToRoot
.
size
()-
1
;
i
>=
0
;
i
--)
{
XAccessibleContext
xParentContext
=
(
XAccessibleContext
)
aPathToRoot
.
get
(
i
);
XAccessibleContext
xParentContext
=
aPathToRoot
.
get
(
i
);
String
sParentName
=
xParentContext
.
getAccessibleName
();
if
(
sParentName
.
length
()
==
0
)
sParentName
=
"<unnamed> / Role "
...
...
odk/examples/DevelopersGuide/Forms/ButtonOperator.java
Dosyayı görüntüle @
0f1dba83
...
...
@@ -55,7 +55,7 @@ public class ButtonOperator implements XActionListener, XFeatureInvalidation
private
XPropertySet
m_form
;
private
XFormOperations
m_formOperations
;
private
Vector
m_aButtons
;
private
Vector
<
XPropertySet
>
m_aButtons
;
/* ------------------------------------------------------------------ */
/** ctor
...
...
@@ -65,7 +65,7 @@ public class ButtonOperator implements XActionListener, XFeatureInvalidation
m_componentContext
=
xCtx
;
m_aDocument
=
aDocument
;
m_form
=
_form
;
m_aButtons
=
new
Vector
();
m_aButtons
=
new
Vector
<
XPropertySet
>
();
}
/* ------------------------------------------------------------------ */
...
...
@@ -89,7 +89,7 @@ public class ButtonOperator implements XActionListener, XFeatureInvalidation
{
for
(
int
i
=
0
;
i
<
m_aButtons
.
size
();
++
i
)
{
XPropertySet
button
=
(
XPropertySet
)
m_aButtons
.
elementAt
(
i
);
XPropertySet
button
=
m_aButtons
.
elementAt
(
i
);
if
(
_formFeature
==
getAssociatedFormFeature
(
button
)
)
return
button
;
}
...
...
@@ -119,7 +119,7 @@ public class ButtonOperator implements XActionListener, XFeatureInvalidation
DocumentViewHelper
aCurrentView
=
m_aDocument
.
getCurrentView
();
// add a listener so we get noticed if the user presses the button
XButton
xButtonControl
=
(
XButton
)
UnoRuntime
.
queryInterface
(
XButton
.
class
,
XButton
xButtonControl
=
UnoRuntime
.
queryInterface
(
XButton
.
class
,
aCurrentView
.
getFormControl
(
_buttonModel
)
);
xButtonControl
.
addActionListener
(
this
);
...
...
@@ -215,7 +215,7 @@ public class ButtonOperator implements XActionListener, XFeatureInvalidation
{
for
(
int
i
=
0
;
i
<
m_aButtons
.
size
();
++
i
)
{
XPropertySet
buttonModel
=
(
XPropertySet
)
m_aButtons
.
elementAt
(
i
);
XPropertySet
buttonModel
=
m_aButtons
.
elementAt
(
i
);
updateButtonState
(
buttonModel
,
getAssociatedFormFeature
(
buttonModel
)
);
}
}
...
...
odk/examples/DevelopersGuide/Forms/TableCellTextBinding.java
Dosyayı görüntüle @
0f1dba83
...
...
@@ -45,15 +45,15 @@ public class TableCellTextBinding
private
String
m_newCellText
;
private
String
m_lastKnownCellText
;
private
boolean
m_haveNewCellText
;
private
java
.
util
.
List
m_listeners
;
private
java
.
util
.
List
<
XModifyListener
>
m_listeners
;
/** Creates a new instance of TableCellTextBinding */
public
TableCellTextBinding
(
XCell
cell
)
{
m_cellText
=
(
XTextRange
)
UnoRuntime
.
queryInterface
(
XTextRange
.
class
,
cell
);
m_cellText
=
UnoRuntime
.
queryInterface
(
XTextRange
.
class
,
cell
);
m_newCellText
=
new
String
();
m_listeners
=
new
java
.
util
.
LinkedList
();
m_listeners
=
new
java
.
util
.
LinkedList
<
XModifyListener
>
();
start
();
}
...
...
@@ -161,10 +161,10 @@ public class TableCellTextBinding
{
com
.
sun
.
star
.
lang
.
EventObject
eventSource
=
new
com
.
sun
.
star
.
lang
.
EventObject
(
this
);
java
.
util
.
Iterator
loop
=
m_listeners
.
iterator
();
java
.
util
.
Iterator
<
XModifyListener
>
loop
=
m_listeners
.
iterator
();
while
(
loop
.
hasNext
()
)
{
((
XModifyListener
)
loop
.
next
()
).
modified
(
eventSource
);
loop
.
next
(
).
modified
(
eventSource
);
}
}
}
...
...
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