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.15 date: 2024/03/04 12:36:15
user: cg
file: AbstractBorder.st directory: libview
module: stx stc-classLibrary: libview

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).

copyright

COPYRIGHT (c) 1997 by eXept Software AG COPYRIGHT (c) 2009 by 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.

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.

queries
o  isAbstract
Return if this class is an abstract class.
True is returned here for myself only; false for subclasses.
Abstract subclasses must redefine this again.


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  dependents

o  dependents: aDependentsCollection
(comment from inherited method)
set the collection of dependents.
The default implementation here uses a global Dictionary to store
dependents which may be too slow for high frequency change&update.
Therefore, some classes (Model) redefine this for better performance.

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  nonWeakDependents

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.7.0.0; WebServer 1.702 at 20f6060372b9.unknown:8081; Sat, 21 Dec 2024 16:12:47 GMT