[Javaclient-cvs] javaclient/net/sourceforge/javaclient/client/component JCFactory.java,1.4,1.5
Status: Alpha
Brought to you by:
rimmeraj
|
From: cuongnt <cu...@us...> - 2004-10-05 20:51:32
|
Update of /cvsroot/javaclient/javaclient/net/sourceforge/javaclient/client/component In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9277/net/sourceforge/javaclient/client/component Modified Files: JCFactory.java Log Message: fixed text readonly & group has id Index: JCFactory.java =================================================================== RCS file: /cvsroot/javaclient/javaclient/net/sourceforge/javaclient/client/component/JCFactory.java,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** JCFactory.java 4 Oct 2004 19:10:28 -0000 1.4 --- JCFactory.java 5 Oct 2004 20:51:09 -0000 1.5 *************** *** 34,38 **** } ! public static Text newText(Widget parent, int cols, int rows, int justify, int span,int limit) { int style = SWT.BORDER; --- 34,38 ---- } ! public static Text newText(Widget parent, int cols, int rows, int justify, int span,int limit, boolean readOnly) { int style = SWT.BORDER; *************** *** 53,58 **** style |= SWT.SINGLE; } ! Text w = new Text((Composite)parent, style); if(limit>0) { --- 53,70 ---- style |= SWT.SINGLE; } ! /* ! if(readOnly) ! { ! //style |= SWT.READ_ONLY; ! style |= SWT.NO_FOCUS; ! } ! */ Text w = new Text((Composite)parent, style); + if(readOnly) + { + w.setBackground(((Composite) parent).getBackground()); + w.setEditable(false); + } + if(limit>0) { |