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