Author: mes
Date: 2012-04-23 11:38:12 -0700 (Mon, 23 Apr 2012)
New Revision: 28946
Modified:
core3/api/trunk/presentation-api/src/main/java/org/cytoscape/view/presentation/property/ArrowShapeVisualProperty.java
core3/api/trunk/presentation-api/src/main/java/org/cytoscape/view/presentation/property/BooleanVisualProperty.java
core3/api/trunk/presentation-api/src/main/java/org/cytoscape/view/presentation/property/DefaultVisualizableVisualProperty.java
core3/api/trunk/presentation-api/src/main/java/org/cytoscape/view/presentation/property/DoubleVisualProperty.java
core3/api/trunk/presentation-api/src/main/java/org/cytoscape/view/presentation/property/EdgeBendVisualProperty.java
core3/api/trunk/presentation-api/src/main/java/org/cytoscape/view/presentation/property/FontVisualProperty.java
core3/api/trunk/presentation-api/src/main/java/org/cytoscape/view/presentation/property/IntegerVisualProperty.java
core3/api/trunk/presentation-api/src/main/java/org/cytoscape/view/presentation/property/LineTypeVisualProperty.java
core3/api/trunk/presentation-api/src/main/java/org/cytoscape/view/presentation/property/NodeShapeVisualProperty.java
core3/api/trunk/presentation-api/src/main/java/org/cytoscape/view/presentation/property/NullVisualProperty.java
core3/api/trunk/presentation-api/src/main/java/org/cytoscape/view/presentation/property/PaintVisualProperty.java
core3/api/trunk/presentation-api/src/main/java/org/cytoscape/view/presentation/property/StringVisualProperty.java
Log:
javadoc updates
Modified:
core3/api/trunk/presentation-api/src/main/java/org/cytoscape/view/presentation/property/ArrowShapeVisualProperty.java
===================================================================
---
core3/api/trunk/presentation-api/src/main/java/org/cytoscape/view/presentation/property/ArrowShapeVisualProperty.java
2012-04-23 17:54:18 UTC (rev 28945)
+++
core3/api/trunk/presentation-api/src/main/java/org/cytoscape/view/presentation/property/ArrowShapeVisualProperty.java
2012-04-23 18:38:12 UTC (rev 28946)
@@ -16,14 +16,22 @@
*/
public final class ArrowShapeVisualProperty extends
AbstractVisualProperty<ArrowShape> {
- // Preset arrow shapes
+
+ /** No arrow */
public static final ArrowShape NONE = new ArrowShapeImpl("None",
"NONE");
+ /** Diamond shaped arrow */
public static final ArrowShape DIAMOND = new ArrowShapeImpl("Diamond",
"DIAMOND");
+ /** Triangle shaped arrow */
public static final ArrowShape DELTA = new ArrowShapeImpl("Delta",
"DELTA");
+ /** Pointy triangle shaped arrow */
public static final ArrowShape ARROW = new ArrowShapeImpl("Arrow",
"ARROW");
+ /** T shaped arrow */
public static final ArrowShape T = new ArrowShapeImpl("T", "T");
+ /** Circle shaped arrow */
public static final ArrowShape CIRCLE = new ArrowShapeImpl("Circle",
"CIRCLE");
+ /** Top Half of a triangle shaped arrow */
public static final ArrowShape HALF_TOP = new ArrowShapeImpl("Half
Top", "HALF_TOP");
+ /** Bottom Half of a triangle shaped arrow */
public static final ArrowShape HALF_BOTTOM = new ArrowShapeImpl("Half
Bottom", "HALF_BOTTOM");
private static final DiscreteRange<ArrowShape> ARROW_SHAPE_RANGE;
@@ -42,11 +50,17 @@
ARROW_SHAPE_RANGE = new
DiscreteRange<ArrowShape>(ArrowShape.class, new
HashSet<ArrowShape>(DEFAULT_SHAPES.values()));
}
-
+ /**
+ * Constructor.
+ * @param defaultValue The default arrow shape.
+ * @param id A machine readable string identifying this visual property
used for XML serialization.
+ * @param displayName A human readable string used for displays and
user interfaces.
+ * @param modelDataType The model data type associated with this visual
property, e.g. CyNode, CyEdge, or CyNetwork.
+ */
public ArrowShapeVisualProperty(ArrowShape defaultValue, String id,
String displayName,
- Class<?> targetObjectDataType) {
- super(defaultValue, ARROW_SHAPE_RANGE, id, displayName,
targetObjectDataType);
+ Class<?> modelDataType) {
+ super(defaultValue, ARROW_SHAPE_RANGE, id, displayName,
modelDataType);
}
@Override
Modified:
core3/api/trunk/presentation-api/src/main/java/org/cytoscape/view/presentation/property/BooleanVisualProperty.java
===================================================================
---
core3/api/trunk/presentation-api/src/main/java/org/cytoscape/view/presentation/property/BooleanVisualProperty.java
2012-04-23 17:54:18 UTC (rev 28945)
+++
core3/api/trunk/presentation-api/src/main/java/org/cytoscape/view/presentation/property/BooleanVisualProperty.java
2012-04-23 18:38:12 UTC (rev 28946)
@@ -58,12 +58,27 @@
BOOLEAN_RANGE = new DiscreteRange<Boolean>(Boolean.class,
bRange);
}
- public BooleanVisualProperty(final Boolean def, final String id, final
String name, final Class<?> targetDataType) {
- this(def, id, name, false, targetDataType);
+ /**
+ * Constructor.
+ * @param def The boolean value.
+ * @param id A machine readable string identifying this visual property
used for XML serialization.
+ * @param displayName A human readable string used for displays and
user interfaces.
+ * @param modelDataType The model data type associated with this visual
property, e.g. CyNode, CyEdge, or CyNetwork.
+ */
+ public BooleanVisualProperty(final Boolean def, final String id, final
String displayName, final Class<?> modelDataType) {
+ this(def, id, displayName, false, modelDataType);
}
- public BooleanVisualProperty(final Boolean def, final String id, final
String name, final Boolean ignoreDefault, final Class<?> targetDataType) {
- super(def, BOOLEAN_RANGE, id, name, targetDataType);
+ /**
+ * Constructor.
+ * @param def The boolean value.
+ * @param id A machine readable string identifying this visual property
used for XML serialization.
+ * @param displayName A human readable string used for displays and
user interfaces.
+ * @param ignoreDefault Whether the default value should be ignored.
+ * @param modelDataType The model data type associated with this visual
property, e.g. CyNode, CyEdge, or CyNetwork.
+ */
+ public BooleanVisualProperty(final Boolean def, final String id, final
String displayName, final Boolean ignoreDefault, final Class<?> modelDataType) {
+ super(def, BOOLEAN_RANGE, id, displayName, modelDataType);
this.shouldIgnoreDefault = ignoreDefault;
}
Modified:
core3/api/trunk/presentation-api/src/main/java/org/cytoscape/view/presentation/property/DefaultVisualizableVisualProperty.java
===================================================================
---
core3/api/trunk/presentation-api/src/main/java/org/cytoscape/view/presentation/property/DefaultVisualizableVisualProperty.java
2012-04-23 17:54:18 UTC (rev 28945)
+++
core3/api/trunk/presentation-api/src/main/java/org/cytoscape/view/presentation/property/DefaultVisualizableVisualProperty.java
2012-04-23 18:38:12 UTC (rev 28946)
@@ -28,14 +28,13 @@
}
/**
- * Constructs this DefaultVisualProperty.
- * @param id the id for this DefaultVisualProperty.
- * @param name the name for this DefaultVisualProperty.
- * @param targetDataType #ASKMIKE
+ * @param id A machine readable string identifying this visual property
used for XML serialization.
+ * @param displayName A human readable string used for displays and
user interfaces.
+ * @param modelDataType The model data type associated with this visual
property, e.g. CyNode, CyEdge, or CyNetwork.
*/
public DefaultVisualizableVisualProperty(final String id,
- final String name, final Class<?> targetDataType) {
- super(visualizable, VISUALIZABLE_RANGE, id, name,
targetDataType);
+ final String displayName, final Class<?> modelDataType)
{
+ super(visualizable, VISUALIZABLE_RANGE, id, displayName,
modelDataType);
}
@Override
@@ -52,4 +51,4 @@
// Dummy class. Currently this does nothing.
}
-}
\ No newline at end of file
+}
Modified:
core3/api/trunk/presentation-api/src/main/java/org/cytoscape/view/presentation/property/DoubleVisualProperty.java
===================================================================
---
core3/api/trunk/presentation-api/src/main/java/org/cytoscape/view/presentation/property/DoubleVisualProperty.java
2012-04-23 17:54:18 UTC (rev 28945)
+++
core3/api/trunk/presentation-api/src/main/java/org/cytoscape/view/presentation/property/DoubleVisualProperty.java
2012-04-23 18:38:12 UTC (rev 28946)
@@ -44,13 +44,30 @@
*/
public final class DoubleVisualProperty extends AbstractVisualProperty<Double>
{
- public DoubleVisualProperty(final Double def, final Range<Double>
range, final String id, final String name, final Class<?> targetDataType) {
- this(def, range, id, name, false, targetDataType);
+ /**
+ * Constructor.
+ * @param def The double value.
+ * @param range The allowable range of values for specified doubles.
+ * @param id A machine readable string identifying this visual property
used for XML serialization.
+ * @param displayName A human readable string used for displays and
user interfaces.
+ * @param modelDataType The model data type associated with this visual
property, e.g. CyNode, CyEdge, or CyNetwork.
+ */
+ public DoubleVisualProperty(final Double def, final Range<Double>
range, final String id, final String displayName, final Class<?> modelDataType)
{
+ this(def, range, id, displayName, false, modelDataType);
}
+ /**
+ * Constructor.
+ * @param def The double value.
+ * @param range The allowable range of values for specified doubles.
+ * @param id A machine readable string identifying this visual property
used for XML serialization.
+ * @param displayName A human readable string used for displays and
user interfaces.
+ * @param ignoreDefault Whether the default value should be ignored.
+ * @param modelDataType The model data type associated with this visual
property, e.g. CyNode, CyEdge, or CyNetwork.
+ */
public DoubleVisualProperty(final Double def, final Range<Double>
range, final String id,
- final String name, final boolean ignoreDefault, final
Class<?> targetDataType) {
- super(def, range, id, name, targetDataType);
+ final String displayName, final boolean ignoreDefault,
final Class<?> modelDataType) {
+ super(def, range, id, displayName, modelDataType);
this.shouldIgnoreDefault = ignoreDefault;
}
Modified:
core3/api/trunk/presentation-api/src/main/java/org/cytoscape/view/presentation/property/EdgeBendVisualProperty.java
===================================================================
---
core3/api/trunk/presentation-api/src/main/java/org/cytoscape/view/presentation/property/EdgeBendVisualProperty.java
2012-04-23 17:54:18 UTC (rev 28945)
+++
core3/api/trunk/presentation-api/src/main/java/org/cytoscape/view/presentation/property/EdgeBendVisualProperty.java
2012-04-23 18:38:12 UTC (rev 28946)
@@ -12,21 +12,36 @@
import org.cytoscape.view.presentation.property.values.BendFactory;
import org.cytoscape.view.presentation.property.values.Handle;
+/**
+ * Visual Property for Edge {@link Bend} values.
+ *
+ * @CyAPI.Final.Class
+ */
public class EdgeBendVisualProperty extends AbstractVisualProperty<Bend> {
- private static final Range<Bend> EDGE_BEND_RANGE;
+ /**
+ * The default edge bend. This "bend" is empty and contains no actual
bend.
+ */
public static final Bend DEFAULT_EDGE_BEND = new EmptyBendImpl();
- static {
- EDGE_BEND_RANGE = new ContinuousRange<Bend>(Bend.class,
DEFAULT_EDGE_BEND, DEFAULT_EDGE_BEND, true, true);
- }
-
+ private static final Range<Bend> EDGE_BEND_RANGE = new
ContinuousRange<Bend>(Bend.class, DEFAULT_EDGE_BEND, DEFAULT_EDGE_BEND, true,
true);
+
private BendFactory bendFactory;
+ /**
+ * Constructor.
+ * @param defaultValue The default bend to use.
+ * @param id A machine readable string identifying this visual property
used for XML serialization.
+ * @param displayName A human readable string used for displays and
user interfaces.
+ */
public EdgeBendVisualProperty(Bend defaultValue, String id, String
displayName) {
super(defaultValue, EDGE_BEND_RANGE, id, displayName,
CyEdge.class);
}
-
+
+ /**
+ * Sets the bend factory that is used behind the scenes to create bend
objects.
+ * @param bendFactory The bend factory to use for this instance.
+ */
public void setBendFactory(final BendFactory bendFactory) {
this.bendFactory = bendFactory;
}
Modified:
core3/api/trunk/presentation-api/src/main/java/org/cytoscape/view/presentation/property/FontVisualProperty.java
===================================================================
---
core3/api/trunk/presentation-api/src/main/java/org/cytoscape/view/presentation/property/FontVisualProperty.java
2012-04-23 17:54:18 UTC (rev 28945)
+++
core3/api/trunk/presentation-api/src/main/java/org/cytoscape/view/presentation/property/FontVisualProperty.java
2012-04-23 18:38:12 UTC (rev 28946)
@@ -72,9 +72,16 @@
};
}
+ /**
+ * Constructor.
+ * @param def The default font value.
+ * @param id A machine readable string identifying this visual property
used for XML serialization.
+ * @param displayName A human readable string used for displays and
user interfaces.
+ * @param modelDataType The model data type associated with this visual
property, e.g. CyNode, CyEdge, or CyNetwork.
+ */
public FontVisualProperty(final Font def, final String id,
- final String name, final Class<?> targetDataType) {
- super(def, FONT_RANGE, id, name, targetDataType);
+ final String displayName, final Class<?> modelDataType)
{
+ super(def, FONT_RANGE, id, displayName, modelDataType);
}
@Override
Modified:
core3/api/trunk/presentation-api/src/main/java/org/cytoscape/view/presentation/property/IntegerVisualProperty.java
===================================================================
---
core3/api/trunk/presentation-api/src/main/java/org/cytoscape/view/presentation/property/IntegerVisualProperty.java
2012-04-23 17:54:18 UTC (rev 28945)
+++
core3/api/trunk/presentation-api/src/main/java/org/cytoscape/view/presentation/property/IntegerVisualProperty.java
2012-04-23 18:38:12 UTC (rev 28946)
@@ -45,31 +45,24 @@
public final class IntegerVisualProperty extends
AbstractVisualProperty<Integer> {
/**
- * Use specific range
- * @param def
- * @param id
- * @param name
- * @param targetDataType
- * @param range the {@link Range} for this IntegerVisualProperty.
+ * Constructor.
+ * @param def The default Integer value.
+ * @param range The allowable range for Integer values of this visual
property.
+ * @param id A machine readable string identifying this visual property
used for XML serialization.
+ * @param displayName A human readable string used for displays and
user interfaces.
+ * @param modelDataType The model data type associated with this visual
property, e.g. CyNode, CyEdge, or CyNetwork.
*/
- public IntegerVisualProperty(final Integer def, final Range<Integer>
range, final String id, final String name,
- final Class<?> targetDataType) {
- super(def, range, id, name, targetDataType);
+ public IntegerVisualProperty(final Integer def, final Range<Integer>
range, final String id, final String displayName, final Class<?> modelDataType)
{
+ super(def, range, id, displayName, modelDataType);
}
- /**
- * {@inheritDoc}
- */
@Override
public String toSerializableString(final Integer value) {
return value.toString();
}
- /**
- * {@inheritDoc}
- */
@Override
public Integer parseSerializableString(final String text) {
// Cytoscape 2.x serializes integer attributes as decimals
(e.g."1.0")!
Modified:
core3/api/trunk/presentation-api/src/main/java/org/cytoscape/view/presentation/property/LineTypeVisualProperty.java
===================================================================
---
core3/api/trunk/presentation-api/src/main/java/org/cytoscape/view/presentation/property/LineTypeVisualProperty.java
2012-04-23 17:54:18 UTC (rev 28945)
+++
core3/api/trunk/presentation-api/src/main/java/org/cytoscape/view/presentation/property/LineTypeVisualProperty.java
2012-04-23 18:38:12 UTC (rev 28946)
@@ -39,9 +39,16 @@
LINE_TYPE_RANGE = new DiscreteRange<LineType>(LineType.class,
new HashSet<LineType>(lineTypes.values()));
}
+ /**
+ * Constructor.
+ * @param defaultValue The default LineType value.
+ * @param id A machine readable string identifying this visual property
used for XML serialization.
+ * @param displayName A human readable string used for displays and
user interfaces.
+ * @param modelDataType The model data type associated with this visual
property, e.g. CyNode, CyEdge, or CyNetwork.
+ */
public LineTypeVisualProperty(LineType defaultValue,
- String id, String displayName, Class<?>
targetObjectDataType) {
- super(defaultValue, LINE_TYPE_RANGE, id, displayName,
targetObjectDataType);
+ String id, String displayName, Class<?> modelDataType) {
+ super(defaultValue, LINE_TYPE_RANGE, id, displayName,
modelDataType);
}
@Override
Modified:
core3/api/trunk/presentation-api/src/main/java/org/cytoscape/view/presentation/property/NodeShapeVisualProperty.java
===================================================================
---
core3/api/trunk/presentation-api/src/main/java/org/cytoscape/view/presentation/property/NodeShapeVisualProperty.java
2012-04-23 17:54:18 UTC (rev 28945)
+++
core3/api/trunk/presentation-api/src/main/java/org/cytoscape/view/presentation/property/NodeShapeVisualProperty.java
2012-04-23 18:38:12 UTC (rev 28946)
@@ -54,8 +54,15 @@
NODE_SHAPE_RANGE = new
DiscreteRange<NodeShape>(NodeShape.class, new
HashSet<NodeShape>(DEFAULT_SHAPES.values()));
}
- public NodeShapeVisualProperty(NodeShape defaultValue, String id,
String displayName, Class<?> targetObjectDataType) {
- super(defaultValue, NODE_SHAPE_RANGE, id, displayName,
targetObjectDataType);
+ /**
+ * Constructor.
+ * @param defaultValue The default NodeShape value.
+ * @param id A machine readable string identifying this visual property
used for XML serialization.
+ * @param displayName A human readable string used for displays and
user interfaces.
+ * @param modelDataType The model data type associated with this visual
property, e.g. CyNode, CyEdge, or CyNetwork.
+ */
+ public NodeShapeVisualProperty(NodeShape defaultValue, String id,
String displayName, Class<?> modelDataType) {
+ super(defaultValue, NODE_SHAPE_RANGE, id, displayName,
modelDataType);
}
@Override
@@ -73,6 +80,11 @@
return shape;
}
+ /**
+ * Returns true if the specified shape is one of the possible default
shape values.
+ * @param shape the node shape to be checked.
+ * @return True if the specified shape is one of the possible default
shape values.
+ */
public static boolean isDefaultShape(final NodeShape shape) {
return DEFAULT_SHAPES.containsValue(shape);
}
Modified:
core3/api/trunk/presentation-api/src/main/java/org/cytoscape/view/presentation/property/NullVisualProperty.java
===================================================================
---
core3/api/trunk/presentation-api/src/main/java/org/cytoscape/view/presentation/property/NullVisualProperty.java
2012-04-23 17:54:18 UTC (rev 28945)
+++
core3/api/trunk/presentation-api/src/main/java/org/cytoscape/view/presentation/property/NullVisualProperty.java
2012-04-23 18:38:12 UTC (rev 28946)
@@ -25,8 +25,13 @@
NullDataType.class, nRange);
}
- public NullVisualProperty(final String id, final String name) {
- super(dummyObject, NULL_RANGE, id, name, Object.class);
+ /**
+ * Constructor.
+ * @param id A machine readable string identifying this visual property
used for XML serialization.
+ * @param displayName A human readable string used for displays and
user interfaces.
+ */
+ public NullVisualProperty(final String id, final String displayName) {
+ super(dummyObject, NULL_RANGE, id, displayName, Object.class);
}
@@ -44,4 +49,4 @@
private final static class NullDataTypeImpl implements NullDataType {
// Dummy class. Currently this does nothing.
}
-}
\ No newline at end of file
+}
Modified:
core3/api/trunk/presentation-api/src/main/java/org/cytoscape/view/presentation/property/PaintVisualProperty.java
===================================================================
---
core3/api/trunk/presentation-api/src/main/java/org/cytoscape/view/presentation/property/PaintVisualProperty.java
2012-04-23 17:54:18 UTC (rev 28945)
+++
core3/api/trunk/presentation-api/src/main/java/org/cytoscape/view/presentation/property/PaintVisualProperty.java
2012-04-23 18:38:12 UTC (rev 28946)
@@ -50,12 +50,20 @@
*/
public final class PaintVisualProperty extends AbstractVisualProperty<Paint> {
- public PaintVisualProperty(final Paint def, final Range<Paint> range,
final String id, final String name, final Class<?> targetDataType) {
- super(def, range, id, name, targetDataType);
+ /**
+ * Constructor.
+ * @param def The default paint value.
+ * @param id A machine readable string identifying this visual property
used for XML serialization.
+ * @param displayName A human readable string used for displays and
user interfaces.
+ * @param modelDataType The model data type associated with this visual
property, e.g. CyNode, CyEdge, or CyNetwork.
+ */
+ public PaintVisualProperty(final Paint def, final Range<Paint> range,
final String id, final String displayName, final Class<?> modelDataType) {
+ super(def, range, id, displayName, modelDataType);
}
- @Override public String toSerializableString(final Paint paint) {
+ @Override
+ public String toSerializableString(final Paint paint) {
if (paint instanceof Color == false)
throw new UnsupportedOperationException("Currently,
this implementation supports only Color object.");
@@ -68,7 +76,8 @@
}
- @Override public Paint parseSerializableString(final String text) {
+ @Override
+ public Paint parseSerializableString(final String text) {
if (text == null)
throw new IllegalArgumentException("invalid color
format: null");
Modified:
core3/api/trunk/presentation-api/src/main/java/org/cytoscape/view/presentation/property/StringVisualProperty.java
===================================================================
---
core3/api/trunk/presentation-api/src/main/java/org/cytoscape/view/presentation/property/StringVisualProperty.java
2012-04-23 17:54:18 UTC (rev 28945)
+++
core3/api/trunk/presentation-api/src/main/java/org/cytoscape/view/presentation/property/StringVisualProperty.java
2012-04-23 18:38:12 UTC (rev 28946)
@@ -44,21 +44,38 @@
*/
public final class StringVisualProperty extends AbstractVisualProperty<String>
{
+ /**
+ * Constructor.
+ * @param def The default String value.
+ * @param range The allowable range of Strings for this visual property.
+ * @param id A machine readable string identifying this visual property
used for XML serialization.
+ * @param displayName A human readable string used for displays and
user interfaces.
+ * @param modelDataType The model data type associated with this visual
property, e.g. CyNode, CyEdge, or CyNetwork.
+ */
public StringVisualProperty(final String def,
final
Range<String> range,
final String id,
- final String
name,
- final Class<?>
targetDataType) {
- super(def, range, id, name, targetDataType);
+ final String
displayName,
+ final Class<?>
modelDataType) {
+ super(def, range, id, displayName, modelDataType);
}
+ /**
+ * Constructor.
+ * @param def The default String value.
+ * @param range The allowable range of Strings for this visual property.
+ * @param id A machine readable string identifying this visual property
used for XML serialization.
+ * @param displayName A human readable string used for displays and
user interfaces.
+ * @param ignoreDefault Whether the default value should be ignored or
not.
+ * @param modelDataType The model data type associated with this visual
property, e.g. CyNode, CyEdge, or CyNetwork.
+ */
public StringVisualProperty(final String def,
final
Range<String> range,
final String id,
- final String
name,
+ final String
displayName,
final boolean
ignoreDefault,
- final Class<?>
targetDataType) {
- super(def, range, id, name, targetDataType);
+ final Class<?>
modelDataType) {
+ super(def, range, id, displayName, modelDataType);
this.shouldIgnoreDefault = ignoreDefault;
}
--
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.