Deletions: See Carousel Components∞ a demo of some of Carousel's advanced components Soduku with XUI
See Soduku with XUI∞ an example showing how to build a Soduku application Localization
See Translate.zip∞ Binding an XTable2 to an XModel for display and update
This article will show you how to create a basic XModelTableModel adapter which uses an XModel as its data source. The data in the model is displayed upon starting the application and user changes are set in the same model and saved back to the same file for the next run. It's important to bear in mind that the TableModel is accessing data within the XModel in a specific hierarchy and this can be changed either by changing the TableModel or by subclassing it.
We start by creating the Welcome page with an XTable2 component within a scrollpane and a save button which will be used to store changes back to the dataset file.
Next we include a dataset file in the datasources file. The file we include is the statics.xml file which contains some basic data to be displayed in the table.
Now the Welcomeclass can be created. There is a header array which sets the titles of the columns in the table and a tableMdl XModel variable which refers to the data model for the table. In the pageCreated method, a reference to the XTable2 is retrieved as is a reference to the tableMdl which is defined in the statics.xml file. Now an instance of the XModelTableModel class is created and the tabldMld variable is passed to the constructor. The headers for the XModelTableModel are set and the model is set as the table model in the setModel call.
The save method simply outputs the contents of the table to the source data file so that user changes are recorded in it. Some old examples (using tables and trees)∞ Synth Support
See The SwingSet application∞ from the JDK running XUI's Synth look and feel with SVG artwork ∞
Additions: Soduku with XUI
See Soduku with XUI∞ an example showing how to build a Soduku application Synth Support
See The SwingSet application∞ from the JDK running XUI's Synth look and feel with SVG artwork
These samples demonstrate particular features and focus on technical issues, not usability or completeness Localization
See Translate.zip∞ Binding an XTable2 to an XModel for display and update
Deletions:
Binding an XTable2 to an XModel for display and update
Additions: This article will show you how to create a basic XModelTableModel adapter which uses an XModel as its data source. The data in the model is displayed upon starting the application and user changes are set in the same model and saved back to the same file for the next run. It's important to bear in mind that the TableModel is accessing data within the XModel in a specific hierarchy and this can be changed either by changing the TableModel or by subclassing it.
Deletions: This article will show you how to create a basic TableModel adapter which uses an XModel as its data source. The data in the model is displayed upon starting the application and user changes are set in the same model and saved back to the same file for the next run. It's important to bear in mind that the TableModel is accessing data within the XModel in a specific hierarchy and this can be changed either by changing the TableModel or by subclassing it.
Additions: Now the Welcomeclass can be created. There is a header array which sets the titles of the columns in the table and a tableMdl XModel variable which refers to the data model for the table. In the pageCreated method, a reference to the XTable2 is retrieved as is a reference to the tableMdl which is defined in the statics.xml file. Now an instance of the XModelTableModel class is created and the tabldMld variable is passed to the constructor. The headers for the XModelTableModel are set and the model is set as the table model in the setModel call.
Additions: Next we include a dataset file in the datasources file. The file we include is the statics.xml file which contains some basic data to be displayed in the table.
Deletions: Next we include a dataset file in the datasources file. The file we include is the statics.xml∞ file which contains some basic data to be displayed in the table.
Additions: Next we include a dataset file in the datasources file. The file we include is the statics.xml∞ file which contains some basic data to be displayed in the table.
Deletions: Next we include a dataset file in the datasources file.
Binding an XTable2 to an XModel for display and update
This article will show you how to create a basic TableModel adapter which uses an XModel as its data source. The data in the model is displayed upon starting the application and user changes are set in the same model and saved back to the same file for the next run. It's important to bear in mind that the TableModel is accessing data within the XModel in a specific hierarchy and this can be changed either by changing the TableModel or by subclassing it.
We start by creating the Welcome page with an XTable2 component within a scrollpane and a save button which will be used to store changes back to the dataset file.
Next we include a dataset file in the datasources.xml∞ file.