jruby-activemq 5.5.1-java

Sign up to get free protection for your applications and to get access to all the features.
Files changed (302) hide show
  1. data/History.md +6 -0
  2. data/LICENSE +619 -0
  3. data/README.md +15 -0
  4. data/Rakefile +34 -0
  5. data/apache-activemq-5.5.1/LICENSE +619 -0
  6. data/apache-activemq-5.5.1/NOTICE +85 -0
  7. data/apache-activemq-5.5.1/README.txt +63 -0
  8. data/apache-activemq-5.5.1/WebConsole-README.txt +42 -0
  9. data/apache-activemq-5.5.1/activemq-all-5.5.1.jar +0 -0
  10. data/apache-activemq-5.5.1/bin/activemq +653 -0
  11. data/apache-activemq-5.5.1/bin/activemq-admin +155 -0
  12. data/apache-activemq-5.5.1/bin/linux-x86-32/activemq +543 -0
  13. data/apache-activemq-5.5.1/bin/linux-x86-32/libwrapper.so +0 -0
  14. data/apache-activemq-5.5.1/bin/linux-x86-32/wrapper +0 -0
  15. data/apache-activemq-5.5.1/bin/linux-x86-32/wrapper.conf +139 -0
  16. data/apache-activemq-5.5.1/bin/linux-x86-64/activemq +543 -0
  17. data/apache-activemq-5.5.1/bin/linux-x86-64/libwrapper.so +0 -0
  18. data/apache-activemq-5.5.1/bin/linux-x86-64/wrapper +0 -0
  19. data/apache-activemq-5.5.1/bin/linux-x86-64/wrapper.conf +139 -0
  20. data/apache-activemq-5.5.1/bin/macosx/activemq +537 -0
  21. data/apache-activemq-5.5.1/bin/macosx/libwrapper.jnilib +0 -0
  22. data/apache-activemq-5.5.1/bin/macosx/wrapper +0 -0
  23. data/apache-activemq-5.5.1/bin/macosx/wrapper.conf +139 -0
  24. data/apache-activemq-5.5.1/bin/run.jar +0 -0
  25. data/apache-activemq-5.5.1/bin/wrapper.jar +0 -0
  26. data/apache-activemq-5.5.1/conf/activemq-command.xml +52 -0
  27. data/apache-activemq-5.5.1/conf/activemq-demo.xml +289 -0
  28. data/apache-activemq-5.5.1/conf/activemq-dynamic-network-broker1.xml +108 -0
  29. data/apache-activemq-5.5.1/conf/activemq-dynamic-network-broker2.xml +109 -0
  30. data/apache-activemq-5.5.1/conf/activemq-jdbc.xml +98 -0
  31. data/apache-activemq-5.5.1/conf/activemq-scalability.xml +77 -0
  32. data/apache-activemq-5.5.1/conf/activemq-security.xml +132 -0
  33. data/apache-activemq-5.5.1/conf/activemq-specjms.xml +118 -0
  34. data/apache-activemq-5.5.1/conf/activemq-static-network-broker1.xml +100 -0
  35. data/apache-activemq-5.5.1/conf/activemq-static-network-broker2.xml +100 -0
  36. data/apache-activemq-5.5.1/conf/activemq-stomp.xml +133 -0
  37. data/apache-activemq-5.5.1/conf/activemq-throughput.xml +82 -0
  38. data/apache-activemq-5.5.1/conf/activemq.xml +136 -0
  39. data/apache-activemq-5.5.1/conf/broker-localhost.cert +0 -0
  40. data/apache-activemq-5.5.1/conf/broker.ks +0 -0
  41. data/apache-activemq-5.5.1/conf/broker.ts +0 -0
  42. data/apache-activemq-5.5.1/conf/camel.xml +66 -0
  43. data/apache-activemq-5.5.1/conf/client.ks +0 -0
  44. data/apache-activemq-5.5.1/conf/client.ts +0 -0
  45. data/apache-activemq-5.5.1/conf/credentials-enc.properties +22 -0
  46. data/apache-activemq-5.5.1/conf/credentials.properties +22 -0
  47. data/apache-activemq-5.5.1/conf/jetty-realm.properties +20 -0
  48. data/apache-activemq-5.5.1/conf/jetty.xml +112 -0
  49. data/apache-activemq-5.5.1/conf/jmx.access +18 -0
  50. data/apache-activemq-5.5.1/conf/jmx.password +18 -0
  51. data/apache-activemq-5.5.1/conf/log4j.properties +75 -0
  52. data/apache-activemq-5.5.1/conf/logging.properties +25 -0
  53. data/apache-activemq-5.5.1/data/activemq.log +0 -0
  54. data/apache-activemq-5.5.1/docs/index.html +22 -0
  55. data/apache-activemq-5.5.1/example/build.xml +317 -0
  56. data/apache-activemq-5.5.1/example/conf/activemq.xml +41 -0
  57. data/apache-activemq-5.5.1/example/conf/log4j.properties +39 -0
  58. data/apache-activemq-5.5.1/example/conf/resin-web.xml +35 -0
  59. data/apache-activemq-5.5.1/example/conf/web.xml +40 -0
  60. data/apache-activemq-5.5.1/example/perfharness/perfharness-activemq.sh +49 -0
  61. data/apache-activemq-5.5.1/example/ruby/README.txt +27 -0
  62. data/apache-activemq-5.5.1/example/ruby/catstomp.rb +49 -0
  63. data/apache-activemq-5.5.1/example/ruby/listener.rb +51 -0
  64. data/apache-activemq-5.5.1/example/ruby/publisher.rb +67 -0
  65. data/apache-activemq-5.5.1/example/ruby/stompcat.rb +50 -0
  66. data/apache-activemq-5.5.1/example/src/CommandLineSupport.java +120 -0
  67. data/apache-activemq-5.5.1/example/src/ConsumerTool.java +353 -0
  68. data/apache-activemq-5.5.1/example/src/EmbeddedBroker.java +41 -0
  69. data/apache-activemq-5.5.1/example/src/Log4jJMSAppenderExample.java +70 -0
  70. data/apache-activemq-5.5.1/example/src/ProducerAndConsumerTool.java +51 -0
  71. data/apache-activemq-5.5.1/example/src/ProducerTool.java +247 -0
  72. data/apache-activemq-5.5.1/example/src/RequesterTool.java +257 -0
  73. data/apache-activemq-5.5.1/example/src/StompExample.java +59 -0
  74. data/apache-activemq-5.5.1/example/src/TopicListener.java +118 -0
  75. data/apache-activemq-5.5.1/example/src/TopicPublisher.java +205 -0
  76. data/apache-activemq-5.5.1/example/src/jndi.properties +17 -0
  77. data/apache-activemq-5.5.1/example/src/log4j-jms.properties +31 -0
  78. data/apache-activemq-5.5.1/example/transactions/README.txt +40 -0
  79. data/apache-activemq-5.5.1/example/transactions/build.xml +113 -0
  80. data/apache-activemq-5.5.1/example/transactions/src/Retailer.java +107 -0
  81. data/apache-activemq-5.5.1/example/transactions/src/Supplier.java +135 -0
  82. data/apache-activemq-5.5.1/example/transactions/src/TransactionsDemo.java +47 -0
  83. data/apache-activemq-5.5.1/example/transactions/src/Vendor.java +302 -0
  84. data/apache-activemq-5.5.1/lib/a.sh +3 -0
  85. data/apache-activemq-5.5.1/lib/activation-1.1.jar +0 -0
  86. data/apache-activemq-5.5.1/lib/activemq-camel-5.5.1.jar +0 -0
  87. data/apache-activemq-5.5.1/lib/activemq-console-5.5.1.jar +0 -0
  88. data/apache-activemq-5.5.1/lib/activemq-core-5.5.1.jar +0 -0
  89. data/apache-activemq-5.5.1/lib/activemq-jaas-5.5.1.jar +0 -0
  90. data/apache-activemq-5.5.1/lib/activemq-protobuf-1.1.jar +0 -0
  91. data/apache-activemq-5.5.1/lib/activemq-rar.txt +20 -0
  92. data/apache-activemq-5.5.1/lib/activemq-web-5.5.1.jar +0 -0
  93. data/apache-activemq-5.5.1/lib/camel-core-2.7.0.jar +0 -0
  94. data/apache-activemq-5.5.1/lib/camel-jetty-2.7.0.jar +0 -0
  95. data/apache-activemq-5.5.1/lib/camel-jms-2.7.0.jar +0 -0
  96. data/apache-activemq-5.5.1/lib/camel-spring-2.7.0.jar +0 -0
  97. data/apache-activemq-5.5.1/lib/geronimo-j2ee-management_1.1_spec-1.0.1.jar +0 -0
  98. data/apache-activemq-5.5.1/lib/geronimo-jms_1.1_spec-1.1.1.jar +0 -0
  99. data/apache-activemq-5.5.1/lib/geronimo-jta_1.0.1B_spec-1.0.1.jar +0 -0
  100. data/apache-activemq-5.5.1/lib/jaxb-api-2.1.jar +0 -0
  101. data/apache-activemq-5.5.1/lib/jaxb-impl-2.1.6.jar +0 -0
  102. data/apache-activemq-5.5.1/lib/jcl-over-slf4j-1.5.11.jar +0 -0
  103. data/apache-activemq-5.5.1/lib/kahadb-5.5.1.jar +0 -0
  104. data/apache-activemq-5.5.1/lib/optional/activeio-core-3.1.2.jar +0 -0
  105. data/apache-activemq-5.5.1/lib/optional/activemq-jmdns_1.0-5.5.1.jar +0 -0
  106. data/apache-activemq-5.5.1/lib/optional/activemq-optional-5.5.1.jar +0 -0
  107. data/apache-activemq-5.5.1/lib/optional/activemq-pool-5.5.1.jar +0 -0
  108. data/apache-activemq-5.5.1/lib/optional/activemq-spring-5.5.1.jar +0 -0
  109. data/apache-activemq-5.5.1/lib/optional/activemq-xmpp-5.5.1.jar +0 -0
  110. data/apache-activemq-5.5.1/lib/optional/commons-beanutils-1.6.1.jar +0 -0
  111. data/apache-activemq-5.5.1/lib/optional/commons-codec-1.2.jar +0 -0
  112. data/apache-activemq-5.5.1/lib/optional/commons-collections-3.2.1.jar +0 -0
  113. data/apache-activemq-5.5.1/lib/optional/commons-dbcp-1.2.2.jar +0 -0
  114. data/apache-activemq-5.5.1/lib/optional/commons-httpclient-3.1.jar +0 -0
  115. data/apache-activemq-5.5.1/lib/optional/commons-lang-2.4.jar +0 -0
  116. data/apache-activemq-5.5.1/lib/optional/commons-net-2.0.jar +0 -0
  117. data/apache-activemq-5.5.1/lib/optional/commons-pool-1.5.4.jar +0 -0
  118. data/apache-activemq-5.5.1/lib/optional/geronimo-j2ee-connector_1.5_spec-2.0.0.jar +0 -0
  119. data/apache-activemq-5.5.1/lib/optional/jasypt-1.7.jar +0 -0
  120. data/apache-activemq-5.5.1/lib/optional/jettison-1.2.jar +0 -0
  121. data/apache-activemq-5.5.1/lib/optional/josql-1.5.jar +0 -0
  122. data/apache-activemq-5.5.1/lib/optional/log4j-1.2.14.jar +0 -0
  123. data/apache-activemq-5.5.1/lib/optional/slf4j-log4j12-1.5.11.jar +0 -0
  124. data/apache-activemq-5.5.1/lib/optional/spring-aop-3.0.3.RELEASE.jar +0 -0
  125. data/apache-activemq-5.5.1/lib/optional/spring-asm-3.0.3.RELEASE.jar +0 -0
  126. data/apache-activemq-5.5.1/lib/optional/spring-beans-3.0.3.RELEASE.jar +0 -0
  127. data/apache-activemq-5.5.1/lib/optional/spring-context-3.0.3.RELEASE.jar +0 -0
  128. data/apache-activemq-5.5.1/lib/optional/spring-core-3.0.3.RELEASE.jar +0 -0
  129. data/apache-activemq-5.5.1/lib/optional/spring-expression-3.0.3.RELEASE.jar +0 -0
  130. data/apache-activemq-5.5.1/lib/optional/spring-jms-3.0.3.RELEASE.jar +0 -0
  131. data/apache-activemq-5.5.1/lib/optional/spring-oxm-tiger-1.5.8.jar +0 -0
  132. data/apache-activemq-5.5.1/lib/optional/spring-tx-3.0.3.RELEASE.jar +0 -0
  133. data/apache-activemq-5.5.1/lib/optional/stax2-api-3.0.1.jar +0 -0
  134. data/apache-activemq-5.5.1/lib/optional/velocity-1.6.2.jar +0 -0
  135. data/apache-activemq-5.5.1/lib/optional/woodstox-core-asl-4.0.7.jar +0 -0
  136. data/apache-activemq-5.5.1/lib/optional/xbean-spring-3.7.jar +0 -0
  137. data/apache-activemq-5.5.1/lib/optional/xpp3-1.1.4c.jar +0 -0
  138. data/apache-activemq-5.5.1/lib/optional/xstream-1.3.1.jar +0 -0
  139. data/apache-activemq-5.5.1/lib/slf4j-api-1.5.11.jar +0 -0
  140. data/apache-activemq-5.5.1/lib/stax-1.2.0.jar +0 -0
  141. data/apache-activemq-5.5.1/lib/stax-api-1.0.1.jar +0 -0
  142. data/apache-activemq-5.5.1/lib/web/commons-management-1.0.jar +0 -0
  143. data/apache-activemq-5.5.1/lib/web/core-3.1.1.jar +0 -0
  144. data/apache-activemq-5.5.1/lib/web/geronimo-servlet_2.5_spec-1.2.jar +0 -0
  145. data/apache-activemq-5.5.1/lib/web/jdom-1.0.jar +0 -0
  146. data/apache-activemq-5.5.1/lib/web/jetty-all-server-7.1.6.v20100715.jar +0 -0
  147. data/apache-activemq-5.5.1/lib/web/jetty-websocket-7.1.6.v20100715.jar +0 -0
  148. data/apache-activemq-5.5.1/lib/web/jsp-2.1-glassfish-2.1.v20100127.jar +0 -0
  149. data/apache-activemq-5.5.1/lib/web/jsp-api-2.1-glassfish-2.1.v20100127.jar +0 -0
  150. data/apache-activemq-5.5.1/lib/web/rome-0.8.jar +0 -0
  151. data/apache-activemq-5.5.1/lib/web/sitemesh-2.2.1.jar +0 -0
  152. data/apache-activemq-5.5.1/lib/web/spring-web-3.0.3.RELEASE.jar +0 -0
  153. data/apache-activemq-5.5.1/lib/web/spring-webmvc-3.0.3.RELEASE.jar +0 -0
  154. data/apache-activemq-5.5.1/user-guide.html +119 -0
  155. data/apache-activemq-5.5.1/webapps/admin/404.html +137 -0
  156. data/apache-activemq-5.5.1/webapps/admin/500.html +138 -0
  157. data/apache-activemq-5.5.1/webapps/admin/META-INF/LICENSE +1026 -0
  158. data/apache-activemq-5.5.1/webapps/admin/META-INF/NOTICE +107 -0
  159. data/apache-activemq-5.5.1/webapps/admin/WEB-INF/classes/org/apache/activemq/web/WebConsoleStarter.class +0 -0
  160. data/apache-activemq-5.5.1/webapps/admin/WEB-INF/classes/org/apache/activemq/web/controller/CopyMessage.class +0 -0
  161. data/apache-activemq-5.5.1/webapps/admin/WEB-INF/classes/org/apache/activemq/web/controller/CreateDestination.class +0 -0
  162. data/apache-activemq-5.5.1/webapps/admin/WEB-INF/classes/org/apache/activemq/web/controller/CreateSubscriber.class +0 -0
  163. data/apache-activemq-5.5.1/webapps/admin/WEB-INF/classes/org/apache/activemq/web/controller/DeleteDestination.class +0 -0
  164. data/apache-activemq-5.5.1/webapps/admin/WEB-INF/classes/org/apache/activemq/web/controller/DeleteJob.class +0 -0
  165. data/apache-activemq-5.5.1/webapps/admin/WEB-INF/classes/org/apache/activemq/web/controller/DeleteMessage.class +0 -0
  166. data/apache-activemq-5.5.1/webapps/admin/WEB-INF/classes/org/apache/activemq/web/controller/DeleteSubscriber.class +0 -0
  167. data/apache-activemq-5.5.1/webapps/admin/WEB-INF/classes/org/apache/activemq/web/controller/MoveMessage.class +0 -0
  168. data/apache-activemq-5.5.1/webapps/admin/WEB-INF/classes/org/apache/activemq/web/controller/PurgeDestination.class +0 -0
  169. data/apache-activemq-5.5.1/webapps/admin/WEB-INF/classes/org/apache/activemq/web/controller/SendMessage.class +0 -0
  170. data/apache-activemq-5.5.1/webapps/admin/WEB-INF/classes/org/apache/activemq/web/filter/ApplicationContextFilter$1.class +0 -0
  171. data/apache-activemq-5.5.1/webapps/admin/WEB-INF/classes/org/apache/activemq/web/filter/ApplicationContextFilter$2.class +0 -0
  172. data/apache-activemq-5.5.1/webapps/admin/WEB-INF/classes/org/apache/activemq/web/filter/ApplicationContextFilter.class +0 -0
  173. data/apache-activemq-5.5.1/webapps/admin/WEB-INF/classes/org/apache/activemq/web/handler/BindingBeanNameUrlHandlerMapping.class +0 -0
  174. data/apache-activemq-5.5.1/webapps/admin/WEB-INF/decorators.xml +30 -0
  175. data/apache-activemq-5.5.1/webapps/admin/WEB-INF/dispatcher-servlet.xml +62 -0
  176. data/apache-activemq-5.5.1/webapps/admin/WEB-INF/jspf/headertags.jspf +21 -0
  177. data/apache-activemq-5.5.1/webapps/admin/WEB-INF/jspf/old.jspf +21 -0
  178. data/apache-activemq-5.5.1/webapps/admin/WEB-INF/tags/form/checkbox.tag +18 -0
  179. data/apache-activemq-5.5.1/webapps/admin/WEB-INF/tags/form/forEachMapEntry.tag +29 -0
  180. data/apache-activemq-5.5.1/webapps/admin/WEB-INF/tags/form/option.tag +20 -0
  181. data/apache-activemq-5.5.1/webapps/admin/WEB-INF/tags/form/short.tag +29 -0
  182. data/apache-activemq-5.5.1/webapps/admin/WEB-INF/tags/form/text.tag +30 -0
  183. data/apache-activemq-5.5.1/webapps/admin/WEB-INF/tags/form/tooltip.tag +29 -0
  184. data/apache-activemq-5.5.1/webapps/admin/WEB-INF/tags/form/uri.tag +18 -0
  185. data/apache-activemq-5.5.1/webapps/admin/WEB-INF/tags/jms/forEachConnection.tag +35 -0
  186. data/apache-activemq-5.5.1/webapps/admin/WEB-INF/tags/jms/forEachMessage.tag +34 -0
  187. data/apache-activemq-5.5.1/webapps/admin/WEB-INF/tags/jms/formatTimestamp.tag +29 -0
  188. data/apache-activemq-5.5.1/webapps/admin/WEB-INF/tags/jms/persistent.tag +27 -0
  189. data/apache-activemq-5.5.1/webapps/admin/WEB-INF/web.xml +187 -0
  190. data/apache-activemq-5.5.1/webapps/admin/WEB-INF/webconsole-default.xml +26 -0
  191. data/apache-activemq-5.5.1/webapps/admin/WEB-INF/webconsole-embedded.xml +45 -0
  192. data/apache-activemq-5.5.1/webapps/admin/WEB-INF/webconsole-invm.xml +41 -0
  193. data/apache-activemq-5.5.1/webapps/admin/WEB-INF/webconsole-jndi.xml +39 -0
  194. data/apache-activemq-5.5.1/webapps/admin/WEB-INF/webconsole-properties.xml +39 -0
  195. data/apache-activemq-5.5.1/webapps/admin/WEB-INF/webconsole-query.xml +25 -0
  196. data/apache-activemq-5.5.1/webapps/admin/browse.jsp +64 -0
  197. data/apache-activemq-5.5.1/webapps/admin/connection.jsp +138 -0
  198. data/apache-activemq-5.5.1/webapps/admin/connections.jsp +85 -0
  199. data/apache-activemq-5.5.1/webapps/admin/decorators/main.jsp +165 -0
  200. data/apache-activemq-5.5.1/webapps/admin/decorators/panel.jsp +31 -0
  201. data/apache-activemq-5.5.1/webapps/admin/decorators/printable.jsp +31 -0
  202. data/apache-activemq-5.5.1/webapps/admin/graph.jsp +67 -0
  203. data/apache-activemq-5.5.1/webapps/admin/images/activemq-logo.png +0 -0
  204. data/apache-activemq-5.5.1/webapps/admin/images/asf-logo.png +0 -0
  205. data/apache-activemq-5.5.1/webapps/admin/images/big-bullet.png +0 -0
  206. data/apache-activemq-5.5.1/webapps/admin/images/black-footer-bottom.png +0 -0
  207. data/apache-activemq-5.5.1/webapps/admin/images/black-footer-left.png +0 -0
  208. data/apache-activemq-5.5.1/webapps/admin/images/black-footer-right.png +0 -0
  209. data/apache-activemq-5.5.1/webapps/admin/images/bottom-red-bar.png +0 -0
  210. data/apache-activemq-5.5.1/webapps/admin/images/checker-bg.png +0 -0
  211. data/apache-activemq-5.5.1/webapps/admin/images/content-left.png +0 -0
  212. data/apache-activemq-5.5.1/webapps/admin/images/content-right.png +0 -0
  213. data/apache-activemq-5.5.1/webapps/admin/images/feed_atom.png +0 -0
  214. data/apache-activemq-5.5.1/webapps/admin/images/feed_rss.png +0 -0
  215. data/apache-activemq-5.5.1/webapps/admin/images/left-box-bottom.png +0 -0
  216. data/apache-activemq-5.5.1/webapps/admin/images/left-box-right.png +0 -0
  217. data/apache-activemq-5.5.1/webapps/admin/images/left-box-top.png +0 -0
  218. data/apache-activemq-5.5.1/webapps/admin/images/oval-arrow.png +0 -0
  219. data/apache-activemq-5.5.1/webapps/admin/images/right-box-bottom.png +0 -0
  220. data/apache-activemq-5.5.1/webapps/admin/images/right-box-left.png +0 -0
  221. data/apache-activemq-5.5.1/webapps/admin/images/right-box-top.png +0 -0
  222. data/apache-activemq-5.5.1/webapps/admin/images/small-bullet-gray.png +0 -0
  223. data/apache-activemq-5.5.1/webapps/admin/images/small-bullet-red.png +0 -0
  224. data/apache-activemq-5.5.1/webapps/admin/images/spacer.gif +0 -0
  225. data/apache-activemq-5.5.1/webapps/admin/images/top-red-bar.png +0 -0
  226. data/apache-activemq-5.5.1/webapps/admin/images/white-header-left.png +0 -0
  227. data/apache-activemq-5.5.1/webapps/admin/images/white-header-right.png +0 -0
  228. data/apache-activemq-5.5.1/webapps/admin/images/white-header-top.png +0 -0
  229. data/apache-activemq-5.5.1/webapps/admin/index.jsp +65 -0
  230. data/apache-activemq-5.5.1/webapps/admin/js/common.js +121 -0
  231. data/apache-activemq-5.5.1/webapps/admin/js/css.js +145 -0
  232. data/apache-activemq-5.5.1/webapps/admin/js/mochi/MochiKit.js +4804 -0
  233. data/apache-activemq-5.5.1/webapps/admin/js/mochi/__package__.js +14 -0
  234. data/apache-activemq-5.5.1/webapps/admin/js/plotkit/Base.js +332 -0
  235. data/apache-activemq-5.5.1/webapps/admin/js/plotkit/Canvas.js +707 -0
  236. data/apache-activemq-5.5.1/webapps/admin/js/plotkit/Layout.js +588 -0
  237. data/apache-activemq-5.5.1/webapps/admin/js/plotkit/SVG.js +677 -0
  238. data/apache-activemq-5.5.1/webapps/admin/js/plotkit/SweetCanvas.js +281 -0
  239. data/apache-activemq-5.5.1/webapps/admin/js/plotkit/SweetSVG.js +196 -0
  240. data/apache-activemq-5.5.1/webapps/admin/js/plotkit/dummy.svg +15 -0
  241. data/apache-activemq-5.5.1/webapps/admin/js/plotkit/iecanvas.htc +389 -0
  242. data/apache-activemq-5.5.1/webapps/admin/js/prettify.js +1424 -0
  243. data/apache-activemq-5.5.1/webapps/admin/js/standardista-table-sorting.js +434 -0
  244. data/apache-activemq-5.5.1/webapps/admin/message.jsp +185 -0
  245. data/apache-activemq-5.5.1/webapps/admin/network.jsp +52 -0
  246. data/apache-activemq-5.5.1/webapps/admin/queueConsumers.jsp +79 -0
  247. data/apache-activemq-5.5.1/webapps/admin/queueGraph.jsp +68 -0
  248. data/apache-activemq-5.5.1/webapps/admin/queues.jsp +78 -0
  249. data/apache-activemq-5.5.1/webapps/admin/scheduled.jsp +67 -0
  250. data/apache-activemq-5.5.1/webapps/admin/send.jsp +173 -0
  251. data/apache-activemq-5.5.1/webapps/admin/styles/prettify.css +44 -0
  252. data/apache-activemq-5.5.1/webapps/admin/styles/site.css +206 -0
  253. data/apache-activemq-5.5.1/webapps/admin/styles/sorttable.css +70 -0
  254. data/apache-activemq-5.5.1/webapps/admin/styles/type-settings.css +177 -0
  255. data/apache-activemq-5.5.1/webapps/admin/subscribers.jsp +158 -0
  256. data/apache-activemq-5.5.1/webapps/admin/test/dummy.jsp +52 -0
  257. data/apache-activemq-5.5.1/webapps/admin/test/index.jsp +84 -0
  258. data/apache-activemq-5.5.1/webapps/admin/test/systemProperties.jsp +53 -0
  259. data/apache-activemq-5.5.1/webapps/admin/topics.jsp +66 -0
  260. data/apache-activemq-5.5.1/webapps/admin/xml/queues.jsp +34 -0
  261. data/apache-activemq-5.5.1/webapps/admin/xml/topics.jsp +29 -0
  262. data/apache-activemq-5.5.1/webapps/demo/META-INF/LICENSE +494 -0
  263. data/apache-activemq-5.5.1/webapps/demo/META-INF/NOTICE +82 -0
  264. data/apache-activemq-5.5.1/webapps/demo/WEB-INF/web.xml +111 -0
  265. data/apache-activemq-5.5.1/webapps/demo/chat.css +76 -0
  266. data/apache-activemq-5.5.1/webapps/demo/chat.html +219 -0
  267. data/apache-activemq-5.5.1/webapps/demo/index.html +181 -0
  268. data/apache-activemq-5.5.1/webapps/demo/js/amq.js +307 -0
  269. data/apache-activemq-5.5.1/webapps/demo/js/amq_dojo_adapter.js +84 -0
  270. data/apache-activemq-5.5.1/webapps/demo/js/amq_jquery_adapter.js +88 -0
  271. data/apache-activemq-5.5.1/webapps/demo/js/amq_prototype_adapter.js +84 -0
  272. data/apache-activemq-5.5.1/webapps/demo/js/chat.js +209 -0
  273. data/apache-activemq-5.5.1/webapps/demo/js/dojo.js +16 -0
  274. data/apache-activemq-5.5.1/webapps/demo/js/jquery-1.4.2.min.js +154 -0
  275. data/apache-activemq-5.5.1/webapps/demo/js/prototype.js +4874 -0
  276. data/apache-activemq-5.5.1/webapps/demo/portfolio/portfolio.html +87 -0
  277. data/apache-activemq-5.5.1/webapps/demo/portfolio/portfolio.js +91 -0
  278. data/apache-activemq-5.5.1/webapps/demo/sandbox/index.html +31 -0
  279. data/apache-activemq-5.5.1/webapps/demo/sandbox/portfolio.html +93 -0
  280. data/apache-activemq-5.5.1/webapps/demo/sandbox/portfolio.js +49 -0
  281. data/apache-activemq-5.5.1/webapps/demo/sandbox/util.js +52 -0
  282. data/apache-activemq-5.5.1/webapps/demo/sandbox/webmq.js +149 -0
  283. data/apache-activemq-5.5.1/webapps/demo/send.html +51 -0
  284. data/apache-activemq-5.5.1/webapps/demo/style.css +440 -0
  285. data/apache-activemq-5.5.1/webapps/demo/test/amq_test.html +311 -0
  286. data/apache-activemq-5.5.1/webapps/demo/test/assets/README +4 -0
  287. data/apache-activemq-5.5.1/webapps/demo/test/assets/jsunittest.js +1017 -0
  288. data/apache-activemq-5.5.1/webapps/demo/test/assets/unittest.css +54 -0
  289. data/apache-activemq-5.5.1/webapps/favicon.ico +0 -0
  290. data/apache-activemq-5.5.1/webapps/fileserver/META-INF/LICENSE +203 -0
  291. data/apache-activemq-5.5.1/webapps/fileserver/META-INF/NOTICE +5 -0
  292. data/apache-activemq-5.5.1/webapps/fileserver/WEB-INF/classes/org/apache/activemq/util/FilenameGuardFilter$GuardedHttpServletRequest.class +0 -0
  293. data/apache-activemq-5.5.1/webapps/fileserver/WEB-INF/classes/org/apache/activemq/util/FilenameGuardFilter.class +0 -0
  294. data/apache-activemq-5.5.1/webapps/fileserver/WEB-INF/classes/org/apache/activemq/util/IOHelper.class +0 -0
  295. data/apache-activemq-5.5.1/webapps/fileserver/WEB-INF/classes/org/apache/activemq/util/RestFilter.class +0 -0
  296. data/apache-activemq-5.5.1/webapps/fileserver/WEB-INF/web.xml +56 -0
  297. data/apache-activemq-5.5.1/webapps/fileserver/index.html +30 -0
  298. data/apache-activemq-5.5.1/webapps/index.html +145 -0
  299. data/apache-activemq-5.5.1/webapps/styles/site.css +206 -0
  300. data/apache-activemq-5.5.1/webapps/styles/type-settings.css +177 -0
  301. data/lib/activemq.rb +11 -0
  302. metadata +382 -0
@@ -0,0 +1,14 @@
1
+ /***
2
+
3
+ MochiKit.MochiKit 1.3 : PACKED VERSION
4
+
5
+ THIS FILE IS AUTOMATICALLY GENERATED. If creating patches, please
6
+ diff against the source tree, not this file.
7
+
8
+ See <http://mochikit.com/> for documentation, downloads, license, etc.
9
+
10
+ (c) 2005 Bob Ippolito. All rights Reserved.
11
+
12
+ ***/
13
+ dojo.hostenv.conditionalLoadModule({"common": ["MochiKit.MochiKit"]});
14
+ dojo.hostenv.moduleLoaded("MochiKit.*");
@@ -0,0 +1,332 @@
1
+ /*
2
+ PlotKit
3
+ =======
4
+ PlotKit is a collection of Javascript classes that allows
5
+ you to quickly visualise data using different types of charts.
6
+
7
+ For license/info/documentation: http://www.liquidx.net/plotkit/
8
+
9
+ Copyright
10
+ ---------
11
+ Copyright 2005,2006 (c) Alastair Tse <alastair^liquidx.net>
12
+ For use under the BSD license. <http://www.liquidx.net/plotkit>
13
+ */
14
+
15
+ // --------------------------------------------------------------------
16
+ // Check required components
17
+ // --------------------------------------------------------------------
18
+
19
+ try {
20
+ if (typeof(MochiKit.Base) == 'undefined' ||
21
+ typeof(MochiKit.DOM) == 'undefined' ||
22
+ typeof(MochiKit.Color) == 'undefined' ||
23
+ typeof(MochiKit.Format) == 'undefined')
24
+ {
25
+ throw "";
26
+ }
27
+ }
28
+ catch (e) {
29
+ throw "PlotKit depends on MochiKit.{Base,Color,DOM,Format}"
30
+ }
31
+
32
+ // -------------------------------------------------------------------
33
+ // Inject Common Shortcuts we use into MochiKit.Color.Color
34
+ // -------------------------------------------------------------------
35
+
36
+ MochiKit.Base.update(MochiKit.Color.Color.prototype, {
37
+ asFillColor: function() {
38
+ return this.lighterColorWithLevel(0.3);
39
+ },
40
+
41
+ asStrokeColor: function() {
42
+ return this.darkerColorWithLevel(0.1);
43
+ },
44
+
45
+ asPointColor: function() {
46
+ return this.lighterColorWithLevel(0.1);
47
+ }
48
+ });
49
+
50
+
51
+ // -------------------------------------------------------------------
52
+ // Define our own PlotKit namespace
53
+ // -------------------------------------------------------------------
54
+
55
+ if (typeof(PlotKit) == 'undefined') {
56
+ PlotKit = {};
57
+ }
58
+
59
+ PlotKit.NAME = "PlotKit";
60
+ PlotKit.VERSION = "0.8";
61
+ PlotKit.__repr__ = function() {
62
+ return "[" + this.NAME + " " + this.VERSION + "]";
63
+ };
64
+
65
+ PlotKit.toString = function() {
66
+ return this.__repr__();
67
+ }
68
+
69
+ // -------------------------------------------------------------------
70
+ // Encapsulate all our utility function into it's own namespace.
71
+ // -------------------------------------------------------------------
72
+
73
+ if (typeof(PlotKit.Base) == 'undefined') {
74
+ PlotKit.Base = {};
75
+ }
76
+
77
+ PlotKit.Base.NAME = 'PlotKit.Base';
78
+ PlotKit.Base.VERSION = PlotKit.VERSION;
79
+
80
+ PlotKit.Base.__repr__ = function() {
81
+ return "[" + this.NAME + " " + this.VERSION + "]";
82
+ };
83
+
84
+ PlotKit.Base.toString = function() {
85
+ return this.__repr__();
86
+ }
87
+
88
+ MochiKit.Base.update(PlotKit.Base, {
89
+ roundInterval: function(range, intervals, precision) {
90
+ // We want to make the interval look regular,
91
+ var trunc = MochiKit.Format.roundToFixed;
92
+ var sep = range/intervals;
93
+ return parseFloat(trunc(sep, precision));
94
+ },
95
+
96
+ collapse: function(lst) {
97
+ var m = MochiKit.Base;
98
+ var biggerList = new Array();
99
+ for (var i = 0; i < lst.length; i++) {
100
+ biggerList = m.concat(biggerList, lst[i]);
101
+ }
102
+ return biggerList;
103
+ },
104
+
105
+ uniq: function(sortedList) {
106
+ // get unique elements in list, exactly the same as unix shell's uniq.
107
+ var m = MochiKit.Base;
108
+
109
+ if (!m.isArrayLike(sortedList) || (sortedList.length < 1))
110
+ return new Array();
111
+
112
+ var uniq = new Array();
113
+ var lastElem = sortedList[0];
114
+ uniq.push(sortedList[0]);
115
+ for (var i = 1; i < sortedList.length; i++) {
116
+ if (m.compare(sortedList[i], lastElem) != 0) {
117
+ lastElem = sortedList[i];
118
+ uniq.push(sortedList[i]);
119
+ }
120
+ }
121
+ return uniq;
122
+ },
123
+
124
+ colorScheme: function() {
125
+ var mb = MochiKit.Base;
126
+ var mc = MochiKit.Color
127
+ var scheme = ["red", "orange", "yellow", "green", "cyan", "blue", "purple", "magenta"];
128
+
129
+ var makeColor = function(name) {
130
+ return mc.Color[name + "Color"]()
131
+ };
132
+
133
+ return mb.map(makeColor, scheme);
134
+ },
135
+
136
+ baseDarkPrimaryColors: function () {
137
+ var hexColor = MochiKit.Color.Color.fromHexString;
138
+ return [hexColor("#ad3f40"),
139
+ hexColor("#ddac2c"),
140
+ hexColor("#dfdd0c"),
141
+ hexColor("#5276c4"),
142
+ hexColor("#739c5a")];
143
+ },
144
+
145
+ basePrimaryColors: function () {
146
+ var hexColor = MochiKit.Color.Color.fromHexString;
147
+ return [hexColor("#d24c4d"),
148
+ hexColor("#f2b32f"),
149
+ hexColor("#ece90e"),
150
+ hexColor("#5d83da"),
151
+ hexColor("#78a15d")];
152
+ },
153
+
154
+ baseBlueColors: function () {
155
+ var hexColor = MochiKit.Color.Color.fromHexString;
156
+ return [hexColor("#4b6b94"), hexColor("#5d81b4"), hexColor("#acbad2")];
157
+ },
158
+
159
+ palette: function(baseColor, fromLevel, toLevel, increment) {
160
+ var isNil = MochiKit.Base.isUndefinedOrNull;
161
+ var fractions = new Array();
162
+ if (isNil(increment))
163
+ increment = 0.1;
164
+ if (isNil(toLevel))
165
+ toLevel = 0.4;
166
+ if (isNil(fromLevel))
167
+ fromLevel = -0.2;
168
+
169
+ var level = fromLevel;
170
+ while (level <= toLevel) {
171
+ fractions.push(level);
172
+ level += increment;
173
+ }
174
+
175
+ var makeColor = function(color, fraction) {
176
+ return color.lighterColorWithLevel(fraction);
177
+ };
178
+ return MochiKit.Base.map(partial(makeColor, baseColor), fractions);
179
+ },
180
+
181
+
182
+
183
+
184
+ // The follow functions are from quirksmode.org
185
+ // http://www.quirksmode.org/js/findpos.html
186
+
187
+ findPosX: function(obj) {
188
+ var curleft = 0;
189
+ if (obj.offsetParent)
190
+ {
191
+ while (obj.offsetParent)
192
+ {
193
+ curleft += obj.offsetLeft
194
+ obj = obj.offsetParent;
195
+ }
196
+ }
197
+ else if (obj.x)
198
+ curleft += obj.x;
199
+ return curleft;
200
+ },
201
+
202
+ findPosY: function(obj) {
203
+ var curtop = 0;
204
+ if (obj.offsetParent)
205
+ {
206
+ while (obj.offsetParent)
207
+ {
208
+ curtop += obj.offsetTop
209
+ obj = obj.offsetParent;
210
+ }
211
+ }
212
+ else if (obj.y)
213
+ curtop += obj.y;
214
+ return curtop;
215
+ }
216
+ });
217
+
218
+ PlotKit.Base.baseColors = function () {
219
+ var hexColor = MochiKit.Color.Color.fromHexString;
220
+ return [hexColor("#476fb2"),
221
+ hexColor("#be2c2b"),
222
+ hexColor("#85b730"),
223
+ hexColor("#734a99"),
224
+ hexColor("#26a1c5"),
225
+ hexColor("#fb8707"),
226
+ hexColor("#000000")];
227
+ };
228
+
229
+ PlotKit.Base.officeBaseStyle = {
230
+ "axisLineWidth": 2.0,
231
+ "axisLabelColor": Color.grayColor(),
232
+ "axisLineColor": Color.whiteColor(),
233
+ "padding": {top: 5, bottom: 10, left: 30, right: 30}
234
+ };
235
+
236
+ MochiKit.Base.update(PlotKit.Base,{
237
+ officeBlue: function() {
238
+ var r = {
239
+ "colorScheme": PlotKit.Base.palette(PlotKit.Base.baseColors()[0]),
240
+ "backgroundColor": PlotKit.Base.baseColors()[0].lighterColorWithLevel(0.45)
241
+ };
242
+ MochiKit.Base.update(r, PlotKit.Base.officeBaseStyle);
243
+ return r;
244
+ },
245
+ officeRed: function() {
246
+ var r = {
247
+ "colorScheme": PlotKit.Base.palette(PlotKit.Base.baseColors()[1]),
248
+ "backgroundColor": PlotKit.Base.baseColors()[1].lighterColorWithLevel(0.5)
249
+ };
250
+ MochiKit.Base.update(r, PlotKit.Base.officeBaseStyle);
251
+ return r;
252
+ },
253
+ officeGreen: function() {
254
+ var r = {
255
+ "colorScheme": PlotKit.Base.palette(PlotKit.Base.baseColors()[2]),
256
+ "backgroundColor": PlotKit.Base.baseColors()[2].lighterColorWithLevel(0.5)
257
+ };
258
+ MochiKit.Base.update(r, PlotKit.Base.officeBaseStyle);
259
+ return r;
260
+ },
261
+ officePurple: function() {
262
+ var r = {
263
+ "colorScheme": PlotKit.Base.palette(PlotKit.Base.baseColors()[3]),
264
+ "backgroundColor": PlotKit.Base.baseColors()[3].lighterColorWithLevel(0.5)
265
+ };
266
+ MochiKit.Base.update(r, PlotKit.Base.officeBaseStyle);
267
+ return r;
268
+ },
269
+
270
+ officeCyan: function() {
271
+ var r = {
272
+ "colorScheme": PlotKit.Base.palette(PlotKit.Base.baseColors()[4]),
273
+ "backgroundColor": PlotKit.Base.baseColors()[4].lighterColorWithLevel(0.5)
274
+ };
275
+ MochiKit.Base.update(r, PlotKit.Base.officeBaseStyle);
276
+ return r;
277
+ },
278
+
279
+ officeOrange: function() {
280
+ var r = {
281
+ "colorScheme": PlotKit.Base.palette(PlotKit.Base.baseColors()[5]),
282
+ "backgroundColor": PlotKit.Base.baseColors()[5].lighterColorWithLevel(0.4)
283
+ };
284
+ MochiKit.Base.update(r, PlotKit.Base.officeBaseStyle);
285
+ return r;
286
+ },
287
+
288
+ officeBlack: function() {
289
+ var r = {
290
+ "colorScheme": PlotKit.Base.palette(PlotKit.Base.baseColors()[6], 0.0, 0.6),
291
+ "backgroundColor": PlotKit.Base.baseColors()[6].lighterColorWithLevel(0.9)
292
+ };
293
+ MochiKit.Base.update(r, PlotKit.Base.officeBaseStyle);
294
+ return r;
295
+ }
296
+ });
297
+
298
+
299
+ PlotKit.Base.EXPORT = [
300
+ "baseColors",
301
+ "collapse",
302
+ "colorScheme",
303
+ "findPosX",
304
+ "findPosY",
305
+ "officeBaseStyle",
306
+ "officeBlue",
307
+ "officeRed",
308
+ "officeGreen",
309
+ "officePurple",
310
+ "officeCyan",
311
+ "officeOrange",
312
+ "officeBlack",
313
+ "roundInterval",
314
+ "uniq",
315
+ ];
316
+
317
+ PlotKit.Base.EXPORT_OK = [];
318
+
319
+ PlotKit.Base.__new__ = function() {
320
+ var m = MochiKit.Base;
321
+
322
+ m.nameFunctions(this);
323
+
324
+ this.EXPORT_TAGS = {
325
+ ":common": this.EXPORT,
326
+ ":all": m.concat(this.EXPORT, this.EXPORT_OK)
327
+ };
328
+ };
329
+
330
+ PlotKit.Base.__new__();
331
+ MochiKit.Base._exportSymbols(this, PlotKit.Base);
332
+
@@ -0,0 +1,707 @@
1
+ /*
2
+ PlotKit Canvas
3
+ --------------
4
+
5
+ Provides HTML Canvas Renderer. This is supported under:
6
+
7
+ - Safari 2.0
8
+ - Mozilla Firefox 1.5
9
+ - Opera 9.0 preview 2
10
+ - IE 6 (via VML Emulation)
11
+
12
+ It uses DIVs for labels.
13
+
14
+ Notes About IE Support
15
+ ----------------------
16
+
17
+ This class relies on iecanvas.htc for Canvas Emulation under IE[1].
18
+ iecanvas.htc is included in the distribution of PlotKit for convenience. In order to enable IE support, you must set the following option when initialising the renderer:
19
+
20
+ var renderOptions = {
21
+ "IECanvasHTC": "contrib/iecanvas.htc"
22
+ };
23
+ var engine = new CanvasRenderer(canvasElement, layout, renderOptions);
24
+
25
+ Where "contrib/iecanvas.htc" is the path to the htc behavior relative
26
+ to where your HTML is.
27
+
28
+ This is only needed for IE support.
29
+
30
+ Copyright
31
+ ---------
32
+ Copyright 2005,2006 (c) Alastair Tse <alastair^liquidx.net>
33
+ For use under the BSD license. <http://www.liquidx.net/plotkit>
34
+
35
+ */
36
+ // --------------------------------------------------------------------
37
+ // Check required components
38
+ // --------------------------------------------------------------------
39
+
40
+ try {
41
+ if (typeof(PlotKit.Layout) == 'undefined')
42
+ {
43
+ throw "";
44
+ }
45
+ }
46
+ catch (e) {
47
+ throw "PlotKit.Layout depends on MochiKit.{Base,Color,DOM,Format} and PlotKit.Base and PlotKit.Layout"
48
+ }
49
+
50
+
51
+ // ------------------------------------------------------------------------
52
+ // Defines the renderer class
53
+ // ------------------------------------------------------------------------
54
+
55
+ if (typeof(PlotKit.CanvasRenderer) == 'undefined') {
56
+ PlotKit.CanvasRenderer = {};
57
+ }
58
+
59
+ PlotKit.CanvasRenderer.NAME = "PlotKit.CanvasRenderer";
60
+ PlotKit.CanvasRenderer.VERSION = PlotKit.VERSION;
61
+
62
+ PlotKit.CanvasRenderer.__repr__ = function() {
63
+ return "[" + this.NAME + " " + this.VERSION + "]";
64
+ };
65
+
66
+ PlotKit.CanvasRenderer.toString = function() {
67
+ return this.__repr__();
68
+ }
69
+
70
+ PlotKit.CanvasRenderer = function(element, layout, options) {
71
+ if (arguments.length > 0)
72
+ this.__init__(element, layout, options);
73
+ };
74
+
75
+ PlotKit.CanvasRenderer.prototype.__init__ = function(element, layout, options) {
76
+ var isNil = MochiKit.Base.isUndefinedOrNull;
77
+ var Color = MochiKit.Color.Color;
78
+
79
+ // default options
80
+ this.options = {
81
+ "drawBackground": true,
82
+ "backgroundColor": Color.whiteColor(),
83
+ "padding": {left: 30, right: 30, top: 5, bottom: 10},
84
+ "colorScheme": PlotKit.Base.palette(PlotKit.Base.baseColors()[0]),
85
+ "strokeColor": Color.whiteColor(),
86
+ "strokeColorTransform": "asStrokeColor",
87
+ "strokeWidth": 0.5,
88
+ "shouldFill": true,
89
+ "shouldStroke": true,
90
+ "drawXAxis": true,
91
+ "drawYAxis": true,
92
+ "axisLineColor": Color.blackColor(),
93
+ "axisLineWidth": 0.5,
94
+ "axisTickSize": 3,
95
+ "axisLabelColor": Color.blackColor(),
96
+ "axisLabelFont": "Arial",
97
+ "axisLabelFontSize": 9,
98
+ "axisLabelWidth": 50,
99
+ "pieRadius": 0.4,
100
+ "enableEvents": true,
101
+ "IECanvasHTC": "PlotKit/iecanvas.htc"
102
+ };
103
+ MochiKit.Base.update(this.options, options ? options : {});
104
+
105
+ // we need to refetch the element because of this horrible Canvas on IE
106
+ // crap
107
+ this.element_id = element.id ? element.id : element;
108
+
109
+ // Stuff relating to Canvas on IE support
110
+ var self = PlotKit.CanvasRenderer;
111
+ this.isIE = self.IECanvasEmulationIfNeeded(this.options.IECanvasHTC);
112
+ this.IEDelay = 0.5;
113
+ this.maxTries = 5;
114
+ this.renderDelay = null;
115
+ this.clearDelay = null;
116
+
117
+ this.layout = layout;
118
+ this.style = layout.style;
119
+ this.element = MochiKit.DOM.getElement(this.element_id);
120
+ //this.element = element;
121
+ this.container = this.element.parentNode;
122
+ this.height = this.element.height;
123
+ this.width = this.element.width;
124
+
125
+ // --- check whether everything is ok before we return
126
+
127
+ if (isNil(this.element))
128
+ throw "CanvasRenderer() - passed canvas is not found";
129
+
130
+ if (!this.isIE && !(PlotKit.CanvasRenderer.isSupported(this.element)))
131
+ throw "CanvasRenderer() - Canvas is not supported.";
132
+
133
+ if (isNil(this.container) || (this.container.nodeName.toLowerCase() != "div"))
134
+ throw "CanvasRenderer() - <canvas> needs to be enclosed in <div>";
135
+
136
+ // internal state
137
+ this.xlabels = new Array();
138
+ this.ylabels = new Array();
139
+ this.isFirstRender = true;
140
+
141
+ this.area = {
142
+ x: this.options.padding.left,
143
+ y: this.options.padding.top,
144
+ w: this.width - this.options.padding.left - this.options.padding.right,
145
+ h: this.height - this.options.padding.top - this.options.padding.bottom
146
+ };
147
+
148
+ MochiKit.DOM.updateNodeAttributes(this.container,
149
+ {"style":{ "position": "relative", "width": this.width + "px"}});
150
+
151
+ // load event system if we have Signals
152
+ try {
153
+ this.event_isinside = null;
154
+ if (MochiKit.Signal && this.options.enableEvents) {
155
+ this._initialiseEvents();
156
+ }
157
+ }
158
+ catch (e) {
159
+ // still experimental
160
+ }
161
+ };
162
+
163
+ PlotKit.CanvasRenderer.IECanvasEmulationIfNeeded = function(htc) {
164
+ var ie = navigator.appVersion.match(/MSIE (\d\.\d)/);
165
+ var opera = (navigator.userAgent.toLowerCase().indexOf("opera") != -1);
166
+ if ((!ie) || (ie[1] < 6) || (opera))
167
+ return false;
168
+
169
+ if (isUndefinedOrNull(MochiKit.DOM.getElement('VMLRender'))) {
170
+ // before we add VMLRender, we need to recreate all canvas tags
171
+ // programmatically otherwise IE will not recognise it
172
+
173
+ var nodes = document.getElementsByTagName('canvas');
174
+ for (var i = 0; i < nodes.length; i++) {
175
+ var node = nodes[i];
176
+ if (node.getContext) { return; } // Other implementation, abort
177
+ var newNode = MochiKit.DOM.CANVAS(
178
+ {id: node.id,
179
+ width: "" + parseInt(node.width),
180
+ height: "" + parseInt(node.height)}, "");
181
+ newNode.style.width = parseInt(node.width) + "px";
182
+ newNode.style.height = parseInt(node.height) + "px";
183
+ node.id = node.id + "_old";
184
+ MochiKit.DOM.swapDOM(node, newNode);
185
+ }
186
+
187
+ document.namespaces.add("v");
188
+ var vmlopts = {'id':'VMLRender',
189
+ 'codebase':'vgx.dll',
190
+ 'classid':'CLSID:10072CEC-8CC1-11D1-986E-00A0C955B42E'};
191
+ var vml = MochiKit.DOM.createDOM('object', vmlopts);
192
+ document.body.appendChild(vml);
193
+ var vmlStyle = document.createStyleSheet();
194
+ vmlStyle.addRule("canvas", "behavior: url('" + htc + "');");
195
+ vmlStyle.addRule("v\\:*", "behavior: url(#VMLRender);");
196
+ }
197
+ return true;
198
+ };
199
+
200
+ PlotKit.CanvasRenderer.prototype.render = function() {
201
+ if (this.isIE) {
202
+ // VML takes a while to start up, so we just poll every this.IEDelay
203
+ try {
204
+ if (this.renderDelay) {
205
+ this.renderDelay.cancel();
206
+ this.renderDelay = null;
207
+ }
208
+ var context = this.element.getContext("2d");
209
+ }
210
+ catch (e) {
211
+ this.isFirstRender = false;
212
+ if (this.maxTries-- > 0) {
213
+ this.renderDelay = MochiKit.Async.wait(this.IEDelay);
214
+ this.renderDelay.addCallback(bind(this.render, this));
215
+ }
216
+ return;
217
+ }
218
+ }
219
+
220
+ if (this.options.drawBackground)
221
+ this._renderBackground();
222
+
223
+ if (this.style == "bar") {
224
+ this._renderBarChart();
225
+ this._renderBarAxis();
226
+ }
227
+ else if (this.style == "pie") {
228
+ this._renderPieChart();
229
+ this._renderPieAxis();
230
+ }
231
+ else if (this.style == "line") {
232
+ this._renderLineChart();
233
+ this._renderLineAxis();
234
+ }
235
+ };
236
+
237
+ PlotKit.CanvasRenderer.prototype._renderBarChartWrap = function(data, plotFunc) {
238
+ var context = this.element.getContext("2d");
239
+ var colorCount = this.options.colorScheme.length;
240
+ var colorScheme = this.options.colorScheme;
241
+ var setNames = MochiKit.Base.keys(this.layout.datasets);
242
+ var setCount = setNames.length;
243
+
244
+ for (var i = 0; i < setCount; i++) {
245
+ var setName = setNames[i];
246
+ var color = colorScheme[i%colorCount];
247
+ context.save();
248
+ context.fillStyle = color.toRGBString();
249
+ if (this.options.strokeColor)
250
+ context.strokeStyle = this.options.strokeColor.toRGBString();
251
+ else if (this.options.strokeColorTransform)
252
+ context.strokeStyle = color[this.options.strokeColorTransform]().toRGBString();
253
+
254
+ context.lineWidth = this.options.strokeWidth;
255
+ var forEachFunc = function(obj) {
256
+ if (obj.name == setName)
257
+ plotFunc(context, obj);
258
+ };
259
+
260
+ MochiKit.Iter.forEach(data, bind(forEachFunc, this));
261
+ context.restore();
262
+ }
263
+ };
264
+
265
+ PlotKit.CanvasRenderer.prototype._renderBarChart = function() {
266
+ var bind = MochiKit.Base.bind;
267
+
268
+ var drawRect = function(context, bar) {
269
+ var x = this.area.w * bar.x + this.area.x;
270
+ var y = this.area.h * bar.y + this.area.y;
271
+ var w = this.area.w * bar.w;
272
+ var h = this.area.h * bar.h;
273
+ if ((w < 1) || (h < 1))
274
+ return;
275
+ if (this.options.shouldFill)
276
+ context.fillRect(x, y, w, h);
277
+ if (this.options.shouldStroke)
278
+ context.strokeRect(x, y, w, h);
279
+ };
280
+ this._renderBarChartWrap(this.layout.bars, bind(drawRect, this));
281
+ };
282
+
283
+ PlotKit.CanvasRenderer.prototype._renderLineChart = function() {
284
+ var context = this.element.getContext("2d");
285
+ var colorCount = this.options.colorScheme.length;
286
+ var colorScheme = this.options.colorScheme;
287
+ var setNames = MochiKit.Base.keys(this.layout.datasets);
288
+ var setCount = setNames.length;
289
+ var bind = MochiKit.Base.bind;
290
+ var partial = MochiKit.Base.partial;
291
+
292
+ for (var i = 0; i < setCount; i++) {
293
+ var setName = setNames[i];
294
+ var color = colorScheme[i%colorCount];
295
+ var strokeX = this.options.strokeColorTransform;
296
+
297
+ // setup graphics context
298
+ context.save();
299
+ context.fillStyle = color.toRGBString();
300
+ if (this.options.strokeColor)
301
+ context.strokeStyle = this.options.strokeColor.toRGBString();
302
+ else if (this.options.strokeColorTransform)
303
+ context.strokeStyle = color[strokeX]().toRGBString();
304
+
305
+ context.lineWidth = this.options.strokeWidth;
306
+
307
+ // create paths
308
+ var makePath = function() {
309
+ context.beginPath();
310
+ context.moveTo(this.area.x, this.area.y + this.area.h);
311
+ var addPoint = function(context, point) {
312
+ if (point.name == setName)
313
+ context.lineTo(this.area.w * point.x + this.area.x,
314
+ this.area.h * point.y + this.area.y);
315
+ };
316
+ MochiKit.Iter.forEach(this.layout.points, partial(addPoint, context), this);
317
+ context.lineTo(this.area.w + this.area.x,
318
+ this.area.h + this.area.y);
319
+ context.lineTo(this.area.x, this.area.y + this.area.h);
320
+ context.closePath();
321
+ };
322
+
323
+ if (this.options.shouldFill) {
324
+ bind(makePath, this)();
325
+ context.fill();
326
+ }
327
+ if (this.options.shouldStroke) {
328
+ bind(makePath, this)();
329
+ context.stroke();
330
+ }
331
+
332
+ context.restore();
333
+ }
334
+ };
335
+
336
+ PlotKit.CanvasRenderer.prototype._renderPieChart = function() {
337
+ var context = this.element.getContext("2d");
338
+ var colorCount = this.options.colorScheme.length;
339
+ var slices = this.layout.slices;
340
+
341
+ var centerx = this.area.x + this.area.w * 0.5;
342
+ var centery = this.area.y + this.area.h * 0.5;
343
+ var radius = Math.min(this.area.w * this.options.pieRadius,
344
+ this.area.h * this.options.pieRadius);
345
+
346
+ if (this.isIE) {
347
+ centerx = parseInt(centerx);
348
+ centery = parseInt(centery);
349
+ radius = parseInt(radius);
350
+ }
351
+
352
+
353
+ // NOTE NOTE!! Canvas Tag draws the circle clockwise from the y = 0, x = 1
354
+ // so we have to subtract 90 degrees to make it start at y = 1, x = 0
355
+
356
+ for (var i = 0; i < slices.length; i++) {
357
+ var color = this.options.colorScheme[i%colorCount];
358
+ context.save();
359
+ context.fillStyle = color.toRGBString();
360
+
361
+ var makePath = function() {
362
+ context.beginPath();
363
+ context.moveTo(centerx, centery);
364
+ context.arc(centerx, centery, radius,
365
+ slices[i].startAngle - Math.PI/2,
366
+ slices[i].endAngle - Math.PI/2,
367
+ false);
368
+ context.lineTo(centerx, centery);
369
+ context.closePath();
370
+ };
371
+
372
+ if (Math.abs(slices[i].startAngle - slices[i].endAngle) > 0.001) {
373
+ if (this.options.shouldFill) {
374
+ makePath();
375
+ context.fill();
376
+ }
377
+
378
+ if (this.options.shouldStroke) {
379
+ makePath();
380
+ context.lineWidth = this.options.strokeWidth;
381
+ if (this.options.strokeColor)
382
+ context.strokeStyle = this.options.strokeColor.toRGBString();
383
+ else if (this.options.strokeColorTransform)
384
+ context.strokeStyle = color[this.options.strokeColorTransform]().toRGBString();
385
+ context.stroke();
386
+ }
387
+ }
388
+ context.restore();
389
+ }
390
+ };
391
+
392
+ PlotKit.CanvasRenderer.prototype._renderBarAxis = function() {
393
+ this._renderAxis();
394
+ }
395
+
396
+ PlotKit.CanvasRenderer.prototype._renderLineAxis = function() {
397
+ this._renderAxis();
398
+ };
399
+
400
+
401
+ PlotKit.CanvasRenderer.prototype._renderAxis = function() {
402
+ if (!this.options.drawXAxis && !this.options.drawYAxis)
403
+ return;
404
+
405
+ var context = this.element.getContext("2d");
406
+
407
+ var labelStyle = {"style":
408
+ {"position": "absolute",
409
+ "fontSize": this.options.axisLabelFontSize + "px",
410
+ "zIndex": 10,
411
+ "color": this.options.axisLabelColor.toRGBString(),
412
+ "width": this.options.axisLabelWidth + "px",
413
+ "overflow": "hidden"
414
+ }
415
+ };
416
+
417
+ // axis lines
418
+ context.save();
419
+ context.strokeStyle = this.options.axisLineColor.toRGBString();
420
+ context.lineWidth = this.options.axisLineWidth;
421
+
422
+
423
+ if (this.options.drawYAxis) {
424
+ if (this.layout.yticks) {
425
+ var drawTick = function(tick) {
426
+ var x = this.area.x;
427
+ var y = this.area.y + tick[0] * this.area.h;
428
+ context.beginPath();
429
+ context.moveTo(x, y);
430
+ context.lineTo(x - this.options.axisTickSize, y);
431
+ context.closePath();
432
+ context.stroke();
433
+
434
+ var label = DIV(labelStyle, tick[1]);
435
+ label.style.top = (y - this.options.axisLabelFontSize) + "px";
436
+ label.style.left = (x - this.options.padding.left - this.options.axisTickSize) + "px";
437
+ label.style.textAlign = "right";
438
+ label.style.width = (this.options.padding.left - this.options.axisTickSize * 2) + "px";
439
+ MochiKit.DOM.appendChildNodes(this.container, label);
440
+ this.ylabels.push(label);
441
+ };
442
+
443
+ MochiKit.Iter.forEach(this.layout.yticks, bind(drawTick, this));
444
+ }
445
+
446
+ context.beginPath();
447
+ context.moveTo(this.area.x, this.area.y);
448
+ context.lineTo(this.area.x, this.area.y + this.area.h);
449
+ context.closePath();
450
+ context.stroke();
451
+ }
452
+
453
+ if (this.options.drawXAxis) {
454
+ if (this.layout.xticks) {
455
+ var drawTick = function(tick) {
456
+ var x = this.area.x + tick[0] * this.area.w;
457
+ var y = this.area.y + this.area.h;
458
+ context.beginPath();
459
+ context.moveTo(x, y);
460
+ context.lineTo(x, y + this.options.axisTickSize);
461
+ context.closePath();
462
+ context.stroke();
463
+
464
+ var label = DIV(labelStyle, tick[1]);
465
+ label.style.top = (y + this.options.axisTickSize) + "px";
466
+ label.style.left = (x - this.options.axisLabelWidth/2) + "px";
467
+ label.style.textAlign = "center";
468
+ label.style.width = this.options.axisLabelWidth + "px";
469
+ MochiKit.DOM.appendChildNodes(this.container, label);
470
+ this.xlabels.push(label);
471
+ };
472
+
473
+ MochiKit.Iter.forEach(this.layout.xticks, bind(drawTick, this));
474
+ }
475
+
476
+ context.beginPath();
477
+ context.moveTo(this.area.x, this.area.y + this.area.h);
478
+ context.lineTo(this.area.x + this.area.w, this.area.y + this.area.h);
479
+ context.closePath();
480
+ context.stroke();
481
+ }
482
+
483
+ context.restore();
484
+
485
+ };
486
+
487
+ PlotKit.CanvasRenderer.prototype._renderPieAxis = function() {
488
+ if (!this.options.drawXAxis)
489
+ return;
490
+
491
+ if (this.layout.xticks) {
492
+ // make a lookup dict for x->slice values
493
+ var lookup = new Array();
494
+ for (var i = 0; i < this.layout.slices.length; i++) {
495
+ lookup[this.layout.slices[i].xval] = this.layout.slices[i];
496
+ }
497
+
498
+ var centerx = this.area.x + this.area.w * 0.5;
499
+ var centery = this.area.y + this.area.h * 0.5;
500
+ var radius = Math.min(this.area.w * this.options.pieRadius,
501
+ this.area.h * this.options.pieRadius);
502
+ var labelWidth = this.options.axisLabelWidth;
503
+
504
+ for (var i = 0; i < this.layout.xticks.length; i++) {
505
+ var slice = lookup[this.layout.xticks[i][0]];
506
+ if (MochiKit.Base.isUndefinedOrNull(slice))
507
+ continue;
508
+
509
+
510
+ var angle = (slice.startAngle + slice.endAngle)/2;
511
+ // normalize the angle
512
+ var normalisedAngle = angle;
513
+ if (normalisedAngle > Math.PI * 2)
514
+ normalisedAngle = normalisedAngle - Math.PI * 2;
515
+ else if (normalisedAngle < 0)
516
+ normalisedAngle = normalisedAngle + Math.PI * 2;
517
+
518
+ var labelx = centerx + Math.sin(normalisedAngle) * (radius + 10);
519
+ var labely = centery - Math.cos(normalisedAngle) * (radius + 10);
520
+
521
+ var attrib = {"position": "absolute",
522
+ "zIndex": 11,
523
+ "width": labelWidth + "px",
524
+ "fontSize": this.options.axisLabelFontSize + "px",
525
+ "overflow": "hidden",
526
+ "color": this.options.axisLabelColor.toHexString()
527
+ };
528
+
529
+ if (normalisedAngle <= Math.PI * 0.5) {
530
+ // text on top and align left
531
+ attrib["textAlign"] = "left";
532
+ attrib["verticalAlign"] = "top";
533
+ attrib["left"] = labelx + "px";
534
+ attrib["top"] = (labely - this.options.axisLabelFontSize) + "px";
535
+ }
536
+ else if ((normalisedAngle > Math.PI * 0.5) && (normalisedAngle <= Math.PI)) {
537
+ // text on bottom and align left
538
+ attrib["textAlign"] = "left";
539
+ attrib["verticalAlign"] = "bottom";
540
+ attrib["left"] = labelx + "px";
541
+ attrib["top"] = labely + "px";
542
+
543
+ }
544
+ else if ((normalisedAngle > Math.PI) && (normalisedAngle <= Math.PI*1.5)) {
545
+ // text on bottom and align right
546
+ attrib["textAlign"] = "right";
547
+ attrib["verticalAlign"] = "bottom";
548
+ attrib["left"] = (labelx - labelWidth) + "px";
549
+ attrib["top"] = labely + "px";
550
+ }
551
+ else {
552
+ // text on top and align right
553
+ attrib["textAlign"] = "right";
554
+ attrib["verticalAlign"] = "bottom";
555
+ attrib["left"] = (labelx - labelWidth) + "px";
556
+ attrib["top"] = (labely - this.options.axisLabelFontSize) + "px";
557
+ }
558
+
559
+ var label = DIV({'style': attrib}, this.layout.xticks[i][1]);
560
+ this.xlabels.push(label);
561
+ MochiKit.DOM.appendChildNodes(this.container, label);
562
+ }
563
+
564
+ }
565
+ };
566
+
567
+ PlotKit.CanvasRenderer.prototype._renderBackground = function() {
568
+ var context = this.element.getContext("2d");
569
+ context.save();
570
+ context.fillStyle = this.options.backgroundColor.toRGBString();
571
+ context.fillRect(0, 0, this.width, this.height);
572
+ context.restore();
573
+ };
574
+
575
+ PlotKit.CanvasRenderer.prototype.clear = function() {
576
+ if (this.isIE) {
577
+ // VML takes a while to start up, so we just poll every this.IEDelay
578
+ try {
579
+ if (this.clearDelay) {
580
+ this.clearDelay.cancel();
581
+ this.clearDelay = null;
582
+ }
583
+ var context = this.element.getContext("2d");
584
+ }
585
+ catch (e) {
586
+ this.isFirstRender = false;
587
+ this.clearDelay = MochiKit.Async.wait(this.IEDelay);
588
+ this.clearDelay.addCallback(bind(this.clear, this));
589
+ return;
590
+ }
591
+ }
592
+
593
+ var context = this.element.getContext("2d");
594
+ context.clearRect(0, 0, this.width, this.height);
595
+
596
+
597
+ for (var i = 0; i < this.xlabels.length; i++) {
598
+ MochiKit.DOM.removeElement(this.xlabels[i]);
599
+ }
600
+ for (var i = 0; i < this.ylabels.length; i++) {
601
+ MochiKit.DOM.removeElement(this.ylabels[i]);
602
+ }
603
+ this.xlabels = new Array();
604
+ this.ylabels = new Array();
605
+
606
+ };
607
+
608
+ PlotKit.CanvasRenderer.prototype._initialiseEvents = function() {
609
+ var connect = MochiKit.Signal.connect;
610
+ var bind = MochiKit.Base.bind;
611
+ MochiKit.Signal.registerSignals(this, ['onmouseover', 'onclick', 'onmouseout', 'onmousemove']);
612
+ //connect(this.element, 'onmouseover', bind(this.onmouseover, this));
613
+ //connect(this.element, 'onmouseout', bind(this.onmouseout, this));
614
+ //connect(this.element, 'onmousemove', bind(this.onmousemove, this));
615
+ connect(this.element, 'onclick', bind(this.onclick, this));
616
+ };
617
+
618
+ PlotKit.CanvasRenderer.prototype._resolveObject = function(e) {
619
+ // does not work in firefox
620
+ //var x = (e.event().offsetX - this.area.x) / this.area.w;
621
+ //var y = (e.event().offsetY - this.area.y) / this.area.h;
622
+
623
+ var x = (e.mouse().page.x - PlotKit.Base.findPosX(this.element) - this.area.x) / this.area.w;
624
+ var y = (e.mouse().page.y - PlotKit.Base.findPosY(this.element) - this.area.y) / this.area.h;
625
+
626
+ //log(x, y);
627
+
628
+ var isHit = this.layout.hitTest(x, y);
629
+ if (isHit)
630
+ return isHit;
631
+ return null;
632
+ };
633
+
634
+ PlotKit.CanvasRenderer.prototype._createEventObject = function(layoutObj, e) {
635
+ if (layoutObj == null) {
636
+ return null;
637
+ }
638
+
639
+ e.chart = layoutObj
640
+ return e;
641
+ };
642
+
643
+
644
+ PlotKit.CanvasRenderer.prototype.onclick = function(e) {
645
+ var layoutObject = this._resolveObject(e);
646
+ var eventObject = this._createEventObject(layoutObject, e);
647
+ if (eventObject != null)
648
+ MochiKit.Signal.signal(this, "onclick", eventObject);
649
+ };
650
+
651
+ PlotKit.CanvasRenderer.prototype.onmouseover = function(e) {
652
+ var layoutObject = this._resolveObject(e);
653
+ var eventObject = this._createEventObject(layoutObject, e);
654
+ if (eventObject != null)
655
+ signal(this, "onmouseover", eventObject);
656
+ };
657
+
658
+ PlotKit.CanvasRenderer.prototype.onmouseout = function(e) {
659
+ var layoutObject = this._resolveObject(e);
660
+ var eventObject = this._createEventObject(layoutObject, e);
661
+ if (eventObject == null)
662
+ signal(this, "onmouseout", e);
663
+ else
664
+ signal(this, "onmouseout", eventObject);
665
+
666
+ };
667
+
668
+ PlotKit.CanvasRenderer.prototype.onmousemove = function(e) {
669
+ var layoutObject = this._resolveObject(e);
670
+ var eventObject = this._createEventObject(layoutObject, e);
671
+
672
+ if ((layoutObject == null) && (this.event_isinside == null)) {
673
+ // TODO: should we emit an event anyway?
674
+ return;
675
+ }
676
+
677
+ if ((layoutObject != null) && (this.event_isinside == null))
678
+ signal(this, "onmouseover", eventObject);
679
+
680
+ if ((layoutObject == null) && (this.event_isinside != null))
681
+ signal(this, "onmouseout", eventObject);
682
+
683
+ if ((layoutObject != null) && (this.event_isinside != null))
684
+ signal(this, "onmousemove", eventObject);
685
+
686
+ this.event_isinside = layoutObject;
687
+ //log("move", x, y);
688
+ };
689
+
690
+ PlotKit.CanvasRenderer.isSupported = function(canvasName) {
691
+ var canvas = null;
692
+ try {
693
+ if (MochiKit.Base.isUndefinedOrNull(canvasName))
694
+ canvas = MochiKit.DOM.CANVAS({});
695
+ else
696
+ canvas = MochiKit.DOM.getElement(canvasName);
697
+ var context = canvas.getContext("2d");
698
+ }
699
+ catch (e) {
700
+ var ie = navigator.appVersion.match(/MSIE (\d\.\d)/);
701
+ var opera = (navigator.userAgent.toLowerCase().indexOf("opera") != -1);
702
+ if ((!ie) || (ie[1] < 6) || (opera))
703
+ return false;
704
+ return true;
705
+ }
706
+ return true;
707
+ };