Author: paperwing
Date: 2012-08-15 16:09:56 -0700 (Wed, 15 Aug 2012)
New Revision: 30203
Modified:
core3/impl/trunk/app-impl/src/main/java/org/cytoscape/app/internal/manager/AppManager.java
core3/impl/trunk/app-impl/src/main/java/org/cytoscape/app/internal/ui/InstallFromStorePanel.java
Log:
App store apps now show app name and version above the icon
Modified:
core3/impl/trunk/app-impl/src/main/java/org/cytoscape/app/internal/manager/AppManager.java
===================================================================
---
core3/impl/trunk/app-impl/src/main/java/org/cytoscape/app/internal/manager/AppManager.java
2012-08-15 22:06:58 UTC (rev 30202)
+++
core3/impl/trunk/app-impl/src/main/java/org/cytoscape/app/internal/manager/AppManager.java
2012-08-15 23:09:56 UTC (rev 30203)
@@ -445,74 +445,6 @@
}
}
- /*
- private void setupKarafDeployMonitor(FileAlterationMonitor
fileAlterationMonitor) {
- // Set up the FileAlterationMonitor to install/uninstall bundle
apps when they are moved
- // to the Karaf deploy directory
-
- File karafDeployPath = new File(getKarafDeployDirectory());
-
- FileAlterationObserver karafDeployObserver = new
FileAlterationObserver(
- karafDeployPath, new
SingleLevelFileFilter(karafDeployPath), IOCase.SYSTEM);
-
- karafDeployObserver.addListener(new
FileAlterationListenerAdaptor() {
- @Override
- public void onFileDelete(File file) {
- for (App app : getApps()) {
- if
(app.getAppTemporaryInstallFile().equals(file)) {
- try {
- uninstallApp(app);
- } catch (AppUninstallException
e) {
- logger.warn("Failed to
uninstall app that was removed from Karaf deploy directory: " +
app.getAppName());
- }
- }
- }
- }
-
- @Override
- public void onFileCreate(File file) {
-
- //System.out.println("File found: " + file);
-
- if (checkIfCytoscapeApp(file)) {
- //System.out.println("File was app: " +
file);
- App parsedApp = null;
- try {
- parsedApp =
appParser.parseApp(file);
-
- if (parsedApp instanceof
SimpleAppOld) {
- logger.warn("A simple
app " + file.getName() + " was moved to the "
- +
"framework/deploy directory. It should be installed via the "
- + "app
manager. Installing anyway..");
- }
-
- //System.out.println("App was
parsed: " + file);
-
- installApp(parsedApp);
- //System.out.println("App was
installed: " + file);
-
- } catch (AppParsingException e) {
- logger.error("Failed to parse
app that was moved to Karaf deploy directory: " + file.getName()
- + ". The error
was: " + e.getMessage());
- } catch (AppInstallException e) {
- logger.error("Failed to
register app with app manager: " + file.getName()
- + ". The error
was:" + e.getMessage());
- }
- }
- }
- });
-
- try {
- //karafDeployObserver.initialize();
- } catch (Exception e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
- }
-
- fileAlterationMonitor.addObserver(karafDeployObserver);
- }
- */
-
public CySwingAppAdapter getSwingAppAdapter() {
return swingAppAdapter;
}
Modified:
core3/impl/trunk/app-impl/src/main/java/org/cytoscape/app/internal/ui/InstallFromStorePanel.java
===================================================================
---
core3/impl/trunk/app-impl/src/main/java/org/cytoscape/app/internal/ui/InstallFromStorePanel.java
2012-08-15 22:06:58 UTC (rev 30202)
+++
core3/impl/trunk/app-impl/src/main/java/org/cytoscape/app/internal/ui/InstallFromStorePanel.java
2012-08-15 23:09:56 UTC (rev 30203)
@@ -642,25 +642,36 @@
String text = "";
- text += "<html> <head> </head> <body hspace=\"6\"
vspace=\"6\">";
+ // text += "<html> <head> </head> <body hspace=\"4\"
vspace=\"4\">";
+ text += "<html> <body hspace=\"4\" vspace=\"2\">";
+
// App hyperlink to web store page
// text += "<p style=\"margin-top: 0\"> <a href=\"" +
selectedApp.getPageUrl() + "\">" + selectedApp.getPageUrl() + "</a> </p>";
+ // App name, version
+ text += "<b>" + selectedApp.getFullName() + "</b>";
+ text += "<br />" +
selectedApp.getReleases().get(selectedApp.getReleases().size() -
1).getReleaseVersion();
+ /*
+ text += "<p>";
+ text += "<b>" + selectedApp.getFullName() + "</b>";
+ text += "<br />" +
selectedApp.getReleases().get(selectedApp.getReleases().size() -
1).getReleaseVersion();
+ text += "</p>";
+ */
+ text += "<p>";
+
// App image
text += "<img border=\"0\" ";
text += "src=\"" +
appManager.getWebQuerier().getDefaultAppStoreUrl()
+ selectedApp.getIconUrl() + "\" alt=\"" +
selectedApp.getFullName() + "\"/>";
- // App name, version
- text += "<p>";
- text += "<b>" + selectedApp.getFullName() + "</b>";
- text += " " +
selectedApp.getReleases().get(selectedApp.getReleases().size() -
1).getReleaseVersion();
text += "</p>";
// App description
- text += "<p>" +
(String.valueOf(selectedApp.getDescription()).equalsIgnoreCase("null") ? "App
description not found." : selectedApp.getDescription()) + "</p>";
+ text += "<p>";
+ text +=
(String.valueOf(selectedApp.getDescription()).equalsIgnoreCase("null") ? "App
description not found." : selectedApp.getDescription());
+ text += "</p>";
text += "</body> </html>";
descriptionTextPane.setText(text);
--
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.