public interface FilterLibrary
extends org.openide.util.Lookup.Provider
Modules can dynamically create new filter builders and serve it ot users by
using addBuilder(org.gephi.filters.spi.FilterBuilder)
.
Modifier and Type | Field and Description |
---|---|
static Category |
ATTRIBUTES
Default
Category for attributes filters. |
static Category |
EDGE
Default
Category for filters working on edges only. |
static Category |
TOPOLOGY
Default
Category for topological filters. |
Modifier and Type | Method and Description |
---|---|
void |
addBuilder(FilterBuilder builder)
Adds
builder to this library. |
void |
deleteQuery(Query query)
Delete a saved
query from the library. |
FilterBuilder |
getBuilder(Filter filter)
Returns the builder that has created
filter . |
org.openide.util.Lookup |
getLookup()
Returns this library's lookup.
|
void |
registerMask(FilterLibraryMask mask)
Registers
mask as a new FilterLibraryMask . |
void |
removeBuilder(FilterBuilder builder)
Removes
builder from this library. |
void |
saveQuery(Query query)
Save
query in the library in order it can be reused. |
void |
unregisterMask(FilterLibraryMask mask)
Unregisters
mask in the library. |
static final Category TOPOLOGY
Category
for topological filters. Use this category
for filters working on graph topology, i.e. the structure of nodes and
edges.static final Category ATTRIBUTES
Category
for attributes filters. Use this category
for filters working on attribute values.static final Category EDGE
Category
for filters working on edges only.void addBuilder(FilterBuilder builder)
builder
to this library.builder
- the builder that is to be addedvoid removeBuilder(FilterBuilder builder)
builder
from this library.builder
- the builder that is to be removedorg.openide.util.Lookup getLookup()
FilterBuilder
: Builders, these are building filters.CategoryBuilder
: Category builders, these are building.
categories, i.e. filters containers.FilterLibraryMask
: Masks, for enable/disable categories
according to the context.Query
: Saved queries, look at FilterController
for active queries.FilterBuilder
in the library can be
obtained by doing the following command:
FilterLibrary.getLookup().lookupAll(FilterBuilder.class);
getLookup
in interface org.openide.util.Lookup.Provider
void registerMask(FilterLibraryMask mask)
mask
as a new FilterLibraryMask
. Such
masks have categories enable/disable flag. Useful to disable for instance
filters for undirected graphs when the current graph is directed.mask
- the mask that is to be registeredvoid unregisterMask(FilterLibraryMask mask)
mask
in the library. The mask will no longer be
used.mask
- the mask that is to be unregisteredFilterBuilder getBuilder(Filter filter)
filter
.filter
- the filter that the builder is to be returnedfilter
void saveQuery(Query query)
query
in the library in order it can be reused. Saved
queries are saved to the project.query
- the query that is to be savedvoid deleteQuery(Query query)
query
from the library. Deleted queries are
deleted from the project.query
- the query that is to be deletedCopyright © 2007–2017 Gephi Consortium. All rights reserved.