Mercurial > projects > dwt-addons
comparison dwtx/jface/internal/text/InformationControlReplacer.d @ 138:b6bad70d540a
Regex instanceof changes
author | Frank Benoit <benoit@tionex.de> |
---|---|
date | Sun, 24 Aug 2008 02:26:23 +0200 |
parents | 51e6e63f930e |
children | 26688fec6d23 |
comparison
equal
deleted
inserted
replaced
137:25170b5a8951 | 138:b6bad70d540a |
---|---|
136 */ | 136 */ |
137 public void showInformationControl(Rectangle subjectArea, Object information) { | 137 public void showInformationControl(Rectangle subjectArea, Object information) { |
138 IInformationControl informationControl= getInformationControl(); | 138 IInformationControl informationControl= getInformationControl(); |
139 | 139 |
140 Rectangle controlBounds= fContentBounds; | 140 Rectangle controlBounds= fContentBounds; |
141 if (informationControl instanceof IInformationControlExtension3) { | 141 if ( cast(IInformationControlExtension3)informationControl ) { |
142 IInformationControlExtension3 iControl3= cast(IInformationControlExtension3) informationControl; | 142 IInformationControlExtension3 iControl3= cast(IInformationControlExtension3) informationControl; |
143 Rectangle trim= iControl3.computeTrim(); | 143 Rectangle trim= iControl3.computeTrim(); |
144 controlBounds= Geometry.add(controlBounds, trim); | 144 controlBounds= Geometry.add(controlBounds, trim); |
145 | 145 |
146 /* | 146 /* |
157 Point size= Geometry.getSize(controlBounds); | 157 Point size= Geometry.getSize(controlBounds); |
158 | 158 |
159 // Caveat: some IInformationControls fail unless setSizeConstraints(..) is called with concrete values | 159 // Caveat: some IInformationControls fail unless setSizeConstraints(..) is called with concrete values |
160 informationControl.setSizeConstraints(size.x, size.y); | 160 informationControl.setSizeConstraints(size.x, size.y); |
161 | 161 |
162 if (informationControl instanceof IInformationControlExtension2) | 162 if ( cast(IInformationControlExtension2)informationControl ) |
163 (cast(IInformationControlExtension2) informationControl).setInput(information); | 163 (cast(IInformationControlExtension2) informationControl).setInput(information); |
164 else | 164 else |
165 informationControl.setInformation(information.toString()); | 165 informationControl.setInformation(information.toString()); |
166 | 166 |
167 informationControl.setLocation(location); | 167 informationControl.setLocation(location); |