javaclient-cvs Mailing List for Java Client (Page 3)
Status: Alpha
Brought to you by:
rimmeraj
You can subscribe to this list here.
| 2004 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
(13) |
Aug
(14) |
Sep
|
Oct
(54) |
Nov
|
Dec
|
|---|
|
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) { |
|
From: cuongnt <cu...@us...> - 2004-10-04 19:11:10
|
Update of /cvsroot/javaclient/javaclient/net/sourceforge/javaclient/tools/xsl In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6652/net/sourceforge/javaclient/tools/xsl Modified Files: Button.java Log Message: add styles Radio, Check, Toggle in Button Index: Button.java =================================================================== RCS file: /cvsroot/javaclient/javaclient/net/sourceforge/javaclient/tools/xsl/Button.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** Button.java 27 Jul 2004 15:08:06 -0000 1.1 --- Button.java 4 Oct 2004 19:10:28 -0000 1.2 *************** *** 6,11 **** public class Button extends Component { ! public Button(String id,String aLabel) { label = aLabel; addImport("org.eclipse.swt.SWT"); --- 6,24 ---- public class Button extends Component { ! public final static String CHECK = "SWT.CHECK"; ! public final static String RADIO = "SWT.RADIO"; ! public final static String TOGGLE = "SWT.TOGGLE"; ! public final static String PUSH = "SWT.PUSH"; ! public Button(String id,String aLabel, String aStyle) { + if(aStyle.equalsIgnoreCase("check")) + style = CHECK; + else if(aStyle.equalsIgnoreCase("radio")) + style = RADIO; + else if(aStyle.equalsIgnoreCase("toggle")) + style = TOGGLE; + else + style = PUSH; + label = aLabel; addImport("org.eclipse.swt.SWT"); *************** *** 52,56 **** } b.append(getComponentId()); ! b.append(" = JCFactory.newButton(parent,\""+label+"\");"); if(eventName != null) { --- 65,70 ---- } b.append(getComponentId()); ! b.append(" = JCFactory.newButton(parent,\""+label+"\"" + ! ", " + style + ");"); if(eventName != null) { *************** *** 61,64 **** --- 75,79 ---- } + private String style; private String label; private String eventName; |
|
From: cuongnt <cu...@us...> - 2004-10-04 19:11:07
|
Update of /cvsroot/javaclient/javaclient/net/sourceforge/javaclient/client/component In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6652/net/sourceforge/javaclient/client/component Modified Files: JCFactory.java Log Message: add styles Radio, Check, Toggle in Button Index: JCFactory.java =================================================================== RCS file: /cvsroot/javaclient/javaclient/net/sourceforge/javaclient/client/component/JCFactory.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** JCFactory.java 30 Jul 2004 20:30:50 -0000 1.3 --- JCFactory.java 4 Oct 2004 19:10:28 -0000 1.4 *************** *** 125,131 **** } ! public static Button newButton(Widget parent, String label) { ! Button w = new Button((Composite) parent, SWT.PUSH); if(label.trim().length() > 0) { --- 125,131 ---- } ! public static Button newButton(Widget parent, String label, int style) { ! Button w = new Button((Composite) parent, style); if(label.trim().length() > 0) { |
|
From: cuongnt <cu...@us...> - 2004-10-04 19:11:07
|
Update of /cvsroot/javaclient/javaclient/metadata In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6652/metadata Modified Files: jc.xsl Log Message: add styles Radio, Check, Toggle in Button Index: jc.xsl =================================================================== RCS file: /cvsroot/javaclient/javaclient/metadata/jc.xsl,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** jc.xsl 4 Aug 2004 14:22:40 -0000 1.4 --- jc.xsl 4 Oct 2004 19:10:27 -0000 1.5 *************** *** 188,192 **** <xsl:template match="button"> ! <xsl:variable name="button" select="jc:Button.new(@id,@label)"/> <xsl:if test="@onPress"> <xsl:value-of select="jc:addEvent($button,@onPress)"/> --- 188,192 ---- <xsl:template match="button"> ! <xsl:variable name="button" select="jc:Button.new(@id,@label,'push')"/> <xsl:if test="@onPress"> <xsl:value-of select="jc:addEvent($button,@onPress)"/> *************** *** 198,201 **** --- 198,234 ---- </xsl:template> + <xsl:template match="check"> + <xsl:variable name="check" select="jc:Button.new(@id,@label,'check')"/> + <xsl:if test="@onPress"> + <xsl:value-of select="jc:addEvent($check,@onPress)"/> + </xsl:if> + <xsl:if test="@onPressExtern"> + <xsl:value-of select="jc:addEventExtern($check,@onPressExtern)"/> + </xsl:if> + <xsl:value-of select="jc:addComponent($class,$check,not(true()))"/> + </xsl:template> + + <xsl:template match="radio"> + <xsl:variable name="radio" select="jc:Button.new(@id,@label,'radio')"/> + <xsl:if test="@onPress"> + <xsl:value-of select="jc:addEvent($radio,@onPress)"/> + </xsl:if> + <xsl:if test="@onPressExtern"> + <xsl:value-of select="jc:addEventExtern($radio,@onPressExtern)"/> + </xsl:if> + <xsl:value-of select="jc:addComponent($class,$radio,not(true()))"/> + </xsl:template> + + <xsl:template match="toggle"> + <xsl:variable name="toggle" select="jc:Button.new(@id,@label,'toggle')"/> + <xsl:if test="@onPress"> + <xsl:value-of select="jc:addEvent($toggle,@onPress)"/> + </xsl:if> + <xsl:if test="@onPressExtern"> + <xsl:value-of select="jc:addEventExtern($toggle,@onPressExtern)"/> + </xsl:if> + <xsl:value-of select="jc:addComponent($class,$toggle,not(true()))"/> + </xsl:template> + <xsl:template match="list"> <xsl:variable name="list" select="jc:List.new(@id,@modelId,@pkclass,@rows)"/> |
|
From: cuongnt <cu...@us...> - 2004-08-05 13:36:48
|
Update of /cvsroot/javaclient/javaclient/net/sourceforge/javaclient/client/filter In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26141/net/sourceforge/javaclient/client/filter Modified Files: DateTextFilter.java Log Message: bug viewToModel() when object is null Index: DateTextFilter.java =================================================================== RCS file: /cvsroot/javaclient/javaclient/net/sourceforge/javaclient/client/filter/DateTextFilter.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** DateTextFilter.java 27 Jul 2004 15:05:36 -0000 1.1 --- DateTextFilter.java 5 Aug 2004 13:36:39 -0000 1.2 *************** *** 39,44 **** String str = (String) s; java.sql.Date dte; ! if(str.length() == 0 || !isValidDateFormat(str)) dte = null; else { --- 39,46 ---- String str = (String) s; java.sql.Date dte; ! if(str == null || str.length() == 0 || !isValidDateFormat(str)) ! { dte = null; + } else { |
|
From: Dave S. <rim...@us...> - 2004-08-04 19:00:42
|
Update of /cvsroot/javaclient/javaclient/net/sourceforge/javaclient/client/filter In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19130/net/sourceforge/javaclient/client/filter Modified Files: TableColumnFilter.java TableFilter.java Log Message: Doh! TableItem is a row not a column! Index: TableFilter.java =================================================================== RCS file: /cvsroot/javaclient/javaclient/net/sourceforge/javaclient/client/filter/TableFilter.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** TableFilter.java 4 Aug 2004 18:57:54 -0000 1.3 --- TableFilter.java 4 Aug 2004 19:00:22 -0000 1.4 *************** *** 32,36 **** public void setListSize(int size) { ! table.setItemCount(size*table.getColumnCount()); } --- 32,36 ---- public void setListSize(int size) { ! table.setItemCount(size); } Index: TableColumnFilter.java =================================================================== RCS file: /cvsroot/javaclient/javaclient/net/sourceforge/javaclient/client/filter/TableColumnFilter.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** TableColumnFilter.java 4 Aug 2004 14:22:41 -0000 1.1 --- TableColumnFilter.java 4 Aug 2004 19:00:22 -0000 1.2 *************** *** 17,21 **** public void modelToView(Object o,int row) { ! table.getItem(row*table.getColumnCount()+col).setText(convertToView(o)); } --- 17,21 ---- public void modelToView(Object o,int row) { ! table.getItem(row).setText(col,convertToView(o)); } |
|
From: Dave S. <rim...@us...> - 2004-08-04 18:58:09
|
Update of /cvsroot/javaclient/javaclient/net/sourceforge/javaclient/client/filter In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18509/net/sourceforge/javaclient/client/filter Modified Files: TableFilter.java Log Message: Well it loads the table but it lays out the data verticaal instead of across columns .. Index: TableFilter.java =================================================================== RCS file: /cvsroot/javaclient/javaclient/net/sourceforge/javaclient/client/filter/TableFilter.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** TableFilter.java 4 Aug 2004 14:22:41 -0000 1.2 --- TableFilter.java 4 Aug 2004 18:57:54 -0000 1.3 *************** *** 3,6 **** --- 3,7 ---- import java.beans.PropertyVetoException; import net.sourceforge.javaclient.client.proxy.ClientModelProxy; + import org.eclipse.swt.SWT; import org.eclipse.swt.widgets.Table; import org.eclipse.swt.widgets.TableItem; *************** *** 31,35 **** public void setListSize(int size) { ! table.setItemCount(size); } --- 32,36 ---- public void setListSize(int size) { ! table.setItemCount(size*table.getColumnCount()); } *************** *** 40,45 **** public void deleteRow(int row) { ! //table.remove(table.getColumnCount()*row,table.getColumnCount()*(row+1)-1); } public void widgetDefaultSelected(SelectionEvent e) { --- 41,47 ---- public void deleteRow(int row) { ! table.remove(table.getColumnCount()*row,table.getColumnCount()*(row+1)-1); } + public void widgetDefaultSelected(SelectionEvent e) { |
|
From: Dave S. <rim...@us...> - 2004-08-04 18:58:04
|
Update of /cvsroot/javaclient/javaclient/samples/dpy In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18509/samples/dpy Modified Files: CustomerBrowse.jc Log Message: Well it loads the table but it lays out the data verticaal instead of across columns .. Index: CustomerBrowse.jc =================================================================== RCS file: /cvsroot/javaclient/javaclient/samples/dpy/CustomerBrowse.jc,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** CustomerBrowse.jc 27 Jul 2004 15:20:16 -0000 1.1 --- CustomerBrowse.jc 4 Aug 2004 18:57:55 -0000 1.2 *************** *** 11,15 **** <text modelId="customer_name" cols="30"/> </group> ! <list id="customerList" modelId="CustomerItem" pkclass="String" rows="13" readonly="true" onDoubleClick="select" onDoubleClickExtern="select"> <listcol label="Customer No" modelId="customer_num" cols="9"/> <listcol label="Name" modelId="name" cols="30"/> --- 11,15 ---- <text modelId="customer_name" cols="30"/> </group> ! <list id="customerList" modelId="customerItem" pkclass="String" rows="13" readonly="true" onDoubleClick="select" onDoubleClickExtern="select"> <listcol label="Customer No" modelId="customer_num" cols="9"/> <listcol label="Name" modelId="name" cols="30"/> |
|
From: Dave S. <rim...@us...> - 2004-08-04 18:58:03
|
Update of /cvsroot/javaclient/javaclient/net/sourceforge/javaclient/tools/xsl In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18509/net/sourceforge/javaclient/tools/xsl Modified Files: List.java Log Message: Well it loads the table but it lays out the data verticaal instead of across columns .. Index: List.java =================================================================== RCS file: /cvsroot/javaclient/javaclient/net/sourceforge/javaclient/tools/xsl/List.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** List.java 4 Aug 2004 15:27:15 -0000 1.3 --- List.java 4 Aug 2004 18:57:55 -0000 1.4 *************** *** 74,78 **** getModelInterface().clear(); super.addModel(modelId+"PK",pkClass); ! return(modelId); } --- 74,78 ---- getModelInterface().clear(); super.addModel(modelId+"PK",pkClass); ! return(Character.toUpperCase(modelId.charAt(0))+modelId.substring(1)); } |
|
From: Dave S. <rim...@us...> - 2004-08-04 18:58:03
|
Update of /cvsroot/javaclient/javaclient/net/sourceforge/javaclient/model In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18509/net/sourceforge/javaclient/model Modified Files: ModelProxy.java Log Message: Well it loads the table but it lays out the data verticaal instead of across columns .. Index: ModelProxy.java =================================================================== RCS file: /cvsroot/javaclient/javaclient/net/sourceforge/javaclient/model/ModelProxy.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** ModelProxy.java 27 Jul 2004 15:10:23 -0000 1.1 --- ModelProxy.java 4 Aug 2004 18:57:54 -0000 1.2 *************** *** 36,42 **** try { ! ClassLoader loader = this.getClass().getClassLoader(); ! proxy = Proxy.newProxyInstance(loader,new Class[] ! { modelProxyClass },this); } catch(Exception e) --- 36,40 ---- try { ! proxy = Proxy.newProxyInstance(modelProxyClass.getClassLoader(),new Class[] { modelProxyClass },this); } catch(Exception e) *************** *** 68,71 **** --- 66,73 ---- return (getProperty(methodName)); } + if(methodName.equals("toString")) + { + return(modelProxyClass.getName()); + } return (null); } |
|
From: Dave S. <rim...@us...> - 2004-08-04 15:27:53
|
Update of /cvsroot/javaclient/javaclient/net/sourceforge/javaclient/client/proxy In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11348/net/sourceforge/javaclient/client/proxy Modified Files: ClientModelProxy.java Log Message: Getting closer. Looks like the problem is that there is no model info at all Index: ClientModelProxy.java =================================================================== RCS file: /cvsroot/javaclient/javaclient/net/sourceforge/javaclient/client/proxy/ClientModelProxy.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** ClientModelProxy.java 30 Jul 2004 19:46:06 -0000 1.2 --- ClientModelProxy.java 4 Aug 2004 15:27:14 -0000 1.3 *************** *** 129,133 **** { ((ClientListProxy)getProperty(propertyName)).addListFilter(aFilter); ! filters.put(pk,getProperty(propertyName)); if(aFilter instanceof net.sourceforge.javaclient.client.filter.Filter) { --- 129,136 ---- { ((ClientListProxy)getProperty(propertyName)).addListFilter(aFilter); ! if(pk != null) ! { ! filters.put(pk,getProperty(propertyName)); ! } if(aFilter instanceof net.sourceforge.javaclient.client.filter.Filter) { |
|
From: Dave S. <rim...@us...> - 2004-08-04 15:27:36
|
Update of /cvsroot/javaclient/javaclient/samples/client/ejb In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11348/samples/client/ejb Modified Files: CustomerBrowseControllerBean.java Log Message: Getting closer. Looks like the problem is that there is no model info at all Index: CustomerBrowseControllerBean.java =================================================================== RCS file: /cvsroot/javaclient/javaclient/samples/client/ejb/CustomerBrowseControllerBean.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** CustomerBrowseControllerBean.java 27 Jul 2004 15:20:16 -0000 1.1 --- CustomerBrowseControllerBean.java 4 Aug 2004 15:27:19 -0000 1.2 *************** *** 2,9 **** --- 2,18 ---- import net.sourceforge.javaclient.server.jboss.JCServerController; + import net.sourceforge.javaclient.model.ListModel; import javax.ejb.SessionBean; import javax.ejb.SessionContext; + import javax.naming.InitialContext; + import javax.sql.DataSource; + import java.sql.ResultSet; + import java.sql.Connection; + import java.sql.Statement; + + import client.model.CustomerBrowseModel; + import client.model.CustomerItem; /** @ejb:bean *************** *** 26,29 **** --- 35,69 ---- { } + /** + @ejb:interface-method view-type="remote" + */ + public void load() + { + try + { + ListModel model = ((CustomerBrowseModel)getModel()).getCustomerItemList(); + InitialContext ctx = new InitialContext(); + DataSource s = (DataSource)ctx.lookup("java:/DefaultDS"); + Connection c = s.getConnection(); + Statement st = c.createStatement(); + ResultSet rs = st.executeQuery("select customer_num,customer_name,address_1,city,country from customer"); + while(rs.next()) + { + CustomerItem m = (CustomerItem)model.newModel(); + m.setCustomer_num(rs.getString(1)); + m.setName(rs.getString(2)); + m.setAddress_1(rs.getString(3)); + m.setCity(rs.getString(4)); + m.setCountry(rs.getString(5)); + m.setCustomerItemPK(m.getCustomer_num()); + } + rs.close(); + c.close(); + } + catch(Exception e) + { + e.printStackTrace(); + } + } /** |
|
From: Dave S. <rim...@us...> - 2004-08-04 15:27:36
|
Update of /cvsroot/javaclient/javaclient/samples/client In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11348/samples/client Modified Files: Customer.java CustomerBrowse.java Log Message: Getting closer. Looks like the problem is that there is no model info at all Index: Customer.java =================================================================== RCS file: /cvsroot/javaclient/javaclient/samples/client/Customer.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** Customer.java 30 Jul 2004 19:46:06 -0000 1.2 --- Customer.java 4 Aug 2004 15:27:19 -0000 1.3 *************** *** 12,17 **** { CustomerBrowse browse = new CustomerBrowse(getShell().getDisplay()); - browse.create(true); - //browse.addCustomerListListener(this); browse.addSelectListener(this); } --- 12,15 ---- Index: CustomerBrowse.java =================================================================== RCS file: /cvsroot/javaclient/javaclient/samples/client/CustomerBrowse.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** CustomerBrowse.java 27 Jul 2004 15:20:16 -0000 1.1 --- CustomerBrowse.java 4 Aug 2004 15:27:19 -0000 1.2 *************** *** 9,12 **** --- 9,21 ---- { super(dpy); + create(true); + try + { + getServerController().load(); + } + catch(Exception e) + { + e.printStackTrace(); + } } public void select(int row) |
|
From: Dave S. <rim...@us...> - 2004-08-04 15:27:31
|
Update of /cvsroot/javaclient/javaclient/net/sourceforge/javaclient/tools/xsl In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11348/net/sourceforge/javaclient/tools/xsl Modified Files: List.java Log Message: Getting closer. Looks like the problem is that there is no model info at all Index: List.java =================================================================== RCS file: /cvsroot/javaclient/javaclient/net/sourceforge/javaclient/tools/xsl/List.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** List.java 4 Aug 2004 14:22:41 -0000 1.2 --- List.java 4 Aug 2004 15:27:15 -0000 1.3 *************** *** 24,27 **** --- 24,35 ---- super.addModel(aModelId+"List","net.sourceforge.javaclient.model.ListModel"); } + public String getModelId() + { + return(modelId); + } + public boolean isList() + { + return(true); + } public void addSelectEvent(String anEventName) { *************** *** 81,85 **** b.append(" = JCFactory.newTable(parent," + rows +");\n"); b.append("\t\tnet.sourceforge.javaclient.client.filter.TableFilter "+modelId+"Filter = new net.sourceforge.javaclient.client.filter.TableFilter("+getComponentId()+");\n"); ! b.append("\t\tproxy.addFilter(\""+modelId+"\","+modelId+"Filter,null);\n"); if(dblClickEventName != null || selectEventName != null) { --- 89,93 ---- b.append(" = JCFactory.newTable(parent," + rows +");\n"); b.append("\t\tnet.sourceforge.javaclient.client.filter.TableFilter "+modelId+"Filter = new net.sourceforge.javaclient.client.filter.TableFilter("+getComponentId()+");\n"); ! b.append("\t\tproxy.addFilter(\""+modelId+"List\","+modelId+"Filter,null);\n"); if(dblClickEventName != null || selectEventName != null) { |
|
From: Dave S. <rim...@us...> - 2004-08-04 14:22:53
|
Update of /cvsroot/javaclient/javaclient/net/sourceforge/javaclient/client/filter In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30706/net/sourceforge/javaclient/client/filter Modified Files: ColumnFilter.java ColumnFilterImpl.java TableFilter.java Added Files: TableColumnFilter.java Log Message: Added table filter. Not tested and PK loading only has to be done Index: TableFilter.java =================================================================== RCS file: /cvsroot/javaclient/javaclient/net/sourceforge/javaclient/client/filter/TableFilter.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** TableFilter.java 27 Jul 2004 15:05:36 -0000 1.1 --- TableFilter.java 4 Aug 2004 14:22:41 -0000 1.2 *************** *** 18,22 **** --- 18,25 ---- public void addColumnFilter(String attribute,ColumnFilter filter) { + modelProxy.addColumnFilter(attribute,filter); + filter.setWidget(table); } + public void addDblClickListener(Object controller,String method) { --- NEW FILE: TableColumnFilter.java --- package net.sourceforge.javaclient.client.filter; import org.eclipse.swt.widgets.Table; import org.eclipse.swt.widgets.Widget; import org.eclipse.swt.widgets.TableItem; public class TableColumnFilter extends ColumnFilterImpl { public TableColumnFilter(int aCol) { col=aCol; } public void setWidget(Widget aWidget) { table=(Table)aWidget; } public void modelToView(Object o,int row) { table.getItem(row*table.getColumnCount()+col).setText(convertToView(o)); } private Table table; private int col; } Index: ColumnFilter.java =================================================================== RCS file: /cvsroot/javaclient/javaclient/net/sourceforge/javaclient/client/filter/ColumnFilter.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** ColumnFilter.java 27 Jul 2004 15:05:36 -0000 1.1 --- ColumnFilter.java 4 Aug 2004 14:22:41 -0000 1.2 *************** *** 3,6 **** --- 3,7 ---- import java.beans.PropertyVetoException; import net.sourceforge.javaclient.client.proxy.ClientListProxy; + import org.eclipse.swt.widgets.Widget; *************** *** 9,12 **** --- 10,14 ---- public void modelToView(Object o,int row); public void setListProxy(ClientListProxy aModel); + public void setWidget(Widget w); } Index: ColumnFilterImpl.java =================================================================== RCS file: /cvsroot/javaclient/javaclient/net/sourceforge/javaclient/client/filter/ColumnFilterImpl.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** ColumnFilterImpl.java 27 Jul 2004 15:05:36 -0000 1.1 --- ColumnFilterImpl.java 4 Aug 2004 14:22:41 -0000 1.2 *************** *** 3,6 **** --- 3,7 ---- import java.beans.PropertyVetoException; import net.sourceforge.javaclient.client.proxy.ClientListProxy; + import org.eclipse.swt.widgets.Widget; public class ColumnFilterImpl implements ColumnFilter *************** *** 10,13 **** --- 11,17 ---- } + public void setWidget(Widget aWidget) + { + } public String convertToView(Object o) { |
|
From: Dave S. <rim...@us...> - 2004-08-04 14:22:51
|
Update of /cvsroot/javaclient/javaclient/net/sourceforge/javaclient/tools/xsl In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30706/net/sourceforge/javaclient/tools/xsl Modified Files: List.java ListCol.java Log Message: Added table filter. Not tested and PK loading only has to be done Index: ListCol.java =================================================================== RCS file: /cvsroot/javaclient/javaclient/net/sourceforge/javaclient/tools/xsl/ListCol.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** ListCol.java 27 Jul 2004 15:08:06 -0000 1.1 --- ListCol.java 4 Aug 2004 14:22:42 -0000 1.2 *************** *** 5,9 **** public class ListCol extends Component { ! public ListCol(String id,String aLabel,int aCols,String aParentModelId) { addImport("org.eclipse.swt.widgets.TableColumn"); --- 5,9 ---- public class ListCol extends Component { ! public ListCol(String id,String aLabel,int aCols,String aParentModelId,int aColNum) { addImport("org.eclipse.swt.widgets.TableColumn"); *************** *** 21,24 **** --- 21,25 ---- cols = aCols; parentModelId = aParentModelId; + colNum = aColNum; } *************** *** 32,36 **** b.append(getComponentId()); b.append(" = JCFactory.newTableColumn(parent,\""+label + "\", " + cols + ");\n"); ! b.append("\t\t"+parentModelId+"Filter.addColumnFilter(\""+modelId+"\",new "+filter+"());\n"); /* TODO add column listeners and external options as well --- 33,37 ---- b.append(getComponentId()); b.append(" = JCFactory.newTableColumn(parent,\""+label + "\", " + cols + ");\n"); ! b.append("\t\t"+parentModelId+"Filter.addColumnFilter(\""+modelId+"\",new "+filter+"("+colNum+"));\n"); /* TODO add column listeners and external options as well *************** *** 79,84 **** private String label; ! private int cols; ! private String filter = "net.sourceforge.javaclient.client.filter.ColumnFilterImpl"; private String modelId,modelClass; private String onChange,beforeChange,parentModelId; --- 80,85 ---- private String label; ! private int cols,colNum; ! private String filter = "net.sourceforge.javaclient.client.filter.TableColumnFilter"; private String modelId,modelClass; private String onChange,beforeChange,parentModelId; Index: List.java =================================================================== RCS file: /cvsroot/javaclient/javaclient/net/sourceforge/javaclient/tools/xsl/List.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** List.java 27 Jul 2004 15:08:06 -0000 1.1 --- List.java 4 Aug 2004 14:22:41 -0000 1.2 *************** *** 80,84 **** b.append(getComponentId()); b.append(" = JCFactory.newTable(parent," + rows +");\n"); ! b.append("\t\tnet.sourceforge.javaclient.client.filter.TableFilter "+filterName+" = new net.sourceforge.javaclient.client.filter.TableFilter("+getComponentId()+");\n"); if(dblClickEventName != null || selectEventName != null) { --- 80,85 ---- b.append(getComponentId()); b.append(" = JCFactory.newTable(parent," + rows +");\n"); ! b.append("\t\tnet.sourceforge.javaclient.client.filter.TableFilter "+modelId+"Filter = new net.sourceforge.javaclient.client.filter.TableFilter("+getComponentId()+");\n"); ! b.append("\t\tproxy.addFilter(\""+modelId+"\","+modelId+"Filter,null);\n"); if(dblClickEventName != null || selectEventName != null) { |
|
From: Dave S. <rim...@us...> - 2004-08-04 14:22:49
|
Update of /cvsroot/javaclient/javaclient/metadata In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30706/metadata Modified Files: jc.xsl Log Message: Added table filter. Not tested and PK loading only has to be done Index: jc.xsl =================================================================== RCS file: /cvsroot/javaclient/javaclient/metadata/jc.xsl,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** jc.xsl 30 Jul 2004 20:30:50 -0000 1.3 --- jc.xsl 4 Aug 2004 14:22:40 -0000 1.4 *************** *** 207,216 **** </xsl:if> <xsl:value-of select="jc:addComponent($class,$list,true())"/> ! <xsl:call-template name="processWidgets"/> <xsl:value-of select="jc:endComponent($class,true())"/> </xsl:template> ! <xsl:template match="listcol"> ! <xsl:variable name="listcol" select="jc:ListCol.new(@id,@label,@cols,../@modelId)"/> <xsl:if test="@modelId"> <xsl:value-of select="jc:addModel($listcol,@modelId,@modelClass)"/> --- 207,221 ---- </xsl:if> <xsl:value-of select="jc:addComponent($class,$list,true())"/> ! <xsl:for-each select="listcol"> ! <xsl:call-template name="listcol"> ! <xsl:with-param name="col" select="position()-1"/> ! </xsl:call-template> ! </xsl:for-each> <xsl:value-of select="jc:endComponent($class,true())"/> </xsl:template> ! <xsl:template name="listcol"> ! <xsl:param name="col"/> ! <xsl:variable name="listcol" select="jc:ListCol.new(@id,@label,@cols,../@modelId,$col)"/> <xsl:if test="@modelId"> <xsl:value-of select="jc:addModel($listcol,@modelId,@modelClass)"/> |
|
From: Dave S. <rim...@us...> - 2004-08-04 09:51:44
|
Update of /cvsroot/javaclient/javaclient In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21118 Modified Files: build.xml Log Message: Add xdoclet to classpath Index: build.xml =================================================================== RCS file: /cvsroot/javaclient/javaclient/build.xml,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** build.xml 27 Jul 2004 15:20:16 -0000 1.2 --- build.xml 4 Aug 2004 09:51:35 -0000 1.3 *************** *** 117,121 **** <path id="xdoclet.class.path"> ! <fileset dir="jars" includes="*.jar"/> </path> --- 117,121 ---- <path id="xdoclet.class.path"> ! <fileset dir="jars/xdoclet" includes="*.jar"/> </path> |
|
From: Dave S. <rim...@us...> - 2004-07-30 20:30:59
|
Update of /cvsroot/javaclient/javaclient/net/sourceforge/javaclient/tools/xsl In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20932/net/sourceforge/javaclient/tools/xsl Modified Files: Text.java Log Message: Got multiline text working. Still does not wrap Index: Text.java =================================================================== RCS file: /cvsroot/javaclient/javaclient/net/sourceforge/javaclient/tools/xsl/Text.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** Text.java 27 Jul 2004 15:08:06 -0000 1.1 --- Text.java 30 Jul 2004 20:30:51 -0000 1.2 *************** *** 6,13 **** public class Text extends Component { - public Text(String id,int aCols, int aLimit,int aSpan) - { - this(id,aCols,1,aLimit,aSpan); - } public Text(String id,int aCols, int aRows, int aLimit,int aSpan) { --- 6,9 ---- *************** *** 26,30 **** span = aSpan; limit = aLimit; ! if(limit == 0) { limit=cols; --- 22,30 ---- span = aSpan; limit = aLimit; ! if(rows == 0) ! { ! rows=1; ! } ! if(limit == 0 && rows == 1) { limit=cols; |
|
From: Dave S. <rim...@us...> - 2004-07-30 20:30:59
|
Update of /cvsroot/javaclient/javaclient/net/sourceforge/javaclient/client/component In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20932/net/sourceforge/javaclient/client/component Modified Files: JCFactory.java Log Message: Got multiline text working. Still does not wrap Index: JCFactory.java =================================================================== RCS file: /cvsroot/javaclient/javaclient/net/sourceforge/javaclient/client/component/JCFactory.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** JCFactory.java 30 Jul 2004 19:59:37 -0000 1.2 --- JCFactory.java 30 Jul 2004 20:30:50 -0000 1.3 *************** *** 43,47 **** if(rows >1) { ! style |= SWT.MULTI; } else --- 43,51 ---- if(rows >1) { ! style |= SWT.MULTI|SWT.WRAP; ! if(limit == 0) ! { ! style |= SWT.V_SCROLL; ! } } else *************** *** 51,56 **** Text w = new Text((Composite)parent, style); ! w.setTextLimit(limit); ! w.setLayoutData(Layout.newGridData(w, cols, span, 0)); return(w); } --- 55,70 ---- Text w = new Text((Composite)parent, style); ! if(limit>0) ! { ! w.setTextLimit(limit); ! } ! if(rows == 1) ! { ! w.setLayoutData(Layout.newGridData(w, cols, span, 0)); ! } ! else ! { ! w.setLayoutData(Layout.newGridData(w, cols,rows)); ! } return(w); } |
|
From: Dave S. <rim...@us...> - 2004-07-30 20:30:58
|
Update of /cvsroot/javaclient/javaclient/metadata In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20932/metadata Modified Files: jc.xsl Log Message: Got multiline text working. Still does not wrap Index: jc.xsl =================================================================== RCS file: /cvsroot/javaclient/javaclient/metadata/jc.xsl,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** jc.xsl 30 Jul 2004 19:59:37 -0000 1.2 --- jc.xsl 30 Jul 2004 20:30:50 -0000 1.3 *************** *** 40,44 **** <xsl:template match="text"> ! <xsl:variable name="text" select="jc:Text.new(@id,@cols,@limit,@span)"/> <xsl:if test="@readOnly"> <xsl:value-of select="jc:setReadOnly($text,not(true()))"/> --- 40,44 ---- <xsl:template match="text"> ! <xsl:variable name="text" select="jc:Text.new(@id,@cols,@rows,@limit,@span)"/> <xsl:if test="@readOnly"> <xsl:value-of select="jc:setReadOnly($text,not(true()))"/> |
|
From: Dave S. <rim...@us...> - 2004-07-30 19:59:51
|
Update of /cvsroot/javaclient/javaclient/net/sourceforge/javaclient/client/component In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15606/net/sourceforge/javaclient/client/component Modified Files: JCFactory.java Log Message: Fixed the Combo so the default is readOnly and add the editable flag for editing Index: JCFactory.java =================================================================== RCS file: /cvsroot/javaclient/javaclient/net/sourceforge/javaclient/client/component/JCFactory.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** JCFactory.java 27 Jul 2004 15:05:36 -0000 1.1 --- JCFactory.java 30 Jul 2004 19:59:37 -0000 1.2 *************** *** 104,110 **** } ! public static Combo newCombo(Widget parent, int cols,int span) { ! Combo w = new Combo((Composite) parent, SWT.NONE); w.setLayoutData(Layout.newGridData(w, cols, span, 22)); return(w); --- 104,110 ---- } ! public static Combo newCombo(Widget parent, int cols,int span,boolean readOnly) { ! Combo w = new Combo((Composite) parent, readOnly ? SWT.READ_ONLY : SWT.NONE); w.setLayoutData(Layout.newGridData(w, cols, span, 22)); return(w); |
|
From: Dave S. <rim...@us...> - 2004-07-30 19:59:50
|
Update of /cvsroot/javaclient/javaclient/metadata In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15606/metadata Modified Files: jc.xsl Log Message: Fixed the Combo so the default is readOnly and add the editable flag for editing Index: jc.xsl =================================================================== RCS file: /cvsroot/javaclient/javaclient/metadata/jc.xsl,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** jc.xsl 27 Jul 2004 15:10:23 -0000 1.1 --- jc.xsl 30 Jul 2004 19:59:37 -0000 1.2 *************** *** 87,91 **** <xsl:template match="combo"> <xsl:variable name="combo" select="jc:Combo.new(@id,@cols,@span)"/> ! <xsl:if test="@readOnly"> <xsl:value-of select="jc:setReadOnly($combo,not(true()))"/> </xsl:if> --- 87,91 ---- <xsl:template match="combo"> <xsl:variable name="combo" select="jc:Combo.new(@id,@cols,@span)"/> ! <xsl:if test="@edit"> <xsl:value-of select="jc:setReadOnly($combo,not(true()))"/> </xsl:if> |
|
From: Dave S. <rim...@us...> - 2004-07-30 19:59:50
|
Update of /cvsroot/javaclient/javaclient/samples/dpy In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15606/samples/dpy Modified Files: Customer.jc Log Message: Fixed the Combo so the default is readOnly and add the editable flag for editing Index: Customer.jc =================================================================== RCS file: /cvsroot/javaclient/javaclient/samples/dpy/Customer.jc,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** Customer.jc 30 Jul 2004 18:09:34 -0000 1.2 --- Customer.jc 30 Jul 2004 19:59:38 -0000 1.3 *************** *** 23,31 **** <text modelId="city" cols="30"/> <label value="Prov/State"/> ! <combo modelId="prov_state" cols="5" limit="4"/> <label value="Zip/Postal Code"/> <text modelId="postal_code" cols="10" limit="9" filter="UpperCaseTextFilter"/> <label value="Country"/> ! <combo modelId="country" cols="20" limit="20" pkClass="String"/> <label value="Phone Number"/> <text modelId="telephone_num" cols="14"/> --- 23,31 ---- <text modelId="city" cols="30"/> <label value="Prov/State"/> ! <combo modelId="prov_state" cols="5" /> <label value="Zip/Postal Code"/> <text modelId="postal_code" cols="10" limit="9" filter="UpperCaseTextFilter"/> <label value="Country"/> ! <combo modelId="country" cols="20" pkClass="String" /> <label value="Phone Number"/> <text modelId="telephone_num" cols="14"/> |
|
From: Dave S. <rim...@us...> - 2004-07-30 19:59:46
|
Update of /cvsroot/javaclient/javaclient/net/sourceforge/javaclient/tools/xsl In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15606/net/sourceforge/javaclient/tools/xsl Modified Files: Combo.java Log Message: Fixed the Combo so the default is readOnly and add the editable flag for editing Index: Combo.java =================================================================== RCS file: /cvsroot/javaclient/javaclient/net/sourceforge/javaclient/tools/xsl/Combo.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** Combo.java 27 Jul 2004 15:08:06 -0000 1.1 --- Combo.java 30 Jul 2004 19:59:38 -0000 1.2 *************** *** 120,124 **** b.append(getComponentId()); b.append(" = JCFactory.newCombo(parent"); ! b.append(", " + cols + ", " + span + ");"); b.append("\n\t\t"); b.append(getComponentId()); --- 120,124 ---- b.append(getComponentId()); b.append(" = JCFactory.newCombo(parent"); ! b.append(", " + cols + ", " + span + ","+readOnly+");"); b.append("\n\t\t"); b.append(getComponentId()); |