Java Gui Builder
You are here: Home   >   Documentation   >   JGB Elements Documentation   >   Ref Element
JGB Element Navigation
tab
ref

Ref Element

Group membership: Property & method calls

References an existing object from the builder's context. It is possible to view ID attributes as meaning variable names. In this case, ref acts as the right-hand side of expressions. Instantiation would then be the left-hand side of expressions.

The references' value is dropped onto the builder's stack, ready for consumption by a parent methodCall, return or property.

Attributes

Name Type Required Description
refid IDREF Yes

Must resolve to an ID attribute that was previously declared in the current JGB XML file.

Example usage

…
<!-- Declare an object that we will access later -->
<object id="someObject" class="…">
    …
</object>

…

<!-- Reference the object that was previously instantiated -->
<property name="aProperty">
    <ref refid="someObject"/>
</property>
…
        

Parent element(s)

constraints, parameter, property, sheet.

Child element(s)

None
Back to top
SourceForge Logo
Hosted on SourceForge.net
Valid XHTML 1.0!
Valid XHTML 1.0 !
Valid CSS!
Valid CSS !
Code Coverage by Clover
Code Coverage provided by Clover
 |  Home |  License |  Downloads |  Documentation |  Developers |  Mailing Lists |  Dependencies |  Links |  Privacy Policy |  SF Project Home |