public static void selectResElement(final Event e, final ElementFilterView elementFilterView) {
   final ToggleButton button = e.getCurrentTarget();
   elementFilterView.setSelected(button.getSelected());
   final SelectItemElementsView elementsView = SelectItemElementsView.INSTANCE;
   if (elementsView.tooManyChoices(SelectItemElementsView.RES_ACTION_ID)) {
     elementFilterView.setSelected(false);
     button.setSelected(false);
   }
   PropertiesProvider.getInstance().firePropertyValueChanged(elementsView, "checkedResNbElements");
 }
 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);
   }
 }
 public static void checkLevelSorter(final Event event) {
   ((CraftView)
           PropertiesProvider.getInstance()
               .getObjectProperty("craft", event.getTarget().getElementMap().getId()))
       .toggleLevelSorter();
 }
 public static void openLinkedBook(final Event event) {
   ((CraftView)
           PropertiesProvider.getInstance()
               .getObjectProperty("craft", event.getTarget().getElementMap().getId()))
       .displayBook();
 }