From: Bruce H. <bh...@bh...> - 2007-07-04 14:47:08
|
Please remove your spurious println debug message. Committed code should not contain these things. Thanks for fixing the guibuilder weirdness. SWT can be a pain in the butt in this area!! Bruce On 7/2/07, mwl...@us... <mwl...@us...> wrote: > > Revision: 415 > http://svn.sourceforge.net/cishell/?rev=415&view=rev > Author: mwlinnem > Date: 2007-07-02 13:01:38 -0700 (Mon, 02 Jul 2007) > > Log Message: > ----------- > Changed text wrap in dialog boxes to work correctly on Windows. > > Modified Paths: > -------------- > > trunk/clients/gui/org.cishell.reference.gui.guibuilder.swt/src/org/cishell/reference/gui/guibuilder/swt/SWTGui.java > > Modified: > trunk/clients/gui/org.cishell.reference.gui.guibuilder.swt/src/org/cishell/reference/gui/guibuilder/swt/SWTGui.java > =================================================================== > --- > trunk/clients/gui/org.cishell.reference.gui.guibuilder.swt/src/org/cishell/reference/gui/guibuilder/swt/SWTGui.java > 2007-07-02 18:31:24 UTC (rev 414) > +++ > trunk/clients/gui/org.cishell.reference.gui.guibuilder.swt/src/org/cishell/reference/gui/guibuilder/swt/SWTGui.java > 2007-07-02 20:01:38 UTC (rev 415) > @@ -41,6 +41,8 @@ > * @author Bruce Herr (bh...@bh...) > */ > public class SWTGui implements GUI, UpdateListener { > + public static final int TEXT_WRAP_LENGTH = 350; > + > private Shell shell; > private SWTGuiComposite composite; > private SelectionListener listener; > @@ -70,12 +72,15 @@ > if(message != null && !message.equals("")){ > Label msg = new Label(shell, SWT.WRAP); > msg.setText(message); > - msg.pack(); > - msg.update(); > - > + msg.pack(true); > GridData labelData = new GridData(); > - labelData.horizontalAlignment = SWT.FILL; > + labelData.horizontalAlignment = GridData.CENTER; > labelData.grabExcessHorizontalSpace = true; > + System.out.println(msg.getSize().x); > + if (msg.getSize().x > TEXT_WRAP_LENGTH) { > + System.out.println(msg.getSize().x); > + labelData.widthHint = TEXT_WRAP_LENGTH; > + } > msg.setLayoutData(labelData); > } > > > > This was sent by the SourceForge.net collaborative development platform, > the world's largest Open Source development site. > > ------------------------------------------------------------------------- > This SF.net email is sponsored by DB2 Express > Download DB2 Express C - the FREE version of DB2 express and take > control of your XML. No limits. Just data. Click to get it now. > http://sourceforge.net/powerbar/db2/ > _______________________________________________ > Cishell-svn mailing list > Cis...@li... > https://lists.sourceforge.net/lists/listinfo/cishell-svn > -- Bruce Herr Senior Software Developer Cyberinfrastructure for Network Science Center School of Library and Information Science Indiana University 10th Street & Jordan Avenue Phone: (812) 856-7034 Fax: -6166 Main Library 022 E-mail: bh...@bh... Bloomington, IN 47405, USA |