[brailleblaster] Re: Create a new style

  • From: Michael Whapples <mwhapples@xxxxxxx>
  • To: brailleblaster@xxxxxxxxxxxxx
  • Date: Mon, 30 Jul 2012 19:22:43 +0100

Put the two files in the same directory. Then open a command prompt and move to the directory with these files. Now run the following java command:

java -classpath <path-to-swt.jar> NewStyle
where <path-to-swt.jar> is the path to your swt.jar file, if you copy swt.jar to the same directory as the other files then swt.jar would be sufficient.

Michael Whapples
On 30/07/2012 18:42, Vic Beckley wrote:

Could one of you programmers tell me what to do with these two files? I would really like to get a look at what Hanxiao has done.

Best regards from Ohio, U.S.A.,

Vic

E-mail: vic.beckley3@xxxxxxxxx <mailto:vic.beckley3@xxxxxxxxx>

*From:*brailleblaster-bounce@xxxxxxxxxxxxx [mailto:brailleblaster-bounce@xxxxxxxxxxxxx] *On Behalf Of *Hanxiao Fu
*Sent:* Monday, July 30, 2012 9:57 AM
*To:* BBlist
*Subject:* [brailleblaster] Create a new style

Hi all,

As part of the editing and displaying function, users will be able to create customized style in BB. I've made a simple example of "creating a new style window" to demonstrate what I'm trying to implement into BB. Please check out the two files in the attachment, and run to see if you have any suggestions. Note that you will need to add swt in the build path in order to compile this little demo. Here are something I'd like to discuss with you guys.

1. If you run the program, you will find the "Create A New Style" button, which open a new window, where there are bunch of labels and fields to be filled for creating the new style. However, the "create" button doesn't really do anything, but print out the input for now. I think, ideally, in our algorithm, this should create a properties in user's local directory, but it won't initiate an instance of Style until there is one line using this style.

2. I mostly worry about the accessibility. The new style is created by either filling out the fields or selecting from combos, but I am not sure whether it is clear enough to show that which field every label corresponds to. I am using tool tips on both labels and fields, but I'm not sure if it would help. The layout uses form layout by the way.

3. Since we will be able to handle a lot of different kinds of documents, I assume that there would be different properties for the styles for different kinds of documents, so the properties, lines_before and etc, are stored in an enum class, where each element in the class takes two parameters, one indicates the type of the property, i.e. integer, boolean; the other one is default value. The two parameters now are hardcoded, but in the later work it can be extended to read from properties files, so that it would be extensible enough to be adjusted for different kind of docs.

4. Validations. Now it only accepts numbers for these number-related fields, but there's no limit on how big the number could be. Let me know if you think there should be more constraints on the input.

5. I'm thinking about adding an menu item for creating new styles. Currently I can only find the menu item called "select style". Maybe I can somehow integrate these two features together, so both of them can be found through, say, "style".

Please see if the little demo could work, especially about the accessibility. Any suggestions/criticisms are welcome.

Thanks,

Hanxiao


Other related posts: