From: Brett L. <wak...@ea...> - 2005-11-20 23:46:43
|
Try a JTextPane: http://java.sun.com/docs/books/tutorial/uiswing/components/text.html ---Brett. -----Original Message----- From: Erik Vos <eri...@hc...> Sent: Nov 20, 2005 10:41 AM To: rai...@li... Subject: [Rails-devel] Help I have added a basic Help system. To achieve that, all windows have become KeyListeners, and, if F1 is pressed, call a static method of the new class HelpWindow to display Help text. HelpWindow is set up like LogWindow, i.e. it displays a JLabel. I am not very pleased as to how it looks like, but at least HTML inside a JLabel allows me to insert line breaks. If someone knows a better way, i.e. one in which better formatting is possible: speak up. Currently, getting Help is set up to describe the currently allowed actions. The text is obtained by calling GameManager.getHelp(), which in turn calls the current round's getHelp() method. So each type of round is responsible to provide specific help text, dependent on the current state of affairs. Most rounds currently produce a dummy text. The only round that tells you more is the OR, and the only step described in full is tile laying (guess why). Pressing F1 does not always work, which (I presume) is caused by inadequate management of the HelpWindow instance. Anyone feeling like improving Help management and/or help texts, feel free to do so. I think I will be turning now to Private special properties, in particular extra tile laying. I think we will need a class for each type of special property, to be configured inside CompanyManager.xml. I am thinking of a generic interface SpecialPropertyI for all such properties. We'll see if this works. (BTW some 'simple' special properties have already been implemented in a different way, I think this can best stay as it is). Erik. ------------------------------------------------------- This SF.Net email is sponsored by the JBoss Inc. Get Certified Today Register for a JBoss Training Course. Free Certification Exam for All Training Attendees Through End of 2005. For more info visit: http://ads.osdn.com/?ad_id=7628&alloc_id=16845&op=click _______________________________________________ Rails-devel mailing list Rai...@li... https://lists.sourceforge.net/lists/listinfo/rails-devel |
From: Brett L. <wak...@ea...> - 2005-11-30 00:23:48
|
I just had a chance to look at the help system a little more in-depth. At some point we're going to want to separate the text strings from the code. Perhaps we should generate a global help xml file to hold the text, or maybe a help directory to hold multiple files, and then also have a game-specific help file for including any game-specific help information. ---Brett. -----Original Message----- From: Erik Vos <eri...@hc...> Sent: Nov 21, 2005 4:27 PM To: rai...@li... Subject: RE: [Rails-devel] Help > Try a JTextPane: > http://java.sun.com/docs/books/tutorial/uiswing/components/text.html Good suggestion, thanks. I had looked at it before, but was put off by the talking about editor kits etc. But it can also be used in a very easy way to display simple HTML. I have actually used its somewhat simpler superclass JEditorPane. Erik. ------------------------------------------------------- This SF.Net email is sponsored by the JBoss Inc. Get Certified Today Register for a JBoss Training Course. Free Certification Exam for All Training Attendees Through End of 2005. For more info visit: http://ads.osdn.com/?ad_id=7628&alloc_id=16845&op=click _______________________________________________ Rails-devel mailing list Rai...@li... https://lists.sourceforge.net/lists/listinfo/rails-devel |
From: John A. T. <ja...@ja...> - 2005-11-30 01:12:27
|
On Tue, 29 Nov 2005, Brett Lentz wrote: > I just had a chance to look at the help system a little more in-depth. > > At some point we're going to want to separate the text strings from the > code. Perhaps we should generate a global help xml file to hold the > text, or maybe a help directory to hold multiple files, and then also > have a game-specific help file for including any game-specific help > information. Is there a Java equivalent to GNU gettext? -- John A. Tamplin ja...@ja... 770/436-5387 HOME 4116 Manson Ave Smyrna, GA 30082-3723 |
From: Brett L. <wak...@ea...> - 2005-11-30 02:09:32
|
Yes, it's even in the Sun API: http://java.sun.com/developer/technicalArticles/Intl/IntlIntro/ ---Brett. -----Original Message----- From: "John A. Tamplin" <ja...@ja...> Sent: Nov 29, 2005 8:12 PM To: rai...@li... Subject: RE: [Rails-devel] Help On Tue, 29 Nov 2005, Brett Lentz wrote: > I just had a chance to look at the help system a little more in-depth. > > At some point we're going to want to separate the text strings from the > code. Perhaps we should generate a global help xml file to hold the > text, or maybe a help directory to hold multiple files, and then also > have a game-specific help file for including any game-specific help > information. Is there a Java equivalent to GNU gettext? -- John A. Tamplin ja...@ja... 770/436-5387 HOME 4116 Manson Ave Smyrna, GA 30082-3723 ------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Do you grep through log files for problems? Stop! Download the new AJAX search engine that makes searching your log files as easy as surfing the web. DOWNLOAD SPLUNK! http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click _______________________________________________ Rails-devel mailing list Rai...@li... https://lists.sourceforge.net/lists/listinfo/rails-devel |
From: Erik V. <eri...@hc...> - 2005-11-21 21:28:22
|
> Try a JTextPane: > http://java.sun.com/docs/books/tutorial/uiswing/components/text.html Good suggestion, thanks. I had looked at it before, but was put off by the talking about editor kits etc. But it can also be used in a very easy way to display simple HTML. I have actually used its somewhat simpler superclass JEditorPane. Erik. |