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/10 12:35]
cduncan [Resource and UIResource]
jvx:reference [2020/06/10 12:49]
cduncan [The Basics]
Line 39: Line 39:
 ==== Extension ==== ==== Extension ====
  
-Next comes the extension layer. Components from the technology are extended to support needed features of [[https://​sourceforge.net/​projects/​jvx/​|JVx]]. This includes creating bindings for the databook, additional style options, and changing of behavior, if necessary. From time to time, this also includes creating components from scratch if the provided ones do not meet the needs or there simply are none with the required functionality. For the most part, we do our best that these layers can be used without [[https://​sourceforge.net/​projects/​jvx/​|JVx]],​ meaning that they represent a solitary extension to the technology. A very good example is our JavaFX implementation,​ which compiles into two separate jars, the first being the complete [[https://​sourceforge.net/​projects/​jvxfx/​|JVx/​JavaFX]] stack, the second being stand-alone JavaFX extensions that can be used in any application and without [[https://​sourceforge.net/​projects/​jvx/​|JVx]].+Next comes the extension layer. Components from the technology are extended to support needed features of [[https://​sourceforge.net/​projects/​jvx/​|JVx]]. This includes creating bindings for the databook, additional style options, and changing of behavior, if necessary. From time to time, this also includes creating components from scratch if the provided ones do not meet the needsor there simply are none with the required functionality. For the most part, we do our best that these layers can be used without [[https://​sourceforge.net/​projects/​jvx/​|JVx]],​ meaning that they represent a solitary extension to the technology. A very good example is our JavaFX implementation,​ which compiles into two separate jars, the first being the complete [[https://​sourceforge.net/​projects/​jvxfx/​|JVx/​JavaFX]] stack, the second being stand-alone JavaFX extensions that can be used in any application and without [[https://​sourceforge.net/​projects/​jvx/​|JVx]].
  
 Theoretically,​ one can skip this layer and directly jump to the implementation layer, but, so far, it has proven necessary (for cleanliness of the code, object structure, and sanity reasons) to create a separate extension layer. Theoretically,​ one can skip this layer and directly jump to the implementation layer, but, so far, it has proven necessary (for cleanliness of the code, object structure, and sanity reasons) to create a separate extension layer.
Line 168: Line 168:
 ===== Piecing It Together ===== ===== Piecing It Together =====
  
-With all this in mind, we know now that [[https://​sourceforge.net/​projects/​jvx/​|JVx]] has swapable ​implementations underneath its UI layer for each technology it utilizes:+With all this in mind, we know now that [[https://​sourceforge.net/​projects/​jvx/​|JVx]] has swappable ​implementations underneath its UI layer for each technology it utilizes:
  
 {{:​jvx:​reference:​multi-layers.png?​nolink|Multiple Extensions/​Implementations/​Technologies can be used}} {{:​jvx:​reference:​multi-layers.png?​nolink|Multiple Extensions/​Implementations/​Technologies can be used}}
Line 192: Line 192:
 ===== The Basics ===== ===== The Basics =====
  
-We’ve [[#​encapsulated_by_a_wrapper_class|encapsulated by a wrapper class]]. A “UIResource”, on the other hand, is an encapsulated concrete implementation of one of the interfaces on the UI layer.+We’ve [[#​encapsulated_by_a_wrapper_class|encapsulated by a wrapper class]]. A “UI resource”, on the other hand, is an encapsulated concrete implementation of one of the interfaces on the UI layer.
  
-Let’s do a short overview ​on how the [[https://​sourceforge.net/​projects/​jvx/​|JVx]] architecture looks like in regards to the GUI stack:+Let’s do a short overview ​of how the [[https://​sourceforge.net/​projects/​jvx/​|JVx]] architecture looks like in regards to the GUI stack:
  
 {{:​jvx:​reference:​resource.png?​nolink|The JVx layers revisited. UI wrapper and implementation implement the interface, extension and technology do not.}} {{:​jvx:​reference:​resource.png?​nolink|The JVx layers revisited. UI wrapper and implementation implement the interface, extension and technology do not.}}
  
-The UI wrappers are the main UI classes that are used to create the GUI (f.e. ''​%%UIButton%%''​). These are wrapping the implementations (f.e. ''​%%SwingButton%%''​),​ which themselves are wrapping the extension/​technology (f.e. a ''​%%JVxButton%%''/''​%%JButton%%''​). Only the UI and implementation classes ​are implementing the interface are required for the component (f.e. ''​%%IButton%%''​). That also means that the implementation is dependent on the extension/​technology component, but the UI can use any object which implements the interface.+The UI wrappers are the main UI classes that are used to create the GUI (f.e. ''​%%UIButton%%''​). These are wrapping the implementations (f.e. ''​%%SwingButton%%''​),​ which themselves are wrapping the extension/​technology (f.e. a ''​%%JVxButton%%''/''​%%JButton%%''​). Only the UI and implementation classes implementing the interface are required for the component (f.e. ''​%%IButton%%''​). That also means that the implementation is dependent on the extension/​technology component, but the UI can use any object which implements the interface.
  
 Now, with that knowledge, we can start defining what is what: Now, with that knowledge, we can start defining what is what:
Line 206: Line 206:
 The resource itself, accessed by calling ''​%%<​uiwrapper>​.getResource()%%'',​ is the extension/​technology component. The  UI resource can be accessed by calling ''​%%<​uiwrapper>​.getUIResource()%%''​. The UI component can be accessed by calling ''​%%<​uiwrapper>​.getUIComponent()%%''​ and is usually the UI wrapper class itself. If we use our previous Swing example, the resource would be a ''​%%JVxButton%%''/''​%%JButton%%'',​ the  UI resource would be the ''​%%SwingButton%%''​ and the UI component would be the ''​%%UIButton%%''​. The resource itself, accessed by calling ''​%%<​uiwrapper>​.getResource()%%'',​ is the extension/​technology component. The  UI resource can be accessed by calling ''​%%<​uiwrapper>​.getUIResource()%%''​. The UI component can be accessed by calling ''​%%<​uiwrapper>​.getUIComponent()%%''​ and is usually the UI wrapper class itself. If we use our previous Swing example, the resource would be a ''​%%JVxButton%%''/''​%%JButton%%'',​ the  UI resource would be the ''​%%SwingButton%%''​ and the UI component would be the ''​%%UIButton%%''​.
  
-As one can see, access to all objects which comprise GUI possible at all times.. We, of course, have the UI component, we can access the implementation component, and we can access the extension/​technology component. Theoretically,​ we could also swap them at runtime, but in [[https://​sourceforge.net/​projects/​jvx/​|JVx]],​ this is limited to the construction of the object to greatly reduce the error potential and complexity of the framework code.+As one can see, access to all objects which comprise GUI possible at all times. We, of course, have the UI component, we can access the implementation component, and we can access the extension/​technology component. Theoretically,​ we could also swap them at runtime, but in [[https://​sourceforge.net/​projects/​jvx/​|JVx]],​ this is limited to the construction of the object to greatly reduce the error potential and complexity of the framework code.
  
 ===== Creating custom components ===== ===== Creating custom components =====
This website uses cookies for visitor traffic analysis. By using the website, you agree with storing the cookies on your computer.More information