style.html 6.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
  3. "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
  4. <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" >
  5. <head>
  6. <title>Orion - Style Sheets</title>
  7. <link rel=StyleSheet href="doc.css" type="text/css" media="screen"/>
  8. <link rel=StyleSheet href="docprint.css" type="text/css" media="print"/>
  9. <style type="text/css">
  10. .myemph { color: #800000;
  11. font-style: italic }
  12. </style>
  13. </head>
  14. <body>
  15. <table>
  16. <tr>
  17. <td>
  18. <table class="menu">
  19. <tr><td><a href="index.html">Index</a></td></tr>
  20. <tr><td><a>Installation and Administration</a></td></tr>
  21. <tr><td><a href="index.html#RunApplet"><b>Orion</b> as a Java Applet</a></td></tr>
  22. <tr><td><a href="index.html#RunApplication"><b>Orion</b> as a Java Application</a></td></tr>
  23. <tr><td><a href="keys.html">Key Mappings</a></td></tr>
  24. <tr><td><a href="bugparade.html">Bug Parade</a></td></tr>
  25. <tr><td><a href="licenses.html">Licenses</a></td></tr>
  26. </table>
  27. <p>
  28. <a href="http://validator.w3.org/check?uri=referer"><img
  29. src="http://www.w3.org/Icons/valid-xhtml11"
  30. alt="Valid XHTML 1.1" height="31" width="88" /></a>
  31. </p>
  32. </td>
  33. <td>
  34. <img alt="[Orion Logo]" style="text-align: right" src="images/orion3.jpg"/>
  35. <h1>Orion - Style Sheets</h1>
  36. <p>The <a class="Orion">Orion</a> Servlet produces a multitude of pieces of
  37. HTML.
  38. The content of the HTML is dependent on both the requested URL, and the state
  39. of the servlet.</p>
  40. <p>In order to help you get <a class="Orion">Orion</a> to fit well into your
  41. web server scheme, the generated HTML uses Cascading Style Sheets (CSS) to
  42. govern all aspects of the display.
  43. The default configuration will provide HTML that is sufficient for many
  44. purposes. However, should you wish to customize it, this page documents what
  45. needs to be done and how to do it.</p>
  46. <p>In order to fully apprciate the following descriptions, you should obtain a
  47. CSS reference book and take time to understand the concepts.</p>
  48. <h2>Default Configuration</h2>
  49. <p>By default, the HTML produced by the servlet will contain a set of CSS style
  50. definitions that will provide a basic rendering of the content.</p>
  51. <p>For example, the basic HTML page will contain the following HTML:</p>
  52. <pre class="codesnippet">
  53. &lt;head&gt;
  54. &lt;style&gt;
  55. body { color: #00ffff; background: #400000 }
  56. h1 { text-decoration: underline; text-align: center }
  57. a:link,a:visited,a:active,a:hover { color: #c0c0ff }
  58. td.orionapplettable { border: double white; background: black; text-align: center }
  59. body.orionerror { color: #ffffff; background: #ff0000 }
  60. .orionlink { font-size: 70% }
  61. &lt;/style&gt;
  62. &lt;/head&gt;
  63. </pre>
  64. <h2>Making the pages use your style sheet</h2>
  65. <p><a class="Orion">Orion</a> is designed such that you can define a style
  66. sheet to be used to override the default display characteristics as shown
  67. above.
  68. This override is performed using the <a class="configparam">cssURL</a> servlet
  69. configuration parameter.
  70. The value of this parameter can be set to any URL of a CSS file.
  71. This URL may be on the same host, or may even be on a different host.</p>
  72. <p><a class="Orion">Orion</a> then puts reference to this defined CSS URL into
  73. all of its generated HTML such that the defined CSS can override any of the
  74. default values provided.</p>
  75. <p>For example, if you set the <a class="configparam">cssURL</a> to
  76. <a class="configvalue">http://sample.ruelgnoj.co.uk/site.css</a> would
  77. result in the following HTML being generated.</p>
  78. <pre class="codesnippet">
  79. &lt;head&gt;
  80. &lt;style&gt;
  81. body { color: #00ffff; background: #400000 }
  82. h1 { text-decoration: underline; text-align: center }
  83. a:link,a:visited,a:active,a:hover { color: #c0c0ff }
  84. td.orionapplettable { border: double white; background: black; text-align: center }
  85. body.orionerror { color: #ffffff; background: #ff0000 }
  86. .orionlink { font-size: 70% }
  87. &lt;/style&gt;
  88. &lt;link rel="stylesheet"
  89. href="http://sameple.ruelgnoj.co.uk/site.css"
  90. type="text/css"
  91. title="Style"&gt;
  92. &lt;/head&gt;
  93. </pre>
  94. <h2>Generated Page overview</h2>
  95. <p>The figure below shows a typical piece of generated HTML.
  96. It can be seen that the majority of the tags used have a
  97. <a class="fileref">class</a> attribute.
  98. It is possible to override the appearance of any of the tags used by the
  99. generated HTML to allow the customization of the view.</p>
  100. <pre class="codesnippet">
  101. &lt;body class="orion"&gt;
  102. &lt;table border="0" width="100%" class="orion"&gt;
  103. &lt;col width="25%"&gt;
  104. &lt;col width="50%"&gt;
  105. &lt;col width="25%"&gt;
  106. &lt;tbody&gt;
  107. &lt;tr class="orion"&gt;
  108. &lt;td class="orion"&gt;&nbsp;&lt;/td&gt;
  109. &lt;td class="orion"&gt;&lt;h1 class="orion"&gt;Test Source&lt;/h1&gt;&lt;/td&gt;
  110. &lt;td valign="top" align="right" class="orion"&gt;
  111. &lt;a href="/orion/test/doc/index.html"
  112. class="orionlink"
  113. target="_blank"&gt;Orion Documentation&lt;/a&gt;
  114. &lt;/td&gt;
  115. &lt;/tr&gt;
  116. &lt;/tbody&gt;
  117. &lt;/table&gt;
  118. &lt;center&gt;
  119. &lt;table border="0" class="orionapplettable" cellpadding="0" cellspacing="0"&gt;
  120. &lt;tbody&gt;
  121. &lt;tr class="orionapplettable"&gt;
  122. &lt;td class="orionapplettable"&gt;
  123. &lt;applet height="600"
  124. name="orion"
  125. archive="/orion/test/orion.jar"
  126. width="560"
  127. code="com.sun.emp.tools.orion.OrionApplet.class"&gt;
  128. &lt;/applet&gt;
  129. &lt;/td&gt;
  130. &lt;/tr&gt;
  131. &lt;tr class="orionapplettable"&gt;
  132. &lt;td class="orionapplettable"&gt;
  133. &lt;a href="javascript:viewsource()" class="orionapplettable"&gt;Show file as HTML&lt;/a&gt;
  134. &lt;/td&gt;
  135. &lt;/tr&gt;
  136. &lt;/tbody&gt;
  137. &lt;/table&gt;
  138. &lt;/center&gt;
  139. &lt;/body&gt;
  140. </pre>
  141. <h2>What styles should be overridden?</h2>
  142. <p>In general, most if not all HTML tags in the generated code have a
  143. <a class="fileref">class</a> specification.
  144. This means that the display of the attribute of a particular attibute can be
  145. modified in several ways.</p>
  146. <h3>Global Overrides</h3>
  147. <br/>
  148. <h3>Class overrides</h3>
  149. <br/>
  150. <h3>Item Overrides</h3>
  151. <br/>
  152. </td>
  153. </tr>
  154. </table>
  155. <div class="copyright">
  156. <p><a href="http://www.ruelgnoj.co.uk/">Copyright &#169; 1997,2015 by Steve Millington. All Rights Reserved.</a></p>
  157. <img src="http://www.w3.org/Icons/valid-xhtml11"
  158. alt="Valid XHTML 1.1!" height="31" width="88"/>
  159. </div>
  160. </body>
  161. </html>