eXept Software AG Logo

Smalltalk/X Webserver

Documentation of class 'Separator':

Home

everywhere
www.exept.de
for:
[back]

Class: Separator


Inheritance:

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

Package:
stx:libwidg2
Category:
Views-Layout
Version:
rev: 1.24 date: 2009/10/24 14:00:07
user: cg
file: Separator.st directory: libwidg2
module: stx stc-classLibrary: libwidg2
Author:
Claus Gittinger

Description:


a simple widget for a separating line. 
To be placed between groups of other widgets.

See examples.


Related information:

    FramedBox
    VariableVerticalPanel
    VariableHorizontalPanel

Instance protocol:

accessing
o  orientation
return the orientation (one of #horizontal or #vertical)

o  orientation: aSymbol
set the orientation to one of #horizontal or #vertical

drawing
o  redrawX: x y: y width: w height: h

o  sizeChanged: how

focus handling
o  wantsFocusWithButtonPress
no, do not catch the keyboard focus on button click

initialization
o  initialize

queries
o  preferredExtent

o  specClass
redefined, since the name of my specClass is nonStandard (i.e. not SeparatorSpec)


Examples:


a separator between two button-panels:


  |top p1 p2 sep|

  top := StandardSystemView new.
  top extent:300@300.

  p1 := VerticalPanelView origin:0.0@0.0 corner:1.0@0.5 in:top.
  p1 bottomInset:5; borderWidth:0.
  p2 := VerticalPanelView origin:0.0@0.5 corner:1.0@1.0 in:top.
  p2 topInset:5; borderWidth:0.

  (Button label:'one' in:p1) width:0.2.
  (Button label:'two' in:p1) width:0.2.
  (Button label:'three' in:p1) width:0.2.

  sep := Separator in:top.
  sep orientation:#horizontal.
  sep origin:0.0@0.5 extent:1.0@10.
  sep topInset:-5; bottomInset:-5.

  (Button label:'four' in:p2) width:0.2.
  (Button label:'five' in:p2) width:0.2.
  (Button label:'six' in:p2) width:0.2.

  top open
vertical:


  |top p1 p2 sep|

  top := StandardSystemView new.
  top extent:300@300.

  p1 := VerticalPanelView origin:0.0@0.0 corner:0.5@1.0 in:top.
  p1 rightInset:5; borderWidth:0.
  p2 := VerticalPanelView origin:0.5@0.0 corner:1.0@1.0 in:top.
  p2 leftInset:5; borderWidth:0.

  (Button label:'one' in:p1) width:0.4.
  (Button label:'two' in:p1) width:0.4.
  (Button label:'three' in:p1) width:0.4.

  sep := Separator in:top.
  sep orientation:#vertical.
  sep origin:0.5@0.0 extent:10@1.0.
  sep leftInset:-5; rightInset:-5.

  (Button label:'four' in:p2) width:0.4.
  (Button label:'five' in:p2) width:0.4.
  (Button label:'six' in:p2) width:0.4.

  top open
with multiple horizontal seps in a panel:


  |top p sep|

  top := StandardSystemView new.
  top extent:300@300.

  p := VerticalPanelView origin:0.0@0.0 corner:1.0@1.0 in:top.
  p verticalLayout:#spreadSpace.
  p horizontalLayout:#center.

  (Button label:'one' in:p).
  (Button label:'two' in:p).
  (Button label:'three' in:p).

  sep := Separator in:p.
  sep orientation:#horizontal.
  sep extent:0.9@10.

  (Button label:'four' in:p).
  (Button label:'five' in:p).

  sep := Separator in:p.
  sep orientation:#horizontal.
  sep extent:0.9@10.

  (Button label:'six' in:p).

  top open


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