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");
 }
コード例 #2
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);
   }
 }
コード例 #3
0
 public static void checkLevelSorter(final Event event) {
   ((CraftView)
           PropertiesProvider.getInstance()
               .getObjectProperty("craft", event.getTarget().getElementMap().getId()))
       .toggleLevelSorter();
 }
コード例 #4
0
 public static void openLinkedBook(final Event event) {
   ((CraftView)
           PropertiesProvider.getInstance()
               .getObjectProperty("craft", event.getTarget().getElementMap().getId()))
       .displayBook();
 }