コード例 #1
0
 public static void previousPage(final Event e, final CraftView view) {
   final int newPage = view.getCurrentPage() - 1;
   if (newPage < 0) {
     return;
   }
   view.setCurrentPage(newPage);
 }
コード例 #2
0
 public static void nextPage(final Event e, final CraftView view) {
   final int newPage = view.getCurrentPage() + 1;
   if (newPage >= view.getCurrentMaxPages()) {
     return;
   }
   view.setCurrentPage(newPage);
 }
コード例 #3
0
 public static void validNameFilter(final Event event, final TextEditor textEditor) {
   final CraftView craftView =
       (CraftView)
           PropertiesProvider.getInstance()
               .getObjectProperty("craft", event.getTarget().getElementMap().getId());
   final String text = textEditor.getText();
   if (!text.equals(craftView.getNameFilter())) {
     craftView.setNameFilter(text);
   }
 }
コード例 #4
0
 public static void onCraftTypeChanged(final SelectionChangedEvent e, final CraftView view) {
   final byte id = (byte) (e.isSelected() ? 0 : 1);
   view.setCurrentType(CraftType.getFromId(id));
   PropertiesProvider.getInstance().setPropertyValue("craftDisplayType", id);
 }