GeometricWrapper.st
changeset 2661 14f345ff3b82
parent 1789 f52f0a0d8448
child 3855 1db7742d33ad
equal deleted inserted replaced
2660:87d554e2590f 2661:14f345ff3b82
     7  inclusion of the above copyright notice.   This software may not
     7  inclusion of the above copyright notice.   This software may not
     8  be provided or otherwise made available to, or used by, any
     8  be provided or otherwise made available to, or used by, any
     9  other person.  No title to or ownership of the software is
     9  other person.  No title to or ownership of the software is
    10  hereby transferred.
    10  hereby transferred.
    11 "
    11 "
    12 
       
    13 
       
    14 
       
    15 
       
    16 
       
    17 "{ Package: 'stx:libview2' }"
    12 "{ Package: 'stx:libview2' }"
    18 
    13 
    19 Wrapper subclass:#GeometricWrapper
    14 Wrapper subclass:#GeometricWrapper
    20 	instanceVariableNames:'foregroundColor backgroundColor'
    15 	instanceVariableNames:'foregroundColor backgroundColor'
    21 	classVariableNames:''
    16 	classVariableNames:''
    73 ! !
    68 ! !
    74 
    69 
    75 !GeometricWrapper methodsFor:'accessing'!
    70 !GeometricWrapper methodsFor:'accessing'!
    76 
    71 
    77 backgroundColor
    72 backgroundColor
    78     "return the value of the instance variable 'backgroundColor' (automatically generated)"
       
    79 
       
    80     ^ backgroundColor
    73     ^ backgroundColor
    81 
       
    82     "Created: 10.2.1997 / 14:22:14 / cg"
       
    83 !
    74 !
    84 
    75 
    85 backgroundColor:something
    76 backgroundColor:something
    86     "set the value of the instance variable 'backgroundColor' (automatically generated)"
       
    87 
       
    88     backgroundColor := something.
    77     backgroundColor := something.
    89 
    78     self invalidate.
    90     "Created: 10.2.1997 / 14:22:14 / cg"
       
    91 !
    79 !
    92 
    80 
    93 component:someComponent
    81 component:someComponent
    94     "set the wrappers component. 
    82     "set the wrappers component. 
    95      Redefined to not set the components container - we know, those
    83      Redefined to not set the components container - we know, those
   100     "Created: 28.5.1996 / 23:02:36 / cg"
    88     "Created: 28.5.1996 / 23:02:36 / cg"
   101     "Modified: 28.5.1996 / 23:02:52 / cg"
    89     "Modified: 28.5.1996 / 23:02:52 / cg"
   102 !
    90 !
   103 
    91 
   104 foregroundColor
    92 foregroundColor
   105     "return the value of the instance variable 'foregroundColor' (automatically generated)"
       
   106 
       
   107     ^ foregroundColor
    93     ^ foregroundColor
   108 
       
   109     "Created: 10.2.1997 / 14:22:10 / cg"
       
   110 !
    94 !
   111 
    95 
   112 foregroundColor:something
    96 foregroundColor:something
   113     "set the value of the instance variable 'foregroundColor' (automatically generated)"
       
   114 
       
   115     foregroundColor := something.
    97     foregroundColor := something.
   116 
    98     self invalidate.
   117     "Created: 10.2.1997 / 14:22:10 / cg"
       
   118 ! !
    99 ! !
   119 
   100 
   120 !GeometricWrapper methodsFor:'accessing - bounds'!
   101 !GeometricWrapper methodsFor:'accessing - bounds'!
   121 
   102 
   122 bounds
   103 bounds
   123     "return the components bounds as default bounds"
   104     "return the components bounds as default bounds"
   124 
   105 
   125     bounds notNil ifTrue:[^ bounds].
   106     frame notNil ifTrue:[^ frame].
   126     ^ component bounds rounded
   107     ^ component bounds rounded
   127 
   108 
   128     "Created: 5.6.1996 / 02:29:10 / cg"
   109     "Created: 5.6.1996 / 02:29:10 / cg"
   129     "Modified: 5.6.1996 / 20:30:50 / cg"
   110     "Modified: 5.6.1996 / 20:30:50 / cg"
   130 !
   111 !
   131 
   112 
   132 bounds:newBounds
   113 bounds:newBounds
   133     "set my bounds"
   114     "set my bounds"
   134 
   115 
   135     bounds := newBounds
   116     frame := newBounds
   136 
   117 
   137     "Created: 5.6.1996 / 02:30:00 / cg"
   118     "Created: 5.6.1996 / 02:30:00 / cg"
   138 !
   119 !
   139 
   120 
   140 preferredBounds
   121 preferredBounds
   141     "return the components bounds as preferredBounds"
   122     "return the components bounds as preferredBounds"
   142 
   123 
   143     ^ component bounds rounded
   124     ^ component bounds ceiling
   144 
       
   145     "Created: 9.5.1996 / 10:28:10 / cg"
       
   146     "Modified: 5.6.1996 / 20:30:54 / cg"
       
   147 ! !
   125 ! !
   148 
   126 
   149 !GeometricWrapper methodsFor:'initialize / release'!
   127 !GeometricWrapper methodsFor:'initialize / release'!
   150 
   128 
   151 flushCoordinateCaches
   129 flushCoordinateCaches
   159 
   137 
   160 ! !
   138 ! !
   161 
   139 
   162 !GeometricWrapper methodsFor:'view protocol mimicri'!
   140 !GeometricWrapper methodsFor:'view protocol mimicri'!
   163 
   141 
       
   142 destroyComponent
       
   143     "component is not a visualPart. Ignored here"
       
   144 !
       
   145 
   164 realize
   146 realize
   165     "my container realized itself. Ignored here"
   147     "my container realized itself. Ignored here"
   166 
   148 
   167     "Created: 5.6.1996 / 02:32:39 / cg"
   149     "Created: 5.6.1996 / 02:32:39 / cg"
   168 ! !
   150 ! !
   169 
   151 
   170 !GeometricWrapper class methodsFor:'documentation'!
   152 !GeometricWrapper class methodsFor:'documentation'!
   171 
   153 
   172 version
   154 version
   173     ^ '$Header: /cvs/stx/stx/libview2/GeometricWrapper.st,v 1.12 2003-08-18 12:13:39 cg Exp $'
   155     ^ '$Header: /cvs/stx/stx/libview2/GeometricWrapper.st,v 1.13 2009-05-08 11:54:36 cg Exp $'
   174 ! !
   156 ! !