Author: jm
Date: 2012-03-21 05:23:41 -0700 (Wed, 21 Mar 2012)
New Revision: 28602
Added:
core3/samples/trunk/sample18/src/main/java/org/cytoscape/sample/internal/MyLayoutContext.java
Log:
Forgot this file in last commit
Added:
core3/samples/trunk/sample18/src/main/java/org/cytoscape/sample/internal/MyLayoutContext.java
===================================================================
---
core3/samples/trunk/sample18/src/main/java/org/cytoscape/sample/internal/MyLayoutContext.java
(rev 0)
+++
core3/samples/trunk/sample18/src/main/java/org/cytoscape/sample/internal/MyLayoutContext.java
2012-03-21 12:23:41 UTC (rev 28602)
@@ -0,0 +1,31 @@
+package org.cytoscape.sample.internal;
+
+import java.util.Set;
+
+import org.cytoscape.view.layout.AbstractLayoutAlgorithmContext;
+import org.cytoscape.work.Tunable;
+import org.cytoscape.work.TunableValidator;
+
+public class MyLayoutContext extends AbstractLayoutAlgorithmContext implements
TunableValidator {
+
+ public MyLayoutContext(boolean supportsSelectedOnly, Set<Class<?>>
supportedNodeAttributes, Set<Class<?>> supportedEdgeAttributes) {
+ super(supportsSelectedOnly, supportedNodeAttributes,
supportedEdgeAttributes);
+ }
+
+ @Tunable(description="Shift X Range")
+ public int XRange = 100; // Default value
+ @Tunable(description="Shift Y Range")
+ public int YRange= 1000;// Default value
+
+ public ValidationState getValidationState(final Appendable errMsg) {
+ if (XRange <= 100){
+ return ValidationState.OK;
+ }
+ try {
+ errMsg.append("Xrange must not exceed 100!");
+ } catch (final Exception e) {
+ /* Intentionally ignored! */
+ }
+ return ValidationState.INVALID;
+ }
+}
--
You received this message because you are subscribed to the Google Groups
"cytoscape-cvs" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/cytoscape-cvs?hl=en.