Items in one sentence about javafx

  1. Always assume user knows nothing about programming.
  2. Do not expect user will open user guide. Someone, including me, even will not look at nor think about prompts on the screen.
  3. Necessary prompts can help user understand intention of the program.
  4. Ambiguous prompt is worse than no prompt.
  5. Always response for user, like pop information, make sound, or update interface.
  6. Provide most options and set default choice.
  7. Remember user’s inputs or seletions and fill in or set values automatically in next time.
  8. Less inputs or selections meanwhile keep interfaces clean.
  9. Use radio or check buttons instead of drop-down list if there is enough place in interface.
  10. No more than 3 levels to select.
  11. Try best to intercept inputs which may cause bad results. Examples: Do not support invalid options, check data type or value range, prompt operation's consequences, etc..
  12. When too many controls in interface, consider popular layout: Left-right areas like curtain, vertical accordion menus, tabs to switch targets
  13. User’ screen resolution may be from 1k to 4k, so the design size of most MyBox interfaces is smaller than 1100 * 720.
  14. Make use of auto-wrap container like FlowPane, to work for both small screen and large screen.
  15. Controls can be updated only in JavaFx thread. Use Platform.runLater to change control when handle event in its listener.
  16. Progress should be shown when operation costs much time.
  17. Time-consume operation should not be run in JavaFx thread to avoid blocking interface.
  18. Backgournd task should always check whether task is canceled, especially in loop or before/after long-run statements.
  19. When listen mouse events, event.getX() and event.getY() return the coordinate of event.getSource() which is the control owns the events. Example, when listen on ImageView, the coordinate is related to the image.
  20. Iterative calls may happen when listen both onMouseEntered and onMouseExited and change focus in handling of the events(like pop menu) or change control’s size.
  21. When double click mouse, single-click event is tiggerred at first and then double-click event is triggerred. So need avoid duplicated or conflicted handlings against same event.
  22. For table's multiple selections, use getSelectedIndices() to listen changes, Some changes may be missed if use selectedItemProperty().
  23. For tree, display it after its generation, rather than display it while make the tree items.