Author: mes
Date: 2011-11-23 16:44:32 -0800 (Wed, 23 Nov 2011)
New Revision: 27596
Added:
core3/api/trunk/property-api/src/main/java/org/cytoscape/property/SimpleCyProperty.java
core3/api/trunk/property-api/src/test/java/org/cytoscape/property/SimpleCyPropertyTest.java
Removed:
core3/api/trunk/property-api/src/main/java/org/cytoscape/property/BasicCyProperty.java
core3/api/trunk/property-api/src/test/java/org/cytoscape/property/BasicCyPropertyTest.java
Modified:
core3/impl/trunk/ding-impl/performance-debug/src/main/java/org/cytoscape/ding/internal/PerfTest.java
core3/impl/trunk/io-impl/impl/src/test/java/org/cytoscape/io/internal/read/AbstractNetworkViewReaderTester.java
core3/impl/trunk/linkout-impl/src/main/java/org/cytoscape/linkout/internal/CyActivator.java
core3/impl/trunk/plugin-impl/src/main/java/org/cytoscape/plugin/internal/CyPluginAdapterImpl.java
core3/impl/trunk/swing-application-impl/src/main/java/org/cytoscape/internal/dialogs/PreferencesDialogImpl.java
Log:
Renamed BasicCyProperty to SimpleCyProperty
Deleted:
core3/api/trunk/property-api/src/main/java/org/cytoscape/property/BasicCyProperty.java
===================================================================
---
core3/api/trunk/property-api/src/main/java/org/cytoscape/property/BasicCyProperty.java
2011-11-24 00:31:16 UTC (rev 27595)
+++
core3/api/trunk/property-api/src/main/java/org/cytoscape/property/BasicCyProperty.java
2011-11-24 00:44:32 UTC (rev 27596)
@@ -1,52 +0,0 @@
-package org.cytoscape.property;
-
-
-import java.util.Properties;
-
-
-/**
- * A simple implementation of CyProperty<Properties> suitable for
- * general purpose use.
- * @CyAPI.Final.Class
- */
-public final class BasicCyProperty implements CyProperty<Properties> {
-
- /**
- * Core Cytoscape Property (Cytoscape System Property)
- */
- public static final String CORE_PROPRERTY_NAME = "cytoscape3.props";
-
- private final Properties properties;
- private final CyProperty.SavePolicy savePolicy;
-
- /**
- * Properties is a non-null Properties object that this CyProperty
object
- * should encapsulate.
- * @param properties The non-null Properties object this CyProperty
object
- * should encapsulate. Throws NullPointerException if Properties is
null.
- * @param savePolicy the {@link CyProperty.SavePolicy} of this
CyProperty object.
- */
- public BasicCyProperty(final Properties properties, final
CyProperty.SavePolicy savePolicy) {
- if (properties == null)
- throw new NullPointerException("\"properties\"
parameter is null!");
- if (savePolicy == null)
- throw new NullPointerException("\"savePolicy\"
parameter is null!");
-
- this.properties = properties;
- this.savePolicy = savePolicy;
- }
-
- /**
- * {@inheritDoc}
- */
- public Properties getProperties() {
- return properties;
- }
-
- /**
- * {@inheritDoc}
- */
- public CyProperty.SavePolicy getSavePolicy() {
- return savePolicy;
- }
-}
Copied:
core3/api/trunk/property-api/src/main/java/org/cytoscape/property/SimpleCyProperty.java
(from rev 27587,
core3/api/trunk/property-api/src/main/java/org/cytoscape/property/BasicCyProperty.java)
===================================================================
---
core3/api/trunk/property-api/src/main/java/org/cytoscape/property/SimpleCyProperty.java
(rev 0)
+++
core3/api/trunk/property-api/src/main/java/org/cytoscape/property/SimpleCyProperty.java
2011-11-24 00:44:32 UTC (rev 27596)
@@ -0,0 +1,52 @@
+package org.cytoscape.property;
+
+
+import java.util.Properties;
+
+
+/**
+ * A simple implementation of CyProperty<Properties> suitable for
+ * general purpose use.
+ * @CyAPI.Final.Class
+ */
+public final class SimpleCyProperty implements CyProperty<Properties> {
+
+ /**
+ * Core Cytoscape Property (Cytoscape System Property)
+ */
+ public static final String CORE_PROPRERTY_NAME = "cytoscape3.props";
+
+ private final Properties properties;
+ private final CyProperty.SavePolicy savePolicy;
+
+ /**
+ * Properties is a non-null Properties object that this CyProperty
object
+ * should encapsulate.
+ * @param properties The non-null Properties object this CyProperty
object
+ * should encapsulate. Throws NullPointerException if Properties is
null.
+ * @param savePolicy the {@link CyProperty.SavePolicy} of this
CyProperty object.
+ */
+ public SimpleCyProperty(final Properties properties, final
CyProperty.SavePolicy savePolicy) {
+ if (properties == null)
+ throw new NullPointerException("\"properties\"
parameter is null!");
+ if (savePolicy == null)
+ throw new NullPointerException("\"savePolicy\"
parameter is null!");
+
+ this.properties = properties;
+ this.savePolicy = savePolicy;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public Properties getProperties() {
+ return properties;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public CyProperty.SavePolicy getSavePolicy() {
+ return savePolicy;
+ }
+}
Deleted:
core3/api/trunk/property-api/src/test/java/org/cytoscape/property/BasicCyPropertyTest.java
===================================================================
---
core3/api/trunk/property-api/src/test/java/org/cytoscape/property/BasicCyPropertyTest.java
2011-11-24 00:31:16 UTC (rev 27595)
+++
core3/api/trunk/property-api/src/test/java/org/cytoscape/property/BasicCyPropertyTest.java
2011-11-24 00:44:32 UTC (rev 27596)
@@ -1,35 +0,0 @@
-package org.cytoscape.property;
-
-
-import static org.junit.Assert.assertTrue;
-import java.util.Properties;
-import org.junit.Test;
-
-
-public class BasicCyPropertyTest {
-
- @Test(expected=NullPointerException.class)
- public void testNullProp() throws Exception {
- BasicCyProperty p = new BasicCyProperty(null,
CyProperty.SavePolicy.DO_NOT_SAVE);
- }
-
- @Test(expected=NullPointerException.class)
- public void testNullSavePol() throws Exception {
- Properties props = new Properties();
- BasicCyProperty p = new BasicCyProperty(props, null);
- }
-
- @Test
- public void testGetProp(){
- Properties props = new Properties();
- BasicCyProperty p = new BasicCyProperty(props,
CyProperty.SavePolicy.DO_NOT_SAVE);
- assertTrue(p.getProperties() != null);
- }
-
- @Test
- public void testGetSavePol(){
- Properties props = new Properties();
- BasicCyProperty p = new BasicCyProperty(props,
CyProperty.SavePolicy.DO_NOT_SAVE);
- assertTrue(p.getSavePolicy() ==
CyProperty.SavePolicy.DO_NOT_SAVE);
- }
-}
Copied:
core3/api/trunk/property-api/src/test/java/org/cytoscape/property/SimpleCyPropertyTest.java
(from rev 27587,
core3/api/trunk/property-api/src/test/java/org/cytoscape/property/BasicCyPropertyTest.java)
===================================================================
---
core3/api/trunk/property-api/src/test/java/org/cytoscape/property/SimpleCyPropertyTest.java
(rev 0)
+++
core3/api/trunk/property-api/src/test/java/org/cytoscape/property/SimpleCyPropertyTest.java
2011-11-24 00:44:32 UTC (rev 27596)
@@ -0,0 +1,35 @@
+package org.cytoscape.property;
+
+
+import static org.junit.Assert.assertTrue;
+import java.util.Properties;
+import org.junit.Test;
+
+
+public class SimpleCyPropertyTest {
+
+ @Test(expected=NullPointerException.class)
+ public void testNullProp() throws Exception {
+ SimpleCyProperty p = new SimpleCyProperty(null,
CyProperty.SavePolicy.DO_NOT_SAVE);
+ }
+
+ @Test(expected=NullPointerException.class)
+ public void testNullSavePol() throws Exception {
+ Properties props = new Properties();
+ SimpleCyProperty p = new SimpleCyProperty(props, null);
+ }
+
+ @Test
+ public void testGetProp(){
+ Properties props = new Properties();
+ SimpleCyProperty p = new SimpleCyProperty(props,
CyProperty.SavePolicy.DO_NOT_SAVE);
+ assertTrue(p.getProperties() != null);
+ }
+
+ @Test
+ public void testGetSavePol(){
+ Properties props = new Properties();
+ SimpleCyProperty p = new SimpleCyProperty(props,
CyProperty.SavePolicy.DO_NOT_SAVE);
+ assertTrue(p.getSavePolicy() ==
CyProperty.SavePolicy.DO_NOT_SAVE);
+ }
+}
Modified:
core3/impl/trunk/ding-impl/performance-debug/src/main/java/org/cytoscape/ding/internal/PerfTest.java
===================================================================
---
core3/impl/trunk/ding-impl/performance-debug/src/main/java/org/cytoscape/ding/internal/PerfTest.java
2011-11-24 00:31:16 UTC (rev 27595)
+++
core3/impl/trunk/ding-impl/performance-debug/src/main/java/org/cytoscape/ding/internal/PerfTest.java
2011-11-24 00:44:32 UTC (rev 27596)
@@ -18,7 +18,7 @@
import org.cytoscape.model.CyNetwork;
import org.cytoscape.model.CyNetworkFactory;
import org.cytoscape.model.CyNode;
-import org.cytoscape.property.BasicCyProperty;
+import org.cytoscape.property.SimpleCyProperty;
import org.cytoscape.property.CyProperty;
import org.cytoscape.property.CyProperty.SavePolicy;
import org.cytoscape.model.NetworkTestSupport;
@@ -118,7 +118,7 @@
private CyLayoutAlgorithmManager getLayouts() {
Properties p = new Properties();
- CyProperty<Properties> props = new
BasicCyProperty(p,CyProperty.SavePolicy.DO_NOT_SAVE);
+ CyProperty<Properties> props = new
SimpleCyProperty(p,CyProperty.SavePolicy.DO_NOT_SAVE);
CyLayoutsImpl cyLayouts = new CyLayoutsImpl(props);
CyLayoutAlgorithm gridNodeLayout = new
GridNodeLayout(mock(UndoSupport.class));
cyLayouts.addLayout(gridNodeLayout,p);
Modified:
core3/impl/trunk/io-impl/impl/src/test/java/org/cytoscape/io/internal/read/AbstractNetworkViewReaderTester.java
===================================================================
---
core3/impl/trunk/io-impl/impl/src/test/java/org/cytoscape/io/internal/read/AbstractNetworkViewReaderTester.java
2011-11-24 00:31:16 UTC (rev 27595)
+++
core3/impl/trunk/io-impl/impl/src/test/java/org/cytoscape/io/internal/read/AbstractNetworkViewReaderTester.java
2011-11-24 00:44:32 UTC (rev 27596)
@@ -17,7 +17,7 @@
import org.cytoscape.model.CyNetworkFactory;
import org.cytoscape.model.CyNode;
import org.cytoscape.model.NetworkTestSupport;
-import org.cytoscape.property.BasicCyProperty;
+import org.cytoscape.property.SimpleCyProperty;
import org.cytoscape.property.CyProperty;
import org.cytoscape.property.CyProperty.SavePolicy;
import org.cytoscape.view.layout.CyLayoutAlgorithm;
@@ -59,7 +59,7 @@
netFactory = nts.getNetworkFactory();
properties = new Properties();
- CyProperty<Properties> cyProperties = new
BasicCyProperty(properties, SavePolicy.DO_NOT_SAVE);
+ CyProperty<Properties> cyProperties = new
SimpleCyProperty(properties, SavePolicy.DO_NOT_SAVE);
NetworkViewTestSupport nvts = new NetworkViewTestSupport();
setViewThreshold(DEF_THRESHOLD);
Modified:
core3/impl/trunk/linkout-impl/src/main/java/org/cytoscape/linkout/internal/CyActivator.java
===================================================================
---
core3/impl/trunk/linkout-impl/src/main/java/org/cytoscape/linkout/internal/CyActivator.java
2011-11-24 00:31:16 UTC (rev 27595)
+++
core3/impl/trunk/linkout-impl/src/main/java/org/cytoscape/linkout/internal/CyActivator.java
2011-11-24 00:44:32 UTC (rev 27596)
@@ -9,7 +9,7 @@
import org.cytoscape.service.util.CyServiceRegistrar;
import org.cytoscape.linkout.internal.LinkOut;
-import org.cytoscape.property.BasicCyProperty;
+import org.cytoscape.property.SimpleCyProperty;
import org.cytoscape.property.CyProperty;
@@ -46,7 +46,7 @@
logger.warn("could not properly load linkout.props",e);
}
- BasicCyProperty linkoutProps = new
BasicCyProperty(linkoutProperties,CyProperty.SavePolicy.CONFIG_DIR);
+ SimpleCyProperty linkoutProps = new
SimpleCyProperty(linkoutProperties,CyProperty.SavePolicy.CONFIG_DIR);
LinkOut linkout = new
LinkOut(linkoutProps,cyServiceRegistrarServiceRef,openBrowserServiceRef,cyApplicationConfigurationServiceRef);
Properties linkoutPropsProps = new Properties();
Modified:
core3/impl/trunk/plugin-impl/src/main/java/org/cytoscape/plugin/internal/CyPluginAdapterImpl.java
===================================================================
---
core3/impl/trunk/plugin-impl/src/main/java/org/cytoscape/plugin/internal/CyPluginAdapterImpl.java
2011-11-24 00:31:16 UTC (rev 27595)
+++
core3/impl/trunk/plugin-impl/src/main/java/org/cytoscape/plugin/internal/CyPluginAdapterImpl.java
2011-11-24 00:44:32 UTC (rev 27596)
@@ -33,7 +33,7 @@
import org.cytoscape.model.subnetwork.CyRootNetworkFactory;
import org.cytoscape.plugin.CyPlugin;
import org.cytoscape.plugin.CyPluginAdapter;
-import org.cytoscape.property.BasicCyProperty;
+import org.cytoscape.property.SimpleCyProperty;
import org.cytoscape.property.CyProperty;
import org.cytoscape.property.bookmark.BookmarksUtil;
import org.cytoscape.property.session.Cysession;
@@ -126,7 +126,7 @@
private AboutToRemoveEdgesEvent aboutToRemoveEdgesEvent;
private RenderingEngineAboutToBeRemovedEvent
renderingEngineAboutToBeRemovedEvent;
private AbstractVisualLexicon abstractVisualLexicon;
- private BasicCyProperty basicCyProperty;
+ private SimpleCyProperty basicCyProperty;
private BookmarksUtil bookmarksUtil;
private Cysession cysession;
private NetworkTaskFactory networkTaskFactory;
Modified:
core3/impl/trunk/swing-application-impl/src/main/java/org/cytoscape/internal/dialogs/PreferencesDialogImpl.java
===================================================================
---
core3/impl/trunk/swing-application-impl/src/main/java/org/cytoscape/internal/dialogs/PreferencesDialogImpl.java
2011-11-24 00:31:16 UTC (rev 27595)
+++
core3/impl/trunk/swing-application-impl/src/main/java/org/cytoscape/internal/dialogs/PreferencesDialogImpl.java
2011-11-24 00:44:32 UTC (rev 27596)
@@ -72,7 +72,7 @@
import org.cytoscape.event.CyEventHelper;
import org.cytoscape.internal.CyOperatingContextImpl;
-import org.cytoscape.property.BasicCyProperty;
+import org.cytoscape.property.SimpleCyProperty;
import org.cytoscape.property.CyProperty;
import org.cytoscape.property.bookmark.Bookmarks;
import org.cytoscape.property.bookmark.BookmarksUtil;
@@ -149,7 +149,7 @@
this.cmbPropCategories.setModel(cmbModel);
- String key = BasicCyProperty.CORE_PROPRERTY_NAME;
+ String key = SimpleCyProperty.CORE_PROPRERTY_NAME;
int index =0;
for (int i=0; i<keys.length; i++){
--
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.