I have done a simple patch to get this working. To be honest, I haven't tested the AlignX, but since I was doing wrapText I figured I'd add that in aswell. The patch is based of the latest 1.2 branch in SVN.
Please consider this change for the next release, we are using thinwire as our UI for my company's flagship product now, And we need this to avoid names "cutting-off" in certain tables.
File Added: hyplink_patch.patch.txt
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Implemented and checked into the 1.2 branch. Unified the common features of Hyperlink and Label under an interface called LabelComponent. With this change, Hyperlink can be treated as a Label in every way. This also means that Hyperlink implements the alignX and wrapText properties just like Label does. BEHAVIOR CHANGE: A side effect of this is that Component's getLabel() method will now return an instance of the LabelComponent interface rather than Label. To correct your existing code, you can either cast the return value of getLabel() to a Label, or you can alter the dependent code to use the LabelComponent interface instead.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Setting wordWrap to true behaves differently for Hyperlink components than Labels. On hyperlink components the text is centered vertically, but on Labels it is top aligned. The patch below makes the Hyperlink.setHeight method the same as Label's which fixes this problem.
Logged In: YES
user_id=1033641
Originator: YES
I have done a simple patch to get this working. To be honest, I haven't tested the AlignX, but since I was doing wrapText I figured I'd add that in aswell. The patch is based of the latest 1.2 branch in SVN.
Please consider this change for the next release, we are using thinwire as our UI for my company's flagship product now, And we need this to avoid names "cutting-off" in certain tables.
File Added: hyplink_patch.patch.txt
Patch to enable wrapText & alignX properties on Hyperlink objects
Logged In: YES
user_id=1544509
Originator: NO
Implemented and checked into the 1.2 branch. Unified the common features of Hyperlink and Label under an interface called LabelComponent. With this change, Hyperlink can be treated as a Label in every way. This also means that Hyperlink implements the alignX and wrapText properties just like Label does. BEHAVIOR CHANGE: A side effect of this is that Component's getLabel() method will now return an instance of the LabelComponent interface rather than Label. To correct your existing code, you can either cast the return value of getLabel() to a Label, or you can alter the dependent code to use the LabelComponent interface instead.
Logged In: YES
user_id=1033641
Originator: YES
Setting wordWrap to true behaves differently for Hyperlink components than Labels. On hyperlink components the text is centered vertically, but on Labels it is top aligned. The patch below makes the Hyperlink.setHeight method the same as Label's which fixes this problem.
Index: F:/devel/thinwire-1.2_SVN/src/thinwire/render/web/resources/Hyperlink.js
--- F:/devel/thinwire-1.2_SVN/src/thinwire/render/web/resources/Hyperlink.js (revision 626)
+++ F:/devel/thinwire-1.2_SVN/src/thinwire/render/web/resources/Hyperlink.js (working copy)
@@ -59,7 +59,7 @@
setHeight: function(height) {
arguments.callee.$.call(this, height);
- this._box.style.lineHeight = this._box.style.height;
+ if (this._box.style.whiteSpace == "nowrap") this._box.style.lineHeight = this._box.style.height;
},
setLocation: function(location) {