This feature provides a reusable, paginated StyledJTable UI designed to work with external data providers. Developers can plug in their own data sources by implementing a simple interface and configuring the desired table columns.
This feature is implemented in the igb-services-api module. Classes that are part of this feature:
Below are the steps that can be used to create a Plugin app and use this extendable UI to add an external data provider as an IGB app. You can use the ucsc-genark-data-provider plugin app as a reference at any point.
<dependency> <groupId>org.lorainelab.igb</groupId> <artifactId>igbSwingExt</artifactId> <version>${IGB_VERSION}</version> </dependency> <dependency> <groupId>org.lorainelab.igb</groupId> <artifactId>igb-services</artifactId> <version>${IGB_VERSION}</version> </dependency> |
package org.lorainelab.igb.custom.data.provider; import org.lorainelab.igb.services.dynamic.search.GenomeDynamicSearchTableGUI; import org.lorainelab.igb.services.window.tabs.IgbTabPanel; import org.lorainelab.igb.services.window.tabs.IgbTabPanelI; import org.osgi.service.component.annotations.Component; import java.awt.BorderLayout; @Component(service = {IgbTabPanelI.class}, immediate = true) public class CustomDataProviderTabPanel extends IgbTabPanel { private final CustomDataProvider customDataProvider = new CustomDataProvider(); private final GenomeDynamicSearchTableGUI dynamicSearchTableGUI = new GenomeDynamicSearchTableGUI(customDataProvider); public CustomDataProviderTabPanel() { super("Custom Data Provider", "Custom Data Provider", null, false, 8); init(); } private void init() { this.setLayout(new BorderLayout()); this.add(dynamicSearchTableGUI); this.pack(); } } |