|
RE: getCellEditor(int row, int col): msg#00168java.ulc.devel
Hi Mario, In ULC, you set cell editor on a ULCTableColumn using: setCellEditor(ITableCellEditor cellEditor) For ITableCellEditor you need to implement: public IEditorComponent getTableCellEditorComponent(ULCTable table, Object value, int row) {} In this method you can return different cell editor components based on row and column. For instance: public class MyCellEditor implements ITableCellEditor { private int fColumnId; private ULCTextField fEditorComponent1; private ULCTextField fEditorComponent2; public MyCellEditor(int columnId) { fColumnId = columnId; fEditorComponent1 = new ULCTextField(); fEditorComponent1.setDataType(new ULCStringDataType()); fEditorComponent2 = new ULCTextField(); fEditorComponent2.setDataType(new ULCDateDataType("dd.MM.yyyy")); } public IEditorComponent getTableCellEditorComponent(ULCTable table, Object value, int row) { if ((row % 2 == 0) && (fColumnId % 2 == 0)) { return fEditorComponent1; } else { return fEditorComponent2; } } } I hope this helps. Thanks and regards, Janak >-----Original Message----- >From: ulc-developer-admin@xxxxxxxxxxxxxxx >[mailto:ulc-developer-admin@xxxxxxxxxxxxxxx]On Behalf Of Mario H. >Castillo >Sent: Tuesday, July 25, 2006 11:57 PM >To: Ulc-Developer@Canoo. Com >Subject: [ULC-developer] getCellEditor(int row, int col) > > >Hello, > >I am pretty sure you answered these question dozen of times >before, in Swing >I can augment the function "TableCellEditor getCellEditor(int row, >int col)" >in order to create a TableCellEditor per row/col rather than >column based, >in my case I need to know the row also. > >How do I do this in ULC? > >Mario > >_______________________________________________ >ULC-developer mailing list >ULC-developer@xxxxxxxxxxxxxxx >http://lists.canoo.com/mailman/listinfo/ulc-developer
|
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | RE: custom border, Janak Mulani |
|---|---|
| Next by Date: | How to pass complex object type arguments to JNLP Client, rambabu somu |
| Previous by Thread: | RE: getCellEditor(int row, int col), Etienne Studer |
| Next by Thread: | RE: getCellEditor(int row, int col), Etienne Studer |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |