Hi all,
I am working on a GWT project that involves the display of protein
sequences amongst other pieces of information about proteins. The
problem I have relates to the fact the a sequence is typically a few
hundred to a few thousand characters long - there are no breaks
(whitespace characters) in the sequence. When I place this sequence
inside a label or HTML widget and this widget is placed inside a
container panel like a tabpanel or verticalpanel then it automatically
increases the width of the panel so that the entire sequence is
displayed on a single line. I would like to set the width of the
widget to be the width of the enclosing panel and have the text split
on multiple lines but I am so far unable to do so. I have tried
playing with the CSS but so far to not avail. Could anyone make any
suggestions?
Below is the code I use to generate the SequenceDisplay Container
widget which is simply an extension of a VerticalPanel. Let me know if
there is anything else anyone thinks might be worth posting.
public void initSeqContent(InputObject inParams){
SeqDisplayRow = new FlowPanel();
SeqAsHTML = new Label();
SeqAsHTML.setWordWrap(true);
SeqAsHTML.setText(getRawSequence());
SeqLength = new Label("Sequence Length: " + Integer.toString
(getRawSequence().length()));
SeqLength.setStyleName("pb-FlowPanel");
SeqDisplayRow.add(new Label("Sequence: "));
SeqDisplayRow.add(SeqAsHTML);
this.add(SeqDPanel);
if (inParams.getIsFragment()){
CaptionText = new Label("Sequence Information for
Fragment");
}
else {
CaptionText = new Label("Sequence Information for " +
inParams.getUniProtID());
addGoInfo(inParams);
getSwissProtName(inParams);
createProtAtlPanel(inParams.getUniProtID());
// addLocalInfo(inParams);
}
CaptionText.setStylePrimaryName("pb-ResultsSegmentCaption");
SeqDPanel.setHeader(CaptionText);
SeqDPanel.setWidth("100%");
SeqVPanel.add(SeqDisplayRow);
SeqDisplayRow.setStylePrimaryName("pb-SeqContainer");
SeqDPanel.setContent(SeqVPanel);
}
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Google Web Toolkit" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~----------~----~----~----~------~----~------~--~---