|
RE: getCellEditor(int row, int col): msg#00171java.ulc.devel
That's exactly what I tried to explain to Mario. Thanks Janak! Regards, Etienne > -----Original Message----- > From: ulc-developer-admin@xxxxxxxxxxxxxxx [mailto:ulc-developer- > admin@xxxxxxxxxxxxxxx] On Behalf Of Janak Mulani > Sent: Wednesday, July 26, 2006 5:50 AM > To: Mario H. Castillo > Cc: Ulc-Developer@Canoo. Com > Subject: RE: [ULC-developer] getCellEditor(int row, int col) > > 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 > > _______________________________________________ > 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: Double Click in an ULCTextField, Etienne Studer |
|---|---|
| Next by Date: | Gradient Painting, bbroschinsky |
| Previous by Thread: | RE: getCellEditor(int row, int col), Janak Mulani |
| Next by Thread: | Key Navigation in ULCTable, karthick Rajagopal |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |