You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

491 lines
16 KiB

  1. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
  2. <!-- NewPage -->
  3. <html lang="en">
  4. <head>
  5. <!-- Generated by javadoc (1.8.0_131) on Mon Jun 05 21:49:34 MST 2017 -->
  6. <title>Settings (LibrarySystem - BinHong Lee)</title>
  7. <meta name="date" content="2017-06-05">
  8. <link rel="stylesheet" type="text/css" href="../stylesheet.css" title="Style">
  9. <script type="text/javascript" src="../script.js"></script>
  10. </head>
  11. <body>
  12. <script type="text/javascript"><!--
  13. try {
  14. if (location.href.indexOf('is-external=true') == -1) {
  15. parent.document.title="Settings (LibrarySystem - BinHong Lee)";
  16. }
  17. }
  18. catch(err) {
  19. }
  20. //-->
  21. var methods = {"i0":10,"i1":10,"i2":10,"i3":10,"i4":10,"i5":10,"i6":10,"i7":10,"i8":10};
  22. var tabs = {65535:["t0","All Methods"],2:["t2","Instance Methods"],8:["t4","Concrete Methods"]};
  23. var altColor = "altColor";
  24. var rowColor = "rowColor";
  25. var tableTab = "tableTab";
  26. var activeTableTab = "activeTableTab";
  27. </script>
  28. <noscript>
  29. <div>JavaScript is disabled on your browser.</div>
  30. </noscript>
  31. <!-- ========= START OF TOP NAVBAR ======= -->
  32. <div class="topNav"><a name="navbar.top">
  33. <!-- -->
  34. </a>
  35. <div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div>
  36. <a name="navbar.top.firstrow">
  37. <!-- -->
  38. </a>
  39. <ul class="navList" title="Navigation">
  40. <li><a href="../libsys/package-summary.html">Package</a></li>
  41. <li class="navBarCell1Rev">Class</li>
  42. <li><a href="package-tree.html">Tree</a></li>
  43. <li><a href="../index-files/index-1.html">Index</a></li>
  44. <li><a href="../help-doc.html">Help</a></li>
  45. </ul>
  46. </div>
  47. <div class="subNav">
  48. <ul class="navList">
  49. <li><a href="../libsys/ReturnDialog.html" title="class in libsys"><span class="typeNameLink">Prev&nbsp;Class</span></a></li>
  50. <li><a href="../libsys/SettingsDialog.html" title="class in libsys"><span class="typeNameLink">Next&nbsp;Class</span></a></li>
  51. </ul>
  52. <ul class="navList">
  53. <li><a href="../index.html?libsys/Settings.html" target="_top">Frames</a></li>
  54. <li><a href="Settings.html" target="_top">No&nbsp;Frames</a></li>
  55. </ul>
  56. <ul class="navList" id="allclasses_navbar_top">
  57. <li><a href="../allclasses-noframe.html">All&nbsp;Classes</a></li>
  58. </ul>
  59. <div>
  60. <script type="text/javascript"><!--
  61. allClassesLink = document.getElementById("allclasses_navbar_top");
  62. if(window==top) {
  63. allClassesLink.style.display = "block";
  64. }
  65. else {
  66. allClassesLink.style.display = "none";
  67. }
  68. //-->
  69. </script>
  70. </div>
  71. <div>
  72. <ul class="subNavList">
  73. <li>Summary:&nbsp;</li>
  74. <li>Nested&nbsp;|&nbsp;</li>
  75. <li><a href="#field.summary">Field</a>&nbsp;|&nbsp;</li>
  76. <li><a href="#constructor.summary">Constr</a>&nbsp;|&nbsp;</li>
  77. <li><a href="#method.summary">Method</a></li>
  78. </ul>
  79. <ul class="subNavList">
  80. <li>Detail:&nbsp;</li>
  81. <li><a href="#field.detail">Field</a>&nbsp;|&nbsp;</li>
  82. <li><a href="#constructor.detail">Constr</a>&nbsp;|&nbsp;</li>
  83. <li><a href="#method.detail">Method</a></li>
  84. </ul>
  85. </div>
  86. <a name="skip.navbar.top">
  87. <!-- -->
  88. </a></div>
  89. <!-- ========= END OF TOP NAVBAR ========= -->
  90. <!-- ======== START OF CLASS DATA ======== -->
  91. <div class="header">
  92. <div class="subTitle">libsys</div>
  93. <h2 title="Class Settings" class="title">Class Settings</h2>
  94. </div>
  95. <div class="contentContainer">
  96. <ul class="inheritance">
  97. <li>java.lang.Object</li>
  98. <li>
  99. <ul class="inheritance">
  100. <li>libsys.Settings</li>
  101. </ul>
  102. </li>
  103. </ul>
  104. <div class="description">
  105. <ul class="blockList">
  106. <li class="blockList">
  107. <hr>
  108. <br>
  109. <pre>public class <span class="typeNameLabel">Settings</span>
  110. extends java.lang.Object</pre>
  111. <div class="block">Handles all settings related operations and background processing of SettingsDialog</div>
  112. </li>
  113. </ul>
  114. </div>
  115. <div class="summary">
  116. <ul class="blockList">
  117. <li class="blockList">
  118. <!-- =========== FIELD SUMMARY =========== -->
  119. <ul class="blockList">
  120. <li class="blockList"><a name="field.summary">
  121. <!-- -->
  122. </a>
  123. <h3>Field Summary</h3>
  124. <table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Field Summary table, listing fields, and an explanation">
  125. <caption><span>Fields</span><span class="tabEnd">&nbsp;</span></caption>
  126. <tr>
  127. <th class="colFirst" scope="col">Modifier and Type</th>
  128. <th class="colLast" scope="col">Field and Description</th>
  129. </tr>
  130. <tr class="altColor">
  131. <td class="colFirst"><code>private java.util.HashMap&lt;java.lang.String,java.lang.String&gt;</code></td>
  132. <td class="colLast"><code><span class="memberNameLink"><a href="../libsys/Settings.html#items">items</a></span></code>&nbsp;</td>
  133. </tr>
  134. <tr class="rowColor">
  135. <td class="colFirst"><code>private java.util.ArrayList&lt;java.lang.String&gt;</code></td>
  136. <td class="colLast"><code><span class="memberNameLink"><a href="../libsys/Settings.html#keys">keys</a></span></code>&nbsp;</td>
  137. </tr>
  138. <tr class="altColor">
  139. <td class="colFirst"><code>private java.lang.String</code></td>
  140. <td class="colLast"><code><span class="memberNameLink"><a href="../libsys/Settings.html#settingsFileName">settingsFileName</a></span></code>&nbsp;</td>
  141. </tr>
  142. </table>
  143. </li>
  144. </ul>
  145. <!-- ======== CONSTRUCTOR SUMMARY ======== -->
  146. <ul class="blockList">
  147. <li class="blockList"><a name="constructor.summary">
  148. <!-- -->
  149. </a>
  150. <h3>Constructor Summary</h3>
  151. <table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Constructor Summary table, listing constructors, and an explanation">
  152. <caption><span>Constructors</span><span class="tabEnd">&nbsp;</span></caption>
  153. <tr>
  154. <th class="colOne" scope="col">Constructor and Description</th>
  155. </tr>
  156. <tr class="altColor">
  157. <td class="colOne"><code><span class="memberNameLink"><a href="../libsys/Settings.html#Settings-java.lang.String-">Settings</a></span>(java.lang.String&nbsp;settingsFileName)</code>
  158. <div class="block">Creates new Settings importing information from the given file name</div>
  159. </td>
  160. </tr>
  161. </table>
  162. </li>
  163. </ul>
  164. <!-- ========== METHOD SUMMARY =========== -->
  165. <ul class="blockList">
  166. <li class="blockList"><a name="method.summary">
  167. <!-- -->
  168. </a>
  169. <h3>Method Summary</h3>
  170. <table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation">
  171. <caption><span id="t0" class="activeTableTab"><span>All Methods</span><span class="tabEnd">&nbsp;</span></span><span id="t2" class="tableTab"><span><a href="javascript:show(2);">Instance Methods</a></span><span class="tabEnd">&nbsp;</span></span><span id="t4" class="tableTab"><span><a href="javascript:show(8);">Concrete Methods</a></span><span class="tabEnd">&nbsp;</span></span></caption>
  172. <tr>
  173. <th class="colFirst" scope="col">Modifier and Type</th>
  174. <th class="colLast" scope="col">Method and Description</th>
  175. </tr>
  176. <tr id="i0" class="altColor">
  177. <td class="colFirst"><code>java.lang.String</code></td>
  178. <td class="colLast"><code><span class="memberNameLink"><a href="../libsys/Settings.html#get-java.lang.String-">get</a></span>(java.lang.String&nbsp;key)</code>
  179. <div class="block">Get the value associated to the field name</div>
  180. </td>
  181. </tr>
  182. <tr id="i1" class="rowColor">
  183. <td class="colFirst"><code>(package private) java.lang.String</code></td>
  184. <td class="colLast"><code><span class="memberNameLink"><a href="../libsys/Settings.html#getKey-int-">getKey</a></span>(int&nbsp;location)</code>
  185. <div class="block">Get the field name from that specific location in the array list</div>
  186. </td>
  187. </tr>
  188. <tr id="i2" class="altColor">
  189. <td class="colFirst"><code>(package private) void</code></td>
  190. <td class="colLast"><code><span class="memberNameLink"><a href="../libsys/Settings.html#setBooksFilename-java.lang.String-">setBooksFilename</a></span>(java.lang.String&nbsp;newBooksFilename)</code>
  191. <div class="block">Change the file name for the Books</div>
  192. </td>
  193. </tr>
  194. <tr id="i3" class="rowColor">
  195. <td class="colFirst"><code>private void</code></td>
  196. <td class="colLast"><code><span class="memberNameLink"><a href="../libsys/Settings.html#setDefault--">setDefault</a></span>()</code>&nbsp;</td>
  197. </tr>
  198. <tr id="i4" class="altColor">
  199. <td class="colFirst"><code>void</code></td>
  200. <td class="colLast"><code><span class="memberNameLink"><a href="../libsys/Settings.html#setTitle-java.lang.String-">setTitle</a></span>(java.lang.String&nbsp;newTitle)</code>
  201. <div class="block">Change the title of the application</div>
  202. </td>
  203. </tr>
  204. <tr id="i5" class="rowColor">
  205. <td class="colFirst"><code>(package private) void</code></td>
  206. <td class="colLast"><code><span class="memberNameLink"><a href="../libsys/Settings.html#setUsersFilename-java.lang.String-">setUsersFilename</a></span>(java.lang.String&nbsp;newUsersFilename)</code>
  207. <div class="block">Change the file name for the Users</div>
  208. </td>
  209. </tr>
  210. <tr id="i6" class="altColor">
  211. <td class="colFirst"><code>int</code></td>
  212. <td class="colLast"><code><span class="memberNameLink"><a href="../libsys/Settings.html#size--">size</a></span>()</code>
  213. <div class="block">Amount of fields in the settings</div>
  214. </td>
  215. </tr>
  216. <tr id="i7" class="rowColor">
  217. <td class="colFirst"><code>private void</code></td>
  218. <td class="colLast"><code><span class="memberNameLink"><a href="../libsys/Settings.html#toFile--">toFile</a></span>()</code>
  219. <div class="block">Save the settings to the given input file</div>
  220. </td>
  221. </tr>
  222. <tr id="i8" class="altColor">
  223. <td class="colFirst"><code>private void</code></td>
  224. <td class="colLast"><code><span class="memberNameLink"><a href="../libsys/Settings.html#update-java.lang.String-java.lang.String-">update</a></span>(java.lang.String&nbsp;key,
  225. java.lang.String&nbsp;newValue)</code>&nbsp;</td>
  226. </tr>
  227. </table>
  228. <ul class="blockList">
  229. <li class="blockList"><a name="methods.inherited.from.class.java.lang.Object">
  230. <!-- -->
  231. </a>
  232. <h3>Methods inherited from class&nbsp;java.lang.Object</h3>
  233. <code>clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</code></li>
  234. </ul>
  235. </li>
  236. </ul>
  237. </li>
  238. </ul>
  239. </div>
  240. <div class="details">
  241. <ul class="blockList">
  242. <li class="blockList">
  243. <!-- ============ FIELD DETAIL =========== -->
  244. <ul class="blockList">
  245. <li class="blockList"><a name="field.detail">
  246. <!-- -->
  247. </a>
  248. <h3>Field Detail</h3>
  249. <a name="items">
  250. <!-- -->
  251. </a>
  252. <ul class="blockList">
  253. <li class="blockList">
  254. <h4>items</h4>
  255. <pre>private&nbsp;java.util.HashMap&lt;java.lang.String,java.lang.String&gt; items</pre>
  256. </li>
  257. </ul>
  258. <a name="keys">
  259. <!-- -->
  260. </a>
  261. <ul class="blockList">
  262. <li class="blockList">
  263. <h4>keys</h4>
  264. <pre>private&nbsp;java.util.ArrayList&lt;java.lang.String&gt; keys</pre>
  265. </li>
  266. </ul>
  267. <a name="settingsFileName">
  268. <!-- -->
  269. </a>
  270. <ul class="blockListLast">
  271. <li class="blockList">
  272. <h4>settingsFileName</h4>
  273. <pre>private&nbsp;java.lang.String settingsFileName</pre>
  274. </li>
  275. </ul>
  276. </li>
  277. </ul>
  278. <!-- ========= CONSTRUCTOR DETAIL ======== -->
  279. <ul class="blockList">
  280. <li class="blockList"><a name="constructor.detail">
  281. <!-- -->
  282. </a>
  283. <h3>Constructor Detail</h3>
  284. <a name="Settings-java.lang.String-">
  285. <!-- -->
  286. </a>
  287. <ul class="blockListLast">
  288. <li class="blockList">
  289. <h4>Settings</h4>
  290. <pre>public&nbsp;Settings(java.lang.String&nbsp;settingsFileName)</pre>
  291. <div class="block">Creates new Settings importing information from the given file name</div>
  292. <dl>
  293. <dt><span class="paramLabel">Parameters:</span></dt>
  294. <dd><code>settingsFileName</code> - File name of existing settings stored</dd>
  295. </dl>
  296. </li>
  297. </ul>
  298. </li>
  299. </ul>
  300. <!-- ============ METHOD DETAIL ========== -->
  301. <ul class="blockList">
  302. <li class="blockList"><a name="method.detail">
  303. <!-- -->
  304. </a>
  305. <h3>Method Detail</h3>
  306. <a name="get-java.lang.String-">
  307. <!-- -->
  308. </a>
  309. <ul class="blockList">
  310. <li class="blockList">
  311. <h4>get</h4>
  312. <pre>public&nbsp;java.lang.String&nbsp;get(java.lang.String&nbsp;key)</pre>
  313. <div class="block">Get the value associated to the field name</div>
  314. <dl>
  315. <dt><span class="paramLabel">Parameters:</span></dt>
  316. <dd><code>key</code> - Field name</dd>
  317. <dt><span class="returnLabel">Returns:</span></dt>
  318. <dd>Field value</dd>
  319. </dl>
  320. </li>
  321. </ul>
  322. <a name="getKey-int-">
  323. <!-- -->
  324. </a>
  325. <ul class="blockList">
  326. <li class="blockList">
  327. <h4>getKey</h4>
  328. <pre>java.lang.String&nbsp;getKey(int&nbsp;location)</pre>
  329. <div class="block">Get the field name from that specific location in the array list</div>
  330. <dl>
  331. <dt><span class="paramLabel">Parameters:</span></dt>
  332. <dd><code>location</code> - Location of the field in the array list</dd>
  333. <dt><span class="returnLabel">Returns:</span></dt>
  334. <dd>The field name</dd>
  335. </dl>
  336. </li>
  337. </ul>
  338. <a name="setBooksFilename-java.lang.String-">
  339. <!-- -->
  340. </a>
  341. <ul class="blockList">
  342. <li class="blockList">
  343. <h4>setBooksFilename</h4>
  344. <pre>void&nbsp;setBooksFilename(java.lang.String&nbsp;newBooksFilename)</pre>
  345. <div class="block">Change the file name for the Books</div>
  346. <dl>
  347. <dt><span class="paramLabel">Parameters:</span></dt>
  348. <dd><code>newBooksFilename</code> - New file name for Books</dd>
  349. </dl>
  350. </li>
  351. </ul>
  352. <a name="setDefault--">
  353. <!-- -->
  354. </a>
  355. <ul class="blockList">
  356. <li class="blockList">
  357. <h4>setDefault</h4>
  358. <pre>private&nbsp;void&nbsp;setDefault()</pre>
  359. </li>
  360. </ul>
  361. <a name="setTitle-java.lang.String-">
  362. <!-- -->
  363. </a>
  364. <ul class="blockList">
  365. <li class="blockList">
  366. <h4>setTitle</h4>
  367. <pre>public&nbsp;void&nbsp;setTitle(java.lang.String&nbsp;newTitle)</pre>
  368. <div class="block">Change the title of the application</div>
  369. <dl>
  370. <dt><span class="paramLabel">Parameters:</span></dt>
  371. <dd><code>newTitle</code> - New Title</dd>
  372. </dl>
  373. </li>
  374. </ul>
  375. <a name="setUsersFilename-java.lang.String-">
  376. <!-- -->
  377. </a>
  378. <ul class="blockList">
  379. <li class="blockList">
  380. <h4>setUsersFilename</h4>
  381. <pre>void&nbsp;setUsersFilename(java.lang.String&nbsp;newUsersFilename)</pre>
  382. <div class="block">Change the file name for the Users</div>
  383. <dl>
  384. <dt><span class="paramLabel">Parameters:</span></dt>
  385. <dd><code>newUsersFilename</code> - New file name for Users</dd>
  386. </dl>
  387. </li>
  388. </ul>
  389. <a name="size--">
  390. <!-- -->
  391. </a>
  392. <ul class="blockList">
  393. <li class="blockList">
  394. <h4>size</h4>
  395. <pre>public&nbsp;int&nbsp;size()</pre>
  396. <div class="block">Amount of fields in the settings</div>
  397. <dl>
  398. <dt><span class="returnLabel">Returns:</span></dt>
  399. <dd>Amount of keys</dd>
  400. </dl>
  401. </li>
  402. </ul>
  403. <a name="toFile--">
  404. <!-- -->
  405. </a>
  406. <ul class="blockList">
  407. <li class="blockList">
  408. <h4>toFile</h4>
  409. <pre>private&nbsp;void&nbsp;toFile()</pre>
  410. <div class="block">Save the settings to the given input file</div>
  411. </li>
  412. </ul>
  413. <a name="update-java.lang.String-java.lang.String-">
  414. <!-- -->
  415. </a>
  416. <ul class="blockListLast">
  417. <li class="blockList">
  418. <h4>update</h4>
  419. <pre>private&nbsp;void&nbsp;update(java.lang.String&nbsp;key,
  420. java.lang.String&nbsp;newValue)</pre>
  421. </li>
  422. </ul>
  423. </li>
  424. </ul>
  425. </li>
  426. </ul>
  427. </div>
  428. </div>
  429. <!-- ========= END OF CLASS DATA ========= -->
  430. <!-- ======= START OF BOTTOM NAVBAR ====== -->
  431. <div class="bottomNav"><a name="navbar.bottom">
  432. <!-- -->
  433. </a>
  434. <div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div>
  435. <a name="navbar.bottom.firstrow">
  436. <!-- -->
  437. </a>
  438. <ul class="navList" title="Navigation">
  439. <li><a href="../libsys/package-summary.html">Package</a></li>
  440. <li class="navBarCell1Rev">Class</li>
  441. <li><a href="package-tree.html">Tree</a></li>
  442. <li><a href="../index-files/index-1.html">Index</a></li>
  443. <li><a href="../help-doc.html">Help</a></li>
  444. </ul>
  445. </div>
  446. <div class="subNav">
  447. <ul class="navList">
  448. <li><a href="../libsys/ReturnDialog.html" title="class in libsys"><span class="typeNameLink">Prev&nbsp;Class</span></a></li>
  449. <li><a href="../libsys/SettingsDialog.html" title="class in libsys"><span class="typeNameLink">Next&nbsp;Class</span></a></li>
  450. </ul>
  451. <ul class="navList">
  452. <li><a href="../index.html?libsys/Settings.html" target="_top">Frames</a></li>
  453. <li><a href="Settings.html" target="_top">No&nbsp;Frames</a></li>
  454. </ul>
  455. <ul class="navList" id="allclasses_navbar_bottom">
  456. <li><a href="../allclasses-noframe.html">All&nbsp;Classes</a></li>
  457. </ul>
  458. <div>
  459. <script type="text/javascript"><!--
  460. allClassesLink = document.getElementById("allclasses_navbar_bottom");
  461. if(window==top) {
  462. allClassesLink.style.display = "block";
  463. }
  464. else {
  465. allClassesLink.style.display = "none";
  466. }
  467. //-->
  468. </script>
  469. </div>
  470. <div>
  471. <ul class="subNavList">
  472. <li>Summary:&nbsp;</li>
  473. <li>Nested&nbsp;|&nbsp;</li>
  474. <li><a href="#field.summary">Field</a>&nbsp;|&nbsp;</li>
  475. <li><a href="#constructor.summary">Constr</a>&nbsp;|&nbsp;</li>
  476. <li><a href="#method.summary">Method</a></li>
  477. </ul>
  478. <ul class="subNavList">
  479. <li>Detail:&nbsp;</li>
  480. <li><a href="#field.detail">Field</a>&nbsp;|&nbsp;</li>
  481. <li><a href="#constructor.detail">Constr</a>&nbsp;|&nbsp;</li>
  482. <li><a href="#method.detail">Method</a></li>
  483. </ul>
  484. </div>
  485. <a name="skip.navbar.bottom">
  486. <!-- -->
  487. </a></div>
  488. <!-- ======== END OF BOTTOM NAVBAR ======= -->
  489. </body>
  490. </html>