Author: mes
Date: 2012-04-23 12:13:14 -0700 (Mon, 23 Apr 2012)
New Revision: 28950
Modified:
core3/api/trunk/vizmap-gui-api/src/main/java/org/cytoscape/view/vizmap/gui/editor/AbstractVisualPropertyEditor.java
core3/api/trunk/vizmap-gui-api/src/main/java/org/cytoscape/view/vizmap/gui/editor/ContinuousEditorType.java
core3/api/trunk/vizmap-gui-api/src/main/java/org/cytoscape/view/vizmap/gui/editor/ContinuousMappingEditor.java
core3/api/trunk/vizmap-gui-api/src/main/java/org/cytoscape/view/vizmap/gui/editor/EditorManager.java
core3/api/trunk/vizmap-gui-api/src/main/java/org/cytoscape/view/vizmap/gui/event/LexiconStateChangedEvent.java
Log:
updated javadoc
Modified:
core3/api/trunk/vizmap-gui-api/src/main/java/org/cytoscape/view/vizmap/gui/editor/AbstractVisualPropertyEditor.java
===================================================================
---
core3/api/trunk/vizmap-gui-api/src/main/java/org/cytoscape/view/vizmap/gui/editor/AbstractVisualPropertyEditor.java
2012-04-23 18:57:38 UTC (rev 28949)
+++
core3/api/trunk/vizmap-gui-api/src/main/java/org/cytoscape/view/vizmap/gui/editor/AbstractVisualPropertyEditor.java
2012-04-23 19:13:14 UTC (rev 28950)
@@ -62,20 +62,39 @@
* @CyAPI.Abstract.Class
*/
public abstract class AbstractVisualPropertyEditor<T> implements
VisualPropertyEditor<T> {
-
+
+ /**
+ * The type of the property editor.
+ */
protected final Class<T> type;
+
+ /**
+ * The property editor.
+ */
protected final PropertyEditor propertyEditor;
- private final ContinuousEditorType continuousEditorType;
+
+ /**
+ * The {@link Window} that holds the editor.
+ */
protected Window vpValueEditor;
-
+
+ /**
+ * The cell renderer for discrete mappings.
+ */
protected TableCellRenderer discreteTableCellRenderer;
+
+ /**
+ * The cell renderer for continuous mappings.
+ */
protected TableCellRenderer continuousTableCellRenderer;
+ private final ContinuousEditorType continuousEditorType;
+
/**
* Creates a new AbstractVisualPropertyEditor object.
- * @param type The type of this AbstractVisualPropertyEditor object.
+ * @param type The type of this property editor.
* @param propertyEditor the {@link PropertyEditor} to construct this
with.
- *
+ * @param continuousEditorType the {@link ContinuousEditorType} to
construct this with.
*/
public AbstractVisualPropertyEditor(final Class<T> type, final
PropertyEditor propertyEditor, ContinuousEditorType continuousEditorType) {
this.type = type;
@@ -83,38 +102,19 @@
this.continuousEditorType = continuousEditorType;
}
- /**
- * {@inheritDoc}
- */
- @Override public Class<T> getType() {
+ @Override
+ public Class<T> getType() {
return this.type;
}
- /**
- * {@inheritDoc}
- */
- @Override public PropertyEditor getPropertyEditor() {
+ @Override
+ public PropertyEditor getPropertyEditor() {
return propertyEditor;
}
-// /**
-// * {@inheritDoc}
-// */
-// @Override public T showVisualPropertyValueEditor() {
-// if(vpValueEditor == null) {
-// // Search value editor repository
-// }
-// vpValueEditor.setVisible(true);
-//
-// //TODO: need new interface for value editor
-// return null;
-// }
-
- /**
- * {@inheritDoc}
- */
- @Override public TableCellRenderer getDiscreteTableCellRenderer() {
+ @Override
+ public TableCellRenderer getDiscreteTableCellRenderer() {
return discreteTableCellRenderer;
}
@@ -130,10 +130,8 @@
return this.continuousEditorType;
}
- /**
- * {@inheritDoc}
- */
- @Override public Icon getDefaultIcon(int width, int height) {
+ @Override
+ public Icon getDefaultIcon(int width, int height) {
// By default, it does not return actual icon. This should be
implemented child classes.
return null;
}
Modified:
core3/api/trunk/vizmap-gui-api/src/main/java/org/cytoscape/view/vizmap/gui/editor/ContinuousEditorType.java
===================================================================
---
core3/api/trunk/vizmap-gui-api/src/main/java/org/cytoscape/view/vizmap/gui/editor/ContinuousEditorType.java
2012-04-23 18:57:38 UTC (rev 28949)
+++
core3/api/trunk/vizmap-gui-api/src/main/java/org/cytoscape/view/vizmap/gui/editor/ContinuousEditorType.java
2012-04-23 19:13:14 UTC (rev 28950)
@@ -1,5 +1,26 @@
package org.cytoscape.view.vizmap.gui.editor;
+/**
+ * An enum describing the possible types of continuous editors.
+ * @CyAPI.Enum.Class
+ */
public enum ContinuousEditorType {
- DISCRETE, CONTINUOUS, COLOR;
+ /**
+ * Used for mapping continuous attribute values to
+ * discrete visual property types such as Node Shape.
+ */
+ DISCRETE,
+
+ /**
+ * Used for mapping continuous attribute values to
+ * continuous visual property types such as Node Size.
+ */
+ CONTINUOUS,
+
+ /**
+ * Used for mapping continuous attribute values to
+ * color visual property types such as Node Color.
+ */
+ COLOR,
+ ;
}
Modified:
core3/api/trunk/vizmap-gui-api/src/main/java/org/cytoscape/view/vizmap/gui/editor/ContinuousMappingEditor.java
===================================================================
---
core3/api/trunk/vizmap-gui-api/src/main/java/org/cytoscape/view/vizmap/gui/editor/ContinuousMappingEditor.java
2012-04-23 18:57:38 UTC (rev 28949)
+++
core3/api/trunk/vizmap-gui-api/src/main/java/org/cytoscape/view/vizmap/gui/editor/ContinuousMappingEditor.java
2012-04-23 19:13:14 UTC (rev 28950)
@@ -2,8 +2,21 @@
import javax.swing.ImageIcon;
+/**
+ * A basic interface used to display continuous mapping editors.
+ * @param <K> The numeric type of the attribute.
+ * @param <V> The generic type of the visual property the attribute is being
mapped to.
+ * @CyAPI.Spi.Interface
+ */
public interface ContinuousMappingEditor<K extends Number, V> {
+ /**
+ * Returns an icon representing this editor for use in a user interface.
+ * @param width The width of the icon.
+ * @param height The height of the icon.
+ * @param detail Whether to include high detail or not.
+ * @return an icon representing this editor for use in a user interface.
+ */
public abstract ImageIcon drawIcon(int width, int height, boolean
detail);
-}
\ No newline at end of file
+}
Modified:
core3/api/trunk/vizmap-gui-api/src/main/java/org/cytoscape/view/vizmap/gui/editor/EditorManager.java
===================================================================
---
core3/api/trunk/vizmap-gui-api/src/main/java/org/cytoscape/view/vizmap/gui/editor/EditorManager.java
2012-04-23 18:57:38 UTC (rev 28949)
+++
core3/api/trunk/vizmap-gui-api/src/main/java/org/cytoscape/view/vizmap/gui/editor/EditorManager.java
2012-04-23 19:13:14 UTC (rev 28950)
@@ -50,8 +50,7 @@
/**
- * Manages all editor objects for ViaMap GUI.
- *
+ * Manages all editor objects for the VizMap GUI.
*
* @CyAPI.Api.Interface
*/
@@ -103,6 +102,11 @@
/**
+ * Returns the continuous editor for the specified visual property.
+ *
+ * @param vp The visual property.
+ *
+ * @return the continuous editor for the specified visual property.
*/
PropertyEditor getContinuousEditor(final VisualProperty<?> vp);
@@ -140,7 +144,7 @@
/**
- * Get {@link JComboBox} type editor
+ * Get {@link javax.swing.JComboBox} type editor
*
* @param editorName name (ID) of editor
*
Modified:
core3/api/trunk/vizmap-gui-api/src/main/java/org/cytoscape/view/vizmap/gui/event/LexiconStateChangedEvent.java
===================================================================
---
core3/api/trunk/vizmap-gui-api/src/main/java/org/cytoscape/view/vizmap/gui/event/LexiconStateChangedEvent.java
2012-04-23 18:57:38 UTC (rev 28949)
+++
core3/api/trunk/vizmap-gui-api/src/main/java/org/cytoscape/view/vizmap/gui/event/LexiconStateChangedEvent.java
2012-04-23 19:13:14 UTC (rev 28950)
@@ -7,9 +7,6 @@
/**
* Tell listeners a enabled/disabled visual properties.
- *
- * TODO: Refactor dependency mechanism.
- *
* @CyAPI.Final.Class
*/
public final class LexiconStateChangedEvent extends AbstractCyEvent<Object> {
--
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.