AT&T Home | AT&T Labs | Research
AT&T Labs, Inc. - Research

The Yoix® Scripting Language

Home | What's New | Grammar | Documentation | Download | License | YChart | YDAT | YWAIT | Byzgraf | FAQs
TableColumn typedict
 
A TableColumn is a custom Yoix component that currently is only designed to be used in a table managed by a TableManager. Yoix programs normally interact with a TableColumn using event handlers and by reading or writing the following fields:
alignment An int that controls the positioning of the text in the tablecolumn. The value should be LEFT, CENTER, or RIGHT, which are all defined in yoix.awt. Reading returns the current alignment. Writing immediately repaints the text using the new alignment.
background The Color that is used to paint the background of the tablecolumn. Reading returns a snapshot of the current color. Writing immediately changes the background to the new color. Storing NULL in background is special and means use the background of the nearest component that contains the tablecolumn and was assigned a background color other than NULL; if no component qualifies the tablecolumn uses VM.screen.background.
border An Object, usually an Insets or Number, that together with the insets field, sets the extent of the highlighted border that is drawn around the tablecolumn. insets determines the maximum size of the border in any direction, independent of the values stored in border. A border that is a number is an easy way to describe a uniform border. Reading returns a snapshot of the current border. Writing immediately sets the border to the new value.
bordercolor The base Color that is used to pick the shadow colors for the highlighted border. The tablecolumn's background is used when bordercolor is NULL. Reading returns a snapshot of the current color. Writing immediately changes the bordercolor to the new color.
cellsize A Dimension that measures distances in units of 72 dots per inch with a height field that is the distance between adjacent lines of text, and a width that is an estimate of the distance between adjacent characters. Reading returns a snapshot of the current cellsize. Writing is not allowed and will result in an invalidaccess error.
columns An int that specifies the number of columns in a tablecolumn. Layout managers usually get the final say, so setting columns should be viewed as a request that will not always be honored. Reading returns the number of columns currently used by the tablecolumn. Writing tries to change the number of columns used by the tablecolumn.
cursor An Object that should be an int, Image, or String that selects the cursor shown when the pointer is over the tablecolumn. A cursor that is an int should be one of the cursors defined in the yoix.awt.Cursor dictionary. A cursor that is an Image can describe the cursor using its size and hotspot fields and often draws it using its paint function. A cursor that is a String should be the name of a cursor that is already defined in yoix.awt.Cursor or the name a local a file or URL that contains a GIF or JPEG image that will be used as the cursor.

Reading returns the current cursor. Writing immediately changes the tablecolumn's cursor to the new value. Storing STANDARD_CURSOR (the default) or NULL in cursor is special and means use the cursor assigned to the nearest component that contains the tablecolumn and was assigned a cursor other than STANDARD_CURSOR; if no component qualifies the tablecolumn uses DEFAULT_CURSOR.

enabled An int that is 1 when the tablecolumn can respond to user input, and 0 otherwise. Reading returns the current state. Writing immediately sets the tablecolumn's state to the new value. This field has not been completely implemented.
extent A Dimension that measures distances in units of 72 dots per inch with a height field that is the vertical size of all the lines of text, and a width that is the horizontal size of the longest line of text. Reading returns a snapshot of the current extent. Writing is not allowed and will result in an invalidaccess error.
focusowner A read-only int that is non-zero when the tablecolumn has the focus.
font The Font, or font name if it is a String, used to paint the text displayed by the tablecolumn. Reading returns a snapshot of the current font. Writing immediately repaints the text in the new font.
foreground The Color used to paint the text displayed by the tablecolumn. Reading returns a snapshot of the current color. Writing immediately repaints the text in the new color. Storing NULL in foreground is special and means use the foreground of the nearest component that contains the tablecolumn and was assigned a foreground color other than NULL; if no component qualifies the tablecolumn uses VM.screen.foreground.
highlighted A read/write field that accepts an int value when being written to and returns a String value when being read from. The int value indicates the row within the column that should be highlighted. The String value is the text that is currently highlighted or NULL if no row in the column is currently highlighted.
index An int that is the number of the row that was most recently selected. Reading returns the selected row number. Writing selects the row without triggering an actionPerformed event.
insets An Object, usually an Insets or Number, that sets margins around the tablecolumn that determine how close text comes to the edges. In addition, insets also determines the maximum size of the highlighted border in any direction, independent of the values stored in border. An insets that is a number is an easy way to describe a uniform margin. Reading returns a snapshot of the current insets. Writing immediately sets the insets to the new value.
ipad An Insets that measures distances in units of 72 dots per inch that adjusts the vertical margins at the top and bottom of each line displayed by the tablecolumn according to the values stored in ipad.top and ipad.bottom. Adjustments corresponding to ipad.left and ipad.right have not been implemented yet. Reading returns a snapshot of the current padding. Writing immediately repaints the text using the new padding.
location A Point that determines the location of the tablecolumn in a coordinate system that has its origin at the upper left corner of the container closest to the tablecolumn (in the component hierarchy) that actually contains it, positive x to the right, positive y down, and a resolution of 72 dots per inch. Reading returns a snapshot of the current location. Writing is allowed, but layout managers usually get the final say, so setting location should be viewed as a request that may not be honored.
origin A Point that is the location of the upper left corner of the printable area (i.e., left corner plus insets) of the tablecolumn in a coordinate system that has its origin at the upper left corner of the first line of text, positive x to the right, positive y down, and a resolution of 72 dots per inch. Reading returns a snapshot of the current origin. Writing immediately sets the origin to the new value.
popup A PopupMenu that is associated with the tablecolumn. Reading returns the current popup menu. Writing immediately shows the popup menu at the point in the tablecolumn's coordinate system specified by the popup menu's location field, assuming of course that the tablecolumn is showing on the screen. Storing TRUE in the popup menu's visible field, which was added in release 1.2.0, is an easy way to show the popup menu that currently belongs to the tablecolumn.
preferredsize A Dimension that is used by layout managers when they need to know the tablecolumn's preferred size in units of 72 dots per inch. A NULL value means the tablecolumn has no preference. A non-positive height or width is allowed and simply means the tablecolumn has no preference for that dimension. Reading returns the current preferred size. Writing changes the preferred size and immediately notifies root.layoutmanager, which means the components contained in root may be repositioned and resized.
requestfocus An int that can be used to request or transfer the keyboard focus. Storing a non-zero value in requestfocus tries to get the focus. Storing 0 tries to transfer the focus. Reading requestfocus does not currently return any useful information.
root An Object that is automatically updated by the interpreter's layout machinery so it is always the top-level object that contains the tablecolumn. For example, put a tablecolumn in a tablemanager and root will be set to that panel; add the tablemanager to a frame and the tablecolumn's root field will be set to that frame. A tablecolumn's event handlers can use root when they need to interact with the other components in the container.
rows An int that specifies the number of rows in a tablecolumn. Layout managers usually get the final say, so setting rows should be viewed as a request that will not always be honored. Reading returns the number of rows currently used by the tablecolumn. Writing tries to change the number of rows used by the tablecolumn.
selected A String that is the text from the row that was most recently selected either directly or by the TableManager that owns this tablecolumn. The tablecolumn's actionPerformed event handler is automatically called when it is not NULL and a selection is made in the tablecolumn. Reading returns the selected text. Writing will set the currently selected text without calling the actionPerformed event handler.
state An int that controls how the border of the tablecolumn, if there is one, is drawn. When state is 0 the left and top parts of the border are drawn in a brighter color than the right and bottom parts, which makes it look like the interior of the tablecolumn is raised. The border colors are reversed when state is 1, which makes it look like the interior of the tablecolumn is depressed.
showing A read-only int that is non-zero when the tablecolumn is showing on the screen.
size A Dimension that determines the size of the tablecolumn in units of 72 dots per inch. Reading returns a snapshot of the current size. Writing is allowed, but layout managers usually get the final say, so setting size should be viewed as a request that may not be honored.
tag A String used to identify the tablecolumn that is either supplied when the tablecolumn is declared, or automatically generated otherwise. Add a tablecolumn to a container, like a Frame or Panel, and the interpreter's layout machinery updates the root field so it points at the top-level container and then adds the tablecolumn, as tag, to the root.components dictionary.
text A String that represents all the rows that are currently loaded in the tablecolumn and uses a newline character to separate individual rows. Writing is not allowed and will result in an invalidaccess error.
value([int row]) A Builtin that returns the text from the specified row or, when no row is specified, the currently selected row.
viewport A Rectangle that completely describes the printable area of the tablecolumn in a coordinate system that has its origin at the upper left corner of the first line of text, positive x to the right, positive y down, and a resolution of 72 dots per inch. In other words, the x and y fields match the corresponding fields in origin, while height and width give the dimensions of the printable area of the tablecolumn. Reading returns a snapshot of the current viewport. Writing is not allowed and will result in an invalidaccess error.
visible An int that is 1 when the tablecolumn is visible, and 0 otherwise. Reading returns the current visibility. Writing immediately sets the tablecolumn's visibility to the new state.
visitcolor The Color used to paint the text in rows that have been selected. Reading returns the current color. Writing immediately repaints the text in selected rows using the new color.
Several permanent fields have not been documented and should not be used in Yoix applications. Event handlers are functions that must be added to a tablecolumn when it is declared. The handlers that work with tablecolumns are listed below; the names should be familiar if you have done some Java programming. The itemStateChanged event handler is only for menus.
 
 Event Handlers:   actionPerformed, componentHidden, componentMoved, componentResized, componentShown, dragDropEnd, dragEnter, dragExit, dragGestureRecognized, dragMouseMoved, dragOver, drop, dropActionChanged, focusGained, focusLost, invocationRun, itemStateChanged, keyPressed, keyReleased, keyTyped, mouseClicked, mouseDragged, mouseEntered, mouseExited, mouseMoved, mousePressed, mouseReleased, mouseWheelMoved
 
 Example:   See the TableManager reference page for a complete table example.
 
 See Also:   Button, Canvas, Checkbox, Choice, Dialog, FileDialog, Frame, Image, Label, List, Panel, postEvent, ScrollPane, Scrollbar, TableManager, TextArea, TextCanvas, TextField, TextTerm, Window

 

Yoix is a registered trademark of AT&T Inc.