UltraLightClient Code Community
[ start | index | login ]
Overview > Fixed Columns Table

Fixed Columns Table

Belongs to following categories: Extension, Snippet, ULC5.2, ULC6.1,

Project Home
Downloads

Purpose

This snippet shows how to create a table with fixed columns in ULC.


How to use

Create two tables which share the table model and the selection model. The column model must not be shared.

	   ULCTable table = new ULCTable(null ,null, fixedColumnsTable.getSelectionModel());
	   table.setAutoResizeMode(ULCTable.AUTO_RESIZE_OFF);
	   table.setAutoCreateColumnsFromModel(false);
	   table.setModel(fixedColumnsTable.getModel());
	


The table model cannot be added in the constructor because the autoCreateColumnsFromModel property default is true. Add the fixed columns to the fixed table column model and the scrollable columns to the scollable table using the ULCTable.addColumn() API. Add both tables to a scroll pane:

	   ULCScrollPane scrollPane = new ULCScrollPane(table);
	   scrollPane.setRowHeaderView(fixedColumnsTable);
	   scrollPane.setCorner(ULCScrollPane.UPPER_LEFT_CORNER,fixedColumnsTable.getTableHeader());
	

Project Links

Project Home
Downloads

Authors

>>daniel
>>sibylle

no comments | post comment
labels
Category:Extension
Category:ULC6.1
Category:Snippet
Category:ULC5.2
attachments
FixedColumnsTable.java (6316)
Created by daniel. Last edited by admin, one year and 170 days ago. Viewed 9,639 times. #23
[diff] [history] [edit] [rdf]




news




RSS News Feed:

RSS Feed

snipsnap.org | Copyright 2000-2002 Matthias L. Jugel and Stephan J. Schmidt