eXept Software AG Logo

Smalltalk/X Webserver

Documentation of class 'AbstractBorder':

Home

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

Class: AbstractBorder


Inheritance:

   Object
   |
   +--AbstractBorder
      |
      +--BeveledBorder
      |
      +--Border
      |
      +--MacButtonBorder
      |
      +--RoundButtonBorder
      |
      +--SimpleBorder

Package:
stx:libview
Category:
Graphics-Support
Version:
rev: 1.9 date: 2016/06/08 09:39:49
user: cg
file: AbstractBorder.st directory: libview
module: stx stc-classLibrary: libview
Author:
Claus Gittinger

Description:


Extracted from Border.
Common superclass for border-painters.
This will replace the mixture of window-system supported borders and manually
drawn 3D levels (which is ugly, but served me well for almost 20years now).


Class protocol:

instance creation
o  color: aColor
create a new instance of the receiver with a border of the given color.

o  new
return an initialized instance

o  width: borderWidth
create a new instance of the receiver with a border of the given width
(and default color).

o  width: borderWidth color: aColor
create a new instance of the receiver with a border of the given width
and color.


Instance protocol:

accessing
o  color
get the color; nil if there is no single color

o  color: aColor
set the color

o  level
get the 3D level

o  width
get the width

o  width: aNumber
set the width

o  width: aWidth color: aColor

displaying
o  displayOn: aGC forDisplayBox: aRectangle
display the borders represented by the receiver in the specified rectangle.
The gc is restored after the draw.

initialization
o  initialize

queries
o  allSidesEqual: aSmallInteger
true if all four sides have the same border width;
always true here - provided for compatibility

o  bottomMargin
return the bottom inset.
That is the number of pixels that an instance of me requires at the bottom,
eg. the inset of the view's contents

o  displayBoxFor: aRectangle
return a rectangle representing the overall display box of a component
bordered by the receiver, which has bounds of aRectangle.
That is, the argument outset by the receiver's borders.

o  insetDisplayBoxFor: aRectangle
return a rectangle representing the display box of a component
bordered by the receiver in the outer bounds, aRectangle.
That is, the argument inset by the receiver's borders.

o  leftMargin
return the left inset.
That is the number of pixels that an instance of me requires at the left,
eg. the inset of the view's contents

o  rightMargin
return the right inset.
That is the number of pixels that an instance of me requires at the right,
eg. the inset of the view's contents

o  topMargin
return the top inset.
That is the number of pixels that an instance of me requires at the top,
eg. the inset of the view's contents



ST/X 7.2.0.0; WebServer 1.670 at bd0aa1f87cdd.unknown:8081; Tue, 23 Apr 2024 13:29:00 GMT