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
0cdac85e
Kaydet (Commit)
0cdac85e
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.1.2); FILE ADDED
2003/04/08 14:28:54 obr 1.1.2.1: re-added accessibility workbench
üst
da2778ba
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
78 additions
and
0 deletions
+78
-0
Options.java
toolkit/test/accessibility/Options.java
+78
-0
No files found.
toolkit/test/accessibility/Options.java
0 → 100644
Dosyayı görüntüle @
0cdac85e
import
java.io.File
;
import
java.io.FileReader
;
import
java.io.FileInputStream
;
import
java.io.FileOutputStream
;
import
java.util.Properties
;
/** Load from and save options into a file.
*/
class
Options
extends
Properties
{
static
public
Options
Instance
()
{
if
(
saOptions
==
null
)
saOptions
=
new
Options
();
return
saOptions
;
}
static
public
void
SetString
(
String
sName
,
String
sValue
)
{
Instance
().
setProperty
(
sName
,
sValue
);
}
static
public
String
GetString
(
String
sName
)
{
return
Instance
().
getProperty
(
sName
);
}
static
public
void
SetBoolean
(
String
sName
,
boolean
bValue
)
{
Instance
().
setProperty
(
sName
,
Boolean
.
toString
(
bValue
));
System
.
out
.
println
(
"setting boolean "
+
sName
+
" : "
+
Instance
().
getProperty
(
sName
));
}
static
public
boolean
GetBoolean
(
String
sName
)
{
System
.
out
.
println
(
"getting boolean "
+
sName
+
" : "
+
Instance
().
getProperty
(
sName
)
+
"->"
+
Boolean
.
getBoolean
(
Instance
().
getProperty
(
sName
)));
return
Boolean
.
getBoolean
(
Instance
().
getProperty
(
sName
));
}
public
void
Load
(
String
sBaseName
)
{
try
{
load
(
new
FileInputStream
(
ProvideFile
(
sBaseName
)));
}
catch
(
java
.
io
.
IOException
e
)
{
// Ignore a non-existing options file.
}
}
public
void
Save
(
String
sBaseName
)
{
try
{
store
(
new
FileOutputStream
(
ProvideFile
(
sBaseName
)),
null
);
}
catch
(
java
.
io
.
IOException
e
)
{
}
}
private
Options
()
{
}
private
File
ProvideFile
(
String
sBaseName
)
{
return
new
File
(
System
.
getProperty
(
"user.home"
),
sBaseName
);
}
static
private
Options
saOptions
=
null
;
}
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