mixinafReflux::Resource
afReflux::Resource
Resources are navigatable objects that may be represented by an URI. For example, the Explorer application has a FileResource
and a HttpResource
.
- children
virtual Resource[] children()
Return child resources. Used by
ResourceTree
.Defaults to empty list.
- displayName
virtual Str displayName()
A display name for the resource. File resources may show their OS specific variant rather than Fantom's canonical URI form.
The display name is displayed in the address bar.
Defaults to
uri.toStr
.- hasChildren
virtual Bool hasChildren()
If generating child resources is in-efficient, override this method for optimisation.
Defaults to
children.size > 0
.- icon
virtual Image? icon()
An (optional) icon that represents this resource.
- name
abstract Str name()
The full name of this resource.
- parent
virtual Resource? parent()
Return the parent resource. Root resources should return
null
. Used byResourceTree
.Defaults to
null
.- populatePopup
virtual Menu populatePopup(Menu menu)
By populating an existing menu, it allows Panels to create the initial menu.
- uri
abstract Uri uri()
The URI that equates to this resource.
- viewTypes
virtual Type[] viewTypes()
The Views that may display this resource.
Defaults to empty list.