Created
April 2, 2012 20:17
-
-
Save keiono/2286925 to your computer and use it in GitHub Desktop.
Visual Property Dependency New API Plan 2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package org.cytoscape.view.model; | |
import java.util.Set; | |
public interface VisualLexicon2 { | |
/** | |
* Returns the Set of VisualPropertys supported by this Renderer. | |
* | |
* @return Set of all visual properties | |
* | |
*/ | |
Set<VisualProperty<?>> getAllVisualProperties(); | |
/** | |
* Get a set of Visual Properties. | |
* Usually, they are grouped by Graph Object: node, edge, and network. | |
* | |
* @param groupName name of the category: node, edge, or network | |
* | |
* @return Set of Visual properties in the category | |
*/ | |
Set<VisualProperty<?>> getVisualPropertyGroup(final String groupName); | |
/** | |
* Test the given Visual Property is supported in this Lexicon. | |
* | |
* @param vp visual property to be tested. | |
* @return true if this lexicon supports the given vp. | |
*/ | |
boolean isSupported(final VisualProperty<?> vp); | |
/** | |
* Returns the appropriate visual property for the descriptive | |
* string. The string is generally expected to be descriptive identifier | |
* from a file format (e.g. XGMML, GML) that can be mapped to a VisualProperty | |
* by the implementer of the VisualLexicon. This method will return null if | |
* no match is found. | |
* | |
* @param type The type of the visual property sought, which should | |
* (in general) be CyNode.class, CyEdge.class, or CyNetwork.class. | |
* @param identifier A string identifying a particular visual property. | |
* | |
* @return A VisualProperty identified by the input string or null if no | |
* match is found. | |
*/ | |
VisualProperty<?> lookup(Class<?> type, String identifier); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package org.cytoscape.view.vizmap; | |
import java.util.Set; | |
import org.cytoscape.view.model.VisualProperty; | |
public interface VisualPropertyDependency<T> { | |
/** | |
* Provides human-readable name of this dependency. For example, | |
* "Synchronize edge color to arrow head color," or | |
* "Fit Custom Graphics to node" | |
* | |
* @return name of this dependency. | |
*/ | |
String getDisplayName(); | |
/** | |
* A set of Visual Properties to be set by the parent if locked. | |
* | |
* @return set of visual properties to be set by parent value. | |
*/ | |
Set<VisualProperty<T>> getVisualProperties(); | |
/** | |
* Return current state of dependency. | |
* | |
* @return true if dependency is enabled | |
*/ | |
boolean isDependnecyEnabled(); | |
void setEnabled(boolean dependencyState); | |
/** | |
* | |
* @return null if not enabled, otherwise, current | |
*/ | |
T getDependentVisualPropertyValue(); | |
void setDependentVisualPropertyValue(final T value); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment