Author(s): Isabel Martín García.
Version: 1.11#222 (2004/5/24, 13:8:7 CEST)
Version of last change: 1.9#166 (2003/12/4, 17:39:45 CET)
In addition to the features explained in the introduction, the predicates exported by this module depict tables in which the font weight for the table elements is bold.
If the arguments are not in a correct format the exception error8
will be thrown.
table_widget1
)table_widget1
)
tablewidget1(Title, Header, ElementTable, Footer)
Shows a regular table in a window. The user does not choose a background image.
Example:
tablewidget1('This is the title', 'Header text', [['Number of processors','8'],['Average processors','95'], ['Average Tasks per fork','7.5']], 'Footer text').
Usage:
Title
is a text (an atom) to be used as label, usually not very long.
(genbar1:title/1
)
Header
is a text (an atom) describing the header of the graph.
(genbar1:header/1
)
table_widget1:table(ElementTable)
(table_widget1:table/1
)
Footer
is a text (an atom) describing the footer of the graph.
(genbar1:footer/1
)
tablewidget1(Title, Header, ElementTable, Footer, BackgroundImage)
Shows a regular table in a window. The user must set a background image. See the
image/1
type definition.
Example:
tablewidget1('This is the title', 'Header text', [['Number of processors','8'],['Average processors','95'], ['Average Tasks per fork','7.5']], 'Footer text', './images/rain.gif')
Usage:
Title
is a text (an atom) to be used as label, usually not very long.
(genbar1:title/1
)
Header
is a text (an atom) describing the header of the graph.
(genbar1:header/1
)
table_widget1:table(ElementTable)
(table_widget1:table/1
)
Footer
is a text (an atom) describing the footer of the graph.
(genbar1:footer/1
)
table_widget1:image(BackgroundImage)
(table_widget1:image/1
)
A table is a list of rows, each row must contain the same number of elements, otherwise the table wouldn't be regular and an exception will be thrown by the library. The rows list may not be empty.
table([X]) :- row(X). table([X|Xs]) :- row(X), table(Xs).
Some predicates allow the user to set the widget background image, whose is what this type is intended for. The user has to take into account the following restrictions:
table_widget1
)row([X]) :- cell_value(X). row([X|Xs]) :- cell_value(X), row(Xs).
Each row is a list of elements whose type is
cell_value/1
. A row cannot be an empty list, as you can see in the definition type.
row([X]) :- cell_value(X). row([X|Xs]) :- cell_value(X), row(Xs).
Each row is a list of elements whose type is
cell_value/1
. A row cannot be an empty list, as you can see in the definition type.
This type defines the possible values that a table element have. If any cell value is "
, the cell will be displayed empty.
cell_value(X) :- atomic(X).
Go to the first, previous, next, last section, table of contents.