登录 | 首页 -> 华新鲜事 -> 求学狮城 | 切换到:传统版 / sForum | 树形列表
共享一个Personal Organiser软件。
<<始页  [1]  末页>> 

共享一个Personal Organiser软件。这是一个EE1000的project, Java做的, 用XML储存数据。 点击这里[我心为谁动 (6-3 17:03, Long long ago)] [ 传统版 | sForum ][登录后回复]1楼

What are the functions that are not implemented?I found that quite a number of buttons gave "not implemented" error.[Flying (6-4 21:41, Long long ago)] [ 传统版 | sForum ][登录后回复]2楼

(引用 Flying:What are the functions that are not implemented?I found that quite a number of buttons gave "not implemented" error.)yes, those are the functions.mainly of the following categories:

1. view type. currently only support day view. (display a day's events). the design includes week view and month view also. (this is similar to microsoft works calendar, week view display 7 days in the main display area, with remarks of each day displayed. month view display a calendar-like thing, with each day's remarks). To be implemented.

2. options. this options can set the following: (1)set a default file to open each time the application starts.
(2)set history clean up. (the XML operation uses DOM, file can not be to large) (3)set report generation property, e.g. which kinds of data to include.

3. find. find an events with the keyword /find remarks with the keyword. I am not quite sure how to do this part, all i can do is to search the whole data set word by word (very inefficient)

4. help. i have a help application available, but without the content yet. the available application uses HTML pages. BUT it thus requires those pages being stored somewhere.(can not be in the jar) i am considering something else to do this, e.g. generate those pages only when user requests the page.

5. of course, may also include other features.
[我心为谁动 (6-4 22:27, Long long ago)] [ 传统版 | sForum ][登录后回复]3楼

(引用 我心为谁动:yes, those are the functions.mainly of the following categories: 1. view type. currently only support day view. (display a day'...)another thing is regarding multi-language version.i stored all the text in the UI in a constant class.

to switch to another language, simply replace those text with the corresponding in the other language.

however, there is problem with input chinese characters in the text area. (displayed as squares). don't know whether this problem can be solved in JDK1.4. if yes, a chinese version can be developed in minutes.
[我心为谁动 (6-4 22:32, Long long ago)] [ 传统版 | sForum ][登录后回复]4楼

(引用 我心为谁动:another thing is regarding multi-language version.i stored all the text in the UI in a constant class. to switch to another lan...)I can answer some of your doubts:1) For HTML pages, they CAN be included into the jar file. I did make applications that displays help documents that are included in jar archive.

2) I recommend that you do not use constant class for localization/internationalization. In fact, the Java i18n approach uses the class MessageFormat as well as .properties files that gives a unique name to each constant string/pattern throughout the application.

You can find sample code for the above points from sun's web site. I did both before, so I'm pretty sure they are operational and they are indeed convenient.
[Flying (6-4 22:45, Long long ago)] [ 传统版 | sForum ][登录后回复]5楼

(引用 Flying:I can answer some of your doubts:1) For HTML pages, they CAN be included into the jar file. I did make applications that display...)doubts:1) i uses JEditorPane to display HTML pages. it requires the URL of the page, how do i specify the URL if the page is in the jar archive? or u use something else to display the HTML pages?

2) the localization is not like the windows one. it's like the english version of MS-office and chinese of MS-office. therefore, different language version has different constant class. thus, there shouldn't be a problem.
[我心为谁动 (6-4 22:51, Long long ago)] [ 传统版 | sForum ][登录后回复]6楼

(引用 我心为谁动:doubts:1) i uses JEditorPane to display HTML pages. it requires the URL of the page, how do i specify the URL if the page is in ...)Answers:1) This problem has similar solution to the internationalization problem, supprisingly--use java resource bundles!
jEditorPane.setPage(YourClass.class.getResource("relative_path/file.html"));


2) The problem of your approach of contant class: no one can customize your application for a new language without knowning Java! Instead, if you do it using ResourceBundle + MessageFormat, the correct resource (.properties file) can be automatically loaded for the user system's default locale, and the correct language will be used automatically. Also, someone else can localize your application without a simple text editor without using any JDK at all.
[Flying (6-4 23:48, Long long ago)] [ 传统版 | sForum ][登录后回复]7楼

(引用 我心为谁动:doubts:1) i uses JEditorPane to display HTML pages. it requires the URL of the page, how do i specify the URL if the page is in ...)reply to Answers: - Flying (reply can't go deeper)1)yup, i tried to find the ClassLoader's methods to get a resource, but surprisingly didn't find a one that returns a URL. find it now.

2)this is a good pt. never considered this level of customization. a good tip to keep in mind. thank you.

BTW, any idea on the search function?
[我心为谁动 (6-5 0:12, Long long ago)] [ 传统版 | sForum ][登录后回复]8楼

(引用 我心为谁动:doubts:1) i uses JEditorPane to display HTML pages. it requires the URL of the page, how do i specify the URL if the page is in ...)Searching itself is a tough problem.For simple searching, I suppose keyword matching is reasonably good in the context. You might just need to optimize your algorithm.[Flying (6-5 0:25, Long long ago)] [ 传统版 | sForum ][登录后回复]9楼


<<始页  [1]  末页>> 
登录 | 首页 -> 华新鲜事 -> 求学狮城 | [刷新本页] | 切换到:传统版 / sForum