
Static Public Member Functions | |
| static void | openInMode (String modeName, TopComponent component) |
| static void | openComponent (String componentName) |
| static void | closeComponent (String componentName) |
| static void | closeComponents (String[] componentsNames) |
| static void | closeAllTopComponents () |
| static boolean | isOpened (String componentName) |
| static TopComponent | findTopComponent (String componentName) |
| static void | openTopComponent (TopComponent comp, String modeName, int index, int workspaceUsage, URL modeIcon) |
| static void | openTopComponent (TopComponent comp, String modeName, int index, int workspaceUsage) |
| static void | openTopComponent (TopComponent comp, String modeName) |
| static void | activateDefaultWorkspace () |
| static Workspace | findWorkspace () |
| static void | setTableColumns (String componentName, String[] newColumns) |
| static void | showDetails (AlarmBean alarm) |
| static void | showTimestamps (AlarmBean ab) |
| static void | printAllModeNames () |
| static void | createMode (String modeName) |
| static void | notifyError (String errorMsg) |
| static void | notifyWarning (String warningMsg) |
| static void | setStatusText (String text) |
| static void | setZeroSelectedNodes (String topComponentName) |
| static void | printAllComponents () |
| static TopComponent | findTopComponent (Workspace workspace, String componentName) |
Private Member Functions | |
| AcWindowManager () | |
Static Private Attributes | |
| static Logger | logger |
| static String | defaultWorkSpaceName = Constants.ALARM_WORKSPACE_NAME |
| static Workspace | defautlWorkspace = findWorkspace() |
| static final Node[] | EMPTY_NODE_ARRAY = new Node[0] |
This is Alarm Console window manager. This manager helps with managing windows within Alarm Console.
| cern::laser::guiplatform::windowmanager::AcWindowManager::AcWindowManager | ( | ) | [inline, private] |
Creates a new instance of AcWindowManager This shold be singleton
| static void cern::laser::guiplatform::windowmanager::AcWindowManager::activateDefaultWorkspace | ( | ) | [inline, static] |
This method activates default workspace
References findWorkspace().
| static void cern::laser::guiplatform::windowmanager::AcWindowManager::closeAllTopComponents | ( | ) | [inline, static] |
This method closes all apropriate TopComponents after user logout All components should be closed
References org::openide::windows::TopComponent::close(), findWorkspace(), and logger.
| static void cern::laser::guiplatform::windowmanager::AcWindowManager::closeComponent | ( | String | componentName | ) | [inline, static] |
This method closes TopComponent in default workspace
| componentName | component name |
References org::openide::windows::TopComponent::close(), findTopComponent(), findWorkspace(), and logger.
| static void cern::laser::guiplatform::windowmanager::AcWindowManager::closeComponents | ( | String[] | componentsNames | ) | [inline, static] |
This method closes all TopComponents
| componentsNames | TopComponents names not implemented yet, and probably not used |
References org::openide::windows::TopComponent::close(), findTopComponent(), findWorkspace(), logger, and org::openide::windows::TopComponent::setCloseOperation().
| static void cern::laser::guiplatform::windowmanager::AcWindowManager::createMode | ( | String | modeName | ) | [inline, static] |
This method create mode inside default workspace
References findWorkspace().
| static TopComponent cern::laser::guiplatform::windowmanager::AcWindowManager::findTopComponent | ( | Workspace | workspace, | |
| String | componentName | |||
| ) | [inline, static] |
Utility method: Returns the TopComponent with the given programmatic name in the given workspace, or null if there is no such TopComponent.
| workspace | the workspace in which to look for the TopComponent | |
| componentName | the programmatic name of the TopComponent |
null if there is no such TopComponent Method taken from gp.windows.WindowUtil, bug with empty element name fixed | static TopComponent cern::laser::guiplatform::windowmanager::AcWindowManager::findTopComponent | ( | String | componentName | ) | [inline, static] |
References findWorkspace().
Referenced by closeComponent(), closeComponents(), isOpened(), openComponent(), setTableColumns(), setZeroSelectedNodes(), showDetails(), and showTimestamps().
| static Workspace cern::laser::guiplatform::windowmanager::AcWindowManager::findWorkspace | ( | ) | [inline, static] |
This method finds default workspace
| RuntimeException | if workspace can not be found |
uncomment this is final version if ( alarmWsp == null ) throw new RuntimeException( Constants.ALARM_WORKSPACE_NAME + " not found\n" + " Probably alarm console module is not properly installed");
References defaultWorkSpaceName.
Referenced by activateDefaultWorkspace(), closeAllTopComponents(), closeComponent(), closeComponents(), createMode(), findTopComponent(), isOpened(), openComponent(), openInMode(), openTopComponent(), printAllComponents(), and printAllModeNames().
| static boolean cern::laser::guiplatform::windowmanager::AcWindowManager::isOpened | ( | String | componentName | ) | [inline, static] |
This method checks if topComponent is opened in default workspace
| componentName | component Name |
References findTopComponent(), findWorkspace(), and org::openide::windows::TopComponent::isOpened().
| static void cern::laser::guiplatform::windowmanager::AcWindowManager::notifyError | ( | String | errorMsg | ) | [inline, static] |
utility method
| errorMsg | error message |
| static void cern::laser::guiplatform::windowmanager::AcWindowManager::notifyWarning | ( | String | warningMsg | ) | [inline, static] |
| static void cern::laser::guiplatform::windowmanager::AcWindowManager::openComponent | ( | String | componentName | ) | [inline, static] |
This method opens given TopComponent in default workspace
| componentName | component Name |
References findTopComponent(), findWorkspace(), logger, and org::openide::windows::TopComponent::open().
| static void cern::laser::guiplatform::windowmanager::AcWindowManager::openInMode | ( | String | modeName, | |
| TopComponent | component | |||
| ) | [inline, static] |
This method opens TopComponents in previosly (XML based) defined mode TopComponent will be opended in default workspace
| modeName | mode name | |
| top | TopComponent |
References findWorkspace(), logger, org::openide::windows::TopComponent::open(), and org::openide::windows::TopComponent::requestFocus().
Referenced by openTopComponent().
| static void cern::laser::guiplatform::windowmanager::AcWindowManager::openTopComponent | ( | TopComponent | comp, | |
| String | modeName | |||
| ) | [inline, static] |
This methods opens topComponent inside previously defined mode
| static void cern::laser::guiplatform::windowmanager::AcWindowManager::openTopComponent | ( | TopComponent | comp, | |
| String | modeName, | |||
| int | index, | |||
| int | workspaceUsage | |||
| ) | [inline, static] |
This class opens topComponent inside default workspace
| comp | topComponent which should be opened | |
| modeName | mode name | |
| index | index (i.e. CENTER, RIGHT, LEFT) | |
| workspaceUsage | ALL - (mode, topComponent) should fill up the whole workspace COMPONENT_SIZE - create mode with comp size | |
| modeIcon | mode icon |
References openTopComponent().
| static void cern::laser::guiplatform::windowmanager::AcWindowManager::openTopComponent | ( | TopComponent | comp, | |
| String | modeName, | |||
| int | index, | |||
| int | workspaceUsage, | |||
| URL | modeIcon | |||
| ) | [inline, static] |
This class opens topComponent inside default workspace
| comp | topComponent which should be opened | |
| modeName | mode name | |
| index | index (i.e. CENTER, RIGHT, LEFT) | |
| workspaceUsage | ALL - (mode, topComponent) should fill up the whole workspace COMPONENT_SIZE - create mode with comp size | |
| modeIcon | mode icon |
References findWorkspace(), logger, and openInMode().
Referenced by openTopComponent().
| static void cern::laser::guiplatform::windowmanager::AcWindowManager::printAllComponents | ( | ) | [inline, static] |
This method prints all components (modes, topcomponents) from default workspace
References findWorkspace(), org::openide::windows::TopComponent::getCloseOperation(), and logger.
| static void cern::laser::guiplatform::windowmanager::AcWindowManager::printAllModeNames | ( | ) | [inline, static] |
this method prints all mode name in default workspace
References findWorkspace(), and logger.
| static void cern::laser::guiplatform::windowmanager::AcWindowManager::setStatusText | ( | String | text | ) | [inline, static] |
| static void cern::laser::guiplatform::windowmanager::AcWindowManager::setTableColumns | ( | String | componentName, | |
| String[] | newColumns | |||
| ) | [inline, static] |
This method sets the columns of the ListTableExplorer
| componentName | component name | |
| newColumns | new columns property names |
| ClassCastException | if component with given component name is not ListTableExplorer |
References findTopComponent(), and logger.
| static void cern::laser::guiplatform::windowmanager::AcWindowManager::setZeroSelectedNodes | ( | String | topComponentName | ) | [inline, static] |
this method sets 0 as selected nodes for given explorer Used in actions in order not to have context menu in empty explorer.
| topComponentName | name used to find explorer (TopComponent name) |
References EMPTY_NODE_ARRAY, findTopComponent(), and logger.
| static void cern::laser::guiplatform::windowmanager::AcWindowManager::showDetails | ( | AlarmBean | alarm | ) | [inline, static] |
This method displays "Detail" window for given alarm
| alarm |
References defautlWorkspace, findTopComponent(), logger, and org::openide::windows::TopComponent::open().
| static void cern::laser::guiplatform::windowmanager::AcWindowManager::showTimestamps | ( | AlarmBean | ab | ) | [inline, static] |
References defautlWorkspace, findTopComponent(), cern::laser::guiplatform::alarms::AlarmBean::getFaultCode(), cern::laser::guiplatform::alarms::AlarmBean::getFaultFamily(), cern::laser::guiplatform::alarms::AlarmBean::getFaultMember(), cern::laser::guiplatform::alarms::AlarmBean::getTimestamps(), and logger.
String cern::laser::guiplatform::windowmanager::AcWindowManager::defaultWorkSpaceName = Constants.ALARM_WORKSPACE_NAME [static, private] |
default workspace name all operation will be done in this workspace
Referenced by findWorkspace().
Workspace cern::laser::guiplatform::windowmanager::AcWindowManager::defautlWorkspace = findWorkspace() [static, private] |
Referenced by showDetails(), and showTimestamps().
final Node [] cern::laser::guiplatform::windowmanager::AcWindowManager::EMPTY_NODE_ARRAY = new Node[0] [static, private] |
Referenced by setZeroSelectedNodes().
Logger cern::laser::guiplatform::windowmanager::AcWindowManager::logger [static, private] |
LogFactory.getLogger(AcWindowManager.class.getName())
logger
Referenced by closeAllTopComponents(), closeComponent(), closeComponents(), openComponent(), openInMode(), openTopComponent(), printAllComponents(), printAllModeNames(), setTableColumns(), setZeroSelectedNodes(), showDetails(), and showTimestamps().
1.6.2