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
6a500920
Kaydet (Commit)
6a500920
authored
Şub 23, 2011
tarafından
Juergen Schmidt
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
jsc340: fix problem with showing Java awt UI from the AppKit thread
üst
4ef76a17
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
1 deletion
+16
-1
AsyncJob.java
...DevelopersGuide/Components/Addons/JobsAddon/AsyncJob.java
+16
-1
No files found.
odk/examples/DevelopersGuide/Components/Addons/JobsAddon/AsyncJob.java
Dosyayı görüntüle @
6a500920
...
@@ -312,7 +312,22 @@ public class AsyncJob extends WeakBase implements XServiceInfo, XAsyncJob
...
@@ -312,7 +312,22 @@ public class AsyncJob extends WeakBase implements XServiceInfo, XAsyncJob
// Because we need a parent anytime.
// Because we need a parent anytime.
// And showing e.g. a java dialog can make some trouble
// And showing e.g. a java dialog can make some trouble
// inside office ... but we have no chance here.
// inside office ... but we have no chance here.
javax
.
swing
.
JOptionPane
.
showMessageDialog
(
null
,
sMessage
,
sTitle
,
javax
.
swing
.
JOptionPane
.
INFORMATION_MESSAGE
);
final
java
.
lang
.
String
sFinalTitle
=
sTitle
;
final
java
.
lang
.
String
sFinalMessage
=
sMessage
;
// On Mac OS X, AWT/Swing must not be accessed from the AppKit thread, so call
// SwingUtilities.invokeLater always on a fresh thread to avoid that problem
// (also, the current thread must not wait for that fresh thread to terminate,
// as that would cause a deadlock if this thread is the AppKit thread):
final
Runnable
doRun
=
new
Runnable
()
{
public
void
run
()
{
javax
.
swing
.
JOptionPane
.
showMessageDialog
(
null
,
sFinalMessage
,
sFinalTitle
,
javax
.
swing
.
JOptionPane
.
INFORMATION_MESSAGE
);
}
};
new
Thread
(
doRun
)
{
public
void
run
()
{
javax
.
swing
.
SwingUtilities
.
invokeLater
(
doRun
);
}
}.
start
();
}
}
//___________________________________________
//___________________________________________
...
...
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