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:34]
cduncan [What else?]
jvx:reference [2020/06/15 08:44]
cduncan [Entry Point]
Line 210: Line 210:
 ===== Creating Custom Components ===== ===== Creating Custom Components =====
  
-We will use an example from the [[#​part_about_creating_custom_components|part about creating custom components]],​ which we will come to later. The ''​%%BeepComponent%%''​ is a simple ''​%%UIComponent%%''​ extension ​which contains a label and two buttons inside itself.+We will use an example from the [[#​part_about_creating_custom_components|part about creating custom components]],​ which we will come to later. The ''​%%BeepComponent%%''​ is a simple ''​%%UIComponent%%''​ extension ​that contains a label and two buttons inside itself.
  
 <code java> <code java>
Line 234: Line 234:
 } }
 </​code>​ </​code>​
-We are setting a new UI resource (a ''​%%UIPanel%%''​) in the constructor (at line #5) that is to be used by the ''​%%UI component%%''​. In this case, it is not an implementation,​ but another UI component. However, that doesn’t matter because the UI resource ​only must implement the expected interface. At line #15 we start using that custom UI resource.+We are setting a new UI resource (a ''​%%UIPanel%%''​) in the constructor (at line #5), which is to be used by the ''​%%UI component%%''​. In this case, it is not an implementation,​ but another UI component. However, that doesn’t matter because the UI resource must only implement the expected interface. At line #15 we start using that custom UI resource.
  
-Because UI component is an abstract component designed for exactly this usage, the example might not be the most exciting one, but it clearly illustrates the mechanic.+Because UI component is an abstract component designed for exactly this usage, the example might not be the most exciting one, but it clearly illustrates the mechanics.
  
 ===== Bolting on Functionality ===== ===== Bolting on Functionality =====
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 =====
This website uses cookies for visitor traffic analysis. By using the website, you agree with storing the cookies on your computer.More information