IT. Expert System.

Android Reference

GraphEnvironment


android.filterfw

Class GraphEnvironment



  • public class GraphEnvironment
    extends MffEnvironment
    A GraphEnvironment provides a simple front-end to filter graph setup and execution using the mobile filter framework. Typically, you use a GraphEnvironment in the following fashion: 1. Instantiate a new GraphEnvironment instance. 2. Perform any configuration, such as adding graph references and setting a GL environment. 3. Load a graph file using loadGraph() or add a graph using addGraph(). 4. Obtain a GraphRunner instance using getRunner(). 5. Execute the obtained runner. Note that it is possible to add multiple graphs and runners to a single GraphEnvironment.
    • Constructor Detail

      • GraphEnvironment

        public GraphEnvironment()
        Create a new GraphEnvironment with default components.
      • GraphEnvironment

        public GraphEnvironment(FrameManager frameManager,
                        GraphReader reader)
        Create a new GraphEnvironment with a custom FrameManager and GraphReader. Specifying null for either of these, will auto-create a default instance.
        Parameters:
        frameManager - The FrameManager to use, or null to auto-create one.
        reader - The GraphReader to use for graph loading, or null to auto-create one. Note, that the reader will not be created until it is required. Pass null if you will not load any graph files.
    • Method Detail

      • getGraphReader

        public GraphReader getGraphReader()
        Returns the used graph reader. This will create one, if a reader has not been set already.
      • addReferences

        public void addReferences(Object... references)
        Add graph references to resolve during graph reading. The references added here are shared among all graphs.
        Parameters:
        references - An alternating argument list of keys (Strings) and values.
      • loadGraph

        public int loadGraph(Context context,
                    int resourceId)
        Loads a graph file from the specified resource and adds it to this environment.
        Parameters:
        context - The context in which to read the resource.
        resourceId - The ID of the graph resource to load.
        Returns:
        A unique ID for the graph.
      • addGraph

        public int addGraph(FilterGraph graph)
        Add a graph to the environment. Consider using loadGraph() if you are loading a graph from a graph file.
        Parameters:
        graph - The graph to add to the environment.
        Returns:
        A unique ID for the added graph.
      • getGraph

        public FilterGraph getGraph(int graphId)
        Access a specific graph of this environment given a graph ID (previously returned from loadGraph() or addGraph()). Throws an InvalidArgumentException if no graph with the specified ID could be found.
        Parameters:
        graphId - The ID of the graph to get.
        Returns:
        The graph with the specified ID.
      • getRunner

        public GraphRunner getRunner(int graphId,
                            int executionMode)
        Get a GraphRunner instance for the graph with the specified ID. The GraphRunner instance can be used to execute the graph. Throws an InvalidArgumentException if no graph with the specified ID could be found.
        Parameters:
        graphId - The ID of the graph to get.
        executionMode - The mode of graph execution. Currently this can be either MODE_SYNCHRONOUS or MODE_ASYNCHRONOUS.
        Returns:
        A GraphRunner instance for this graph.


Content

Android Reference

Java basics

Java Enterprise Edition (EE)

Java Standard Edition (SE)

SQL

HTML

PHP

CSS

Java Script

MYSQL

JQUERY

VBS

REGEX

C

C++

C#

Design patterns

RFC (standard status)

RFC (proposed standard status)

RFC (draft standard status)

RFC (informational status)

RFC (experimental status)

RFC (best current practice status)

RFC (historic status)

RFC (unknown status)

IT dictionary

License.
All information of this service is derived from the free sources and is provided solely in the form of quotations. This service provides information and interfaces solely for the familiarization (not ownership) and under the "as is" condition.
Copyright 2016 © ELTASK.COM. All rights reserved.
Site is optimized for mobile devices.
Downloads: 2001 / . Delta: 0.00633 с