@Override public void doubleClicked() { // Load modules on double-click if (!m_module.isLoaded()) { CModuleLoader.loadModule(m_dialog, m_module); } }
/** Creates the children of the node. */ private void createChildren() { if (m_module.isLoaded()) { for (final INaviView view : m_module.getContent().getViewContainer().getViews()) { if (view.getNodeCount() == 0) { continue; } add(new CViewIconNode(view)); } } }
@Override public Object getValueAt(final int row, final int col) { final INaviModule module = getModules().get(row); switch (col) { case NAME_COLUMN: return module.getConfiguration().getName(); case DESCRIPTION_COLUMN: return module.getConfiguration().getDescription(); case VIEWS_COLUMN: return module.isLoaded() ? module.getContent().getViewContainer().getViews().size() : module.getCustomViewCount() + module.getFunctionCount() + 1; case CREATION_DATE_COLUMN: return module.getConfiguration().getCreationDate(); case MODIFICATION_DATE_COLUMN: return module.getConfiguration().getModificationDate(); default: throw new IllegalStateException("IE01160: Invalid column"); } }
// / @endcond public Module( final Database database, final INaviModule module, final TagManager nodeTagManager, final TagManager viewTagManager) { m_database = Preconditions.checkNotNull(database, "Error: Database argument can't be null"); m_module = Preconditions.checkNotNull(module, "Error: Module argument can't be null"); m_nodeTagManager = Preconditions.checkNotNull( nodeTagManager, "Error: Node tag manager argument can't be null"); m_viewTagManager = Preconditions.checkNotNull( viewTagManager, "Error: View tag manager argument can't be null"); if (m_module.getConfiguration().getDebugger() != null) { m_debugger = new Debugger(m_module.getConfiguration().getDebugger()); } if (module.isLoaded()) { convertData(); } module.addListener(m_listener); }
/** * Returns a flag that indicates whether the module is loaded. * * @return True, if the module is loaded. False, otherwise. */ public boolean isLoaded() { return m_module.isLoaded(); }
@Override public Icon getIcon() { return m_module.isLoaded() ? ICON_MODULE : ICON_MODULE_GRAY; }