本文整理汇总了Java中org.cytoscape.view.vizmap.VisualMappingFunctionFactory类的典型用法代码示例。如果您正苦于以下问题:Java VisualMappingFunctionFactory类的具体用法?Java VisualMappingFunctionFactory怎么用?Java VisualMappingFunctionFactory使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
VisualMappingFunctionFactory类属于org.cytoscape.view.vizmap包,在下文中一共展示了VisualMappingFunctionFactory类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: VariationAction
import org.cytoscape.view.vizmap.VisualMappingFunctionFactory; //导入依赖的package包/类
/**
* Create a new variation action.
*
* @param applicationManager application manager, must not be null
* @param dialogTaskManager dialog task manager, must not be null
* @param visualMappingManager visual mapping manager, must not be null
* @param continuousMappingFactory continuous mapping factory, must not be null
* @param discreteMappingFactory discrete mapping factory, must not be null
* @param passthroughMappingFactory passthrough mapping factory, must not be null
*/
VariationAction(final CyApplicationManager applicationManager,
final DialogTaskManager dialogTaskManager,
final VisualMappingManager visualMappingManager,
final VisualMappingFunctionFactory continuousMappingFactory,
final VisualMappingFunctionFactory discreteMappingFactory,
final VisualMappingFunctionFactory passthroughMappingFactory)
{
super("Variation");
setPreferredMenu("Apps");
checkNotNull(applicationManager);
checkNotNull(dialogTaskManager);
checkNotNull(visualMappingManager);
checkNotNull(continuousMappingFactory);
checkNotNull(discreteMappingFactory);
checkNotNull(passthroughMappingFactory);
this.applicationManager = applicationManager;
this.dialogTaskManager = dialogTaskManager;
this.visualMappingManager = visualMappingManager;
this.continuousMappingFactory = continuousMappingFactory;
this.discreteMappingFactory = discreteMappingFactory;
this.passthroughMappingFactory = passthroughMappingFactory;
}
开发者ID:heuermh,项目名称:variation-cytoscape3-app,代码行数:34,代码来源:VariationAction.java
示例2: start
import org.cytoscape.view.vizmap.VisualMappingFunctionFactory; //导入依赖的package包/类
@Override
public void start(final BundleContext bundleContext)
{
if (bundleContext == null)
{
throw new NullPointerException("bundleContext must not be null");
}
CyApplicationManager applicationManager = getService(bundleContext, CyApplicationManager.class);
DialogTaskManager dialogTaskManager = getService(bundleContext, DialogTaskManager.class);
VisualMappingManager visualMappingManager = getService(bundleContext, VisualMappingManager.class);
VisualMappingFunctionFactory continuousMappingFactory = getService(bundleContext, VisualMappingFunctionFactory.class, "(mapping.type=continuous)");
VisualMappingFunctionFactory discreteMappingFactory = getService(bundleContext, VisualMappingFunctionFactory.class, "(mapping.type=discrete)");
VisualMappingFunctionFactory passthroughMappingFactory = getService(bundleContext, VisualMappingFunctionFactory.class, "(mapping.type=passthrough)");
VariationAction variationAction = new VariationAction(applicationManager,
dialogTaskManager,
visualMappingManager,
continuousMappingFactory,
discreteMappingFactory,
passthroughMappingFactory);
Properties properties = new Properties();
registerService(bundleContext, variationAction, CyAction.class, properties);
}
开发者ID:heuermh,项目名称:variation-cytoscape3-app,代码行数:25,代码来源:CyActivator.java
示例3: StyleFactory
import org.cytoscape.view.vizmap.VisualMappingFunctionFactory; //导入依赖的package包/类
public StyleFactory(VisualStyleFactory visualStyleFactory,
VisualMappingFunctionFactory continuousMappingFactory,
VisualMappingFunctionFactory passthroughMappingFactory) {
this.visualStyleFactory = visualStyleFactory;
this.continuousMappingFactory = continuousMappingFactory;
this.passthroughMappingFactory = passthroughMappingFactory;
}
开发者ID:baryshnikova-lab,项目名称:safe-java,代码行数:8,代码来源:StyleFactory.java
示例4: VisualStyleUtil
import org.cytoscape.view.vizmap.VisualMappingFunctionFactory; //导入依赖的package包/类
/**
* Constructor
*
* @param styleFactory
* @param mappingManager
* @param discreteMappingFactory
* @param passthroughFactory
*/
public VisualStyleUtil(VisualStyleFactory styleFactory,
VisualMappingManager mappingManager,
VisualMappingFunctionFactory discreteMappingFactory,
VisualMappingFunctionFactory passthroughFactory) {
this.styleFactory = styleFactory;
this.mappingManager = mappingManager;
this.discreteFactory = discreteMappingFactory;
this.passthroughFactory = passthroughFactory;
}
开发者ID:cytoscape,项目名称:biopax,代码行数:18,代码来源:VisualStyleUtil.java
示例5: VariationApp
import org.cytoscape.view.vizmap.VisualMappingFunctionFactory; //导入依赖的package包/类
/**
* Create a new variation app.
*
* @param applicationManager application manager, must not be null
* @param dialogTaskManager dialog task manager, must not be null
* @param visualMappingManager visual mapping manager, must not be null
* @param continuousMappingFactory continuous mapping factory, must not be null
* @param discreteMappingFactory discrete mapping factory, must not be null
* @param passthroughMappingFactory passthrough mapping factory, must not be null
*/
VariationApp(final CyApplicationManager applicationManager,
final DialogTaskManager dialogTaskManager,
final VisualMappingManager visualMappingManager,
final VisualMappingFunctionFactory continuousMappingFactory,
final VisualMappingFunctionFactory discreteMappingFactory,
final VisualMappingFunctionFactory passthroughMappingFactory)
{
checkNotNull(applicationManager);
checkNotNull(dialogTaskManager);
checkNotNull(visualMappingManager);
checkNotNull(continuousMappingFactory);
checkNotNull(discreteMappingFactory);
checkNotNull(passthroughMappingFactory);
this.applicationManager = applicationManager;
this.dialogTaskManager = dialogTaskManager;
model = new VariationModel();
configView = new ConfigView(model);
featureView = new FeatureView(model);
variationView = new VariationView(model);
variationConsequenceView = new VariationConsequenceView(model);
visualMappingView = new VisualMappingView(model, visualMappingManager, continuousMappingFactory, discreteMappingFactory, passthroughMappingFactory);
tabbedPane = new JTabbedPane();
tabbedPane.add("Config", configView);
tabbedPane.add("Features", featureView);
tabbedPane.add("Variations", variationView);
tabbedPane.add("Consequences", variationConsequenceView);
tabbedPane.add("Visual Mapping", visualMappingView);
model.setNetwork(applicationManager.getCurrentNetwork());
layoutComponents();
}
开发者ID:heuermh,项目名称:variation-cytoscape3-app,代码行数:45,代码来源:VariationApp.java
示例6: VisualMappingView
import org.cytoscape.view.vizmap.VisualMappingFunctionFactory; //导入依赖的package包/类
/**
* Create a new visual mapping view with the specified variation model.
*
* @param model variation model, must not be null
* @param visualMappingManager visual mapping manager, must not be null
* @param continuousMappingFactory continuous mapping factory, must not be null
* @param discreteMappingFactory discrete mapping factory, must not be null
* @param passthroughMappingFactory passthrough mapping factory, must not be null
*/
VisualMappingView(final VariationModel model,
final VisualMappingManager visualMappingManager,
final VisualMappingFunctionFactory continuousMappingFactory,
final VisualMappingFunctionFactory discreteMappingFactory,
final VisualMappingFunctionFactory passthroughMappingFactory)
{
super();
setOpaque(false);
checkNotNull(model);
checkNotNull(visualMappingManager);
checkNotNull(continuousMappingFactory);
checkNotNull(discreteMappingFactory);
checkNotNull(passthroughMappingFactory);
this.model = model;
this.visualMappingManager = visualMappingManager;
this.continuousMappingFactory = continuousMappingFactory;
this.discreteMappingFactory = discreteMappingFactory;
this.passthroughMappingFactory = passthroughMappingFactory;
variationCountToNodeSize = new JCheckBox("Map variation_count to node size continuously");
variationCountToNodeColor = new JCheckBox("Map variation_count to node color continuously");
variationCountToNodeSize.setSelected(false);
variationCountToNodeColor.setSelected(false);
variationCountToNodeSize.addActionListener(checkBoxActionListener);
variationCountToNodeColor.addActionListener(checkBoxActionListener);
apply.setEnabled(false);
layoutComponents();
}
开发者ID:heuermh,项目名称:variation-cytoscape3-app,代码行数:43,代码来源:VisualMappingView.java
示例7: setUp
import org.cytoscape.view.vizmap.VisualMappingFunctionFactory; //导入依赖的package包/类
@Before
public void setUp()
{
cyActivator = new CyActivator();
bundleContext = new FakeBundleContext(CyApplicationManager.class,
DialogTaskManager.class,
VisualMappingManager.class,
VisualMappingFunctionFactory.class);
}
开发者ID:heuermh,项目名称:variation-cytoscape3-app,代码行数:10,代码来源:CyActivatorTest.java
示例8: Plugin
import org.cytoscape.view.vizmap.VisualMappingFunctionFactory; //导入依赖的package包/类
public Plugin(CyNetworkFactory cyNetFct,
CyNetworkManager cyNetMgr,
DialogTaskManager dialogTaskManager,
CyNetworkViewFactory networkViewFactory,
VisualMappingManager vmmServiceRef,
VisualStyleFactory visualStyleFactoryServiceRef,
VisualMappingFunctionFactory vmfFactoryC,
VisualMappingFunctionFactory vmfFactoryD,
VisualMappingFunctionFactory vmfFactoryP,
CyLayoutAlgorithmManager cyAlgorithmManager,
CyApplicationManager cyApplicationManager,
CyNetworkViewManager cyNetworkViewManager,
CySwingApplication cySwingApplication) {
extensionManager = new HashMap<CyNetwork, ExtensionManager>();
this.cyNetworkFactory = cyNetFct;
this.cyNetworkManager = cyNetMgr;
this.dialogTaskManager = dialogTaskManager;
this.cyNetworkViewFactory = networkViewFactory;
this.visualMappingManager = vmmServiceRef;
this.visualStyleFactory = visualStyleFactoryServiceRef;
this.visualMappingFunctionFactoryContinous = vmfFactoryC;
this.visualMappingFunctionFactoryDiscrete = vmfFactoryD;
this.visualMappingFunctionFactoryPassthrough = vmfFactoryP;
this.cyLayoutAlgorithmManager = cyAlgorithmManager;
this.cyApplicationManager = cyApplicationManager;
this.cyNetworkViewManager = cyNetworkViewManager;
this.cySwingApplication = cySwingApplication;
}
开发者ID:CyTargetLinker,项目名称:cytargetlinker,代码行数:30,代码来源:Plugin.java
示例9: start
import org.cytoscape.view.vizmap.VisualMappingFunctionFactory; //导入依赖的package包/类
@Override
public void start(BundleContext context) throws Exception {
CyApplicationManager cyApplicationManager = getService(context, CyApplicationManager.class);
CyNetworkViewFactory networkViewFactory = getService(context, CyNetworkViewFactory.class);
CyNetworkFactory networkFactory = getService(context, CyNetworkFactory.class);
CyNetworkManager networkManager = getService(context, CyNetworkManager.class);
DialogTaskManager dialogTaskManager = getService(context, DialogTaskManager.class);
VisualMappingManager vmmServiceRef = getService(context,VisualMappingManager.class);
VisualStyleFactory visualStyleFactoryServiceRef = getService(context,VisualStyleFactory.class);
VisualMappingFunctionFactory vmfFactoryC = getService(context,VisualMappingFunctionFactory.class, "(mapping.type=continuous)");
VisualMappingFunctionFactory vmfFactoryD = getService(context,VisualMappingFunctionFactory.class, "(mapping.type=discrete)");
VisualMappingFunctionFactory vmfFactoryP = getService(context,VisualMappingFunctionFactory.class, "(mapping.type=passthrough)");
CyLayoutAlgorithmManager cyAlgorithmManager = getService(context, CyLayoutAlgorithmManager.class);
CyNetworkViewManager cyNetworkViewManager = getService(context, CyNetworkViewManager.class);
CySwingApplication cySwingApplication = getService(context, CySwingApplication.class);
OpenBrowser openBrowser = getService(context, OpenBrowser.class);
Plugin plugin = new Plugin(networkFactory, networkManager, dialogTaskManager, networkViewFactory, vmmServiceRef, visualStyleFactoryServiceRef,
vmfFactoryC, vmfFactoryD, vmfFactoryP, cyAlgorithmManager, cyApplicationManager, cyNetworkViewManager, cySwingApplication);
registerService(context, plugin, NetworkDestroyedListener.class, new Properties());
// CyTargetLinker implements two actions: extend network and help
ExtensionAction extAction = new ExtensionAction("Extend network", plugin);
registerAllServices(context, extAction, new Properties());
HelpAction helpAction = new HelpAction("Help", openBrowser);
registerAllServices(context, helpAction, new Properties());
// property stores last used RegIN directory
CyTargetLinkerProperty property = new CyTargetLinkerProperty();
CyProperty<Properties> prop = property.checkCyProperties(getService(context, CySessionManager.class));
registerService(context, prop, CyProperty.class, new Properties());
// registers the panel for CyTargetLinker
CyTargetLinkerPanel panel = new CyTargetLinkerPanel(plugin);
registerService(context, panel, CytoPanelComponent.class, new Properties());
}
开发者ID:CyTargetLinker,项目名称:cytargetlinker,代码行数:38,代码来源:CyActivator.java
示例10: CyServices
import org.cytoscape.view.vizmap.VisualMappingFunctionFactory; //导入依赖的package包/类
public CyServices(CySwingApplication cySwingApplication,
TaskManager taskManager, OpenBrowser openBrowser,
CyNetworkManager networkManager,
CyApplicationManager applicationManager,
CyNetworkViewManager networkViewManager,
// CyNetworkReaderManager networkViewReaderManager,
CyNetworkNaming naming, CyNetworkFactory networkFactory,
CyLayoutAlgorithmManager layoutManager, UndoSupport undoSupport,
VisualMappingManager mappingManager,
CyProperty<Properties> cyProperty,
CyRootNetworkManager rootNetworkManager,
UnHideAllEdgesTaskFactory unHideAllEdgesTaskFactory,
CyNetworkViewFactory networkViewFactory,
VisualStyleFactory visualStyleFactory,
VisualMappingFunctionFactory discreteMappingFunctionFactory,
VisualMappingFunctionFactory passthroughMappingFunctionFactory,
StreamUtil streamUtil
) {
this.cySwingApplication = cySwingApplication;
this.taskManager = taskManager;
this.openBrowser = openBrowser;
this.networkManager = networkManager;
this.applicationManager = applicationManager;
this.networkViewManager = networkViewManager;
// this.networkViewReaderManager = networkViewReaderManager;
this.naming = naming;
this.networkFactory = networkFactory;
this.layoutManager = layoutManager;
this.undoSupport = undoSupport;
this.mappingManager = mappingManager;
this.cyProperty = cyProperty;
this.networkViewFactory = networkViewFactory;
this.rootNetworkManager = rootNetworkManager;
this.unHideAllEdgesTaskFactory = unHideAllEdgesTaskFactory;
this.visualStyleFactory = visualStyleFactory;
this.discreteMappingFunctionFactory = discreteMappingFunctionFactory;
this.passthroughMappingFunctionFactory = passthroughMappingFunctionFactory;
this.streamUtil = streamUtil;
}
开发者ID:PathwayCommons,项目名称:CyPath2,代码行数:40,代码来源:CyServices.java
示例11: start
import org.cytoscape.view.vizmap.VisualMappingFunctionFactory; //导入依赖的package包/类
@Override
public void start(BundleContext context) throws Exception {
CyApplicationManager applicationManager = getService(context, CyApplicationManager.class);
CyNetworkViewManager networkViewManager = getService(context, CyNetworkViewManager.class);
CyServiceRegistrar registrar = getService(context, CyServiceRegistrar.class);
CySwingApplication application = getService(context, CySwingApplication.class);
DialogTaskManager taskManager = getService(context, DialogTaskManager.class);
CyTableManager tableManager = getService(context, CyTableManager.class);
CyTableFactory tableFactory = getService(context, CyTableFactory.class);
VisualMappingManager visualMappingManager = getService(context, VisualMappingManager.class);
VisualStyleFactory visualStyleFactory = getService(context, VisualStyleFactory.class);
VisualMappingFunctionFactory continuousMappingFactory = getService(context, VisualMappingFunctionFactory.class,
"(mapping.type=continuous)");
VisualMappingFunctionFactory passthroughMappingFactory = getService(context, VisualMappingFunctionFactory.class,
"(mapping.type=passthrough)");
StyleFactory styleFactory = new StyleFactory(visualStyleFactory, continuousMappingFactory,
passthroughMappingFactory);
EventService eventService = new DefaultEventService();
AttributeBrowserController attributeBrowser = new AttributeBrowserController(visualMappingManager, styleFactory,
eventService, taskManager);
AnnotationChooserController annotationChooser = new AnnotationChooserController(application, taskManager);
ImportPanelController importPanel = new ImportPanelController(taskManager, attributeBrowser, annotationChooser,
eventService);
DomainBrowserController domainBrowser = new DomainBrowserController(visualMappingManager, styleFactory,
taskManager, eventService);
CompositeMapController compositeMapPanel = new CompositeMapController(taskManager, domainBrowser, eventService);
SafeSessionSerializer serializer = new SafeSessionSerializer(tableManager, tableFactory);
SelectionTracker selectionTracker = new SelectionTracker(eventService);
RedrawTracker redrawTracker = new RedrawTracker(eventService);
SafeController safeController = new SafeController(registrar, application, applicationManager, importPanel,
attributeBrowser, compositeMapPanel, domainBrowser,
eventService, serializer, selectionTracker);
Map<String, String> safeActionProperties = new MapBuilder().put("inMenuBar", "true")
.put("preferredMenu", ServiceProperties.APPS_MENU)
.build();
SafeAction safeAction = new SafeAction(safeActionProperties, applicationManager, networkViewManager,
safeController);
safeAction.putValue(CyAction.NAME, "SAFE");
registerService(context, safeAction, CyAction.class);
registerService(context, safeController, SetCurrentNetworkViewListener.class,
NetworkViewAboutToBeDestroyedListener.class, ColumnCreatedListener.class,
ColumnDeletedListener.class, ColumnNameChangedListener.class, SessionLoadedListener.class,
SessionAboutToBeSavedListener.class);
registerService(context, selectionTracker, RowsSetListener.class);
registerService(context, redrawTracker, UpdateNetworkPresentationListener.class);
}
开发者ID:baryshnikova-lab,项目名称:safe-java,代码行数:64,代码来源:CyActivator.java
示例12: start
import org.cytoscape.view.vizmap.VisualMappingFunctionFactory; //导入依赖的package包/类
public void start(BundleContext bc) {
CySwingApplication cySwingApplication = getService(bc,CySwingApplication.class);
OpenBrowser openBrowser = getService(bc,OpenBrowser.class);
CyApplicationManager cyApplicationManager = getService(bc,CyApplicationManager.class);
CyNetworkViewManager cyNetworkViewManager = getService(bc,CyNetworkViewManager.class);
CyNetworkManager cyNetworkManager = getService(bc,CyNetworkManager.class);
CyNetworkNaming cyNetworkNaming = getService(bc,CyNetworkNaming.class);
CyNetworkFactory cyNetworkFactory = getService(bc,CyNetworkFactory.class);
StreamUtil streamUtil = getService(bc,StreamUtil.class);
VisualMappingManager visualMappingManager = getService(bc,VisualMappingManager.class);
VisualStyleFactory visualStyleFactory = getService(bc,VisualStyleFactory.class);
VisualMappingFunctionFactory discreteMappingFunctionFactory =
getService(bc,VisualMappingFunctionFactory.class,"(mapping.type=discrete)");
VisualMappingFunctionFactory passthroughMappingFunctionFactory =
getService(bc,VisualMappingFunctionFactory.class,"(mapping.type=passthrough)");
CyLayoutAlgorithmManager cyLayoutAlgorithmManager = getService(bc,CyLayoutAlgorithmManager.class);
TaskManager taskManager = getService(bc, DialogTaskManager.class);
CyProperty<Properties> cyProperties = getService(bc, CyProperty.class, "(cyPropertyName=cytoscape3.props)");
CyRootNetworkManager cyRootNetworkManager = getService(bc,CyRootNetworkManager.class);
CyNetworkReaderManager cyNetworkReaderManager = getService(bc,CyNetworkReaderManager.class);
UndoSupport undoSupport = getService(bc,UndoSupport.class);
CyNetworkViewFactory networkViewFactory = getService(bc, CyNetworkViewFactory.class);
// keep all the service references in one place -
final CyServices cyServices = new CyServices(cySwingApplication, taskManager, openBrowser,
cyNetworkManager, cyApplicationManager, cyNetworkViewManager, cyNetworkReaderManager,
cyNetworkNaming, cyNetworkFactory, cyLayoutAlgorithmManager, undoSupport, visualMappingManager,
cyProperties, networkViewFactory, cyRootNetworkManager);
BioPaxFilter bioPaxFilter = new BioPaxFilter(streamUtil);
VisualStyleUtil visualStyleUtil = new VisualStyleUtil(visualStyleFactory,
visualMappingManager, discreteMappingFunctionFactory, passthroughMappingFunctionFactory);
visualStyleUtil.init(); //important
// create the biopax reader object
BioPaxReader biopaxReader = new BioPaxReader(bioPaxFilter, cyServices, visualStyleUtil);
// register/export osgi services
Properties props = new Properties();
props.setProperty("readerDescription","BioPAX reader");
props.setProperty("readerId","biopaxNetworkReader");
registerAllServices(bc, biopaxReader, props);
System.setProperty("paxtools.CollectionsProvider","org.biopax.paxtools.trove.TProvider");
//TODO move the CytoPanelComponent (results panel) and related code from CyPath2 app to here...
}
开发者ID:cytoscape,项目名称:biopax,代码行数:50,代码来源:CyActivator.java
示例13: KddnExperiment
import org.cytoscape.view.vizmap.VisualMappingFunctionFactory; //导入依赖的package包/类
/**
* Constructor
* @param cyNetworkManagerServiceRef
* @param cyNetworkNamingServiceRef
* @param cyNetworkFactoryServiceRef
* @param networkViewFactory
* @param networkViewManager
* @param vmmServiceRef
* @param vsfServiceRef
* @param vmfFactoryC
* @param vmfFactoryD
* @param vmfFactoryP
* @param clamRef
* @param varList
* @param data1
* @param data2
* @param priorKnowledge
* @param useKnowledge
* @param lambda1
* @param lambda2
* @param alpha
* @param theta
* @param delta
* @param needPvalue
* @param numPermutation
* @param twoCondition
* @param dataPanel
* @param parameterPanel
*/
public KddnExperiment(CyNetworkManager cyNetworkManagerServiceRef,
CyNetworkNaming cyNetworkNamingServiceRef,
CyNetworkFactory cyNetworkFactoryServiceRef,
CyNetworkViewFactory networkViewFactory,
CyNetworkViewManager networkViewManager,
VisualMappingManager vmmServiceRef,
VisualStyleFactory vsfServiceRef,
VisualMappingFunctionFactory vmfFactoryC,
VisualMappingFunctionFactory vmfFactoryD,
VisualMappingFunctionFactory vmfFactoryP,
CyLayoutAlgorithmManager clamRef,
String[] varList, double[][] data1, double[][] data2,
String[][] priorKnowledge, boolean useKnowledge,
double lambda1, double lambda2,
double alpha, double theta, double delta, boolean needPvalue,
int numPermutation, boolean twoCondition,
KddnDataPanel dataPanel, KddnParameterPanel parameterPanel) {
this.cyNetworkFactoryServiceRef = cyNetworkFactoryServiceRef;
this.cyNetworkManagerServiceRef = cyNetworkManagerServiceRef;
this.cyNetworkNamingServiceRef = cyNetworkNamingServiceRef;
this.networkViewFactory = networkViewFactory;
this.networkViewManager = networkViewManager;
this.vmmServiceRef = vmmServiceRef;
this.vsfServiceRef = vsfServiceRef;
this.vmfFactoryC = vmfFactoryC;
this.vmfFactoryD = vmfFactoryD;
this.vmfFactoryP = vmfFactoryP;
this.clamRef = clamRef;
this.varList = varList;
this.data1 = data1;
this.priorKnowledge = priorKnowledge;
this.useKnowledge = useKnowledge;
this.numPermutation = numPermutation;
this.lambda1 = lambda1;
this.lambda2 = lambda2;
this.theta = theta;
this.alpha = alpha;
this.delta = delta;
this.needPvalue = needPvalue;
this.twoCondition = twoCondition;
if(!twoCondition)
this.data2 = data1;
else
this.data2 = data2;
this.dataPanel = dataPanel;
this.parameterPanel = parameterPanel;
}
开发者ID:tianye03,项目名称:kddn-cytoscape,代码行数:79,代码来源:KddnExperiment.java
示例14: createVisualStyleSingle
import org.cytoscape.view.vizmap.VisualMappingFunctionFactory; //导入依赖的package包/类
/**
* Create visual style for single condition
* @param vmmServiceRef
* @param vsfServiceRef
* @param vmfFactoryC
* @param vmfFactoryD
* @param vmfFactoryP
* @return
*/
private VisualStyle createVisualStyleSingle(
VisualMappingManager vmmServiceRef,
VisualStyleFactory vsfServiceRef,
VisualMappingFunctionFactory vmfFactoryC,
VisualMappingFunctionFactory vmfFactoryD,
VisualMappingFunctionFactory vmfFactoryP) {
// retrieve visual style if already exist
if(styleExist(vmmServiceRef, "KDDN visual style - single condition"))
return getVSstyle(vmmServiceRef, "KDDN visual style - single condition");
// node color setting
Color NODE_COLOR = new Color(230, 191, 85);
Color NODE_BORDER_COLOR = Color.WHITE;
Color NODE_LABEL_COLOR = new Color(50, 50, 50);
// To create a new VisualStyle object and set the mapping function
VisualStyle vs= vsfServiceRef.createVisualStyle("KDDN visual style - single condition");
// unlock node size
Set<VisualPropertyDependency<?>> deps = vs.getAllVisualPropertyDependencies();
for(VisualPropertyDependency<?> dep: deps) {
dep.setDependency(false);
}
// set node related default
vs.setDefaultValue(BasicVisualLexicon.NODE_SHAPE, NodeShapeVisualProperty.ELLIPSE);
vs.setDefaultValue(BasicVisualLexicon.NODE_FILL_COLOR, NODE_COLOR);
vs.setDefaultValue(BasicVisualLexicon.NODE_LABEL_COLOR, NODE_LABEL_COLOR);
vs.setDefaultValue(BasicVisualLexicon.NODE_BORDER_PAINT, NODE_BORDER_COLOR);
vs.setDefaultValue(BasicVisualLexicon.NODE_TRANSPARENCY, 220);
vs.setDefaultValue(BasicVisualLexicon.NODE_LABEL_FONT_SIZE, 20);
// map node names
String nodeName = "name";
PassthroughMapping nodeNameMapping = (PassthroughMapping)
vmfFactoryP.createVisualMappingFunction(nodeName, String.class,
BasicVisualLexicon.NODE_LABEL);
vs.addVisualMappingFunction(nodeNameMapping);
// map edge color
String edgeType = "interaction";
DiscreteMapping<String, Paint> edgeTypeMapping = (DiscreteMapping<String, Paint>)
vmfFactoryD.createVisualMappingFunction(edgeType, String.class,
BasicVisualLexicon.EDGE_STROKE_UNSELECTED_PAINT);
edgeTypeMapping.putMapValue("static edge", Color.DARK_GRAY);
vs.addVisualMappingFunction(edgeTypeMapping);
// add visual style if not added
if(!styleExist(vmmServiceRef, "KDDN visual style - single condition"))
vmmServiceRef.addVisualStyle(vs);
return vs;
}
开发者ID:tianye03,项目名称:kddn-cytoscape,代码行数:64,代码来源:KddnExperiment.java
示例15: createVisualStyleTwoCondition
import org.cytoscape.view.vizmap.VisualMappingFunctionFactory; //导入依赖的package包/类
/**
* Create visual style for two conditions
* @param vmmServiceRef
* @param vsfServiceRef
* @param vmfFactoryC
* @param vmfFactoryD
* @param vmfFactoryP
* @return
*/
private VisualStyle createVisualStyleTwoCondition(VisualMappingManager vmmServiceRef,
VisualStyleFactory vsfServiceRef,
VisualMappingFunctionFactory vmfFactoryC,
VisualMappingFunctionFactory vmfFactoryD,
VisualMappingFunctionFactory vmfFactoryP) {
// retrieve visual style if already exist
if(styleExist(vmmServiceRef, "KDDN visual style - two conditions"))
return getVSstyle(vmmServiceRef, "KDDN visual style - two conditions");
// node related color
Color NODE_COLOR = new Color(230, 191, 85);
Color NODE_BORDER_COLOR = Color.WHITE;
Color NODE_LABEL_COLOR = new Color(50, 50, 50);
// To create a new VisualStyle object and set the mapping function
VisualStyle vs= vsfServiceRef.createVisualStyle("KDDN visual style - two conditions");
// unlock node size
Set<VisualPropertyDependency<?>> deps = vs.getAllVisualPropertyDependencies();
for(VisualPropertyDependency<?> dep: deps) {
dep.setDependency(false);
}
// default node appearance
vs.setDefaultValue(BasicVisualLexicon.NODE_SHAPE, NodeShapeVisualProperty.ELLIPSE);
vs.setDefaultValue(BasicVisualLexicon.NODE_FILL_COLOR, NODE_COLOR);
vs.setDefaultValue(BasicVisualLexicon.NODE_LABEL_COLOR, NODE_LABEL_COLOR);
vs.setDefaultValue(BasicVisualLexicon.NODE_BORDER_PAINT, NODE_BORDER_COLOR);
vs.setDefaultValue(BasicVisualLexicon.NODE_TRANSPARENCY, 220);
vs.setDefaultValue(BasicVisualLexicon.NODE_LABEL_FONT_SIZE, 20);
// map node names
String nodeName = "name";
PassthroughMapping nodeNameMapping = (PassthroughMapping)
vmfFactoryP.createVisualMappingFunction(nodeName, String.class,
BasicVisualLexicon.NODE_LABEL);
vs.addVisualMappingFunction(nodeNameMapping);
// map edge color
String edgeType = "interaction";
DiscreteMapping<String, Paint> edgeTypeMapping = (DiscreteMapping<String, Paint>)
vmfFactoryD.createVisualMappingFunction(edgeType, String.class,
BasicVisualLexicon.EDGE_STROKE_UNSELECTED_PAINT);
edgeTypeMapping.putMapValue("condition 1", Color.RED);
edgeTypeMapping.putMapValue("condition 2", new Color(0,196,26));
vs.addVisualMappingFunction(edgeTypeMapping);
// add visual style is not added
if(!styleExist(vmmServiceRef, "KDDN visual style - two conditions"))
vmmServiceRef.addVisualStyle(vs);
return vs;
}
开发者ID:tianye03,项目名称:kddn-cytoscape,代码行数:64,代码来源:KddnExperiment.java
示例16: start
import org.cytoscape.view.vizmap.VisualMappingFunctionFactory; //导入依赖的package包/类
@Override
public void start(BundleContext bc) throws Exception {
CySwingApplication cytoscapeDesktopService = getService(bc,CySwingApplication.class);
// register visualization related managers to Cytoscape
// network creation
CyNetworkManager cyNetworkManagerServiceRef = getService(bc,CyNetworkManager.class);
CyNetworkNaming cyNetworkNamingServiceRef = getService(bc,CyNetworkNaming.class);
CyNetworkFactory cyNetworkFactoryServiceRef = getService(bc,CyNetworkFactory.class);
// progress dialog
DialogTaskManager dialogTaskManager = getService(bc, DialogTaskManager.class);
// view creation
CyNetworkViewFactory networkViewFactory = getService(bc, CyNetworkViewFactory.class);
CyNetworkViewManager networkViewManager = getService(bc, CyNetworkViewManager.class);
// visual style manager
VisualMappingManager vmmServiceRef = getService(bc,VisualMappingManager.class);
VisualStyleFactory vsfServiceRef = getService(bc,VisualStyleFactory.class);
// visual mapping functions
VisualMappingFunctionFactory vmfFactoryC = getService(bc,VisualMappingFunctionFactory.class, "(mapping.type=continuous)");
VisualMappingFunctionFactory vmfFactoryD = getService(bc,VisualMappingFunctionFactory.class, "(mapping.type=discrete)");
VisualMappingFunctionFactory vmfFactoryP = getService(bc,VisualMappingFunctionFactory.class, "(mapping.type=passthrough)");
// layout manager
CyLayoutAlgorithmManager clamRef = getService(bc, CyLayoutAlgorithmManager.class);
// main control panel added to the left of Cytoscape panel
kddnConfigurePanel = new KddnConfigurePanel(cyNetworkManagerServiceRef,
cyNetworkNamingServiceRef,cyNetworkFactoryServiceRef,
dialogTaskManager, networkViewFactory, networkViewManager,
vmmServiceRef, vsfServiceRef, vmfFactoryC,
vmfFactoryD, vmfFactoryP, clamRef);
registerService(bc,kddnConfigurePanel,CytoPanelComponent.class, new Properties());
// results panel added to the right of Cytoscape panel
kddnResultsPanel = new KddnResultsPanel(cytoscapeDesktopService);
registerService(bc, kddnResultsPanel, CytoPanelComponent.class, new Properties());
// menu items
CyApplicationManager cyApplicationManager = getService(bc, CyApplicationManager.class);
KddnMenuAction runMenu = new KddnMenuAction(cyApplicationManager, "Run analysis", cytoscapeDesktopService, kddnConfigurePanel);
registerAllServices(bc, runMenu, new Properties());
KddnMenuAction helpMenu = new KddnMenuAction(cyApplicationManager, "Help", cytoscapeDesktopService, kddnConfigurePanel);
registerAllServices(bc, helpMenu, new Properties());
KddnMenuAction aboutMenu = new KddnMenuAction(cyApplicationManager, "About", cytoscapeDesktopService, kddnConfigurePanel);
registerAllServices(bc, aboutMenu, new Properties());
// help doc
cyHelpBroker = getService(bc, CyHelpBroker.class);
final String HELP_SET_NAME = "/help/jhelpset";
final ClassLoader classLoader = getClass().getClassLoader();
URL helpSetURL;
try {
helpSetURL = HelpSet.findHelpSet(classLoader, HELP_SET_NAME);
final HelpSet newHelpSet = new HelpSet(classLoader, helpSetURL);
cyHelpBroker.getHelpSet().add(newHelpSet);
} catch (final Exception e) {
System.err.println("Could not find help set: \"" + HELP_SET_NAME + ".");
}
}
开发者ID:tianye03,项目名称:kddn-cytoscape,代码行数:69,代码来源:CyActivator.java
示例17: KddnRunPanel
import org.cytoscape.view.vizmap.VisualMappingFunctionFactory; //导入依赖的package包/类
public KddnRunPanel(CyNetworkManager cyNetworkManagerServiceRef,
CyNetworkNaming cyNetworkNamingServiceRef,
CyNetworkFactory cyNetworkFactoryServiceRef,
DialogTaskManager dialogTaskManager,
CyNetworkViewFactory networkViewFactory,
CyNetworkViewManager networkViewManager,
VisualMappingManager vmmServiceRef,
VisualStyleFactory vsfServiceRef,
VisualMappingFunctionFactory vmfFactoryC,
VisualMappingFunctionFactory vmfFactoryD,
VisualMappingFunctionFactory vmfFactoryP,
CyLayoutAlgorithmManager clamRef,
KddnParameterPanel parameterPanel, KddnDataPanel dataPanel,
KddnConfigurePanel kddnConfigurePanel) {
this.cyNetworkFactoryServiceRef = cyNetworkFactoryServiceRef;
this.cyNetworkManagerServiceRef = cyNetworkManagerServiceRef;
this.cyNetworkNamingServiceRef = cyNetworkNamingServiceRef;
this.networkViewFactory = networkViewFactory;
this.dialogTaskManager = dialogTaskManager;
this.networkViewManager = networkViewManager;
this.vmmServiceRef = vmmServiceRef;
this.vsfServiceRef = vsfServiceRef;
this.vmfFactoryC = vmfFactoryC;
this.vmfFactoryD = vmfFactoryD;
this.vmfFactoryP = vmfFactoryP;
this.clamRef = clamRef;
this.parameterPanel = parameterPanel;
this.dataPanel = dataPanel;
this.kddnConfigurePanel = kddnConfigurePanel;
this.setLayout(new BorderLayout(0,0));
JPanel aPanel = new JPanel();
aPanel.setLayout(new BorderLayout(0,0));
// border for top panel
Border border = BorderFactory.createEtchedBorder();
String title = "Step 3: Running Options";
TitledBorder titledBorder = BorderFactory.createTitledBorder(border, title,
TitledBorder.LEFT, TitledBorder.TOP, new Font("titleFont", Font.BOLD, 12));
aPanel.setBorder(titledBorder);
permBox = new JCheckBox("Want differential edge p-value");
aPanel.add(permBox, BorderLayout.NORTH);
numpermLabel = new JLabel("Number of permutations:");
numpermLabel.setEnabled(false);
aPanel.add(numpermLabel, BorderLayout.WEST);
numPerm = new JSpinner(numSpin);
numPerm.setEnabled(false);
aPanel.add(numPerm, BorderLayout.EAST);
runButton = new JButton("Run KDDN");
runButton.setHorizontalAlignment(SwingConstants.CENTER);
runButton.setEnabled(false);
aPanel.add(runButton, BorderLayout.SOUTH);
runButton.addActionListener(this);
permBox.addItemListener(this);
this.add(aPanel, BorderLayout.NORTH);
}
开发者ID:tianye03,项目名称:kddn-cytoscape,代码行数:65,代码来源:KddnRunPanel.java
示例18: getVisualMappingFunctionFactoryContinous
import org.cytoscape.view.vizmap.VisualMappingFunctionFactory; //导入依赖的package包/类
public VisualMappingFunctionFactory getVisualMappingFunctionFactoryContinous() {
return visualMappingFunctionFactoryContinous;
}
开发者ID:CyTargetLinker,项目名称:cytargetlinker,代码行数:4,代码来源:Plugin.java
示例19: getVisualMappingFunctionFactoryDiscrete
import org.cytoscape.view.vizmap.VisualMappingFunctionFactory; //导入依赖的package包/类
public VisualMappingFunctionFactory getVisualMappingFunctionFactoryDiscrete() {
return visualMappingFunctionFactoryDiscrete;
}
开发者ID:CyTargetLinker,项目名称:cytargetlinker,代码行数:4,代码来源:Plugin.java
示例20: getVisualMappingFunctionFactoryPassthrough
import org.cytoscape.view.vizmap.VisualMappin
|
请发表评论