eXept Software AG Logo

Smalltalk/X Webserver

Documentation of class 'Border':

Home

Documentation
www.exept.de
Everywhere
for:
[back]

Class: Border


Inheritance:

   Object
   |
   +--AbstractBorder
      |
      +--Border

Package:
stx:libview
Category:
Graphics-Support
Version:
rev: 1.17 date: 2023/11/27 19:34:18
user: cg
file: Border.st directory: libview
module: stx stc-classLibrary: libview

Description:


a border holds the values of a view's (or component's) border.
We have only recently started to change the system to use borders instead of separate
borderWidth, borderColor, level, shadow- and lightColors.
Expect more changes here in the near future..

copyright

COPYRIGHT (c) 1997 by Claus Gittinger / eXept Software AG All Rights Reserved This software is furnished under a license and may be used only in accordance with the terms of that license and with the inclusion of the above copyright notice. This software may not be provided or otherwise made available to, or used by, any other person. No title to or ownership of the software is hereby transferred.

Instance protocol:

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

o  bottomColor: aColor
set the bottomColor

o  bottomWidth

o  bottomWidth: aNumber

o  color: newColor
set all four colors

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

o  leftColor: aColor
set the leftColor

o  leftWidth

o  leftWidth: aNumber

o  leftWidth: leftWidthArg rightWidth: rightWidthArg topWidth: topWidthArg bottomWidth: bottomWidthArg

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

o  rightColor: aColor
set the rightColor

o  rightWidth

o  rightWidth: aNumber

o  setBottomColor: aColor
set the bottomColor

o  setLeftColor: aColor
set the leftColor

o  setRightColor: aColor
set the rightColor

o  setTopColor: aColor
set the topColor

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

o  topColor: aColor
set the topColor

o  topWidth

o  topWidth: aNumber

o  width: w
(comment from inherited method)
set the width

displaying
o  displayOn: aGC forDisplayBox: aRectangle
display the border represented by the receiver in the given rectangle.
The gc's state is restored after the drawing.

initialization
o  initialize

queries
o  bottomMargin

o  leftMargin

o  rightMargin

o  topMargin


Examples:


     |v b|

     v := StandardSystemView extent:100@100.
     v openAndWaitUntilVisible.

     b := Border width:1 color:Color red.
     v border:b
     |v b|

     v := StandardSystemView extent:100@100.
     v openAndWaitUntilVisible.

     b := Border width:10 color:Color red.
     b displayOn:v forDisplayBox:(0@0 corner:90@90).

     Delay waitForSeconds:1.
     b leftColor:Color blue.
     b displayOn:v forDisplayBox:(0@0 corner:90@90).
     Delay waitForSeconds:1.
     b topColor:Color green.
     b displayOn:v forDisplayBox:(0@0 corner:90@90).
     Delay waitForSeconds:1.
     b rightColor:Color yellow.
     b displayOn:v forDisplayBox:(0@0 corner:90@90).
     |v b|

     v := StandardSystemView extent:100@100.
     v openAndWaitUntilVisible.

     b := Border width:10 color:Color red.
     b topColor:Color red.
     b leftColor:Color blue.
     b topColor:Color green.
     b rightColor:Color yellow.
     b leftWidth:10 rightWidth:20 topWidth:5 bottomWidth:15.

     b displayOn:v forDisplayBox:(0@0 corner:90@90).
     |v sub1 sub2 sub3|

     v := StandardSystemView extent:200@200.
     v openAndWaitUntilVisible.

     sub1 := (View in:v) origin:10@10; corner:90@90.
     sub1 border:(SimpleBorder width:10 color:Color red ).
     sub1 realize.
     sub2 := (View in:v) origin:110@10; corner:190@90.
     sub2 border:(Border new width:10; color:Color blue; leftColor:Color red; rightColor:Color red ).
     sub2 realize.
     sub3 := (View in:v) origin:110@110; corner:190@190.
     sub3 border:(SimpleBorder width:10 color:Color green ).
     sub3 realize.

     Delay waitForSeconds:1.
     sub3 border:(Border new width:10; color:Color yellow; leftColor:Color red; rightColor:Color red ).
     |v b|

     v := StandardSystemView extent:100@100.
     v border:(b := Border width:10 color:Color red).
     v openAndWaitUntilVisible.

     Delay waitForSeconds:1.
     b leftColor:Color blue.
     Delay waitForSeconds:1.
     b topColor:Color green.
     Delay waitForSeconds:1.
     b rightColor:Color yellow.
     Delay waitForSeconds:1.
     b leftWidth:10 rightWidth:20 topWidth:5 bottomWidth:15.
     Delay waitForSeconds:1.


ST/X 7.7.0.0; WebServer 1.702 at 20f6060372b9.unknown:8081; Sat, 21 Dec 2024 16:24:05 GMT