Issue Details (XML | Word | Printable)

Key: RCP-498
Type: New Feature New Feature
Status: Open Open
Priority: Critical Critical
Assignee: Unassigned
Reporter: Luis Santos
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
Spring Rich Client Project

The label does not get the correct attrbites

Created: 23/Nov/07 10:30 AM   Updated: 05/Nov/08 02:36 AM
Component/s: Core
Affects Version/s: None
Fix Version/s: 1.x

Time Tracking:
Not Specified

File Attachments: 1. Text File attributesPatch.txt (5 kB)



 Description  « Hide

when you add a property to a form in the form of
formBuilder.add( propertyName, attributes)
the jLabel is not afected by the attutes defined.

More precisely, if an valign or rowspan attribute is specified it should also be applied to the label.

Proposal of a fix:

replace the method in the class org.springframework.richclient.form.builder.TableFormBuilder

public String getLabelAttributes() { return labelAttributes; }

for an alternate implementation

public String getLabelAttributes(String fieldProperties) {
String theLabelAttributes = labelAttributes;

int valignStartIndex = fieldProperties.indexOf(TableLayoutBuilder.VALIGN);
if( valignStartIndex!=-1){ int valignEndIndex = fieldProperties.indexOf(" ",valignStartIndex); theLabelAttributes += (" "+theLabelAttributes.substring(valignStartIndex, valignEndIndex)); }

int rowStartIndex = fieldProperties.indexOf(TableLayoutBuilder.ROWSPAN);
if( rowStartIndex!=-1){ int rowEndIndex = fieldProperties.indexOf(" ",valignStartIndex); theLabelAttributes += (" "+theLabelAttributes.substring(rowStartIndex, rowEndIndex)); }

return theLabelAttributes;
}



Luis Santos added a comment - 23/Nov/07 11:16 AM

A proposed patch to the issue


Peter De Bruycker added a comment - 29/Nov/07 01:14 AM

changing from bug to new feature