SystemStatusMonitor.st
author Claus Gittinger <cg@exept.de>
Tue, 03 Sep 2019 09:44:51 +0200
changeset 19110 64a09c9c02cb
parent 18521 2f7064ec0374
child 19211 46183169364d
permissions -rw-r--r--
#DOCUMENTATION by exept class: SystemStatusMonitor class comment/format in: #documentation
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
18521
2f7064ec0374 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 18503
diff changeset
     1
"{ Encoding: utf8 }"
2f7064ec0374 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 18503
diff changeset
     2
2744
0ebeada0fee0 copyright added
Claus Gittinger <cg@exept.de>
parents: 2699
diff changeset
     3
"
0ebeada0fee0 copyright added
Claus Gittinger <cg@exept.de>
parents: 2699
diff changeset
     4
 COPYRIGHT (c) 1997 by eXept Software AG
0ebeada0fee0 copyright added
Claus Gittinger <cg@exept.de>
parents: 2699
diff changeset
     5
              All Rights Reserved
0ebeada0fee0 copyright added
Claus Gittinger <cg@exept.de>
parents: 2699
diff changeset
     6
0ebeada0fee0 copyright added
Claus Gittinger <cg@exept.de>
parents: 2699
diff changeset
     7
 This software is furnished under a license and may be used
0ebeada0fee0 copyright added
Claus Gittinger <cg@exept.de>
parents: 2699
diff changeset
     8
 only in accordance with the terms of that license and with the
0ebeada0fee0 copyright added
Claus Gittinger <cg@exept.de>
parents: 2699
diff changeset
     9
 inclusion of the above copyright notice.   This software may not
0ebeada0fee0 copyright added
Claus Gittinger <cg@exept.de>
parents: 2699
diff changeset
    10
 be provided or otherwise made available to, or used by, any
0ebeada0fee0 copyright added
Claus Gittinger <cg@exept.de>
parents: 2699
diff changeset
    11
 other person.  No title to or ownership of the software is
0ebeada0fee0 copyright added
Claus Gittinger <cg@exept.de>
parents: 2699
diff changeset
    12
 hereby transferred.
0ebeada0fee0 copyright added
Claus Gittinger <cg@exept.de>
parents: 2699
diff changeset
    13
"
17168
26ea2eb499bf #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 6157
diff changeset
    14
"{ Package: 'stx:libtool' }"
2744
0ebeada0fee0 copyright added
Claus Gittinger <cg@exept.de>
parents: 2699
diff changeset
    15
17168
26ea2eb499bf #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 6157
diff changeset
    16
"{ NameSpace: Smalltalk }"
2699
dcb83b594b14 default extent
Claus Gittinger <cg@exept.de>
parents: 2488
diff changeset
    17
981
82fa38667915 renamed
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    18
SimpleView subclass:#SystemStatusMonitor
82fa38667915 renamed
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    19
	instanceVariableNames:'listView listUpdateDelay updateDelay updateBlock listUpdateBlock
82fa38667915 renamed
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    20
		updateProcess'
82fa38667915 renamed
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    21
	classVariableNames:''
82fa38667915 renamed
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    22
	poolDictionaries:''
1053
9b1b15ef1e34 category change
Claus Gittinger <cg@exept.de>
parents: 1052
diff changeset
    23
	category:'Monitors-ST/X'
981
82fa38667915 renamed
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    24
!
82fa38667915 renamed
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    25
2744
0ebeada0fee0 copyright added
Claus Gittinger <cg@exept.de>
parents: 2699
diff changeset
    26
!SystemStatusMonitor class methodsFor:'documentation'!
0ebeada0fee0 copyright added
Claus Gittinger <cg@exept.de>
parents: 2699
diff changeset
    27
0ebeada0fee0 copyright added
Claus Gittinger <cg@exept.de>
parents: 2699
diff changeset
    28
copyright
0ebeada0fee0 copyright added
Claus Gittinger <cg@exept.de>
parents: 2699
diff changeset
    29
"
0ebeada0fee0 copyright added
Claus Gittinger <cg@exept.de>
parents: 2699
diff changeset
    30
 COPYRIGHT (c) 1997 by eXept Software AG
0ebeada0fee0 copyright added
Claus Gittinger <cg@exept.de>
parents: 2699
diff changeset
    31
              All Rights Reserved
0ebeada0fee0 copyright added
Claus Gittinger <cg@exept.de>
parents: 2699
diff changeset
    32
0ebeada0fee0 copyright added
Claus Gittinger <cg@exept.de>
parents: 2699
diff changeset
    33
 This software is furnished under a license and may be used
0ebeada0fee0 copyright added
Claus Gittinger <cg@exept.de>
parents: 2699
diff changeset
    34
 only in accordance with the terms of that license and with the
0ebeada0fee0 copyright added
Claus Gittinger <cg@exept.de>
parents: 2699
diff changeset
    35
 inclusion of the above copyright notice.   This software may not
0ebeada0fee0 copyright added
Claus Gittinger <cg@exept.de>
parents: 2699
diff changeset
    36
 be provided or otherwise made available to, or used by, any
0ebeada0fee0 copyright added
Claus Gittinger <cg@exept.de>
parents: 2699
diff changeset
    37
 other person.  No title to or ownership of the software is
0ebeada0fee0 copyright added
Claus Gittinger <cg@exept.de>
parents: 2699
diff changeset
    38
 hereby transferred.
0ebeada0fee0 copyright added
Claus Gittinger <cg@exept.de>
parents: 2699
diff changeset
    39
"
17168
26ea2eb499bf #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 6157
diff changeset
    40
!
26ea2eb499bf #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 6157
diff changeset
    41
26ea2eb499bf #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 6157
diff changeset
    42
documentation
26ea2eb499bf #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 6157
diff changeset
    43
"
26ea2eb499bf #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 6157
diff changeset
    44
    Abstract class providing common code for list-based status monitors.
26ea2eb499bf #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 6157
diff changeset
    45
26ea2eb499bf #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 6157
diff changeset
    46
    [disclaimer:]
26ea2eb499bf #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 6157
diff changeset
    47
        these are some of the oldest tools in the system, written in the early 90's.
26ea2eb499bf #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 6157
diff changeset
    48
        They do in no way reflect the way GUIs are designed/written these days.
19110
64a09c9c02cb #DOCUMENTATION by exept
Claus Gittinger <cg@exept.de>
parents: 18521
diff changeset
    49
        However, after all those years, they are still very very useful (and not found in many other systems)  
17168
26ea2eb499bf #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 6157
diff changeset
    50
"
2744
0ebeada0fee0 copyright added
Claus Gittinger <cg@exept.de>
parents: 2699
diff changeset
    51
! !
981
82fa38667915 renamed
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    52
82fa38667915 renamed
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    53
!SystemStatusMonitor class methodsFor:'defaults'!
82fa38667915 renamed
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    54
82fa38667915 renamed
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    55
defaultIcon
82fa38667915 renamed
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    56
    ^ StandardSystemView defaultIcon
82fa38667915 renamed
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    57
82fa38667915 renamed
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    58
    "Created: 23.1.1997 / 02:52:25 / cg"
82fa38667915 renamed
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    59
!
82fa38667915 renamed
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    60
82fa38667915 renamed
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    61
defaultLabel
82fa38667915 renamed
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    62
    ^ 'Status Monitor'
82fa38667915 renamed
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    63
82fa38667915 renamed
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    64
    "Created: 23.1.1997 / 02:52:43 / cg"
82fa38667915 renamed
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    65
! !
82fa38667915 renamed
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    66
17225
2313780b08fb #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17168
diff changeset
    67
!SystemStatusMonitor class methodsFor:'menu specs'!
2313780b08fb #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17168
diff changeset
    68
18501
b540eb4f289b #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 17225
diff changeset
    69
fileMenu
b540eb4f289b #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 17225
diff changeset
    70
    "This resource specification was automatically generated
b540eb4f289b #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 17225
diff changeset
    71
     by the MenuEditor of ST/X."
b540eb4f289b #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 17225
diff changeset
    72
b540eb4f289b #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 17225
diff changeset
    73
    "Do not manually edit this!! If it is corrupted,
b540eb4f289b #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 17225
diff changeset
    74
     the MenuEditor may not be able to read the specification."
b540eb4f289b #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 17225
diff changeset
    75
b540eb4f289b #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 17225
diff changeset
    76
b540eb4f289b #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 17225
diff changeset
    77
    "
b540eb4f289b #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 17225
diff changeset
    78
     MenuEditor new openOnClass:SystemStatusMonitor andSelector:#fileMenu
b540eb4f289b #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 17225
diff changeset
    79
     (Menu new fromLiteralArrayEncoding:(SystemStatusMonitor fileMenu)) startUp
b540eb4f289b #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 17225
diff changeset
    80
    "
b540eb4f289b #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 17225
diff changeset
    81
b540eb4f289b #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 17225
diff changeset
    82
    <resource: #menu>
b540eb4f289b #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 17225
diff changeset
    83
b540eb4f289b #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 17225
diff changeset
    84
    ^ 
b540eb4f289b #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 17225
diff changeset
    85
     #(Menu
b540eb4f289b #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 17225
diff changeset
    86
        (
b540eb4f289b #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 17225
diff changeset
    87
         (MenuItem
b540eb4f289b #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 17225
diff changeset
    88
            label: 'Exit'
b540eb4f289b #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 17225
diff changeset
    89
            itemValue: closeRequestToTopView
b540eb4f289b #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 17225
diff changeset
    90
          )
b540eb4f289b #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 17225
diff changeset
    91
         )
b540eb4f289b #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 17225
diff changeset
    92
        nil
b540eb4f289b #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 17225
diff changeset
    93
        nil
b540eb4f289b #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 17225
diff changeset
    94
      )
b540eb4f289b #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 17225
diff changeset
    95
!
b540eb4f289b #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 17225
diff changeset
    96
17225
2313780b08fb #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17168
diff changeset
    97
mainMenu
2313780b08fb #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17168
diff changeset
    98
    "This resource specification was automatically generated
2313780b08fb #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17168
diff changeset
    99
     by the MenuEditor of ST/X."
2313780b08fb #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17168
diff changeset
   100
2313780b08fb #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17168
diff changeset
   101
    "Do not manually edit this!! If it is corrupted,
2313780b08fb #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17168
diff changeset
   102
     the MenuEditor may not be able to read the specification."
2313780b08fb #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17168
diff changeset
   103
2313780b08fb #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17168
diff changeset
   104
2313780b08fb #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17168
diff changeset
   105
    "
2313780b08fb #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17168
diff changeset
   106
     MenuEditor new openOnClass:SystemStatusMonitor andSelector:#mainMenu
2313780b08fb #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17168
diff changeset
   107
     (Menu new fromLiteralArrayEncoding:(SystemStatusMonitor mainMenu)) startUp
2313780b08fb #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17168
diff changeset
   108
    "
2313780b08fb #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17168
diff changeset
   109
2313780b08fb #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17168
diff changeset
   110
    <resource: #menu>
2313780b08fb #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17168
diff changeset
   111
2313780b08fb #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17168
diff changeset
   112
    ^ 
2313780b08fb #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17168
diff changeset
   113
     #(Menu
2313780b08fb #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17168
diff changeset
   114
        (
2313780b08fb #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17168
diff changeset
   115
         (MenuItem
2313780b08fb #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17168
diff changeset
   116
            label: 'File'
18501
b540eb4f289b #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 17225
diff changeset
   117
            submenuChannel: fileMenu
b540eb4f289b #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 17225
diff changeset
   118
          )
b540eb4f289b #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 17225
diff changeset
   119
         (MenuItem
b540eb4f289b #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 17225
diff changeset
   120
            label: 'View'
b540eb4f289b #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 17225
diff changeset
   121
            submenuChannel: viewMenu
b540eb4f289b #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 17225
diff changeset
   122
          )
b540eb4f289b #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 17225
diff changeset
   123
         )
b540eb4f289b #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 17225
diff changeset
   124
        nil
b540eb4f289b #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 17225
diff changeset
   125
        nil
b540eb4f289b #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 17225
diff changeset
   126
      )
b540eb4f289b #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 17225
diff changeset
   127
!
b540eb4f289b #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 17225
diff changeset
   128
b540eb4f289b #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 17225
diff changeset
   129
viewMenu
b540eb4f289b #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 17225
diff changeset
   130
    "This resource specification was automatically generated
b540eb4f289b #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 17225
diff changeset
   131
     by the MenuEditor of ST/X."
b540eb4f289b #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 17225
diff changeset
   132
b540eb4f289b #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 17225
diff changeset
   133
    "Do not manually edit this!! If it is corrupted,
b540eb4f289b #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 17225
diff changeset
   134
     the MenuEditor may not be able to read the specification."
b540eb4f289b #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 17225
diff changeset
   135
b540eb4f289b #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 17225
diff changeset
   136
b540eb4f289b #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 17225
diff changeset
   137
    "
b540eb4f289b #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 17225
diff changeset
   138
     MenuEditor new openOnClass:SystemStatusMonitor andSelector:#viewMenu
b540eb4f289b #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 17225
diff changeset
   139
     (Menu new fromLiteralArrayEncoding:(SystemStatusMonitor viewMenu)) startUp
b540eb4f289b #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 17225
diff changeset
   140
    "
b540eb4f289b #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 17225
diff changeset
   141
b540eb4f289b #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 17225
diff changeset
   142
    <resource: #menu>
b540eb4f289b #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 17225
diff changeset
   143
b540eb4f289b #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 17225
diff changeset
   144
    ^ 
b540eb4f289b #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 17225
diff changeset
   145
     #(Menu
b540eb4f289b #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 17225
diff changeset
   146
        (
b540eb4f289b #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 17225
diff changeset
   147
         (MenuItem
b540eb4f289b #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 17225
diff changeset
   148
            label: 'Update Interval...'
b540eb4f289b #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 17225
diff changeset
   149
            itemValue: menuChangeUpdateInterval
17225
2313780b08fb #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17168
diff changeset
   150
          )
2313780b08fb #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17168
diff changeset
   151
         )
2313780b08fb #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17168
diff changeset
   152
        nil
2313780b08fb #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17168
diff changeset
   153
        nil
2313780b08fb #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17168
diff changeset
   154
      )
2313780b08fb #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17168
diff changeset
   155
! !
2313780b08fb #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17168
diff changeset
   156
981
82fa38667915 renamed
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   157
!SystemStatusMonitor class methodsFor:'startup'!
82fa38667915 renamed
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   158
17168
26ea2eb499bf #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 6157
diff changeset
   159
isAbstract
26ea2eb499bf #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 6157
diff changeset
   160
    "return true, if this is an abstract class."
26ea2eb499bf #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 6157
diff changeset
   161
26ea2eb499bf #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 6157
diff changeset
   162
    ^ self == SystemStatusMonitor
26ea2eb499bf #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 6157
diff changeset
   163
!
26ea2eb499bf #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 6157
diff changeset
   164
1823
6ebeee55f0c4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
   165
isVisualStartable
2844
9b5742ab47d6 comment only
Claus Gittinger <cg@exept.de>
parents: 2744
diff changeset
   166
    "return true, if this application can be started via #open.
17168
26ea2eb499bf #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 6157
diff changeset
   167
     (to allow start of a subclass instance via double-click in the browser)"
2844
9b5742ab47d6 comment only
Claus Gittinger <cg@exept.de>
parents: 2744
diff changeset
   168
1823
6ebeee55f0c4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
   169
    ^ self ~~ SystemStatusMonitor
6ebeee55f0c4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
   170
6ebeee55f0c4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
   171
    "Created: / 10.8.1998 / 16:02:23 / cg"
6ebeee55f0c4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
   172
    "Modified: / 10.8.1998 / 16:02:41 / cg"
6ebeee55f0c4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
   173
!
6ebeee55f0c4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
   174
981
82fa38667915 renamed
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   175
open
17225
2313780b08fb #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17168
diff changeset
   176
    |top menuPanel menu monitor|
981
82fa38667915 renamed
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   177
82fa38667915 renamed
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   178
    top := StandardSystemView new.
17225
2313780b08fb #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17168
diff changeset
   179
2313780b08fb #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17168
diff changeset
   180
    monitor := self in:top.
2313780b08fb #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17168
diff changeset
   181
    monitor layout:(LayoutFrame
2313780b08fb #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17168
diff changeset
   182
        leftFraction:0 offset:0
2313780b08fb #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17168
diff changeset
   183
        rightFraction:1 offset:0
2313780b08fb #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17168
diff changeset
   184
        topFraction:0 offset:30
2313780b08fb #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17168
diff changeset
   185
        bottomFraction:1 offset:0).
2313780b08fb #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17168
diff changeset
   186
2313780b08fb #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17168
diff changeset
   187
    menuPanel := MenuPanel in:top.
2313780b08fb #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17168
diff changeset
   188
    menuPanel layout:(LayoutFrame
2313780b08fb #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17168
diff changeset
   189
        leftFraction:0 offset:0
2313780b08fb #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17168
diff changeset
   190
        rightFraction:1 offset:0
2313780b08fb #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17168
diff changeset
   191
        topFraction:0 offset:0
2313780b08fb #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17168
diff changeset
   192
        bottomFraction:0 offset:30).
2313780b08fb #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17168
diff changeset
   193
    menuPanel verticalLayout:false.
2313780b08fb #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17168
diff changeset
   194
    menu := self mainMenu decodeAsLiteralArray.
2313780b08fb #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17168
diff changeset
   195
    menu findGuiResourcesIn:monitor.
2313780b08fb #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17168
diff changeset
   196
    menu receiver:monitor.
2313780b08fb #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17168
diff changeset
   197
    menuPanel menu:menu.
2313780b08fb #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17168
diff changeset
   198
981
82fa38667915 renamed
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   199
    top extent:monitor preferredExtent.
82fa38667915 renamed
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   200
    top label:self defaultLabel.
82fa38667915 renamed
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   201
    top icon:self defaultIcon.
2410
292d61292ac8 Reurn the monitor in #open.
Stefan Vogel <sv@exept.de>
parents: 1897
diff changeset
   202
    top open.
292d61292ac8 Reurn the monitor in #open.
Stefan Vogel <sv@exept.de>
parents: 1897
diff changeset
   203
292d61292ac8 Reurn the monitor in #open.
Stefan Vogel <sv@exept.de>
parents: 1897
diff changeset
   204
    ^ monitor
981
82fa38667915 renamed
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   205
82fa38667915 renamed
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   206
    "
82fa38667915 renamed
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   207
     ProcessMonitor open
82fa38667915 renamed
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   208
    "
82fa38667915 renamed
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   209
82fa38667915 renamed
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   210
    "Created: 23.1.1997 / 02:53:42 / cg"
82fa38667915 renamed
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   211
! !
82fa38667915 renamed
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   212
82fa38667915 renamed
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   213
!SystemStatusMonitor methodsFor:'destroying'!
82fa38667915 renamed
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   214
3825
291fef465a5b destroy - release
Claus Gittinger <cg@exept.de>
parents: 3024
diff changeset
   215
release
981
82fa38667915 renamed
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   216
    updateBlock notNil ifTrue:[
3825
291fef465a5b destroy - release
Claus Gittinger <cg@exept.de>
parents: 3024
diff changeset
   217
        Processor removeTimedBlock:updateBlock.
291fef465a5b destroy - release
Claus Gittinger <cg@exept.de>
parents: 3024
diff changeset
   218
        updateBlock := nil.
981
82fa38667915 renamed
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   219
    ].
3825
291fef465a5b destroy - release
Claus Gittinger <cg@exept.de>
parents: 3024
diff changeset
   220
    listUpdateBlock notNil ifTrue:[
291fef465a5b destroy - release
Claus Gittinger <cg@exept.de>
parents: 3024
diff changeset
   221
        Processor removeTimedBlock:listUpdateBlock.
291fef465a5b destroy - release
Claus Gittinger <cg@exept.de>
parents: 3024
diff changeset
   222
        listUpdateBlock := nil.
291fef465a5b destroy - release
Claus Gittinger <cg@exept.de>
parents: 3024
diff changeset
   223
    ].
291fef465a5b destroy - release
Claus Gittinger <cg@exept.de>
parents: 3024
diff changeset
   224
    updateProcess notNil ifTrue:[
291fef465a5b destroy - release
Claus Gittinger <cg@exept.de>
parents: 3024
diff changeset
   225
        updateProcess terminate.
291fef465a5b destroy - release
Claus Gittinger <cg@exept.de>
parents: 3024
diff changeset
   226
        updateProcess := nil.
291fef465a5b destroy - release
Claus Gittinger <cg@exept.de>
parents: 3024
diff changeset
   227
    ].
291fef465a5b destroy - release
Claus Gittinger <cg@exept.de>
parents: 3024
diff changeset
   228
    super release
981
82fa38667915 renamed
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   229
82fa38667915 renamed
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   230
    "Created: 23.1.1997 / 02:26:50 / cg"
82fa38667915 renamed
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   231
! !
82fa38667915 renamed
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   232
82fa38667915 renamed
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   233
!SystemStatusMonitor methodsFor:'drawing'!
82fa38667915 renamed
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   234
17168
26ea2eb499bf #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 6157
diff changeset
   235
titleLine
26ea2eb499bf #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 6157
diff changeset
   236
    self subclassResponsibility
26ea2eb499bf #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 6157
diff changeset
   237
!
26ea2eb499bf #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 6157
diff changeset
   238
6157
333cde2a5ec7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6156
diff changeset
   239
updateList
333cde2a5ec7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6156
diff changeset
   240
    self subclassResponsibility
333cde2a5ec7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6156
diff changeset
   241
!
333cde2a5ec7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6156
diff changeset
   242
333cde2a5ec7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6156
diff changeset
   243
updateStatus:arg
333cde2a5ec7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6156
diff changeset
   244
    self subclassResponsibility
333cde2a5ec7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6156
diff changeset
   245
!
333cde2a5ec7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6156
diff changeset
   246
981
82fa38667915 renamed
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   247
updateView
82fa38667915 renamed
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   248
    self updateList.
2488
65689c6d5bd6 changes to avoid loosing the selection when the list is updated
Claus Gittinger <cg@exept.de>
parents: 2410
diff changeset
   249
    self updateStatus:nil
981
82fa38667915 renamed
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   250
2488
65689c6d5bd6 changes to avoid loosing the selection when the list is updated
Claus Gittinger <cg@exept.de>
parents: 2410
diff changeset
   251
    "Created: / 23.1.1997 / 02:27:05 / cg"
65689c6d5bd6 changes to avoid loosing the selection when the list is updated
Claus Gittinger <cg@exept.de>
parents: 2410
diff changeset
   252
    "Modified: / 14.12.1999 / 20:47:37 / cg"
981
82fa38667915 renamed
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   253
! !
82fa38667915 renamed
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   254
82fa38667915 renamed
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   255
!SystemStatusMonitor methodsFor:'events'!
82fa38667915 renamed
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   256
82fa38667915 renamed
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   257
canHandle:key
82fa38667915 renamed
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   258
    ^ key == #InspectIt
82fa38667915 renamed
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   259
82fa38667915 renamed
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   260
    "Created: 23.1.1997 / 02:27:15 / cg"
82fa38667915 renamed
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   261
!
82fa38667915 renamed
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   262
82fa38667915 renamed
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   263
keyPress:key x:x y:y
82fa38667915 renamed
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   264
    <resource: #keyboard ( #InspectIt ) >
82fa38667915 renamed
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   265
82fa38667915 renamed
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   266
    key == #InspectIt ifTrue:[
1897
76292e485360 disabled toggleSelect
Claus Gittinger <cg@exept.de>
parents: 1823
diff changeset
   267
	^ self inspectSelection.
981
82fa38667915 renamed
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   268
    ].
82fa38667915 renamed
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   269
    ^ super keyPress:key x:x y:y
82fa38667915 renamed
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   270
82fa38667915 renamed
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   271
    "Modified: 23.1.1997 / 02:27:27 / cg"
82fa38667915 renamed
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   272
    "Created: 23.1.1997 / 02:27:45 / cg"
82fa38667915 renamed
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   273
! !
82fa38667915 renamed
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   274
82fa38667915 renamed
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   275
!SystemStatusMonitor methodsFor:'initialization'!
82fa38667915 renamed
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   276
82fa38667915 renamed
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   277
initialize
82fa38667915 renamed
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   278
    |v|
82fa38667915 renamed
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   279
82fa38667915 renamed
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   280
    super initialize.
82fa38667915 renamed
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   281
82fa38667915 renamed
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   282
    v := HVScrollableView for:SelectionInListView miniScrollerH:true in:self.
82fa38667915 renamed
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   283
    v origin:0.0@0.0 corner:1.0@1.0.
82fa38667915 renamed
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   284
82fa38667915 renamed
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   285
    listView := v scrolledView.
1273
3a8a91e6c5fa give my listView a fixed font.
Claus Gittinger <cg@exept.de>
parents: 1053
diff changeset
   286
    listView font:(EditTextView defaultFont).
981
82fa38667915 renamed
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   287
    listView menuHolder:self; menuPerformer:self; menuMessage:#statusMenu. 
82fa38667915 renamed
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   288
82fa38667915 renamed
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   289
    listView multipleSelectOk:true.
1897
76292e485360 disabled toggleSelect
Claus Gittinger <cg@exept.de>
parents: 1823
diff changeset
   290
    "/ listView toggleSelect:true.
981
82fa38667915 renamed
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   291
    listView delegate:(KeyboardForwarder toView:self).
82fa38667915 renamed
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   292
    listView doubleClickAction:[:line | self doubleClicked].
82fa38667915 renamed
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   293
82fa38667915 renamed
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   294
    updateDelay := 0.5.
82fa38667915 renamed
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   295
    listUpdateDelay := 5.
82fa38667915 renamed
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   296
82fa38667915 renamed
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   297
    "/ event mode is no longer used;
82fa38667915 renamed
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   298
    "/ this event support may vanish
82fa38667915 renamed
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   299
    Processor isPureEventDriven ifTrue:[
2488
65689c6d5bd6 changes to avoid loosing the selection when the list is updated
Claus Gittinger <cg@exept.de>
parents: 2410
diff changeset
   300
        updateBlock := [self updateStatus:nil].
65689c6d5bd6 changes to avoid loosing the selection when the list is updated
Claus Gittinger <cg@exept.de>
parents: 2410
diff changeset
   301
        listUpdateBlock := [self updateList].
981
82fa38667915 renamed
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   302
    ].
82fa38667915 renamed
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   303
82fa38667915 renamed
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   304
    "
82fa38667915 renamed
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   305
     ProcessMonitor open
82fa38667915 renamed
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   306
    "
82fa38667915 renamed
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   307
2488
65689c6d5bd6 changes to avoid loosing the selection when the list is updated
Claus Gittinger <cg@exept.de>
parents: 2410
diff changeset
   308
    "Modified: / 14.12.1999 / 20:47:57 / cg"
981
82fa38667915 renamed
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   309
!
82fa38667915 renamed
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   310
82fa38667915 renamed
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   311
mapped
82fa38667915 renamed
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   312
    super mapped.
2488
65689c6d5bd6 changes to avoid loosing the selection when the list is updated
Claus Gittinger <cg@exept.de>
parents: 2410
diff changeset
   313
    self updateStatus:nil.
981
82fa38667915 renamed
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   314
    self updateList.
82fa38667915 renamed
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   315
2488
65689c6d5bd6 changes to avoid loosing the selection when the list is updated
Claus Gittinger <cg@exept.de>
parents: 2410
diff changeset
   316
    "Created: / 23.1.1997 / 02:30:05 / cg"
65689c6d5bd6 changes to avoid loosing the selection when the list is updated
Claus Gittinger <cg@exept.de>
parents: 2410
diff changeset
   317
    "Modified: / 14.12.1999 / 20:47:54 / cg"
981
82fa38667915 renamed
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   318
!
82fa38667915 renamed
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   319
82fa38667915 renamed
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   320
realize
82fa38667915 renamed
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   321
    super realize.
82fa38667915 renamed
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   322
82fa38667915 renamed
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   323
    self startUpdateProcess.
82fa38667915 renamed
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   324
82fa38667915 renamed
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   325
    "Created: 23.1.1997 / 02:30:28 / cg"
82fa38667915 renamed
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   326
!
82fa38667915 renamed
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   327
82fa38667915 renamed
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   328
reinitialize
82fa38667915 renamed
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   329
    updateProcess := nil.
82fa38667915 renamed
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   330
    super reinitialize.
82fa38667915 renamed
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   331
    self startUpdateProcess.
82fa38667915 renamed
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   332
82fa38667915 renamed
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   333
    "Modified: 22.12.1995 / 22:51:14 / cg"
82fa38667915 renamed
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   334
    "Created: 23.1.1997 / 02:30:43 / cg"
82fa38667915 renamed
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   335
!
82fa38667915 renamed
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   336
82fa38667915 renamed
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   337
startUpdateProcess
82fa38667915 renamed
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   338
    updateBlock notNil ifTrue:[
2488
65689c6d5bd6 changes to avoid loosing the selection when the list is updated
Claus Gittinger <cg@exept.de>
parents: 2410
diff changeset
   339
        Processor addTimedBlock:updateBlock afterSeconds:updateDelay.
65689c6d5bd6 changes to avoid loosing the selection when the list is updated
Claus Gittinger <cg@exept.de>
parents: 2410
diff changeset
   340
        Processor addTimedBlock:listUpdateBlock afterSeconds:listUpdateDelay.
981
82fa38667915 renamed
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   341
    ] ifFalse:[
2488
65689c6d5bd6 changes to avoid loosing the selection when the list is updated
Claus Gittinger <cg@exept.de>
parents: 2410
diff changeset
   342
        updateProcess := [
65689c6d5bd6 changes to avoid loosing the selection when the list is updated
Claus Gittinger <cg@exept.de>
parents: 2410
diff changeset
   343
            [
65689c6d5bd6 changes to avoid loosing the selection when the list is updated
Claus Gittinger <cg@exept.de>
parents: 2410
diff changeset
   344
                |id cnt myDelay|
992
311227ea4edb reuse delays
Claus Gittinger <cg@exept.de>
parents: 981
diff changeset
   345
3024
51e109cb8ae0 dynamic updateDelay
Claus Gittinger <cg@exept.de>
parents: 2844
diff changeset
   346
                myDelay := Delay forSeconds:updateDelay.
981
82fa38667915 renamed
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   347
2488
65689c6d5bd6 changes to avoid loosing the selection when the list is updated
Claus Gittinger <cg@exept.de>
parents: 2410
diff changeset
   348
                "
3024
51e109cb8ae0 dynamic updateDelay
Claus Gittinger <cg@exept.de>
parents: 2844
diff changeset
   349
                 every updateDelay (0.5), we look which process runs;
2488
65689c6d5bd6 changes to avoid loosing the selection when the list is updated
Claus Gittinger <cg@exept.de>
parents: 2410
diff changeset
   350
                 every half second, the status is updated.
3024
51e109cb8ae0 dynamic updateDelay
Claus Gittinger <cg@exept.de>
parents: 2844
diff changeset
   351
                 every listUpdateDelay (5s), the list of processes is
2488
65689c6d5bd6 changes to avoid loosing the selection when the list is updated
Claus Gittinger <cg@exept.de>
parents: 2410
diff changeset
   352
                 built up again
65689c6d5bd6 changes to avoid loosing the selection when the list is updated
Claus Gittinger <cg@exept.de>
parents: 2410
diff changeset
   353
                "
65689c6d5bd6 changes to avoid loosing the selection when the list is updated
Claus Gittinger <cg@exept.de>
parents: 2410
diff changeset
   354
                [true] whileTrue:[
3024
51e109cb8ae0 dynamic updateDelay
Claus Gittinger <cg@exept.de>
parents: 2844
diff changeset
   355
                    ((listUpdateDelay // updateDelay) max:2) - 1 timesRepeat:[
2488
65689c6d5bd6 changes to avoid loosing the selection when the list is updated
Claus Gittinger <cg@exept.de>
parents: 2410
diff changeset
   356
                        myDelay wait.
65689c6d5bd6 changes to avoid loosing the selection when the list is updated
Claus Gittinger <cg@exept.de>
parents: 2410
diff changeset
   357
                        self updateStatus:nil.
65689c6d5bd6 changes to avoid loosing the selection when the list is updated
Claus Gittinger <cg@exept.de>
parents: 2410
diff changeset
   358
                    ].
65689c6d5bd6 changes to avoid loosing the selection when the list is updated
Claus Gittinger <cg@exept.de>
parents: 2410
diff changeset
   359
                    myDelay wait.
65689c6d5bd6 changes to avoid loosing the selection when the list is updated
Claus Gittinger <cg@exept.de>
parents: 2410
diff changeset
   360
                    self updateList.
65689c6d5bd6 changes to avoid loosing the selection when the list is updated
Claus Gittinger <cg@exept.de>
parents: 2410
diff changeset
   361
                ]
6156
2b0398bd0ed6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3825
diff changeset
   362
            ] ifCurtailed:[
2488
65689c6d5bd6 changes to avoid loosing the selection when the list is updated
Claus Gittinger <cg@exept.de>
parents: 2410
diff changeset
   363
                updateProcess := nil
65689c6d5bd6 changes to avoid loosing the selection when the list is updated
Claus Gittinger <cg@exept.de>
parents: 2410
diff changeset
   364
            ]
65689c6d5bd6 changes to avoid loosing the selection when the list is updated
Claus Gittinger <cg@exept.de>
parents: 2410
diff changeset
   365
        ]  forkAt:(Processor userSchedulingPriority + 1).
65689c6d5bd6 changes to avoid loosing the selection when the list is updated
Claus Gittinger <cg@exept.de>
parents: 2410
diff changeset
   366
        updateProcess name:'monitor [' , 
65689c6d5bd6 changes to avoid loosing the selection when the list is updated
Claus Gittinger <cg@exept.de>
parents: 2410
diff changeset
   367
                           Processor activeProcess id printString ,
65689c6d5bd6 changes to avoid loosing the selection when the list is updated
Claus Gittinger <cg@exept.de>
parents: 2410
diff changeset
   368
                           '] update'.
65689c6d5bd6 changes to avoid loosing the selection when the list is updated
Claus Gittinger <cg@exept.de>
parents: 2410
diff changeset
   369
        "
65689c6d5bd6 changes to avoid loosing the selection when the list is updated
Claus Gittinger <cg@exept.de>
parents: 2410
diff changeset
   370
         raise my own priority
65689c6d5bd6 changes to avoid loosing the selection when the list is updated
Claus Gittinger <cg@exept.de>
parents: 2410
diff changeset
   371
        "
65689c6d5bd6 changes to avoid loosing the selection when the list is updated
Claus Gittinger <cg@exept.de>
parents: 2410
diff changeset
   372
        Processor activeProcess priority:(Processor userSchedulingPriority + 2)
981
82fa38667915 renamed
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   373
    ].
82fa38667915 renamed
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   374
2488
65689c6d5bd6 changes to avoid loosing the selection when the list is updated
Claus Gittinger <cg@exept.de>
parents: 2410
diff changeset
   375
    "Created: / 23.1.1997 / 02:30:58 / cg"
65689c6d5bd6 changes to avoid loosing the selection when the list is updated
Claus Gittinger <cg@exept.de>
parents: 2410
diff changeset
   376
    "Modified: / 14.12.1999 / 20:47:50 / cg"
981
82fa38667915 renamed
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   377
! !
82fa38667915 renamed
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   378
17225
2313780b08fb #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17168
diff changeset
   379
!SystemStatusMonitor methodsFor:'menu'!
2313780b08fb #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17168
diff changeset
   380
2313780b08fb #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17168
diff changeset
   381
closeRequestToTopView
2313780b08fb #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17168
diff changeset
   382
    self topView closeRequest
2313780b08fb #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17168
diff changeset
   383
!
2313780b08fb #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17168
diff changeset
   384
18501
b540eb4f289b #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 17225
diff changeset
   385
menuChangeUpdateInterval
b540eb4f289b #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 17225
diff changeset
   386
    |newInterval|
b540eb4f289b #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 17225
diff changeset
   387
b540eb4f289b #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 17225
diff changeset
   388
    newInterval := Dialog request:'Update interval (seconds):' initialAnswer:updateDelay printString.
b540eb4f289b #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 17225
diff changeset
   389
    newInterval isEmptyOrNil ifTrue:[^ self].
b540eb4f289b #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 17225
diff changeset
   390
    updateDelay := Number readFrom:newInterval onError:[updateDelay].
b540eb4f289b #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 17225
diff changeset
   391
b540eb4f289b #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 17225
diff changeset
   392
    "Created: / 29-10-2018 / 15:20:47 / Claus Gittinger"
b540eb4f289b #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 17225
diff changeset
   393
!
b540eb4f289b #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 17225
diff changeset
   394
17225
2313780b08fb #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17168
diff changeset
   395
selectionIndicesDo:aBlock
2313780b08fb #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17168
diff changeset
   396
    "evaluate aBlock on all selected indices"
2313780b08fb #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17168
diff changeset
   397
2313780b08fb #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17168
diff changeset
   398
    |sel|
2313780b08fb #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17168
diff changeset
   399
2313780b08fb #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17168
diff changeset
   400
    sel := listView selection.
2313780b08fb #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17168
diff changeset
   401
    sel isNil ifTrue:[^ self].
2313780b08fb #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17168
diff changeset
   402
2313780b08fb #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17168
diff changeset
   403
    (sel isKindOf:Collection) ifTrue:[
2313780b08fb #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17168
diff changeset
   404
        sel do:aBlock
2313780b08fb #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17168
diff changeset
   405
    ] ifFalse:[
2313780b08fb #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17168
diff changeset
   406
        aBlock value:sel.
2313780b08fb #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17168
diff changeset
   407
    ].
2313780b08fb #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17168
diff changeset
   408
2313780b08fb #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17168
diff changeset
   409
    "Created: 23.1.1997 / 03:11:24 / cg"
2313780b08fb #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17168
diff changeset
   410
! !
2313780b08fb #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17168
diff changeset
   411
2313780b08fb #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17168
diff changeset
   412
!SystemStatusMonitor methodsFor:'private'!
2313780b08fb #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17168
diff changeset
   413
2313780b08fb #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17168
diff changeset
   414
installDelayedUpdate
2313780b08fb #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17168
diff changeset
   415
    updateBlock notNil ifTrue:[
2313780b08fb #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17168
diff changeset
   416
        Processor removeTimedBlock:listUpdateBlock.
2313780b08fb #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17168
diff changeset
   417
        Processor addTimedBlock:listUpdateBlock afterSeconds:listUpdateDelay
2313780b08fb #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17168
diff changeset
   418
    ].
2313780b08fb #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17168
diff changeset
   419
! !
2313780b08fb #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17168
diff changeset
   420
981
82fa38667915 renamed
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   421
!SystemStatusMonitor methodsFor:'queries'!
82fa38667915 renamed
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   422
18521
2f7064ec0374 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 18503
diff changeset
   423
computePreferredExtent
981
82fa38667915 renamed
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   424
    "return my preferred extent"
82fa38667915 renamed
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   425
17225
2313780b08fb #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17168
diff changeset
   426
    ^ ((self font widthOf:self titleLine) + 400) @ 250
981
82fa38667915 renamed
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   427
18521
2f7064ec0374 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 18503
diff changeset
   428
    "Created: / 09-11-2018 / 20:01:19 / Claus Gittinger"
981
82fa38667915 renamed
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   429
! !
82fa38667915 renamed
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   430
17168
26ea2eb499bf #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 6157
diff changeset
   431
!SystemStatusMonitor methodsFor:'user actions'!
26ea2eb499bf #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 6157
diff changeset
   432
26ea2eb499bf #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 6157
diff changeset
   433
doubleClicked
26ea2eb499bf #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 6157
diff changeset
   434
    "intentionally blank here - to be redefined in subclasses"
26ea2eb499bf #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 6157
diff changeset
   435
    
26ea2eb499bf #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 6157
diff changeset
   436
    ^ self 
26ea2eb499bf #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 6157
diff changeset
   437
!
26ea2eb499bf #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 6157
diff changeset
   438
26ea2eb499bf #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 6157
diff changeset
   439
inspectSelection
26ea2eb499bf #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 6157
diff changeset
   440
    "intentionally blank here - to be redefined in subclasses"
26ea2eb499bf #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 6157
diff changeset
   441
    
26ea2eb499bf #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 6157
diff changeset
   442
    ^ self 
26ea2eb499bf #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 6157
diff changeset
   443
! !
26ea2eb499bf #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 6157
diff changeset
   444
981
82fa38667915 renamed
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   445
!SystemStatusMonitor class methodsFor:'documentation'!
82fa38667915 renamed
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   446
82fa38667915 renamed
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   447
version
17168
26ea2eb499bf #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 6157
diff changeset
   448
    ^ '$Header$'
18503
a104045b61c8 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 18501
diff changeset
   449
!
a104045b61c8 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 18501
diff changeset
   450
a104045b61c8 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 18501
diff changeset
   451
version_CVS
a104045b61c8 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 18501
diff changeset
   452
    ^ '$Header$'
981
82fa38667915 renamed
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   453
! !
17168
26ea2eb499bf #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 6157
diff changeset
   454