The IDLgrColorbar::Init function method initializes the colorbar object.
Note: Init methods are special lifecycle methods, and as such cannot be called outside the context of object creation. This means that in most cases, you cannot call the Init method directly. There is one exception to this rule: if you write your own subclass of this class, you can call the Init method from within the Init method of the subclass.
Syntax
Obj = OBJ_NEW( 'IDLgrColorbar' [, aRed, aGreen, aBlue] [, PROPERTY=value])
or
Result = Obj->[IDLgrColorbar::]Init([aRed, aGreen, aBlue] [, PROPERTY=value]) (In a lifecycle method only.)
Return Value
When this method is called indirectly, as part of the call to the OBJ_NEW function, the return value is an object reference to the newly-created object.
When called directly within a subclass Init method, the return value is 1 if initialization was successful, or zero otherwise.
Arguments
Note: The values specified by the aRed, aGreen, and aBlue arguments are used to initialize the value of the RED_VALUES, GREEN_VALUES, and BLUE_VALUES, properties of the IDLgrColorbar object.
Note: If aRed, aGreen, and aBlue are not provided, the color palette will default to a 256 entry greyscale ramp.
aRed
A vector containing the red values for the color palette. These values should be within the range of 0 < Value < 255. The number of elements comprising the aRed vector must not exceed 256.
aGreen
A vector containing the green values for the color palette. These values should be within the range of 0 < Value < 255. The number of elements comprising the aGreen vector must not exceed 256.
aBlue
A vector containing the blue values for the color palette. These values should be within the range of 0 < Value < 255. The number of elements comprising the aBlue vector must not exceed 256.
Keywords
Any property listed under IDLgrColorbar Properties that contains the word “Yes” in the “Init” column of the properties table can be initialized during object creation using this method. To initialize the value of a property, specify the property name as a keyword set equal to the appropriate property value.
All other keywords are passed to the superclass of this object.
Version History