You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
SmartGWT Canvas and layout overloads set vertical and horizontal alignment
methods, which causes GWT compiler to complain "ambiguous method specified".
e.g.,
setLayoutAlign(Alignment) is for horiz align.
setLayoutAlign(VerticalAlignment) is for vert align.
However, in our uibinder nodes, when we declare
<z:UICanvas layoutAlignment='TOP' ..../>
GWT compiler is confused and complains "ambiguous method specified" because it
does not know which method overload to use.
Proposed Solution
=================
Therefore, the following solution is proposed.
There will be two new interfaces:
[code]
package org.synthful.smartgwt.client;
import com.smartgwt.client.types.Alignment;
import com.smartgwt.client.types.VerticalAlignment;
public interface HasUICanvasAlign {
void setLayoutHAlign(Alignment alignment);
void setLayoutVAlign(VerticalAlignment alignment);
}
package org.synthful.smartgwt.client;
import com.smartgwt.client.types.Alignment;
import com.smartgwt.client.types.VerticalAlignment;
public interface HasUILayoutAlign
extends HasUICanvasAlign{
void setDefaultLayoutHAlign(Alignment alignment);
void setDefaultLayoutVAlign(VerticalAlignment alignment);
}
[/code]
All non-layout canvas wrappers should implement HasUICanvasAlign in the
following manner:
[code]
@Override
public void setLayoutHAlign(Alignment alignment) {
super.setLayoutAlign(alignment);
}
@Override
public void setLayoutVAlign(VerticalAlignment alignment) {
super.setLayoutAlign(alignment);
}
[/code]
All layout canvas wrappers should implement HasUILayoutAlign in the following
manner:
[code]
@Override
public void setDefaultLayoutHAlign(Alignment alignment){
super.setDefaultLayoutAlign(alignment);
}
@Override
public void setDefaultLayoutVAlign(VerticalAlignment alignment){
super.setDefaultLayoutAlign(alignment);
}
@Override
public void setLayoutHAlign(Alignment alignment) {
super.setLayoutAlign(alignment);
}
@Override
public void setLayoutVAlign(VerticalAlignment alignment) {
super.setLayoutAlign(alignment);
}
[/code]
Original issue reported on code.google.com by BlessedGeek on 18 Jun 2010 at 5:42
The text was updated successfully, but these errors were encountered:
Original issue reported on code.google.com by
BlessedGeek
on 18 Jun 2010 at 5:42The text was updated successfully, but these errors were encountered: