ch.tatool.core.display.swing.status
Interface StatusRegion

All Known Implementing Classes:
StatusRegionImpl

public interface StatusRegion

Backing object for the status region. Instead of providing direct access to the region, status panels can be added and removed to this object, and accessed by tasks using simple ids. This decouples the status regions and panels from the tasks, yet provides a standard way of getting direct access to the status elements displayed in it.

Author:
Michael Ruflin

Method Summary
 void addStatusPanel(String id, StatusPanel statusPanel)
          Add a status panel to the status region.
 void addStatusPanel(String id, StatusPanel statusPanel, int index)
          Add a status panel to the status region.
 StatusPanel getStatusPanel(String id)
          Get a status panel given it's id.
 List<String> getStatusPanelIds()
          Get the id's of all added status panels.
 List<StatusPanel> getStatusPanels()
          Get the status panels in the order in which they appear on the screen.
 void removeAllPanels()
          Remove all status panels.
 void removeStatusPanel(String id)
          Remove a status panel given it's id.
 void reoderStatusPanels(List<String> statusPanelIds)
          Reorder the status panels according to the provided list.
 

Method Detail

getStatusPanels

List<StatusPanel> getStatusPanels()
Get the status panels in the order in which they appear on the screen.


getStatusPanelIds

List<String> getStatusPanelIds()
Get the id's of all added status panels. The list also contains the order of the panels on the screen


reoderStatusPanels

void reoderStatusPanels(List<String> statusPanelIds)
Reorder the status panels according to the provided list.

Parameters:
statusPanelIds - the ids of the statuspanels in the order they should appear on the screen. Missing ids will be added to the end, unknown ids ignored.

getStatusPanel

StatusPanel getStatusPanel(String id)
Get a status panel given it's id.


addStatusPanel

void addStatusPanel(String id,
                    StatusPanel statusPanel)
Add a status panel to the status region.

Parameters:
id - the id of the status panel.
statusPanel - the status panel to add

addStatusPanel

void addStatusPanel(String id,
                    StatusPanel statusPanel,
                    int index)
Add a status panel to the status region.

Parameters:
id - the id of the status panel.
statusPanel - the status panel to add
index - the index to insert the panel into

removeStatusPanel

void removeStatusPanel(String id)
Remove a status panel given it's id.


removeAllPanels

void removeAllPanels()
Remove all status panels.



Copyright © 2012. All Rights Reserved.