Trace:
Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision | Next revision Both sides next revision | ||
jvx:reference [2020/06/10 12:52] cduncan [Creating custom components] |
jvx:reference [2020/06/10 12:53] cduncan [Bolting on functionality] |
||
---|---|---|---|
Line 238: | Line 238: | ||
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 mechanic. | ||
- | ===== Bolting on functionality ===== | + | ===== Bolting on Functionality ===== |
- | Also from from the [[#part_about_creating_custom_components|part about creating custom components]] we can reuse the ''%%PostfixedLabel%%'' as example: | + | Also, from the [[#part_about_creating_custom_components|part about creating custom components]], we can reuse the ''%%PostfixedLabel%%'' as example: |
<code java> | <code java> | ||
Line 251: | Line 251: | ||
}; | }; | ||
</code> | </code> | ||
- | Now ''%%testLabel%%'' will be using the ''%%PostfixedLabel%%'' internally, but with no indication to the user of the object that this is the case. This allows to extend the functionality of a component completely transparently, especially in combination with functions which do return an ''%%UIComponent%%'' and similar. | + | Now ''%%testLabel%%'' will be using the ''%%PostfixedLabel%%'' internally but with no indication to the user of the object that this is the case. This allows us to extend the functionality of a component completely transparently, especially in combination with functions that return a ''%%UI component%%'' and similar. |
===== An important note about the component hierarchy ===== | ===== An important note about the component hierarchy ===== |