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
867fdfb6
Commit
867fdfb6
authored
May 09, 2019
by
Christoffer Ackelman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Web: Minor cleanup.
parent
121334c9
Changes
18
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
18 changed files
with
837 additions
and
937 deletions
+837
-937
java/jsw/co/src/cli.ts
java/jsw/co/src/cli.ts
+12
-14
java/jsw/co/src/gdh.ts
java/jsw/co/src/gdh.ts
+27
-48
java/jsw/co/src/plow.ts
java/jsw/co/src/plow.ts
+66
-99
java/jsw/co/src/pwr.ts
java/jsw/co/src/pwr.ts
+8
-2
java/jsw/ev/src/ev.html
java/jsw/ev/src/ev.html
+53
-29
java/jsw/ev/src/ev.ts
java/jsw/ev/src/ev.ts
+116
-119
java/jsw/flow/src/flow.html
java/jsw/flow/src/flow.html
+26
-18
java/jsw/flow/src/flow.ts
java/jsw/flow/src/flow.ts
+189
-292
java/jsw/ge/src/ge.html
java/jsw/ge/src/ge.html
+62
-62
java/jsw/ge/src/ge_appl.ts
java/jsw/ge/src/ge_appl.ts
+1
-0
java/jsw/ge/src/ge_dyn.ts
java/jsw/ge/src/ge_dyn.ts
+19
-18
java/jsw/ge/src/ge_graph.ts
java/jsw/ge/src/ge_graph.ts
+9
-3
java/jsw/opwind/src/crypt.ts
java/jsw/opwind/src/crypt.ts
+5
-5
java/jsw/opwind/src/opwind.html
java/jsw/opwind/src/opwind.html
+21
-20
java/jsw/opwind/src/opwind.ts
java/jsw/opwind/src/opwind.ts
+57
-61
java/jsw/opwind/src/opwind_menu.html
java/jsw/opwind/src/opwind_menu.html
+26
-27
java/jsw/xtt/src/xtt.html
java/jsw/xtt/src/xtt.html
+41
-25
java/jsw/xtt/src/xtt.ts
java/jsw/xtt/src/xtt.ts
+99
-95
No files found.
java/jsw/co/src/cli.ts
View file @
867fdfb6
...
...
@@ -3,6 +3,7 @@
class
CliTable
{
command
:
string
;
qualifier
:
Array
<
string
>
;
constructor
(
command
,
qualifier
)
{
this
.
command
=
command
;
this
.
qualifier
=
qualifier
;
...
...
@@ -32,19 +33,16 @@ enum State {
}
class
Cli
{
verb
:
Array
;
qualifier
:
Array
;
qualValue
:
Array
;
verb
:
Array
=
new
Array
(
CliC
.
VERB_VECT_SIZE
)
;
qualifier
:
Array
=
new
Array
(
30
)
;
qualValue
:
Array
=
new
Array
(
30
)
;
status
:
number
;
cliTableIndex
:
number
;
cliQualifierIndex
:
Array
;
cliQualifierIndex
:
Array
=
new
Array
(
30
)
;
configuredVerbs
:
number
;
cliTable
:
Array
<
CliTable
>
;
constructor
(
cliTable
)
{
this
.
verb
=
new
Array
(
CliC
.
VERB_VECT_SIZE
);
this
.
qualifier
=
new
Array
(
30
);
this
.
qualValue
=
new
Array
(
30
);
this
.
cliQualifierIndex
=
new
Array
(
30
);
this
.
cliTable
=
cliTable
;
}
...
...
@@ -161,7 +159,7 @@ class Cli {
state
=
State
.
SPACE
;
}
else
if
(
c
===
'
/
'
)
{
this
.
qualValue
[
this
.
qualifier
.
length
-
1
]
=
cmd
.
substring
(
start_pos
,
i
);
cmd
.
substring
(
start_pos
,
i
);
state
=
State
.
QUAL
;
start_pos
=
i
;
}
...
...
@@ -169,7 +167,7 @@ class Cli {
case
State
.
QUALVALUE_EXACT
:
if
(
c
===
'
"
'
)
{
this
.
qualValue
[
this
.
qualifier
.
length
-
1
]
=
cmd
.
substring
(
start_pos
,
i
);
cmd
.
substring
(
start_pos
,
i
);
state
=
State
.
SPACE
;
}
break
;
...
...
@@ -248,7 +246,7 @@ class Cli {
continue
;
}
if
(
this
.
verb
[
0
]
===
(
this
.
cliTable
[
i
].
command
.
substring
(
0
,
this
.
verb
[
0
].
length
)))
{
(
this
.
cliTable
[
i
].
command
.
substring
(
0
,
this
.
verb
[
0
].
length
)))
{
this
.
verb
[
0
]
=
this
.
cliTable
[
i
].
command
;
found
=
true
;
break
;
...
...
@@ -291,12 +289,12 @@ class Cli {
break
;
}
if
(
this
.
qualifier
[
j
].
length
>
this
.
cliTable
[
this
.
cliTableIndex
].
qualifier
[
i
].
length
)
{
this
.
cliTable
[
this
.
cliTableIndex
].
qualifier
[
i
].
length
)
{
continue
;
}
if
(
this
.
qualifier
[
j
]
===
(
this
.
cliTable
[
this
.
cliTableIndex
].
qualifier
[
i
].
substring
(
0
,
this
.
qualifier
[
j
].
length
)))
{
(
this
.
cliTable
[
this
.
cliTableIndex
].
qualifier
[
i
].
substring
(
0
,
this
.
qualifier
[
j
].
length
)))
{
this
.
cliQualifierIndex
[
j
]
=
i
;
found
=
true
;
this
.
qualifier
[
j
]
=
this
.
cliTable
[
this
.
cliTableIndex
].
qualifier
[
i
];
...
...
java/jsw/co/src/gdh.ts
View file @
867fdfb6
...
...
@@ -130,15 +130,13 @@ class GlowBarChartInfo {
class
GlowTableInfo
{
columns
;
rows
;
column_size
:
Array
;
constructor
()
{
this
.
column_size
=
new
Array
(
30
);
}
column_size
:
Array
=
new
Array
(
30
);
}
class
PendingData
{
func_cb
:
(
id
:
number
,
val
:
number
,
sts
:
number
=
0
,
res
:
number
=
0
)
=>
void
;
data
:
object
;
constructor
(
func_cb
,
data
)
{
this
.
func_cb
=
func_cb
;
this
.
data
=
data
;
...
...
@@ -227,6 +225,7 @@ enum Msg {
class
Uint8ArrayHelper
{
buf
:
Uint8Array
;
idx
:
number
;
constructor
(
size
,
tag
)
{
this
.
buf
=
new
Uint8Array
(
size
);
this
.
buf
[
0
]
=
tag
;
...
...
@@ -255,10 +254,10 @@ class Uint8ArrayHelper {
class
DataViewHelper
{
dv
:
DataView
;
offset
:
number
;
offset
=
0
;
constructor
(
data
:
ArrayBuffer
)
{
this
.
dv
=
new
DataView
(
data
);
this
.
offset
=
0
;
}
getUint8
()
{
...
...
@@ -266,11 +265,6 @@ class DataViewHelper {
return
this
.
dv
.
getUint8
(
this
.
offset
-
1
);
}
getInt16
()
{
this
.
offset
+=
2
;
return
this
.
dv
.
getInt16
(
this
.
offset
-
2
);
}
getUint16
()
{
this
.
offset
+=
2
;
return
this
.
dv
.
getUint8
(
this
.
offset
-
2
);
...
...
@@ -302,32 +296,17 @@ class DataViewHelper {
}
class
Gdh
{
debug
:
boolean
;
pending
:
Array
;
sub
:
Array
<
Sub
>
;
PORT
:
number
;
ws
:
WebSocket
;
open_cb
:
()
=>
void
;
close_cb
:
()
=>
void
;
return_cb
:
()
=>
void
;
next_id
:
number
;
subscriptionCount
:
number
;
listSent
:
boolean
;
constructor
()
{
this
.
debug
=
false
;
this
.
pending
=
[];
this
.
sub
=
[];
this
.
PORT
=
4448
;
this
.
ws
=
null
;
this
.
open_cb
=
null
;
this
.
close_cb
=
null
;
this
.
return_cb
=
null
;
this
.
next_id
=
1234
;
this
.
subscriptionCount
=
1
;
this
.
listSent
=
false
;
}
init
()
{
debug
=
false
;
pending
:
Array
=
[];
sub
:
Array
<
Sub
>
=
[];
static
PORT
=
4448
;
ws
:
WebSocket
=
null
;
return_cb
:
()
=>
void
=
null
;
next_id
=
1234
;
subscriptionCount
=
1
;
listSent
=
false
;
constructor
(
open_cb
,
close_cb
=
null
)
{
if
(
window
.
location
.
hostname
===
""
)
{
this
.
ws
=
new
WebSocket
(
"
ws:127.0.0.1:4448
"
);
}
else
{
...
...
@@ -336,8 +315,8 @@ class Gdh {
this
.
ws
.
binaryType
=
"
arraybuffer
"
;
this
.
ws
.
onopen
=
function
(
e
)
{
if
(
this
.
gdh
.
open_cb
!==
null
)
{
this
.
gdh
.
open_cb
();
if
(
open_cb
!==
null
)
{
open_cb
();
}
};
...
...
@@ -345,8 +324,8 @@ class Gdh {
if
(
this
.
debug
)
{
console
.
log
(
"
Socket closed
"
);
}
if
(
this
.
gdh
.
close_cb
!==
null
)
{
this
.
gdh
.
close_cb
();
if
(
close_cb
!==
null
)
{
close_cb
();
}
};
...
...
@@ -465,7 +444,7 @@ class Gdh {
let
elements
=
esize
;
if
(
elements
!==
sub
.
elements
)
{
console
.
log
(
"
Subscription size error
"
,
elements
,
sub
.
elements
,
eid
);
sub
.
elements
,
eid
);
}
value
=
new
Array
(
elements
);
for
(
let
k
=
0
;
k
<
elements
;
k
++
)
{
...
...
@@ -480,7 +459,7 @@ class Gdh {
let
elements
=
esize
/
4
;
if
(
elements
!==
sub
.
elements
)
{
console
.
log
(
"
Subscription size error
"
,
elements
,
sub
.
elements
,
eid
);
sub
.
elements
,
eid
);
}
value
=
new
Array
(
elements
);
for
(
let
k
=
0
;
k
<
elements
;
k
++
)
{
...
...
@@ -505,7 +484,7 @@ class Gdh {
let
elements
=
esize
/
4
;
if
(
elements
!==
sub
.
elements
)
{
console
.
log
(
"
Subscription size error
"
,
elements
,
sub
.
elements
,
eid
);
sub
.
elements
,
eid
);
}
value
=
new
Array
(
elements
);
for
(
let
k
=
0
;
k
<
elements
;
k
++
)
{
...
...
@@ -524,7 +503,7 @@ class Gdh {
let
elements
=
sub
.
elements
;
if
(
elements
!==
sub
.
elements
)
{
console
.
log
(
"
Subscription size error
"
,
elements
,
sub
.
elements
,
eid
);
sub
.
elements
,
eid
);
}
value
=
new
Array
(
elements
);
for
(
let
l
=
0
;
l
<
elements
;
l
++
)
{
...
...
@@ -827,7 +806,7 @@ class Gdh {
helper
.
packString
(
sub
.
name
);
this
.
pending
[
this
.
next_id
]
=
new
PendingData
(
this
.
refObjectInfoReply
,
null
);
new
PendingData
(
this
.
refObjectInfoReply
,
null
);
if
(
this
.
debug
)
{
console
.
log
(
"
Sending RefObjectInfo
"
,
this
.
next_id
,
size
);
}
...
...
@@ -858,7 +837,7 @@ class Gdh {
helper
.
pack32Bit
(
refid
);
this
.
pending
[
this
.
next_id
]
=
new
PendingData
(
this
.
unrefObjectInfoReply
,
null
);
new
PendingData
(
this
.
unrefObjectInfoReply
,
null
);
if
(
this
.
debug
)
{
console
.
log
(
"
Sending UnrefObjectInfo
"
,
this
.
next_id
,
size
,
refid
);
}
...
...
@@ -1037,7 +1016,7 @@ class Gdh {
this
.
pending
[
this
.
next_id
]
=
new
PendingData
(
return_cb
,
data
);
if
(
this
.
debug
)
{
console
.
log
(
"
Sending getAllClassAttributes
"
,
this
.
next_id
,
cid
,
oid
.
vid
,
oid
.
oix
);
oid
.
oix
);
}
this
.
ws
.
send
(
helper
.
buf
);
this
.
next_id
++
;
...
...
java/jsw/co/src/plow.ts
View file @
867fdfb6
...
...
@@ -122,15 +122,13 @@ enum Event {
class
PlowNodeClass
{
a
:
PlowArray
;
ctx
:
PlowCtx
;
nc_name
:
string
;
group
:
number
;
node_open
:
number
;
nc_name
=
""
;
group
=
0
;
node_open
=
0
;
constructor
(
ctx
)
{
this
.
a
=
new
PlowArray
(
ctx
);
this
.
ctx
=
ctx
;
this
.
nc_name
=
""
;
this
.
group
=
0
;
this
.
node_open
=
0
;
}
draw
(
g
,
p
,
node
,
highlight
)
{
...
...
@@ -143,10 +141,10 @@ class PlowNodeClass {
}
class
PlowArray
{
a
:
Array
<
PlowNode
>
;
a
:
Array
=
[]
;
ctx
:
PlowCtx
;
constructor
(
ctx
)
{
this
.
a
=
[];
this
.
ctx
=
ctx
;
}
...
...
@@ -391,56 +389,35 @@ class PlowArray {
class
PlowNode
{
ctx
:
PlowCtx
;
userdata
:
object
;
x_right
:
number
;
x_left
:
number
;
y_high
:
number
;
y_low
:
number
;
userdata
:
object
=
null
;
x_right
=
0.0
;
x_left
=
0.0
;
y_high
=
0.0
;
y_low
=
0.0
;
nc
:
PlowNodeClass
;
pos
:
Point
;
n_name
:
string
;
annotv
:
Array
;
annotsize
:
Array
;
pixmapv
:
Array
;
trace_object
:
string
;
trace_attribute
:
string
;
trace_attr_type
:
number
;
highlight
:
boolean
;
select
:
boolean
;
invert
:
boolean
;
pos
=
new
Point
()
;
n_name
=
""
;
annotv
=
[]
;
annotsize
=
[]
;
pixmapv
=
[]
;
trace_object
=
""
;
trace_attribute
=
""
;
trace_attr_type
=
0
;
highlight
=
false
;
select
=
false
;
invert
=
false
;
level
:
number
;
node_open
:
number
;
fill_color
:
number
;
p
:
number
;
old_value
:
number
;
first_scan
:
boolean
;
relative_position
:
number
;
node_open
=
0
;
fill_color
=
0
;
p
=
0
;
old_value
=
0
;
first_scan
=
true
;
relative_position
=
0
;
constructor
(
ctx
,
nc
,
level
)
{
this
.
ctx
=
ctx
;
this
.
userdata
=
null
;
this
.
x_right
=
0.0
;
this
.
x_left
=
0.0
;
this
.
y_high
=
0.0
;
this
.
y_low
=
0.0
;
this
.
nc
=
nc
;
this
.
pos
=
new
Point
();
this
.
n_name
=
""
;
this
.
annotv
=
[];
this
.
annotsize
=
[];
this
.
pixmapv
=
[];
this
.
trace_object
=
""
;
this
.
trace_attribute
=
""
;
this
.
trace_attr_type
=
0
;
this
.
highlight
=
false
;
this
.
select
=
false
;
this
.
invert
=
false
;
this
.
level
=
level
;
this
.
node_open
=
0
;
this
.
fill_color
=
0
;
this
.
p
=
0
;
this
.
old_value
=
0
;
this
.
first_scan
=
true
;
this
.
relative_position
=
0
;
}
set_annotation
(
number
,
text
)
{
...
...
@@ -518,9 +495,9 @@ class PlowNode {
event_handler
(
event
,
x
,
y
)
{
if
((
x
-
this
.
ctx
.
offset_x
)
/
this
.
ctx
.
zoom_factor
>=
this
.
x_left
&&
(
x
-
this
.
ctx
.
offset_x
)
/
this
.
ctx
.
zoom_factor
<=
this
.
x_right
&&
(
y
-
this
.
ctx
.
offset_y
)
/
this
.
ctx
.
zoom_factor
>=
this
.
y_low
&&
(
y
-
this
.
ctx
.
offset_y
)
/
this
.
ctx
.
zoom_factor
<=
this
.
y_high
)
{
(
x
-
this
.
ctx
.
offset_x
)
/
this
.
ctx
.
zoom_factor
<=
this
.
x_right
&&
(
y
-
this
.
ctx
.
offset_y
)
/
this
.
ctx
.
zoom_factor
>=
this
.
y_low
&&
(
y
-
this
.
ctx
.
offset_y
)
/
this
.
ctx
.
zoom_factor
<=
this
.
y_high
)
{
this
.
ctx
.
event_object
=
this
;
return
1
;
}
...
...
@@ -557,7 +534,7 @@ class PlowNode {
in_icon
(
x
,
y
)
{
return
x
>=
this
.
x_left
*
this
.
ctx
.
zoom_factor
&&
x
<=
(
this
.
x_left
+
1.75
)
*
this
.
ctx
.
zoom_factor
;
(
this
.
x_left
+
1.75
)
*
this
.
ctx
.
zoom_factor
;
}
measure
()
{
...
...
@@ -570,13 +547,14 @@ class PlowNode {
}
class
PlowAnnot
{
RELATIVE_OFFSET
=
1
;
static
RELATIVE_OFFSET
=
1
;
ctx
:
PlowCtx
;
p
:
Point
;
draw_type
:
number
;
text_size
:
number
;
annot_type
:
number
;
number
:
number
;
constructor
(
ctx
,
x
,
y
,
text_size
,
text_color
,
annot_type
,
number
)
{
this
.
p
=
new
Point
(
x
,
y
);
this
.
draw_type
=
text_color
;
...
...
@@ -596,7 +574,7 @@ class PlowAnnot {
let
tsize
=
0
;
let
idx
=
this
.
ctx
.
zoom_factor
/
this
.
ctx
.
base_zoom_factor
*
(
this
.
text_size
+
4
)
-
4
;
(
this
.
text_size
+
4
)
-
4
;
if
(
idx
<
0
)
{
return
;
}
...
...
@@ -646,8 +624,8 @@ class PlowAnnot {
let
y
=
(
this
.
p
.
y
+
p0
.
y
)
*
this
.
ctx
.
zoom_factor
-
tsize
/
4
;
if
((
this
.
annot_type
&
RELATIVE_POSITION
)
!==
0
)
{
let
rel_x
=
(
p0
.
x
+
node
.
relative_position
+
this
.
RELATIVE_OFFSET
)
*
this
.
ctx
.
zoom_factor
;
let
rel_x
=
(
p0
.
x
+
node
.
relative_position
+
PlowAnnot
.
RELATIVE_OFFSET
)
*
this
.
ctx
.
zoom_factor
;
if
(
x
<
rel_x
)
{
x
=
rel_x
;
}
...
...
@@ -659,10 +637,10 @@ class PlowAnnot {
y
+=
tsize
*
1.4
;
}
if
((
this
.
annot_type
&
NEXT_RELATIVE_POSITION
)
!==
0
||
(
this
.
annot_type
&
RELATIVE_POSITION
)
!==
0
)
{
(
this
.
annot_type
&
RELATIVE_POSITION
)
!==
0
)
{
node
.
relative_position
=
(
x
+
g
.
measureText
(
node
.
annotv
[
this
.
number
]).
width
)
/
this
.
ctx
.
zoom_factor
-
p0
.
x
;
(
x
+
g
.
measureText
(
node
.
annotv
[
this
.
number
]).
width
)
/
this
.
ctx
.
zoom_factor
-
p0
.
x
;
}
}
...
...
@@ -674,6 +652,7 @@ class PlowAnnotPixmap {
ctx
:
PlowCtx
;
p
:
Point
;
number
:
number
;
constructor
(
ctx
,
x
,
y
,
number
)
{
this
.
p
=
new
Point
(
x
,
y
);
this
.
number
=
number
;
...
...
@@ -704,7 +683,7 @@ class PlowAnnotPixmap {
img
.
onload
=
function
()
{
for
(
let
i
=
0
;
i
<
Bitmaps
.
pending
[
bix
].
length
;
i
++
)
{
gctx
.
drawImage
(
img
,
Bitmaps
.
pending
[
bix
][
i
].
x
,
Bitmaps
.
pending
[
bix
][
i
].
y
);
Bitmaps
.
pending
[
bix
][
i
].
y
);
}
Bitmaps
.
pending
[
bix
]
=
null
;
}
...
...
@@ -729,6 +708,7 @@ class PlowRect {
fill_color
:
number
;
fill
:
number
;
fix_color
:
number
;
constructor
(
ctx
,
x
,
y
,
width
,
height
,
fill_color
,
border_color
,
fill
,
fix_color
)
{
this
.
ll
=
new
Point
(
x
,
y
);
this
.
ur
=
new
Point
(
x
+
width
,
y
+
height
);
...
...
@@ -817,6 +797,7 @@ class GDraw {
canvas
:
HTMLCanvasElement
;
gctx
:
CanvasRenderingContext2D
;
offset_top
:
number
;
constructor
(
ctx
)
{
this
.
ctx
=
ctx
;
this
.
canvas
=
document
.
querySelector
(
"
canvas
"
);
...
...
@@ -826,43 +807,29 @@ class GDraw {
}
class
PlowCtx
{
gdh
:
Gdh
;
debug
:
boolean
;
nodraw
:
number
;
zoom_factor
:
number
;
base_zoom_factor
:
number
;
offset_x
:
number
;
offset_y
:
number
;
x_right
:
number
;
x_left
:
number
;
y_high
:
number
;
y_low
:
number
;
gdh
:
Gdh
=
null
;
debug
=
false
;
nodraw
=
0
;
zoom_factor
=
20.0
;
base_zoom_factor
=
20.0
;
offset_x
=
0
;
offset_y
=
0
;
x_right
=
0.0
;
x_left
=
0.0
;
y_high
=
0.0
;
y_low
=
0.0
;
a
:
PlowArray
;
a_nc
:
PlowArray
;
name
:
string
;
name
=
"
Claes context
"
;
gdraw
:
GDraw
;
select_object
:
PlowNode
;
event_cb
:
(
event
:
object
,
object
:
PlowNode
,
x
:
number
,
y
:
number
)
=>
void
;
event_object
:
PlowNode
;
select_object
:
PlowNode
=
null
;
event_cb
:
(
event
:
object
,
object
:
PlowNode
,
x
:
number
,
y
:
number
)
=>
void
=
null
;
event_object
:
PlowNode
=
null
;
constructor
()
{
this
.
gdh
=
null
;
this
.
debug
=
false
;
this
.
nodraw
=
0
;
this
.
zoom_factor
=
20.0
;
this
.
base_zoom_factor
=
20.0
;
this
.
offset_x
=
0
;
this
.
offset_y
=
0
;
this
.
x_right
=
0.0
;
this
.
x_left
=
0.0
;
this
.
y_high
=
0.0
;
this
.
y_low
=
0.0
;
this
.
a
=
new
PlowArray
(
this
);
this
.
a_nc
=
new
PlowArray
(
this
);
this
.
name
=
"
Claes context
"
;
this
.
gdraw
=
new
GDraw
(
this
);
this
.
select_object
=
null
;
this
.
event_cb
=
null
;
this
.
event_object
=
null
;
}
draw
()
{
...
...
@@ -871,7 +838,7 @@ class PlowCtx {
}
this
.
gdraw
.
gctx
.
fillStyle
=
"
white
"
;
this
.
gdraw
.
gctx
.
fillRect
(
0
,
0
,
this
.
gdraw
.
canvas
.
width
,
this
.
gdraw
.
canvas
.
height
);
this
.
gdraw
.
canvas
.
height
);
this
.
a
.
draw
(
this
.
gdraw
.
gctx
,
null
,
null
,
false
);
}
...
...
@@ -1002,13 +969,13 @@ class PlowCtx {
is_visible
(
o
)
{
return
(
o
.
y_high
*
this
.
zoom_factor
<=
window
.
pageYOffset
+
window
.
innerHeight
-
this
.
gdraw
.
offset_top
)
&&
(
o
.
y_low
*
this
.
zoom_factor
>=
window
.
pageYOffset
-
this
.
gdraw
.
offset_top
);
window
.
innerHeight
-
this
.
gdraw
.
offset_top
)
&&
(
o
.
y_low
*
this
.
zoom_factor
>=
window
.
pageYOffset
-
this
.
gdraw
.
offset_top
);
}
scroll
(
y
,
factor
)
{
window
.
scrollTo
(
window
.
scrollX
,
y
*
this
.
zoom_factor
-
window
.
innerHeight
*
factor
+
this
.
gdraw
.
offset_top
)
factor
+
this
.
gdraw
.
offset_top
)
};
}
\ No newline at end of file
java/jsw/co/src/pwr.ts
View file @
867fdfb6
...
...
@@ -159,6 +159,7 @@ enum XttMntMethodsMask {
class
PwrtObjid
{
vid
:
number
;
oix
:
number
;
constructor
(
vid
,
oix
)
{
this
.
oix
=
oix
;
this
.
vid
=
vid
;
...
...
@@ -176,6 +177,7 @@ class PwrtAttrRef {
class
CdhrNumber
{
value
:
number
;
sts
:
number
;
constructor
(
value
,
sts
)
{
this
.
value
=
value
;
this
.
sts
=
sts
;
...
...
@@ -195,9 +197,11 @@ class UserdataCbReturn {
class
Point
{
x
=
0
;
y
=
0
;
constructor
()
{
}
constructor
(
x
:
number
,
y
:
number
)
{
constructor
(
x
:
number
,
y
:
number
)
{
this
.
x
=
x
;
this
.
y
=
y
;
}
...
...
@@ -208,9 +212,11 @@ class Rect {
y
=
0
;
width
=
0
;
height
=
0
;
constructor
()
{
}
constructor
(
x
:
number
,
y
:
number
,
width
:
number
,
height
:
number
)
{
constructor
(
x
:
number
,
y
:
number
,
width
:
number
,
height
:
number
)
{
this
.
x
=
x
;
this
.
y
=
y
;
this
.
width
=
width
;
...
...
java/jsw/ev/src/ev.html
View file @
867fdfb6
<!DOCTYPE html>
<html>
<head>
<title>
Alarm List
</title>
<link
rel=
"stylesheet"
type=
"text/css"
href=
"toolbar.css"
>
</head>
<head>
<title>
Alarm List
</title>
<link
rel=
"stylesheet"
type=
"text/css"
href=
"toolbar.css"
>
</head>
<body>
<div
class=
"toolbar"
role=
"toolbar"
>
<div
id=
"toolitem1"
tabindex=
"0"
class=
"toolbar-item"
role=
"button"
><img
src=
"toolbar_ack.png"
><img>
....
</div>
<div
id=
"toolitem2"
tabindex=
"-1"
class=
"toolbar-item"
role=
"button"
><img
src=
"toolbar_navigator.png"
><img></div>
<div
id=
"toolitem3"
tabindex=
"-1"
class=
"toolbar-item"
role=
"button"
><img
src=
"toolbar_plc.png"
><img>
....
</div>
<div
id=
"toolitem4"
tabindex=
"-1"
class=
"toolbar-item"
role=
"button"
><img
src=
"toolbar_graph.png"
><img></div>
<div
id=
"toolitem5"
tabindex=
"-1"
class=
"toolbar-item"
role=
"button"
><img
src=
"toolbar_objectgraph.png"
><img></div>
<div
id=
"toolitem6"
tabindex=
"-1"
class=
"toolbar-item"
role=
"button"
><img
src=
"toolbar_navigator.png"
><img></div>
<div
id=
"toolitem7"
tabindex=
"-1"
class=
"toolbar-item"
role=
"button"
><img
src=
"toolbar_plc.png"
><img></div>
<div
id=
"toolitem8"
tabindex=
"-1"
class=
"toolbar-item"
role=
"button"
><img
src=
"toolbar_history.png"
><img></div>
<div
id=
"toolitem9"
tabindex=
"-1"
class=
"toolbar-item"
role=
"button"
><img
src=
"toolbar_object.png"
><img></div>
<div
id=
"toolitem10"
tabindex=
"-1"
class=
"toolbar-item"
role=
"button"
><img
src=
"toolbar_crossref.png"
><img></div>
<div
id=
"toolitem11"
tabindex=
"-1"
class=
"toolbar-item"
role=
"button"
><img
src=
"toolbar_help.png"
><img></div>
<div
id=
"toolitem12"
tabindex=
"-1"
class=
"toolbar-item"
role=
"button"
><img
src=
"toolbar_classhelp.png"
><img></div>
</div>
<canvas
id=
"flowcanvas"
width=
"1200"
height=
"800"
></canvas>
<script
src=
"https://unpkg.com/@babel/standalone/babel.min.js"
></script>
<script
type=
"text/babel"
src=
"pwr.js"
></script>
<script
type=
"text/babel"
src=
"cli.js"
></script>
<script
type=
"text/babel"
src=
"gdh.js"
></script>
<script
type=
"text/babel"
src=
"plow.js"
></script>
<script
type=
"text/babel"
src=
"ev.ts"
></script>
<hr>
<address><a
href=
"mailto:claes@debian86.ssab.com"
></a></address>
</body>
<body>
<div
class=
"toolbar"
role=
"toolbar"
>
<div
id=
"toolitem1"
tabindex=
"0"
class=
"toolbar-item"
role=
"button"
>
<img
src=
"toolbar_ack.png"
/>
....
</div>
<div
id=
"toolitem2"
tabindex=
"-1"
class=
"toolbar-item"
role=
"button"
>
<img
src=
"toolbar_navigator.png"
/>
</div>
<div
id=
"toolitem3"
tabindex=
"-1"
class=
"toolbar-item"
role=
"button"
>
<img
src=
"toolbar_plc.png"
/>
....
</div>
<div
id=
"toolitem4"
tabindex=
"-1"
class=
"toolbar-item"
role=
"button"
>
<img
src=
"toolbar_graph.png"
/>
</div>
<div
id=
"toolitem5"
tabindex=
"-1"
class=
"toolbar-item"
role=
"button"
>
<img
src=
"toolbar_objectgraph.png"
/>
</div>
<div
id=
"toolitem6"
tabindex=
"-1"
class=
"toolbar-item"
role=
"button"
>
<img
src=
"toolbar_navigator.png"
/>
</div>
<div
id=
"toolitem7"
tabindex=
"-1"
class=
"toolbar-item"
role=
"button"
>
<img
src=
"toolbar_plc.png"
/>
</div>
<div
id=
"toolitem8"
tabindex=
"-1"
class=
"toolbar-item"
role=
"button"
>
<img
src=
"toolbar_history.png"
/>
</div>
<div
id=
"toolitem9"
tabindex=
"-1"
class=
"toolbar-item"
role=
"button"
>
<img
src=
"toolbar_object.png"
/>
</div>
<div
id=
"toolitem10"
tabindex=
"-1"
class=
"toolbar-item"
role=
"button"
>
<img
src=
"toolbar_crossref.png"
/>
</div>
<div
id=
"toolitem11"
tabindex=
"-1"
class=
"toolbar-item"
role=
"button"
>
<img
src=
"toolbar_help.png"
/>
</div>
<div
id=
"toolitem12"
tabindex=
"-1"
class=
"toolbar-item"
role=
"button"
>
<img
src=
"toolbar_classhelp.png"
/>
</div>
</div>
<canvas
id=
"flowcanvas"
width=
"1200"
height=
"800"
></canvas>
<script
src=
"https://unpkg.com/@babel/standalone/babel.min.js"
></script>
<script
type=
"text/babel"
src=
"pwr.js"
></script>
<script
type=
"text/babel"
src=
"cli.js"
></script>
<script
type=
"text/babel"
src=
"gdh.js"
></script>
<script
type=
"text/babel"
src=
"plow.js"
></script>
<script
type=
"text/babel"
src=
"ev.ts"
></script>
<hr>
<address><a
href=
"mailto:claes@debian86.ssab.com"
></a></address>
</body>
</html>
java/jsw/ev/src/ev.ts
View file @
867fdfb6
This diff is collapsed.
Click to expand it.
java/jsw/flow/src/flow.html
View file @
867fdfb6
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>
Trace
</title>
<link
rel=
"stylesheet"
type=
"text/css"
href=
"toolbar.css"
>
</head>
<head>
<title>
Trace
</title>
<link
rel=
"stylesheet"
type=
"text/css"
href=
"toolbar.css"
>
</head>
<body>
<div
class=
"toolbar"
role=
"toolbar"
>
<div
id=
"toolitem1"
tabindex=
"0"
class=
"toolbar-item"
role=
"button"
><img
src=
"toolbar_graph.png"
><img></div>
<div
id=
"toolitem2"
tabindex=
"-1"
class=
"toolbar-item"
role=
"button"
><img
src=
"toolbar_navigator.png"
><img></div>
<div
id=
"toolitem3"
tabindex=
"-1"
class=
"toolbar-item"
role=
"button"
><img
src=
"toolbar_history.png"
><img></div>
<div
id=
"toolitem4"
tabindex=
"-1"
class=
"toolbar-item"
role=
"button"
><img
src=
"toolbar_object.png"
><img></div>
<body>
<div
class=
"toolbar"
role=
"toolbar"
>
<div
id=
"toolitem1"
tabindex=
"0"
class=
"toolbar-item"
role=
"button"
>
<img
src=
"toolbar_graph.png"
/>
</div>
<canvas
id=
"flowcanvas"
width=
"1200"
height=
"800"
></canvas>
<script
src=
"https://unpkg.com/@babel/standalone/babel.min.js"
></script>
<script
type=
"text/babel"
src=
"pwr.js"
></script>
<script
type=
"text/babel"
src=
"gdh.js"
></script>
<script
type=
"text/babel"
src=
"flow.ts"
></script>
<hr>
<address><a
href=
"mailto:claes@debian86.ssab.com"
></a></address>
</body>
<div
id=
"toolitem2"
tabindex=
"-1"
class=
"toolbar-item"
role=
"button"
>
<img
src=
"toolbar_navigator.png"
/>
</div>
<div
id=
"toolitem3"
tabindex=
"-1"
class=
"toolbar-item"
role=
"button"
>
<img
src=
"toolbar_history.png"
/>
</div>
<div
id=
"toolitem4"
tabindex=
"-1"
class=
"toolbar-item"
role=
"button"
>
<img
src=
"toolbar_object.png"
/>
</div>
</div>
<canvas
id=
"flowcanvas"
width=
"1200"
height=
"800"
></canvas>
<script
src=
"https://unpkg.com/@babel/standalone/babel.min.js"
></script>
<script
type=
"text/babel"
src=
"pwr.js"
></script>
<script
type=
"text/babel"
src=
"gdh.js"
></script>
<script
type=
"text/babel"
src=
"flow.ts"
></script>
<hr>
<address><a
href=
"mailto:claes@debian86.ssab.com"
></a></address>
</body>
</html>
java/jsw/flow/src/flow.ts
View file @
867fdfb6
This diff is collapsed.
Click to expand it.
java/jsw/ge/src/ge.html
View file @
867fdfb6
<!DOCTYPE html>
<html>
<head>
<title>
Ge graph
</title>
<link
rel=
"stylesheet"
type=
"text/css"
href=
"toolbar.css"
>
</head>
<head>
<title>
Ge graph
</title>
<link
rel=
"stylesheet"
type=
"text/css"
href=
"toolbar.css"
>
</head>
<body>
<canvas
id=
"flowcanvas"
width=
"1200"
height=
"800"
></canvas>
<script
src=
"https://unpkg.com/@babel/standalone/babel.min.js"
></script>
<script
type=
"text/babel"
src=
"pwr.js"
></script>
<script
type=
"text/babel"
src=
"cli.js"
></script>
<script
type=
"text/babel"
src=
"gdh.js"
></script>
<body>
<canvas
id=
"flowcanvas"
width=
"1200"
height=
"800"
></canvas>
<script
src=
"https://unpkg.com/@babel/standalone/babel.min.js"
></script>
<script
type=
"text/babel"
src=
"pwr.js"
></script>
<script
type=
"text/babel"
src=
"cli.js"
></script>
<script
type=
"text/babel"
src=
"gdh.js"
></script>
<script
type=
"text/babel"
src=
"glow.ts"
></script>
<script
type=
"text/babel"
src=
"glow_point.ts"
></script>
<script
type=
"text/babel"
src=
"glow_color.ts"
></script>
<script
type=
"text/babel"
src=
"glow_array.ts"
></script>
<script
type=
"text/babel"
src=
"glow_transform.ts"
></script>
<script
type=
"text/babel"
src=
"glow_nodeclass.ts"
></script>
<script
type=
"text/babel"
src=
"glow_nodegroup.ts"
></script>
<script
type=
"text/babel"
src=
"glow_conclass.ts"
></script>
<script
type=
"text/babel"
src=
"glow_con.ts"
></script>
<script
type=
"text/babel"
src=
"glow_line.ts"
></script>
<script
type=
"text/babel"
src=
"glow_arc.ts"
></script>
<script
type=
"text/babel"
src=
"glow_rect.ts"
></script>
<script
type=
"text/babel"
src=
"glow_text.ts"
></script>
<script
type=
"text/babel"
src=
"glow_conpoint.ts"
></script>
<script
type=
"text/babel"
src=
"glow_draw.ts"
></script>
<script
type=
"text/babel"
src=
"glow_cformat.ts"
></script>
<script
type=
"text/babel"
src=
"glow.ts"
></script>
<script
type=
"text/babel"
src=
"glow_point.ts"
></script>
<script
type=
"text/babel"
src=
"glow_color.ts"
></script>
<script
type=
"text/babel"
src=
"glow_array.ts"
></script>
<script
type=
"text/babel"
src=
"glow_transform.ts"
></script>
<script
type=
"text/babel"
src=
"glow_nodeclass.ts"
></script>
<script
type=
"text/babel"
src=
"glow_nodegroup.ts"
></script>
<script
type=
"text/babel"
src=
"glow_conclass.ts"
></script>
<script
type=
"text/babel"
src=
"glow_con.ts"
></script>
<script
type=
"text/babel"
src=
"glow_line.ts"
></script>
<script
type=
"text/babel"
src=
"glow_arc.ts"
></script>
<script
type=
"text/babel"
src=
"glow_rect.ts"
></script>
<script
type=
"text/babel"
src=
"glow_text.ts"
></script>
<script
type=
"text/babel"
src=
"glow_conpoint.ts"
></script>
<script
type=
"text/babel"
src=
"glow_draw.ts"
></script>
<script
type=
"text/babel"
src=
"glow_cformat.ts"
></script>
<script
type=
"text/babel"
src=
"grow_node.ts"
></script>
<script
type=
"text/babel"
src=
"grow_group.ts"
></script>
<script
type=
"text/babel"
src=
"grow_slider.ts"
></script>
<script
type=
"text/babel"
src=
"grow_toolbar.ts"
></script>
<script
type=
"text/babel"
src=
"grow_rect.ts"
></script>
<script
type=
"text/babel"
src=
"grow_rectrounded.ts"
></script>
<script
type=
"text/babel"
src=
"grow_line.ts"
></script>
<script
type=
"text/babel"
src=
"grow_arc.ts"
></script>
<script
type=
"text/babel"
src=
"grow_text.ts"
></script>
<script
type=
"text/babel"
src=
"grow_annot.ts"
></script>
<script
type=
"text/babel"
src=
"grow_polyline.ts"
></script>
<script
type=
"text/babel"
src=
"grow_conpoint.ts"
></script>
<script
type=
"text/babel"
src=
"grow_image.ts"
></script>
<script
type=
"text/babel"
src=
"grow_conglue.ts"
></script>
<script
type=
"text/babel"
src=
"grow_bar.ts"
></script>
<script
type=
"text/babel"
src=
"grow_bararc.ts"
></script>
<script
type=
"text/babel"
src=
"grow_trend.ts"
></script>
<script
type=
"text/babel"
src=
"grow_xycurve.ts"
></script>
<script
type=
"text/babel"
src=
"grow_menu.ts"
></script>
<script
type=
"text/babel"
src=
"grow_scrollbar.ts"
></script>
<script
type=
"text/babel"
src=
"grow_window.ts"
></script>
<script
type=
"text/babel"
src=
"grow_folder.ts"
></script>
<script
type=
"text/babel"
src=
"grow_axis.ts"
></script>
<script
type=
"text/babel"
src=
"grow_axisarc.ts"
></script>
<script
type=
"text/babel"
src=
"grow_pie.ts"
></script>
<script
type=
"text/babel"
src=
"grow_barchart.ts"
></script>
<script
type=
"text/babel"
src=
"grow_table.ts"
></script>
<script
type=
"text/babel"
src=
"grow_ctx.ts"
></script>
<script
type=
"text/babel"
src=
"grow_frame.ts"
></script>
<script
type=
"text/babel"
src=
"grow_node.ts"
></script>
<script
type=
"text/babel"
src=
"grow_group.ts"
></script>
<script
type=
"text/babel"
src=
"grow_slider.ts"
></script>
<script
type=
"text/babel"
src=
"grow_toolbar.ts"
></script>
<script
type=
"text/babel"
src=
"grow_rect.ts"
></script>
<script
type=
"text/babel"
src=
"grow_rectrounded.ts"
></script>
<script
type=
"text/babel"
src=
"grow_line.ts"
></script>
<script
type=
"text/babel"
src=
"grow_arc.ts"
></script>
<script
type=
"text/babel"
src=
"grow_text.ts"
></script>
<script
type=
"text/babel"
src=
"grow_annot.ts"
></script>
<script
type=
"text/babel"
src=
"grow_polyline.ts"
></script>
<script
type=
"text/babel"
src=
"grow_conpoint.ts"
></script>
<script
type=
"text/babel"
src=
"grow_image.ts"
></script>
<script
type=
"text/babel"
src=
"grow_conglue.ts"
></script>
<script
type=
"text/babel"
src=
"grow_bar.ts"
></script>
<script
type=
"text/babel"
src=
"grow_bararc.ts"
></script>
<script
type=
"text/babel"
src=
"grow_trend.ts"
></script>
<script
type=
"text/babel"
src=
"grow_xycurve.ts"
></script>
<script
type=
"text/babel"
src=
"grow_menu.ts"
></script>
<script
type=
"text/babel"
src=
"grow_scrollbar.ts"
></script>
<script
type=
"text/babel"
src=
"grow_window.ts"
></script>
<script
type=
"text/babel"
src=
"grow_folder.ts"
></script>
<script
type=
"text/babel"
src=
"grow_axis.ts"
></script>
<script
type=
"text/babel"
src=
"grow_axisarc.ts"
></script>
<script
type=
"text/babel"
src=
"grow_pie.ts"
></script>
<script
type=
"text/babel"
src=
"grow_barchart.ts"
></script>
<script
type=
"text/babel"
src=
"grow_table.ts"
></script>
<script
type=
"text/babel"
src=
"grow_ctx.ts"
></script>
<script
type=
"text/babel"
src=
"grow_frame.ts"
></script>
<script
type=
"text/babel"
src=
"ge.ts"
></script>
<script
type=
"text/babel"
src=
"ge_dyn.ts"
></script>
<script
type=
"text/babel"
src=
"ge_graph.ts"
></script>
<script
type=
"text/babel"
src=
"ge_appl.ts"
></script>
<hr>
<address><a
href=
"mailto:claes@debian86.ssab.com"
></a></address>
</body>
<script
type=
"text/babel"
src=
"ge.ts"
></script>
<script
type=
"text/babel"
src=
"ge_dyn.ts"
></script>
<script
type=
"text/babel"
src=
"ge_graph.ts"
></script>
<script
type=
"text/babel"
src=
"ge_appl.ts"
></script>
<hr>
<address><a
href=
"mailto:claes@debian86.ssab.com"
></a></address>
</body>
</html>
java/jsw/ge/src/ge_appl.ts
View file @
867fdfb6
...
...
@@ -14,6 +14,7 @@ let cliTable = [new CliTable("OPEN",
class
Appl
{
graph
:
Graph
;
constructor
()
{
this
.
graph
=
new
Graph
(
this
);
}
...
...
java/jsw/ge/src/ge_dyn.ts
View file @
867fdfb6
...
...
@@ -30,7 +30,7 @@ class Dyn {
resetColor
=
false
;
ignoreBgColor
=
false
;
resetBgColor
=
false
;
constructor
(
graph
)
{
this
.
graph
=
graph
;
}
...
...
@@ -106,7 +106,7 @@ class Dyn {
}
let
elem
=
null
;
switch
(
key
)
{
case
DynSave
.
Dyn
:
break
;
...
...
@@ -331,13 +331,13 @@ class Dyn {
console
.
log
(
"
Syntax error in Dyn
"
);
break
;
}
if
(
elem
!==
null
)
{
this
.
elements
.
push
(
elem
);
i
=
elem
.
open
(
lines
,
i
+
1
);
}
}
return
i
;
}
...
...
@@ -1026,7 +1026,7 @@ class DynDigLowColor extends DynElem {
if
(
this
.
dyn
.
debug
)
{
console
.
log
(
"
DynDigLowColor :
"
+
lines
[
i
]);
}
switch
(
key
)
{
case
DynSave
.
DigLowColor
:
break
;
...
...
@@ -1147,7 +1147,7 @@ class DynDigColor extends DynElem {
if
(
this
.
dyn
.
debug
)
{
console
.
log
(
"
DynDigColor :
"
+
lines
[
i
]);
}
switch
(
key
)
{
case
DynSave
.
DigColor
:
break
;
...
...
@@ -1172,7 +1172,7 @@ class DynDigColor extends DynElem {
break
;
}
}
return
i
;
}
}
...
...
@@ -1260,7 +1260,7 @@ class DynDigWarning extends DynElem {
if
(
this
.
dyn
.
debug
)
{
console
.
log
(
"
DynDigWarning :
"
+
lines
[
i
]);
}
switch
(
key
)
{
case
DynSave
.
DigWarning
:
break
;
...
...
@@ -1279,7 +1279,7 @@ class DynDigWarning extends DynElem {
break
;
}
}
return
i
;
}
}
...
...
@@ -1367,7 +1367,7 @@ class DynDigError extends DynElem {
if
(
this
.
dyn
.
debug
)
{
console
.
log
(
"
DynDigError :
"
+
lines
[
i
]);
}
switch
(
key
)
{
case
DynSave
.
DigError
:
break
;
...
...
@@ -1386,7 +1386,7 @@ class DynDigError extends DynElem {
break
;
}
}
return
i
;
}
}
...
...
@@ -1495,7 +1495,7 @@ class DynDigFlash extends DynElem {
if
(
this
.
dyn
.
debug
)
{
console
.
log
(
"
DynDigError :
"
+
lines
[
i
]);
}
switch
(
key
)
{
case
DynSave
.
DigFlash
:
break
;
...
...
@@ -1626,7 +1626,7 @@ class DynInvisible extends DynElem {
if
(
this
.
dyn
.
debug
)
{
console
.
log
(
"
DynInvisible :
"
+
lines
[
i
]);
}
switch
(
key
)
{
case
DynSave
.
Invisible
:
break
;
...
...
@@ -1727,7 +1727,7 @@ class DynDigTextColor extends DynElem {
if
(
this
.
dyn
.
debug
)
{
console
.
log
(
"
DigTextColor :
"
+
lines
[
i
]);
}
switch
(
key
)
{
case
DynSave
.
DigTextColor
:
break
;
...
...
@@ -1823,7 +1823,7 @@ class DynDigText extends DynElem {
if
(
this
.
dyn
.
debug
)
{
console
.
log
(
"
DigText :
"
+
lines
[
i
]);
}
switch
(
key
)
{
case
DynSave
.
DigText
:
break
;
...
...
@@ -1850,7 +1850,7 @@ class DynDigText extends DynElem {
break
;
}
}
return
i
;
}
}
...
...
@@ -1919,7 +1919,7 @@ class DynDigBorder extends DynElem {
if
(
this
.
dyn
.
debug
)
{
console
.
log
(
"
DynBorder :
"
+
lines
[
i
]);
}
switch
(
key
)
{
case
DynSave
.
DigBorder
:
break
;
...
...
@@ -2190,7 +2190,7 @@ class DynValue extends DynElem {
if
(
this
.
dyn
.
debug
)
{
console
.
log
(
"
DynBorder :
"
+
lines
[
i
]);
}
switch
(
key
)
{
case
DynSave
.
Value
:
break
;
...
...
@@ -8319,6 +8319,7 @@ class DynInputFocus extends DynElem {
action
(
o
,
e
)
{
return
1
;
}
open
(
lines
,
row
)
{
let
i
;
for
(
i
=
row
;
i
<
lines
.
length
;
i
++
)
{
...
...
java/jsw/ge/src/ge_graph.ts
View file @
867fdfb6
...
...
@@ -27,9 +27,11 @@ class LocalSub {
ref
()
{
this
.
refCount
++
;
}
unref
()
{
this
.
refCount
--
;
}
getRefCount
()
{
return
this
.
refCount
;
}
...
...
@@ -235,6 +237,7 @@ class Graph {
priv
=
0
;
timer
:
number
;
frame
:
GrowFrame
;
constructor
(
appl
)
{
this
.
appl
=
appl
;
if
(
typeof
InstallTrigger
!==
'
undefined
'
)
{
...
...
@@ -268,9 +271,7 @@ class Graph {
this
.
ctx
.
traceConnect
();
this
.
trace_cyclic
();
}
else
{
this
.
gdh
=
new
Gdh
();
this
.
gdh
.
open_cb
=
this
.
gdh_init_cb
;
this
.
gdh
.
init
();
this
.
gdh
=
new
Gdh
(
this
.
gdh_init_cb
);
}
}
...
...
@@ -303,6 +304,7 @@ class Graph {
this
.
gdh
.
getRefObjectInfoAll
(
this
.
trace_scan
);
}
}
trace_scan
(
id
,
sts
)
{
this
.
scan_time
=
this
.
ctx
.
scantime
;
this
.
fast_scan_time
=
this
.
ctx
.
fast_scantime
;
...
...
@@ -713,9 +715,11 @@ class Graph {
getLdb
()
{
return
this
.
ldb
;
}
getGdh
()
{
return
this
.
gdh
;
}
isAuthorized
(
access
)
{
return
!!
(
this
.
priv
&
access
);
// return appl.isAuthorized( access);
...
...
@@ -769,11 +773,13 @@ class Graph {
this
.
ctxPush
();
}
}
traceDisconnect
(
o
)
{
if
(
o
.
userdata
!==
null
)
{
o
.
userdata
.
disconnect
(
o
);
}
}
traceScan
(
o
)
{
if
(
o
.
userdata
!==
null
)
{
let
dyn
=
o
.
userdata
;
...
...
java/jsw/opwind/src/crypt.ts
View file @
867fdfb6
...
...
@@ -288,8 +288,8 @@ class JopCrypt {
c
=
results
[
1
];
d
=
(((
d
&
0x000000ff
)
<<
16
)
|
(
d
&
0x0000ff00
)
|
((
d
&
0x00ff0000
)
>>>
16
)
|
((
c
&
0xf0000000
)
>>>
4
));
(((
d
&
0x000000ff
)
<<
16
)
|
(
d
&
0x0000ff00
)
|
((
d
&
0x00ff0000
)
>>>
16
)
|
((
c
&
0xf0000000
)
>>>
4
));
c
&=
0x0fffffff
;
let
s
,
t
;
...
...
@@ -311,7 +311,7 @@ class JopCrypt {
JopCrypt
.
skb
[
1
][((
c
>>>
6
)
&
0x03
)
|
((
c
>>>
7
)
&
0x3c
)]
|
JopCrypt
.
skb
[
2
][((
c
>>>
13
)
&
0x0f
)
|
((
c
>>>
14
)
&
0x30
)]
|
JopCrypt
.
skb
[
3
][((
c
>>>
20
)
&
0x01
)
|
((
c
>>>
21
)
&
0x06
)
|
((
c
>>>
22
)
&
0x38
)];
((
c
>>>
22
)
&
0x38
)];
t
=
JopCrypt
.
skb
[
4
][(
d
)
&
0x3f
]
|
JopCrypt
.
skb
[
5
][((
d
>>>
7
)
&
0x03
)
|
((
d
>>>
8
)
&
0x3c
)]
|
...
...
@@ -448,8 +448,8 @@ class JopCrypt {
u
=
0x80
;
}
buffer
=
buffer
.
substring
(
0
,
i
)
+
String
.
fromCharCode
(
JopCrypt
.
cov_2char
[
c
])
+
buffer
.
substring
(
i
+
1
,
buffer
.
length
);
buffer
.
substring
(
0
,
i
)
+
String
.
fromCharCode
(
JopCrypt
.
cov_2char
[
c
])
+
buffer
.
substring
(
i
+
1
,
buffer
.
length
);
}
}
return
buffer
;
...
...
java/jsw/opwind/src/opwind.html
View file @
867fdfb6
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>
Operator window
</title>
<link
rel=
"stylesheet"
type=
"text/css"
href=
"toolbar.css"
>
<style>
.menu
{
float
:
left
;
width
:
20%
;
height
:
100%
;
}
.main
{
float
:
left
;
width
:
79%
;
height
:
100%
;
}
</style>
</head>
<head>
<title>
Operator window
</title>
<link
rel=
"stylesheet"
type=
"text/css"
href=
"toolbar.css"
>
<style>
.menu
{
float
:
left
;
width
:
20%
;
height
:
100%
;
}
<body>
<iframe
class=
"menu"
src=
"opwind_menu.html"
></iframe>
<iframe
class=
"main"
src=
"xtt_help_index.html"
></iframe>
</body>
.main
{
float
:
left
;
width
:
79%
;
height
:
100%
;
}
</style>
</head>
<body>
<iframe
class=
"menu"
src=
"opwind_menu.html"
></iframe>
<iframe
class=
"main"
src=
"xtt_help_index.html"
></iframe>
</body>
</html>
java/jsw/opwind/src/opwind.ts
View file @
867fdfb6
"
use strict
"
;
class
OpWindMenu
{
priv
:
number
;
user
:
string
;
user_text
:
Text
;
priv
=
0
;
user
=
""
;
user_text
:
Text
=
null
;
host
:
string
;
gdh
:
Gdh
;
info
:
OpwindMenuInfo
;
constructor
()
{
this
.
priv
=
0
;
this
.
user
=
""
;
this
.
user_text
=
null
;
this
.
host
=
window
.
location
.
hostname
;
if
(
this
.
host
===
""
)
{
this
.
host
=
"
localhost
"
;
}
this
.
gdh
=
new
Gdh
();
this
.
gdh
.
open_cb
=
this
.
gdh_init_cb
;
this
.
gdh
.
init
();
this
.
gdh
=
new
Gdh
(
this
.
gdh_init_cb
);
}
is_authorized
(
access
)
{
...
...
@@ -46,7 +42,7 @@ class OpWindMenu {
button
.
type
=
"
button
"
;
button
.
className
=
"
leftmenu-button
"
;
button
.
value
=
text
;
button
.
addEventListener
(
'
click
'
,
function
()
{
button
.
addEventListener
(
'
click
'
,
function
()
{
menu
.
button_cb
(
button
.
value
);
});
context
.
appendChild
(
button
);
...
...
@@ -68,47 +64,47 @@ class OpWindMenu {
context
.
appendChild
(
document
.
createElement
(
"
hr
"
));
document
.
getElementById
(
"
login_button
"
)
.
addEventListener
(
"
click
"
,
function
(
event
)
{
if
(
document
.
getElementById
(
"
login_frame
"
).
style
.
visibility
===
'
hidden
'
)
{
document
.
getElementById
(
"
login_user
"
).
innerHTML
=
""
;
document
.
getElementById
(
"
login_passw
"
).
innerHTML
=
""
;
document
.
getElementById
(
"
login_frame
"
).
style
.
visibility
=
'
visible
'
;
document
.
getElementById
(
"
login_frame
"
).
style
.
height
=
'
120px
'
;
document
.
getElementById
(
"
login_user
"
).
focus
();
}
else
{
.
addEventListener
(
"
click
"
,
function
(
event
)
{
if
(
document
.
getElementById
(
"
login_frame
"
).
style
.
visibility
===
'
hidden
'
)
{
document
.
getElementById
(
"
login_user
"
).
innerHTML
=
""
;
document
.
getElementById
(
"
login_passw
"
).
innerHTML
=
""
;
document
.
getElementById
(
"
login_frame
"
).
style
.
visibility
=
'
visible
'
;
document
.
getElementById
(
"
login_frame
"
).
style
.
height
=
'
120px
'
;
document
.
getElementById
(
"
login_user
"
).
focus
();
}
else
{
document
.
getElementById
(
"
login_frame
"
).
style
.
visibility
=
'
hidden
'
;
document
.
getElementById
(
"
login_frame
"
).
style
.
height
=
'
0px
'
;
}
});
document
.
getElementById
(
"
apply_button
"
)
.
addEventListener
(
"
click
"
,
function
(
event
)
{
let
user
=
document
.
getElementById
(
"
login_user
"
).
innerHTML
;
let
passwd
=
document
.
getElementById
(
"
login_passw
"
).
innerHTML
;
if
(
user
.
trim
()
===
""
)
{
return
;
}
document
.
getElementById
(
"
login_frame
"
).
style
.
visibility
=
'
hidden
'
;
document
.
getElementById
(
"
login_frame
"
).
style
.
height
=
'
0px
'
;
}
});
document
.
getElementById
(
"
apply_button
"
)
.
addEventListener
(
"
click
"
,
function
(
event
)
{
let
user
=
document
.
getElementById
(
"
login_user
"
).
innerHTML
;
let
passwd
=
document
.
getElementById
(
"
login_passw
"
).
innerHTML
;
if
(
user
.
trim
()
===
""
)
{
return
;
}
document
.
getElementById
(
"
login_frame
"
).
style
.
visibility
=
'
hidden
'
;
document
.
getElementById
(
"
login_frame
"
).
style
.
height
=
'
0px
'
;
let
c
=
new
JopCrypt
();
passwd
=
c
.
crypt
(
"
aa
"
,
passwd
);
this
.
user
=
user
;
this
.
gdh
.
login
(
user
,
passwd
,
this
.
login_cb
,
this
);
});
let
c
=
new
JopCrypt
();
passwd
=
c
.
crypt
(
"
aa
"
,
passwd
);
this
.
user
=
user
;
this
.
gdh
.
login
(
user
,
passwd
,
this
.
login_cb
,
this
);
});
document
.
getElementById
(
"
cancel_button
"
)
.
addEventListener
(
"
click
"
,
function
(
event
)
{
document
.
getElementById
(
"
login_frame
"
).
style
.
visibility
=
'
hidden
'
;
document
.
getElementById
(
"
login_frame
"
).
style
.
height
=
'
0px
'
;
});
.
addEventListener
(
"
click
"
,
function
(
event
)
{
document
.
getElementById
(
"
login_frame
"
).
style
.
visibility
=
'
hidden
'
;
document
.
getElementById
(
"
login_frame
"
).
style
.
height
=
'
0px
'
;
});
document
.
getElementById
(
"
logout_button
"
)
.
addEventListener
(
"
click
"
,
function
(
event
)
{
document
.
getElementById
(
"
login_frame
"
).
style
.
visibility
=
'
hidden
'
;
document
.
getElementById
(
"
login_frame
"
).
style
.
height
=
'
0px
'
;
this
.
priv
=
0
;
this
.
user
=
"
Default
"
;
this
.
gdh
.
login
(
""
,
""
,
this
.
login_cb
,
this
);
});
.
addEventListener
(
"
click
"
,
function
(
event
)
{
document
.
getElementById
(
"
login_frame
"
).
style
.
visibility
=
'
hidden
'
;
document
.
getElementById
(
"
login_frame
"
).
style
.
height
=
'
0px
'
;
this
.
priv
=
0
;
this
.
user
=
"
Default
"
;
this
.
gdh
.
login
(
""
,
""
,
this
.
login_cb
,
this
);
});
document
.
getElementById
(
"
login_user
"
).
innerHTML
=
""
;
document
.
getElementById
(
"
login_passw
"
).
innerHTML
=
""
;
...
...
@@ -154,9 +150,9 @@ class OpWindMenu {
}
else
if
(
this
.
info
.
enable_alarmlist
&&
text
===
"
AlarmList
"
)
{
console
.
log
(
"
AlarmList activated
"
);
if
(
this
.
is_authorized
(
Access
.
RtRead
|
Access
.
RtWrite
|
Access
.
AllOperators
|
Access
.
System
|
Access
.
Maintenance
|
Access
.
Process
|
Access
.
Instrument
))
{
Access
.
AllOperators
|
Access
.
System
|
Access
.
Maintenance
|
Access
.
Process
|
Access
.
Instrument
))
{
window
.
open
(
"
ev.html?list=alarm
"
,
"
_blank
"
);
}
else
{
window
.
alert
(
"
Not authorized for this operation
"
);
...
...
@@ -164,9 +160,9 @@ class OpWindMenu {
}
else
if
(
this
.
info
.
enable_alarmlist
&&
text
===
"
EventList
"
)
{
console
.
log
(
"
EventList activated
"
);
if
(
this
.
is_authorized
(
Access
.
RtRead
|
Access
.
RtWrite
|
Access
.
AllOperators
|
Access
.
System
|
Access
.
Maintenance
|
Access
.
Process
|
Access
.
Instrument
))
{
Access
.
AllOperators
|
Access
.
System
|
Access
.
Maintenance
|
Access
.
Process
|
Access
.
Instrument
))
{
window
.
open
(
"
ev.html?list=event
"
,
"
_blank
"
);
}
else
{
window
.
alert
(
"
Not authorized for this operation
"
);
...
...
@@ -174,9 +170,9 @@ class OpWindMenu {
}
else
if
(
this
.
info
.
enable_eventlog
&&
text
===
"
EventLog
"
)
{
console
.
log
(
"
EventLog activated
"
);
if
(
this
.
is_authorized
(
Access
.
RtRead
|
Access
.
RtWrite
|
Access
.
AllOperators
|
Access
.
System
|
Access
.
Maintenance
|
Access
.
Process
|
Access
.
Instrument
))
{
Access
.
AllOperators
|
Access
.
System
|
Access
.
Maintenance
|
Access
.
Process
|
Access
.
Instrument
))
{
window
.
alert
(
"
Not yet implemented
"
);
}
else
{
window
.
alert
(
"
Not authorized for this operation
"
);
...
...
@@ -184,8 +180,8 @@ class OpWindMenu {
}
else
if
(
this
.
info
.
enable_navigator
&&
text
===
"
Navigator
"
)
{
console
.
log
(
"
Navigator activated
"
);
if
(
this
.
is_authorized
(
Access
.
RtNavigator
|
Access
.
System
|
Access
.
Maintenance
|
Access
.
Process
|
Access
.
Instrument
))
{
Access
.
Maintenance
|
Access
.
Process
|
Access
.
Instrument
))
{
window
.
open
(
"
xtt.html
"
,
"
_blank
"
);
}
else
{
window
.
alert
(
"
Not authorized for this operation
"
);
...
...
@@ -198,9 +194,9 @@ class OpWindMenu {
window
.
open
(
"
http://www.proview.se
"
,
"
_blank
"
);
}
else
{
if
(
this
.
is_authorized
(
Access
.
RtRead
|
Access
.
RtWrite
|
Access
.
AllOperators
|
Access
.
System
|
Access
.
Maintenance
|
Access
.
Process
|
Access
.
Instrument
))
{
Access
.
AllOperators
|
Access
.
System
|
Access
.
Maintenance
|
Access
.
Process
|
Access
.
Instrument
))
{
for
(
let
i
=
0
;
i
<
this
.
info
.
buttons
.
length
;
i
++
)
{
if
(
this
.
info
.
buttons
[
i
].
text
===
text
)
{
console
.
log
(
"
Found
"
,
this
.
info
.
buttons
[
i
].
text
);
...
...
java/jsw/opwind/src/opwind_menu.html
View file @
867fdfb6
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>
Operator Menu
</title>
<link
rel=
"stylesheet"
type=
"text/css"
href=
"toolbar.css"
>
</head>
<head>
<title>
Operator Menu
</title>
<link
rel=
"stylesheet"
type=
"text/css"
href=
"toolbar.css"
>
</head>
<body>
<div
id=
"opwindmenu"
width=
"120"
height=
"800"
>
<h1
id=
"opwind_title"
></h1>
<p
id=
"opwind_text"
></p>
<hr>
<button
id=
"login_button"
type=
"button"
class=
"leftmenu-button"
>
Login
</button>
<div
id=
"login_frame"
class=
"login-frame"
>
Username
<br>
<input
id=
"login_user"
name=
"username"
class=
"login-field"
/><br>
Password
<br>
<input
id=
"login_passw"
name=
"password"
type=
"password"
class=
"login-field"
/><br>
<button
id=
"apply_button"
type=
"button"
style=
"flex-grow:1"
>
Apply
</button>
<button
id=
"cancel_button"
type=
"button"
style=
"float:right"
>
Cancel
</button><br>
<button
id=
"logout_button"
type=
"button"
class=
"leftmenu-button"
>
Logout
</button>
</div>
</div>
<script
src=
"https://unpkg.com/@babel/standalone/babel.min.js"
></script>
<script
type=
"text/babel"
src=
"crypt.ts"
></script>
<script
type=
"text/babel"
src=
"pwr.js"
></script>
<script
type=
"text/babel"
src=
"gdh.js"
></script>
<script
type=
"text/babel"
src=
"opwind.ts"
></script>
<body>
<div
id=
"opwindmenu"
width=
"120"
height=
"800"
>
<h1
id=
"opwind_title"
></h1>
<p
id=
"opwind_text"
></p>
<hr>
<address><a
href=
"mailto:claes@debian86.ssab.com"
></a></address>
</body>
<button
id=
"login_button"
type=
"button"
class=
"leftmenu-button"
>
Login
</button>
<div
id=
"login_frame"
class=
"login-frame"
>
Username
<br>
<input
id=
"login_user"
name=
"username"
class=
"login-field"
/><br>
Password
<br>
<input
id=
"login_passw"
name=
"password"
type=
"password"
class=
"login-field"
/><br>
<button
id=
"apply_button"
type=
"button"
style=
"flex-grow:1"
>
Apply
</button>
<button
id=
"cancel_button"
type=
"button"
style=
"float:right"
>
Cancel
</button>
<br>
<button
id=
"logout_button"
type=
"button"
class=
"leftmenu-button"
>
Logout
</button>
</div>
</div>
<script
src=
"https://unpkg.com/@babel/standalone/babel.min.js"
></script>
<script
type=
"text/babel"
src=
"crypt.ts"
></script>
<script
type=
"text/babel"
src=
"pwr.js"
></script>
<script
type=
"text/babel"
src=
"gdh.js"
></script>
<script
type=
"text/babel"
src=
"opwind.ts"
></script>
<hr>
<address><a
href=
"mailto:claes@debian86.ssab.com"
></a></address>
</body>
</html>
java/jsw/xtt/src/xtt.html
View file @
867fdfb6
<!DOCTYPE html>
<html>
<head>
<title>
Xtt
</title>
<link
rel=
"stylesheet"
type=
"text/css"
href=
"toolbar.css"
>
</head>
<head>
<title>
Xtt
</title>
<link
rel=
"stylesheet"
type=
"text/css"
href=
"toolbar.css"
>
</head>
<body>
<div
class=
"toolbar"
role=
"toolbar"
>
<div
id=
"toolitem1"
tabindex=
"0"
class=
"toolbar-item"
role=
"button"
><img
src=
"toolbar_graph.png"
><img></div>
<div
id=
"toolitem2"
tabindex=
"-1"
class=
"toolbar-item"
role=
"button"
><img
src=
"toolbar_objectgraph.png"
><img></div>
<div
id=
"toolitem3"
tabindex=
"-1"
class=
"toolbar-item"
role=
"button"
><img
src=
"toolbar_plc.png"
><img></div>
<div
id=
"toolitem4"
tabindex=
"-1"
class=
"toolbar-item"
role=
"button"
><img
src=
"toolbar_history.png"
><img></div>
<div
id=
"toolitem5"
tabindex=
"-1"
class=
"toolbar-item"
role=
"button"
><img
src=
"toolbar_object.png"
><img></div>
<div
id=
"toolitem6"
tabindex=
"-1"
class=
"toolbar-item"
role=
"button"
><img
src=
"toolbar_crossref.png"
><img></div>
<div
id=
"toolitem7"
tabindex=
"-1"
class=
"toolbar-item"
role=
"button"
><img
src=
"toolbar_help.png"
><img></div>
<div
id=
"toolitem8"
tabindex=
"-1"
class=
"toolbar-item"
role=
"button"
><img
src=
"toolbar_classhelp.png"
><img></div>
</div>
<canvas
id=
"flowcanvas"
width=
"1200"
height=
"800"
></canvas>
<script
src=
"https://unpkg.com/@babel/standalone/babel.min.js"
></script>
<script
type=
"text/babel"
src=
"pwr.js"
></script>
<script
type=
"text/babel"
src=
"cli.js"
></script>
<script
type=
"text/babel"
src=
"gdh.js"
></script>
<script
type=
"text/babel"
src=
"plow.js"
></script>
<script
type=
"text/babel"
src=
"xtt.ts"
></script>
<hr>
<address><a
href=
"mailto:claes@debian86.ssab.com"
></a></address>
</body>
<body>
<div
class=
"toolbar"
role=
"toolbar"
>
<div
id=
"toolitem1"
tabindex=
"0"
class=
"toolbar-item"
role=
"button"
>
<img
src=
"toolbar_graph.png"
/>
</div>
<div
id=
"toolitem2"
tabindex=
"-1"
class=
"toolbar-item"
role=
"button"
>
<img
src=
"toolbar_objectgraph.png"
/>
</div>
<div
id=
"toolitem3"
tabindex=
"-1"
class=
"toolbar-item"
role=
"button"
>
<img
src=
"toolbar_plc.png"
/>
</div>
<div
id=
"toolitem4"
tabindex=
"-1"
class=
"toolbar-item"
role=
"button"
>
<img
src=
"toolbar_history.png"
/>
</div>
<div
id=
"toolitem5"
tabindex=
"-1"
class=
"toolbar-item"
role=
"button"
>
<img
src=
"toolbar_object.png"
/>
</div>
<div
id=
"toolitem6"
tabindex=
"-1"
class=
"toolbar-item"
role=
"button"
>
<img
src=
"toolbar_crossref.png"
/>
</div>
<div
id=
"toolitem7"
tabindex=
"-1"
class=
"toolbar-item"
role=
"button"
>
<img
src=
"toolbar_help.png"
/>
</div>
<div
id=
"toolitem8"
tabindex=
"-1"
class=
"toolbar-item"
role=
"button"
>
<img
src=
"toolbar_classhelp.png"
/>
</div>
</div>
<canvas
id=
"flowcanvas"
width=
"1200"
height=
"800"
></canvas>
<script
src=
"https://unpkg.com/@babel/standalone/babel.min.js"
></script>
<script
type=
"text/babel"
src=
"pwr.js"
></script>
<script
type=
"text/babel"
src=
"cli.js"
></script>
<script
type=
"text/babel"
src=
"gdh.js"
></script>
<script
type=
"text/babel"
src=
"plow.js"
></script>
<script
type=
"text/babel"
src=
"xtt.ts"
></script>
<hr>
<address><a
href=
"mailto:claes@debian86.ssab.com"
></a></address>
</body>
</html>
java/jsw/xtt/src/xtt.ts
View file @
867fdfb6
This diff is collapsed.
Click to expand it.
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