eXept Software AG Logo

Smalltalk/X Webserver

Documentation of class 'TabSpecRuler':

Home

everywhere
www.exept.de
for:
[back]

Class: TabSpecRuler


Inheritance:

   Object
   |
   +--GraphicsContext
      |
      +--DeviceGraphicsContext
         |
         +--GraphicsMedium
            |
            +--DisplaySurface
               |
               +--SimpleView
                  |
                  +--TabSpecRuler

Package:
stx:libwidg2
Category:
Views-Misc
Version:
rev: 1.20 date: 2009/02/26 21:26:34
user: stefan
file: TabSpecRuler.st directory: libwidg2
module: stx stc-classLibrary: libwidg2

Description:


It shows the tabulator positions of a TabulatorSpecification
and allows its tab positions to be manipulated.
(as shown in a FileBrowser, when the longList is enabled).

[author]
    Claus Gittinger


Related information:

    TabulatorSpecification
    Ruler
    ListView

Class protocol:

defaults
o  updateStyleCache


Instance protocol:

accessing
o  beAsynchronous
clear synchronousOperation mode;
if on, a move is immediately forwarded to dependents;
of off, its forwarded when the mouse button is released.

o  beSynchronous
set synchronousOperation mode;
if on, a move is immediately forwarded to dependents;
of off, its forwarded when the mouse button is released.

o  fixedTabs
return the collection of tabIndices which are fixed;
or nil, if all are variable

o  fixedTabs: something
set the collection of tabIndices which are fixed;
nil, if all are to be variable

o  hiddenTabs
return the collection of tabs which are to be hidden
(or nil if all are to be shown)

o  hiddenTabs: something
set the collection of tabs which are to be hidden
(or nil if all are to be shown)

o  isSynchronous
return the synchronousOperation mode settings value

o  masterView: aView
set my master view - if non-nil, I will follow the masters scroll-offset

o  synchronousOperation

** This is an obsolete interface - do not use it (it may vanish in future versions) **

o  synchronousOperation: something

** This is an obsolete interface - do not use it (it may vanish in future versions) **

o  tabsAreVariable
return the value of the instance variable 'tabsAreVariable' (automatically generated)

o  tabsAreVariable: something
set/clear movability of tabs. If false, tab positions are only
displayed - but cannot be moved by the user.
The default is true.

o  tabulatorSpecification: aTabSpec
set my tabulator specification

o  titles: aCollectionOfStrings

event handling
o  buttonMotion: state x: x y: y
mouse-button was moved while pressed;
redraw thumb at its new position and, if scroll-mode is asynchronous,
the scroll action is performed

o  buttonPress: button x: x y: y
mouse-button was pressed;
start moving the tab

o  buttonRelease: button x: x y: y
mouse-button was pressed;
start moving the tab

o  pointerLeave: state
mouse left view - restore cursor.

o  update: something with: aParameter from: changedObject

initialization
o  initStyle

o  initialize

private
o  canMoveTabAtX: x

o  indexOfTabAtX: x

o  moveTabAtIndex: idx toX: movedTabX

queries
o  widthOfContents

redrawing
o  drawHandleAtX: x type: handleType
redraw a tabulator handle

o  positionOfTabAtIndex: idx

o  redraw
redraw the handles from by tabSpec

o  redrawTabAtIndex: idx
redraw a single handle

o  redrawTitleAtIndex: idx
redraw a single handle


Examples:



    |top head spec|

    top := View new.
    top extent:300@100.

    head := TabSpecRuler in:top.
    head width:1.0.
    head level:1.

    spec := TabulatorSpecification new.
    spec unit:#inch.
    spec positions:#(0     1     2.5    3.5    4       5        ).
    spec align:    #(#left #left #right #right #center #decimal ).

    head tabulatorSpecification:spec.
    top open.


    |top head spec|

    top := View new.
    top extent:300@100.

    head := TabSpecRuler in:top.
    head width:1.0.
    head level:1.
    head titles:#('col1' 'col2' 'col3' 'col4' 'col5' 'col6').

    spec := TabulatorSpecification new.
    spec unit:#inch.
    spec positions:#(0     1     2.5    3.5    4       5        ).
    spec align:    #(#left #left #right #right #center #decimal ).

    head tabulatorSpecification:spec.
    top open.


ST/X 6.1.1; WebServer 1.620 at exept:8081; Tue, 22 May 2012 22:37:19 GMT