PageRenderTime 201ms CodeModel.GetById 16ms RepoModel.GetById 0ms app.codeStats 0ms

/src/mpv5/ui/panels/DataPanel.java

http://mp-rechnungs-und-kundenverwaltung.googlecode.com/
Java | 92 lines | 18 code | 17 blank | 57 comment | 0 complexity | 90a5e02830e5c0f0b6177ec5ac7d6d32 MD5 | raw file
Possible License(s): LGPL-3.0, Apache-2.0, GPL-3.0, GPL-2.0, AGPL-3.0, JSON, BSD-3-Clause
  1. /*
  2. * To change this template, choose Tools | Templates
  3. * and open the template in the editor.
  4. */
  5. package mpv5.ui.panels;
  6. import mpv5.db.common.DatabaseObject;
  7. /**
  8. *Represents a view for {@link DatabaseObject}s
  9. *
  10. */
  11. public interface DataPanel {
  12. /**
  13. * Collect the view data
  14. * @return
  15. */
  16. public boolean collectData();
  17. /**
  18. * Get the database objec twhich owns the view
  19. * @return
  20. */
  21. public DatabaseObject getDataOwner();
  22. /**
  23. * Assign this view to a database object
  24. * @param object
  25. * @param populateData If true, the DOs data is populated into the view.
  26. */
  27. public void setDataOwner(DatabaseObject object, boolean populateData);
  28. /**
  29. * Reload the view from database, in background
  30. */
  31. public void refresh();
  32. /**
  33. * Populate the data to the view
  34. */
  35. public void exposeData();
  36. /**
  37. * Paste a dbo into this panel and let the panel decide what to do with it
  38. * @param dbo
  39. */
  40. public void paste(DatabaseObject... dbo);
  41. /**
  42. * Show the user the fields which are mandatory to fill in
  43. */
  44. public void showRequiredFields();
  45. /**
  46. * Show/hide the search panel for this view (if any)
  47. * @param show
  48. */
  49. public void showSearchBar(boolean show);
  50. /**
  51. * Call this after saving the dataowner of the panel
  52. */
  53. public void actionAfterSave();
  54. /**
  55. * Call this after creating a new dataowner on the panel
  56. */
  57. public void actionAfterCreate();
  58. /**
  59. * Call this before creating a new dataowner on the panel
  60. */
  61. public void actionBeforeCreate();
  62. /**
  63. * Call this before saving the dataowner of the panel
  64. * @throws ChangeNotApprovedException thrown if the user did not approve the change
  65. */
  66. public void actionBeforeSave() throws ChangeNotApprovedException;
  67. /**
  68. * Mail the current data
  69. */
  70. public void mail();
  71. /**
  72. * Print the current data
  73. */
  74. public void print();
  75. }