Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
P
proview
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Esteban Blanc
proview
Commits
bfaf1052
Commit
bfaf1052
authored
Jun 02, 2010
by
Claes Sjofors
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Language selection added to webhandler
parent
8838a2a4
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
47 additions
and
13 deletions
+47
-13
java/jpwr/jop/src/JopOpWindow.java
java/jpwr/jop/src/JopOpWindow.java
+31
-13
src/wbl/pwrb/src/pwrb_c_webhandler.wb_load
src/wbl/pwrb/src/pwrb_c_webhandler.wb_load
+16
-0
No files found.
java/jpwr/jop/src/JopOpWindow.java
View file @
bfaf1052
...
...
@@ -45,18 +45,27 @@ public class JopOpWindow extends JPanel {
this
.
root
=
root
;
en
=
session
.
getEngine
();
// Set language
JopLang
lng
=
new
JopLang
(
session
);
lng
.
set
(
JopLang
.
LANGUAGE_sv_SE
);
JopLang
.
setDefault
(
lng
);
// Get WebHandler object
CdhrObjid
oretWebH
=
en
.
gdh
.
getClassList
(
Pwrb
.
cClass_WebHandler
);
if
(
oretWebH
.
evenSts
())
return
;
CdhrString
sret
=
en
.
gdh
.
objidToName
(
oretWebH
.
objid
,
Cdh
.
mName_volumeStrict
);
if
(
sret
.
evenSts
())
return
;
String
s
=
sret
.
str
+
".Title"
;
// Set language
JopLang
lng
=
new
JopLang
(
session
);
String
s
=
sret
.
str
+
".Language"
;
CdhrInt
iret
=
en
.
gdh
.
getObjectInfoInt
(
s
);
if
(
iret
.
oddSts
())
lng
.
set
(
iret
.
value
);
JopLang
.
setDefault
(
lng
);
if
(
root
instanceof
JFrame
)
((
JFrame
)
root
).
setTitle
(
JopLang
.
transl
(
"Operator Window"
));
s
=
sret
.
str
+
".Title"
;
CdhrString
srettxt
=
en
.
gdh
.
getObjectInfoString
(
s
);
if
(
srettxt
.
evenSts
())
return
;
...
...
@@ -81,12 +90,19 @@ public class JopOpWindow extends JPanel {
this
.
add
(
label
);
OpWindButton
button
;
langButton
=
new
OpWindButton
(
session
,
""
,
JopLang
.
transl
(
"Language"
),
OpWindButton
.
LANGUAGE
);
this
.
add
(
langButton
);
s
=
sret
.
str
+
".EnableLanguage"
;
iret
=
en
.
gdh
.
getObjectInfoInt
(
s
);
if
(
iret
.
evenSts
())
return
;
if
(
iret
.
value
!=
0
)
{
langButton
=
new
OpWindButton
(
session
,
""
,
JopLang
.
transl
(
"Language"
),
OpWindButton
.
LANGUAGE
);
this
.
add
(
langButton
);
}
s
=
sret
.
str
+
".EnableLogin"
;
CdhrInt
iret
=
en
.
gdh
.
getObjectInfoInt
(
s
);
iret
=
en
.
gdh
.
getObjectInfoInt
(
s
);
if
(
iret
.
evenSts
())
return
;
if
(
iret
.
value
!=
0
)
{
...
...
@@ -104,7 +120,7 @@ public class JopOpWindow extends JPanel {
iret
=
en
.
gdh
.
getObjectInfoInt
(
s
);
if
(
iret
.
evenSts
())
return
;
if
(
iret
.
value
!=
0
)
{
if
(
iret
.
value
!=
0
&&
!(
root
instanceof
JFrame
)
)
{
alarmButton
=
new
OpWindButton
(
session
,
""
,
JopLang
.
transl
(
"Alarm and Event List"
),
OpWindButton
.
ALARMLIST
);
this
.
add
(
alarmButton
);
...
...
@@ -114,7 +130,7 @@ public class JopOpWindow extends JPanel {
iret
=
en
.
gdh
.
getObjectInfoInt
(
s
);
if
(
iret
.
evenSts
())
return
;
if
(
iret
.
value
!=
0
)
{
if
(
iret
.
value
!=
0
&&
!(
root
instanceof
JFrame
)
)
{
eventLogButton
=
new
OpWindButton
(
session
,
""
,
JopLang
.
transl
(
"Event Log"
),
OpWindButton
.
EVENTLOG
);
this
.
add
(
eventLogButton
);
...
...
@@ -294,7 +310,9 @@ public class JopOpWindow extends JPanel {
}
public
void
setLanguage
(
int
language
)
{
System
.
out
.
println
(
"Opwindow: Set language"
);
if
(
root
instanceof
JFrame
)
((
JFrame
)
root
).
setTitle
(
JopLang
.
transl
(
"Operator Window"
));
if
(
langButton
!=
null
)
langButton
.
setText
(
JopLang
.
transl
(
"Language"
));
...
...
src/wbl/pwrb/src/pwrb_c_webhandler.wb_load
View file @
bfaf1052
...
...
@@ -103,6 +103,14 @@ SObject pwrb:Class
EndBody
EndObject
!/**
! A language selection entry will be placed in the menu frame.
!*/
Object EnableLanguage $Attribute 14
Body SysBody
Attr TypeRef = "pwrs:Type-$Boolean"
EndBody
EndObject
!/**
! @Summary A login entry will be placed in the menu frame.
! A login entry will be placed in the menu frame, that makes it possible
! to login as a proview user, and gain privileges to make changes to
...
...
@@ -148,6 +156,14 @@ SObject pwrb:Class
EndBody
EndObject
!/**
! Specifies default language.
!*/
Object Language $Attribute 15
Body SysBody
Attr TypeRef = "pwrb:Type-LanguageEnum"
EndBody
EndObject
!/**
! @Summary css-file that will be used by generated html-files.
! css-file (Cascading Style Sheets) that will be used by
! generated html-files.
...
...
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