Documentation

Trace:

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Next revision Both sides next revision
jvx:reference [2020/06/15 08:40]
cduncan [Creating Custom Components]
jvx:reference [2020/06/15 08:50]
cduncan [DataBook]
Line 280: Line 280:
                                     \-Button                                     \-Button
 </​code>​ </​code>​
-That is because such extended components are not “passed” to the technology; they only exist on the UI layer because they do not have a Technology ​component which could be used. That is done by adding the ''​%%UI component%%''​ to the UI parent, but for adding the actual technology component the set UI resource is used.+That is because such extended components are not “passed” to the technology; they only exist on the UI layer because they do not have a technology ​component which could be used. That is done by adding the ''​%%UI component%%''​ to the UI parent, but for adding the actual technology componentthe set UI resource is used.
  
 ===== The Special Case of Containers ===== ===== The Special Case of Containers =====
Line 333: Line 333:
 } }
 </​code>​ </​code>​
-Which is easy enough, but let’s say we’d like to add logic to that wrapper. At that point, it becomes more complicated. We can’t use the same technique as the custom component from above because, in that case, the “overlaying panel” would simply not be displayed. However, there is a similar mechanism for containers: setting the UI resource container.+This is easy enough, but let’s say we’d like to add logic to that wrapper. At that point, it becomes more complicated. We can’t use the same technique as the custom component from above because, in that case, the “overlaying panel” would simply not be displayed. However, there is a similar mechanism for containers: setting the UI resource container.
  
 The UI resource container is another special mechanism that works similar to setting the UI resource, but it works the other way round. While setting the UI resource “hides” components from the technology in UI layer, setting the UI resource container hides components from the UI layer, while they are added in the technology.. As it is a little complicated,​ here is our example using this technique again: The UI resource container is another special mechanism that works similar to setting the UI resource, but it works the other way round. While setting the UI resource “hides” components from the technology in UI layer, setting the UI resource container hides components from the UI layer, while they are added in the technology.. As it is a little complicated,​ here is our example using this technique again:
Line 457: Line 457:
 } }
 </​code>​ </​code>​
-All we have to do there is start the launcher itself. As the comment suggests, there might be work required for a “real” application startup. For this example, it is all we need to do. Of course, we could also directly embed this little function into the launcher implementation itself to save us one class.+All we have to do there is start the launcher itself. As the comment suggests, there might be work required for a “real” application startup. For this example, however, it is all we need to do. Of course, we could also directly embed this little function into the launcher implementation itself to save us one class.
  
 ===== The Launcher ===== ===== The Launcher =====
  
-The ''​%%ILauncher%%''​ implementation,​ on the other hand, contains quite some logic but nothing ​not manageable:+The ''​%%ILauncher%%''​ implementation,​ on the other hand, contains quite a bit of logic but nothing ​unmanageable:
  
 <code java> <code java>
Line 576: Line 576:
 ===== Notes on the Launcher ===== ===== Notes on the Launcher =====
  
-As you might have noticed, in our example the launcher is a (window) frame. That makes sense for nearly every desktop GUI toolkit as they all depend upon a window as main method to display their applications. But the launcher could also be simpler: for example, just a call to start the GUI thread. Or it could be something completely different: for example, an incoming HTTP request.+As you might have noticed, in our example the launcher is a (window) frame. That makes sense for nearly every desktop GUI toolkitas they all depend upon a window as the main method to display their applications. But the launcher could also be simpler: for example, just a call to start the GUI thread. Or it could be something completely different: for example, an incoming HTTP request.
  
 Also, don’t forget that the launcher is providing additional functionality to the application,​ like saving file handles, reading and writing the configuration,​ and similar platform and toolkit-dependent operations. See the [[https://​sourceforge.net/​p/​jvx/​code/​HEAD/​tree/​trunk/​java/​swing/​src/​com/​sibvisions/​rad/​ui/​swing/​impl/​SwingApplication.java|launcher for Swing for further details]]. Also, don’t forget that the launcher is providing additional functionality to the application,​ like saving file handles, reading and writing the configuration,​ and similar platform and toolkit-dependent operations. See the [[https://​sourceforge.net/​p/​jvx/​code/​HEAD/​tree/​trunk/​java/​swing/​src/​com/​sibvisions/​rad/​ui/​swing/​impl/​SwingApplication.java|launcher for Swing for further details]].
Line 602: Line 602:
 {{:​jvx:​reference:​databook.png?​nolink|DataBook Architecture,​ the DataBook contains DataPages, which contain DataRows.}} {{:​jvx:​reference:​databook.png?​nolink|DataBook Architecture,​ the DataBook contains DataPages, which contain DataRows.}}
  
-===== RowDefinition ​=====+===== Row Definition ​=====
  
-The RowDefinition ​defines what columns are available in the row and stores some additional information about them, like the names of the [[https://​en.wikipedia.org/​wiki/​Unique_key|primary key]] columns. You can think of the RowDefinition ​as the headers of a table.+The row definition ​defines what columns are available in the row and stores some additional information about them, like the names of the [[https://​en.wikipedia.org/​wiki/​Unique_key|primary key]] columns. You can think of the row definition ​as the headers of a table.
  
-Its creation and usage is rather simple, and if you’re working with RemoteDataBooks there is no need to create one at all, as it is automatically created when the DataBook ​is opened. A RowDefinition ​holds and manages ​ColumnDefinitions, which define the columns.+Its creation and usage is rather simple, andif you’re working with RemoteDataBooks there is no need to create one at all, as it is automatically created when the data book is opened. A row definition ​holds and manages ​column definitions, which define the columns.
  
 <code java> <code java>
Line 628: Line 628:
 Most of the column definition is additional information about the column, like if it is nullable, the label of the column, default values, allowed values, and similar information. Most of the column definition is additional information about the column, like if it is nullable, the label of the column, default values, allowed values, and similar information.
  
-==== DataType ​====+==== Data Type ====
  
-Of course, we must define what type the value in the column has. This is done by setting a data type on the column definition. The data type defines what kind of values the column holds, like if it is a String, a Number, or something else. We provide the most often used data types out of the box:+Of course, we must define what type the value in the column has. This is done by setting a data type on the column definition. The data type defines what kind of values the column holds, like if it is a string, a number, or something else. We provide the most often used data types out of the box:
  
   * BigDecimal   * BigDecimal
Line 642: Line 642:
 It is possible to add new data types by simply implementing ''​%%IDataType%%''​. It is possible to add new data types by simply implementing ''​%%IDataType%%''​.
  
-===== DataRow ​=====+===== Data Row =====
  
 The data row represents a single row of data; it holds/​references its own row definition and, of course, provides access to the values of the row. Accessing the  data row can be done either by column index or column name, and the methods either return or accept objects. Let’s look at a simple usage example: The data row represents a single row of data; it holds/​references its own row definition and, of course, provides access to the values of the row. Accessing the  data row can be done either by column index or column name, and the methods either return or accept objects. Let’s look at a simple usage example:
Line 653: Line 653:
 dataRow.setValue("​COLUMN_A",​ "New Value"​);​ dataRow.setValue("​COLUMN_A",​ "New Value"​);​
 </​code>​ </​code>​
-===== DataPage ​=====+===== Data Page =====
  
-The data page is basically a list of data rows, it also holds its own row definition, which is shared with all the contained data rows.+The data page is basically a list of data rows. It also holds its own row definition, which is shared with all the contained data rows.
  
-The main usage of data pages is to allow paging in a master/​detail relationship. If the master selects a different row, the detail ​databook ​selects the related data page.+The main usage of data pages is to allow paging in a master/​detail relationship. If the master selects a different row, the detail ​data book selects the related data page.
  
-===== DataBook ​=====+===== Data Book =====
  
 The data book is the main model of [[https://​sourceforge.net/​projects/​jvx/​|JVx]],​ it provides direct access to its current data page and data row by extending from IDataRow and IDataPage. The data book is the main model of [[https://​sourceforge.net/​projects/​jvx/​|JVx]],​ it provides direct access to its current data page and data row by extending from IDataRow and IDataPage.
This website uses cookies for visitor traffic analysis. By using the website, you agree with storing the cookies on your computer.More information