[operations] [attributes] [fields] [template] [definition]
[implementation] [documentation]
To use the search tool you need to use a browser which supports JAVA (c)

[next] [prev] [superclass] [next peer] [prev peer] [subclass] [index] [hierarchy]

MemoryThermometer

inherits from BarGraph

Object <- Viewable <- Control <- BarGraph <- MemoryThermometer



Operations

Get list of all operations

UpdateLevel


Attributes

Get list of all attributes

FreeMemoryInKBytesText
PercentMemoryFree
UsedMemoryInKBytesText


Fields

Field Type
Viewable: superview: Viewable
relativeOrigin: Dot
contentSize: Dot
viewFlags: Flags
labelStyle: TextStyle
color: Unsigned
altColor: Unsigned
shadow: Shadow
sound: Playable
HasBorder: border: Border
Control: image: Image
textStyle: TextStyle
controlFlags: Unsigned
level: Fixed
min: Fixed
max: Fixed
target: Object
targetAttribute: OperationNumber
MemoryThermometer: freeMemory: Unsigned


Instance template

instance MemoryThermometer tag;
 relativeOrigin: <0.0,0.0>;
    contentSize: <0.0,0.0>;
      viewFlags: 0x00000000;
     labelStyle: nilObject;
          color: 0;
       altColor: 0;
         shadow: nilObject;
          sound: nilObject;
         border: nilObject;
          image: nilObject;
      textStyle: nilObject;
   controlFlags: 0;
          level: 0;
            min: 0;
            max: 0;
         target: nilObject;
targetAttribute: nilOperation;
     freeMemory: 0;
end instance;

Class definition

Define Class MemoryThermometer;
    inherits from BarGraph;
    
    field freeMemory: Unsigned;
        // cached result of TotalFreeBytes(iSystem)
        
    overrides UpdateLevel;
        // stores free memory in field so other objects can obtain it from
        // this one without recomputing
        
    attribute PercentMemoryFree: Fixed, readOnly;
        // computes percent from field
        // this allows target of self to be self, with this attribute
    attribute FreeMemoryInKBytesText: Text, readOnly;
        // obtains value from free memory field to avoid recomputation
    attribute UsedMemoryInKBytesText: Text, readOnly;
        // obtains value from size of main memory - free memory field to avoid recomputation
end class;