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 Both sides next revision
jvx:firstapp [2019/02/26 10:03]
admin
jvx:firstapp [2020/06/08 12:26]
cduncan
Line 1: Line 1:
-~~Title: First JVx application ​~~+~~Title: First JVx Application ​~~
  
 In the following paragraphs, we will show you how to create your first JVx application with minimal effort and code. In the following paragraphs, we will show you how to create your first JVx application with minimal effort and code.
Line 5: Line 5:
 The application'​s task is to display data from a database table and make the data editable. ​ The application'​s task is to display data from a database table and make the data editable. ​
  
-Before you start you will need the following libraries and tools:+Before you startyou will need the following libraries and tools:
  
   * [[http://​sourceforge.net/​projects/​jvx/​files/​latest/​download|JVx Binary package]]   * [[http://​sourceforge.net/​projects/​jvx/​files/​latest/​download|JVx Binary package]]
Line 13: Line 13:
   * [[http://​sourceforge.net/​projects/​jvxfirstapp/​files/​latest/​download|JVx sample Eclipse project]]   * [[http://​sourceforge.net/​projects/​jvxfirstapp/​files/​latest/​download|JVx sample Eclipse project]]
  
-For our JVx sample application we need the following parts:+For our JVx sample applicationwe need the following parts:
  
   * [[#​application|Application]]   * [[#​application|Application]]
Line 21: Line 21:
  
 {{anchor:​application:​}} {{anchor:​application:​}}
-== Create an application ​== +== Create an Application ​== 
  
 We need an application as a frame for the client. Each application must implement the interface ''​javax.rad.application.IApplication''​. In our example, we derive from the standard implementation ''​com.sibvisions.rad.application.Application'',​ whereby we use the following code: We need an application as a frame for the client. Each application must implement the interface ''​javax.rad.application.IApplication''​. In our example, we derive from the standard implementation ''​com.sibvisions.rad.application.Application'',​ whereby we use the following code:
Line 141: Line 141:
 ^ Method ^ Description ^ ^ Method ^ Description ^
 |Constructor|A specific constructor is needed, as each application is started with a  launcher which depends on the technology used. This launcher is passed over to the application in the constructor.| |Constructor|A specific constructor is needed, as each application is started with a  launcher which depends on the technology used. This launcher is passed over to the application in the constructor.|
-|createConnection|The communication protocol is initialised. A ''​DirectServerConnection''​ is sufficient for our application,​ as both the client and the server are started in the same VM. However, if an application server is integrated, a ''​HttpConnection''​ could also be used.| +|createConnection|The communication protocol is initialized. A ''​DirectServerConnection''​ is sufficient for our application,​ as both the client and the server are started in the same VM. However, if an application server is integrated, a ''​HttpConnection''​ could also be used.| 
-|getApplicationName|Sets the application name. This name is needed for the communication with the server, as the latter uses the appropriate application configuration depending on the application name. In our case, the application name must be firstapp as the working directory is also called ''​../​JVxFirstApp/​rad/​**firstapp**/''​.|+|getApplicationName|Sets the application name. This name is needed for the communication with the server, as the latter uses the appropriate application configuration depending on the application name. In our case, the application name must be "firstapp", ​as the working directory is also called ''​../​JVxFirstApp/​rad/​**firstapp**/''​.|
 |afterLogin|This method is called by the super class after a successful login. We use this method to extend our menu and our toolbar.\\ \\ It is not necessary to reset the changes after logout, as this is done automatically by the super class.| |afterLogin|This method is called by the super class after a successful login. We use this method to extend our menu and our toolbar.\\ \\ It is not necessary to reset the changes after logout, as this is done automatically by the super class.|
-|createMenuItem|Provided by the super class to create menu entries. The first parameter contains the name of the method which is to be called when the menu entry is selected. The second parameter contains the command (ActionCommand) which plays no role in our case. The text of the menu entry is to be defined in the third parameter, and lastly the image for the entry is passed over.|+|createMenuItem|Provided by the super class to create menu entries. The first parameter contains the name of the method which is to be called when the menu entry is selected. The second parameter contains the command (ActionCommand)which plays no role in our case. The text of the menu entry is to be defined in the third parameter, and lastlythe image for the entry is passed over.|
 |createToolBarButton|Similar to ''​createMenuItem'',​ except that this method creates a button which adapts to the layout of the toolbar.| |createToolBarButton|Similar to ''​createMenuItem'',​ except that this method creates a button which adapts to the layout of the toolbar.|
 |UIImage.getImage|Provides a predefined image from the JVx image library. \\ For ease of use, we use a predefined image.| |UIImage.getImage|Provides a predefined image from the JVx image library. \\ For ease of use, we use a predefined image.|
-|doOpenDBEdit|This method is called when the menu or the toolbar button ​are pressed and calls the corresponding ​work screen.|+|doOpenDBEdit|This method is called when the menu or the toolbar button ​is pressed and calls the corresponding ​workscreen.|
 |configureFrame|This method is provided by the super class and ensures that all frames look the same. This includes the menu icon.| |configureFrame|This method is provided by the super class and ensures that all frames look the same. This includes the menu icon.|
  
 {{anchor:​workscreen:​}} {{anchor:​workscreen:​}}
-== Create a work screen ​== +== Create a Workscreen ​== 
  
-Once we have created the application framework, we now create our first work screen ​with the following code:+Once we have created the application framework, we create our first workscreen ​with the following code:
  
 <file java DBEditFrame.java>​ <file java DBEditFrame.java>​
This website uses cookies for visitor traffic analysis. By using the website, you agree with storing the cookies on your computer.More information