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); } }
@Override public boolean run(final Event event) { if (event.getType() != Events.RESIZED) { return false; } if (this.m_target != null) { this.screenTargetMoved( null, this.m_target.getScreenX(), this.m_target.getScreenY(), this.m_target.getScreenTargetHeight()); } return false; }
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(); }