Package org.onosproject.ui.topo
Class Highlights
- java.lang.Object
-
- org.onosproject.ui.topo.Highlights
-
public class Highlights extends Object
Encapsulates highlights to be applied to the topology view, such as highlighting links, displaying link labels, perhaps even decorating nodes with badges, etc.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
Highlights.Amount
A notion of amount.
-
Constructor Summary
Constructors Constructor Description Highlights()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Highlights
add(DeviceHighlight dh)
Adds highlighting information for a device.Highlights
add(HostHighlight hh)
Adds highlighting information for a host.Highlights
add(LinkHighlight lh)
Adds highlighting information for a link.Highlights
delay(int ms)
Sets the number of milliseconds to delay processing of highlights events on the client side.int
delayMs()
Return the delay for the highlight event.Collection<DeviceHighlight>
devices()
Returns the collection of device highlights.DeviceHighlight
getDevice(String id)
Returns the device highlight for the given device identifier, or null if no match.HostHighlight
getHost(String id)
Returns the host highlight for the given host identifier, or null if no match.LinkHighlight
getLink(String id)
Returns the link highlight for the given link identifier, or null if no match.NodeHighlight
getNode(String id)
Returns the node highlight (device or host) for the given element identifier, or null if no match.Collection<HostHighlight>
hosts()
Returns the collection of host highlights.Collection<LinkHighlight>
links()
Returns the collection of link highlights.Highlights
subdueAllElse(Highlights.Amount amount)
Marks the amount by which all other elements (devices, hosts, links) not explicitly referenced here will be "subdued" visually.Highlights.Amount
subdueLevel()
Returns the amount by which all other elements not explicitly referenced here should be "subdued".
-
-
-
Method Detail
-
delay
public Highlights delay(int ms)
Sets the number of milliseconds to delay processing of highlights events on the client side.- Parameters:
ms
- milliseconds to delay- Returns:
- self, for chaining
-
delayMs
public int delayMs()
Return the delay for the highlight event.- Returns:
- delay in milliseconds
-
add
public Highlights add(DeviceHighlight dh)
Adds highlighting information for a device.- Parameters:
dh
- device highlight- Returns:
- self, for chaining
-
add
public Highlights add(HostHighlight hh)
Adds highlighting information for a host.- Parameters:
hh
- host highlight- Returns:
- self, for chaining
-
add
public Highlights add(LinkHighlight lh)
Adds highlighting information for a link.- Parameters:
lh
- link highlight- Returns:
- self, for chaining
-
subdueAllElse
public Highlights subdueAllElse(Highlights.Amount amount)
Marks the amount by which all other elements (devices, hosts, links) not explicitly referenced here will be "subdued" visually.- Parameters:
amount
- amount to subdue other elements- Returns:
- self, for chaining
-
devices
public Collection<DeviceHighlight> devices()
Returns the collection of device highlights.- Returns:
- device highlights
-
hosts
public Collection<HostHighlight> hosts()
Returns the collection of host highlights.- Returns:
- host highlights
-
links
public Collection<LinkHighlight> links()
Returns the collection of link highlights.- Returns:
- link highlights
-
subdueLevel
public Highlights.Amount subdueLevel()
Returns the amount by which all other elements not explicitly referenced here should be "subdued".- Returns:
- amount to subdue other elements
-
getNode
public NodeHighlight getNode(String id)
Returns the node highlight (device or host) for the given element identifier, or null if no match.- Parameters:
id
- element identifier- Returns:
- corresponding node highlight
-
getDevice
public DeviceHighlight getDevice(String id)
Returns the device highlight for the given device identifier, or null if no match.- Parameters:
id
- device identifier- Returns:
- corresponding device highlight
-
getHost
public HostHighlight getHost(String id)
Returns the host highlight for the given host identifier, or null if no match.- Parameters:
id
- host identifier- Returns:
- corresponding host highlight
-
getLink
public LinkHighlight getLink(String id)
Returns the link highlight for the given link identifier, or null if no match.- Parameters:
id
- link identifier- Returns:
- corresponding link highlight
-
-