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 |