public class UiRegion extends UiNode
| Modifier and Type | Field and Description | 
|---|---|
static RegionId | 
NULL_ID
The identifier for the null-region. 
 | 
static String | 
NULL_NAME  | 
LAYER_DEFAULT, LAYER_OPTICAL, LAYER_PACKET| Constructor and Description | 
|---|
UiRegion(UiTopology topology,
        Region region)
Constructs a UI region, with a reference to the specified backing region. 
 | 
| Modifier and Type | Method and Description | 
|---|---|
Region | 
backingRegion()
Returns the region instance backing this UI region. 
 | 
Set<RegionId> | 
children()
Returns the identities of the child regions. 
 | 
protected void | 
destroy()
Removes all external references, and prepares the instance for
 garbage collection. 
 | 
int | 
deviceCount()
Returns the count of devices in this region. 
 | 
Set<DeviceId> | 
deviceIds()
Returns the set of device identifiers for this region. 
 | 
void | 
deviceRemoved(DeviceId deviceId)  | 
Set<UiDevice> | 
devices()
Returns the devices in this region. 
 | 
int | 
hostCount()
Returns the count of devices in this region. 
 | 
Set<HostId> | 
hostIds()
Returns the set of host identifiers for this region. 
 | 
Set<UiHost> | 
hosts()
Returns the hosts in this region. 
 | 
RegionId | 
id()
Returns the identity of the region. 
 | 
String | 
idAsString()
Returns a string representation of the element identifier. 
 | 
boolean | 
isRelevant(UiModelEvent event)
Determins whether the specified event is relevant to the view
 constrained to this region. 
 | 
boolean | 
isRoot()
Returns true if this is the root (default) region. 
 | 
List<String> | 
layerOrder()
Returns the order in which layers should be rendered. 
 | 
String | 
name()
Returns a friendly name to be used for display purposes. 
 | 
void | 
newDeviceAdded(DeviceId deviceId)  | 
RegionId | 
parent()
Returns the identity of the parent region. 
 | 
UiRegion | 
parentRegion()
Returns the UI region that is the parent of this region. 
 | 
void | 
reconcileDevices(Set<DeviceId> devices)
Make sure we have only these devices in the region. 
 | 
void | 
reconcileHosts(Set<HostId> hosts)
Make sure we have only these hosts in the region. 
 | 
static String | 
safeName(Region region)
Guarantees to return a string for the name of the specified region. 
 | 
void | 
setChildren(Set<RegionId> children)
Sets the children IDs for this region. 
 | 
void | 
setLayerOrder(String... layers)
Sets the layer order for this region. 
 | 
void | 
setParent(RegionId parentId)
Sets the parent ID for this region. 
 | 
String | 
toString()  | 
Region.Type | 
type()
Returns the region's type. 
 | 
public static final String NULL_NAME
public static final RegionId NULL_ID
public UiRegion(UiTopology topology, Region region)
topology - parent topologyregion - backing regionprotected void destroy()
UiElementpublic void setLayerOrder(String... layers)
UiNode.LAYER_* constants will be used here.layers - the layerspublic RegionId id()
public RegionId parent()
public boolean isRoot()
public Set<RegionId> children()
public UiRegion parentRegion()
public void setParent(RegionId parentId)
parentId - parent IDpublic void setChildren(Set<RegionId> children)
children - children IDspublic String idAsString()
UiElementidAsString in class UiElementpublic String name()
UiElementUiElement.idAsString().public Region backingRegion()
public void reconcileDevices(Set<DeviceId> devices)
devices - devices in the regionpublic Region.Type type()
public int deviceCount()
public Set<DeviceId> deviceIds()
public Set<UiDevice> devices()
public void reconcileHosts(Set<HostId> hosts)
hosts - hosts in the regionpublic Set<HostId> hostIds()
public Set<UiHost> hosts()
public int hostCount()
public List<String> layerOrder()
[UiNode.LAYER_OPTICAL, UiNode.LAYER_PACKET, UiNode.LAYER_DEFAULT]
public static String safeName(Region region)
region - the region whose name we requirepublic boolean isRelevant(UiModelEvent event)
event - UI model eventpublic void newDeviceAdded(DeviceId deviceId)
public void deviceRemoved(DeviceId deviceId)