From: <hu...@us...> - 2006-10-26 14:04:16
|
Revision: 318 http://svn.sourceforge.net/cishell/?rev=318&view=rev Author: huangb Date: 2006-10-26 07:04:09 -0700 (Thu, 26 Oct 2006) Log Message: ----------- switch the location of ok and cancel buttons 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 2006-10-25 17:17:55 UTC (rev 317) +++ trunk/clients/gui/org.cishell.reference.gui.guibuilder.swt/src/org/cishell/reference/gui/guibuilder/swt/SWTGui.java 2006-10-26 14:04:09 UTC (rev 318) @@ -58,7 +58,7 @@ ObjectClassDefinition ocd = provider.getObjectClassDefinition(id, null); shell.setText(ocd.getName()); - + GridLayout gridLayout = new GridLayout(); gridLayout.numColumns = 1; shell.setLayout(gridLayout); @@ -92,16 +92,6 @@ gridData.grabExcessHorizontalSpace = false; buttonsGroup.setLayoutData(gridData); - Button cancel = new Button(buttonsGroup, SWT.NONE); - cancel.setText("Cancel"); - cancel.setSize(40, 20); - cancel.setFont(defaultFont); - cancel.addSelectionListener(new SelectionAdapter() { - public void widgetSelected(SelectionEvent e) { - close(); - } - }); - okButton = new Button(buttonsGroup, SWT.PUSH); okButton.setText("OK"); okButton.setSize(40, 20); @@ -116,6 +106,17 @@ } } }); + + Button cancel = new Button(buttonsGroup, SWT.NONE); + cancel.setText("Cancel"); + cancel.setSize(40, 20); + cancel.setFont(defaultFont); + cancel.addSelectionListener(new SelectionAdapter() { + public void widgetSelected(SelectionEvent e) { + close(); + } + }); + shell.addDisposeListener(new DisposeListener() { public void widgetDisposed(DisposeEvent e) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <bh...@us...> - 2006-12-11 20:29:43
|
Revision: 349 http://svn.sourceforge.net/cishell/?rev=349&view=rev Author: bh2 Date: 2006-12-11 12:29:25 -0800 (Mon, 11 Dec 2006) Log Message: ----------- Made Ok be pushed by default when a user hits enter in a GUIBuilder based gui. 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 2006-12-08 16:21:08 UTC (rev 348) +++ trunk/clients/gui/org.cishell.reference.gui.guibuilder.swt/src/org/cishell/reference/gui/guibuilder/swt/SWTGui.java 2006-12-11 20:29:25 UTC (rev 349) @@ -125,6 +125,8 @@ } }}); + shell.setDefaultButton(okButton); + validate(); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mwl...@us...> - 2007-06-27 18:54:33
|
Revision: 405 http://svn.sourceforge.net/cishell/?rev=405&view=rev Author: mwlinnem Date: 2007-06-27 11:54:31 -0700 (Wed, 27 Jun 2007) Log Message: ----------- fixed display issue for visualization with annotation dialog boxes, where lack of text wrap would cause the box to be huge. 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-05-17 20:29:22 UTC (rev 404) +++ trunk/clients/gui/org.cishell.reference.gui.guibuilder.swt/src/org/cishell/reference/gui/guibuilder/swt/SWTGui.java 2007-06-27 18:54:31 UTC (rev 405) @@ -68,7 +68,7 @@ //stuff to display a message String message = ocd.getDescription(); if(message != null && !message.equals("")){ - Label msg = new Label(shell, SWT.CENTER); + Label msg = new Label(shell, SWT.WRAP); msg.setText(message); GridData labelData = new GridData(); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mwl...@us...> - 2007-07-02 18:31:28
|
Revision: 414 http://svn.sourceforge.net/cishell/?rev=414&view=rev Author: mwlinnem Date: 2007-07-02 11:31:24 -0700 (Mon, 02 Jul 2007) Log Message: ----------- Commiting so I can see if fix for text wrap issue works 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 16:12:55 UTC (rev 413) +++ 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) @@ -70,9 +70,12 @@ if(message != null && !message.equals("")){ Label msg = new Label(shell, SWT.WRAP); msg.setText(message); + msg.pack(); + msg.update(); GridData labelData = new GridData(); - labelData.horizontalAlignment = SWT.CENTER; + labelData.horizontalAlignment = SWT.FILL; + labelData.grabExcessHorizontalSpace = true; msg.setLayoutData(labelData); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mwl...@us...> - 2007-07-02 20:01:40
|
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. |