Trace:
Differences
This shows you the differences between two versions of the page.
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:41] cduncan [An Important Note About the Component Hierarchy] |
||
---|---|---|---|
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 component, the set UI resource is used. |
===== The Special Case of Containers ===== | ===== The Special Case of Containers ===== |