The Matrix Display Class

Any A+ matrix that is not a simple character matrix can be displayed as an object of class matrix. A display of a variable in this class has five parts: a title area, three label areas, and a value area. The label area above the value area is called the column label area, the one to the left is called the row label area, and the one in the upper left corner is called the corner label area, and the title area is above them all. The value area appears below the title and column label areas, and consists of delineated cells.

If a matrix requires more than just a few cells, then by default, only a submatrix is presented on the screen, and the value area is provided with scrollbars. The particular subarray that appears in the value area is controlled in two ways: by the scrollbars, manipulated by users, and by the attributes firstrow, firstcol, rows, and cols, set by programmers.

The contents of each cell in the value area can be edited.

Visual Representation
     m?10 10100
     labs(//m;/@1 m;/ m)   Corner label; row labels; column labels.
     `m has (`class;`matrix; `label;labs)
     `m has (`selectionmode;`multiple)     Allows multiple rows to be selected simultaneously
     `m has (`rowindex;1 3)
     `m has (`index;2 5)
     show `m

To select a single row manually, simply click on the row desired. To select multiple rows manually, first enable multiple selections by entering:

     `m has (`selectionmode;`multiple)
Then, click on the first of the rows that you want to select. If the other rows are contiguous with the row that you selected, you can simply drag the mouse over the other rows while the left button remains depressed. To select non-contiguous rows, click on the first of the rows that you want to select, and then hold the Ctrl key down while you click on additional rows.

To see which rows have been selected:

     `index of `m
<  2 5

Attributes
See the "Display Attributes" chapter for details concerning all the attributes that apply to objects in the matrix display class, as well as lists of colors and fonts. The keys in the Table of All Display Attributes that pertain to this class are M, ALL, CNFT, NFT, and TOP.

The attributes that are meaningful for the matrix display class (other than the print... attributes) are:

active
ancestors
arrowdown
arrowkeys
arrowleft
arrowlist
arrowright
arrowup
at
atsector
b
bg
blank
bound
class
clear
col
colindex
colindexbg
collabelrows
colors
cols
colsep
colspace
copy
cornerindex
cornerindexbg
cycle
deiconized
delete
doc
done
downto
dynamic
edit
editbg
editfg
editspace
eval
evaluate
execute
extent
exit
f1-f12
fg
firstcol
firstrow
fkeys
focus
followers
followertree
font
foot
freeze
fullscreen
h
H
has
head
hide
hl
hlthickness
hscrollsize
hscrollwith
icon
iconic
iconized
icontitle
in
incurrentworkspace
index
insertabove
insertbelow
is
l
label
labelfg
labelfont
leader
leftto
literal
lower
mapped
na
naturalsize
notify
out
outofcurrentworkspace
parent
pin
preset
primary
protect
protected
r
raise
realize
refer
refresh
request
resize
resizeable
respace
rightto
row
rowbg
rowindex
rowindexbg
rows
rowsep
script
scrollbg
scrollsize
select
selectbg
selectcol
selectcorner
selected
selectionmode
selectrow
sensitive
set
setcol
setfirstcol
setfirstrow
setrow
settings
shadowthickness
shell
shelltitle
show
size
space
stars
state
stateself
syncshow
t
tabfrom
tablist
tabto
title
titlefg
titlefont
titlejustify
upto
vcol
vcols
verify
vrow
vrows
vscrollsize
vscrollwith
w
W
ws
x
X
xs
y
Y
ys
yx
YX
yxs
(Point the mouse cursor to an attribute to display a short description at the bottom of the screen)


doc@aplusdev.org© Copyright 1995–2008 Morgan Stanley Dean Witter & Co. All rights reserved.