/** * Action that toggles the display of boards window * * @param e the event that triggered this action */ @Action(selectedProperty = BOARDS_WINDOW_DISPLAYED) public void toggleBoards (ActionEvent e) { }
if (action != null) { final String methodName = m.getName(); final String enabledProperty = aString(action.enabledProperty(), null); final String disabledProperty = aString(action.disabledProperty(), null); final String selectedProperty = aString(action.selectedProperty(), null); final String actionName = aString(action.name(), methodName); final String taskService = aString(action.taskService(), TaskService.DEFAULT_NAME); final Task.BlockingScope block = action.block();
private void addAnnotationActions(ResourceMap resourceMap) { Class<?> actionsClass = getActionsClass(); // @Action for (Method m : actionsClass.getDeclaredMethods()) { Action action = m.getAnnotation(Action.class); if (action != null) { String methodName = m.getName(); String enabledProperty = aString(action.enabledProperty(), null); String selectedProperty = aString(action.selectedProperty(), null); String actionName = aString(action.name(), methodName); Task.BlockingScope block = action.block(); ApplicationAction appAction = new ApplicationAction(this, resourceMap, actionName, m, enabledProperty, selectedProperty, block); putAction(actionName, appAction); } } // @ProxyActions ProxyActions proxyActionsAnnotation = actionsClass.getAnnotation(ProxyActions.class); if (proxyActionsAnnotation != null) { for(String actionName : proxyActionsAnnotation.value()) { ApplicationAction appAction = new ApplicationAction(this, resourceMap, actionName); appAction.setEnabled(false); // will track the enabled property of the Action it's bound to putAction(actionName, appAction); proxyActions.add(appAction); } } }
static void initActionFromAnnotation(ProxyAction action, ExecutableElement methodElement, org.jdesktop.application.Action annotation) { boolean returnsTask = isAsyncActionMethod(methodElement); action.setTaskEnabled(returnsTask); action.setEnabledName(annotation.enabledProperty()); action.setSelectedName(annotation.selectedProperty()); action.setBlockingType(ProxyAction.BlockingType.valueOf(annotation.block().toString())); // TBD 'name' attr }
@Override protected Map<String, String> inspectAction( Action action ) throws Exception { Map<String, String> attributes = CollectionUtils.newHashMap(); // org.jdesktop.application.Action (this is kind of a given) org.jdesktop.application.Action actionAnnotation = action.getAnnotation( org.jdesktop.application.Action.class ); if ( actionAnnotation != null ) { attributes.put( NAME, action.getName() ); if ( !"".equals( actionAnnotation.name() ) ) { attributes.put( LABEL, actionAnnotation.name() ); } } return attributes; } }
/** * Action that toggles the display of annotations in the score * * @param e the event that triggered this action */ @Action(selectedProperty = ANNOTATION_PAINTING) public void toggleAnnotations (ActionEvent e) { }
/** * Action that toggles the display of errors in the score * * @param e the event that triggered this action */ @Action(selectedProperty = ERROR_PAINTING) public void toggleErrors (ActionEvent e) { }
/** * Action that toggles the display of computed marks in the score * * @param e the event that triggered this action */ @Action(selectedProperty = MARK_PAINTING) public void toggleMarks (ActionEvent e) { }
/** * Action that toggles the display of voices with specific colors * * @param e the event that triggered this action */ @Action(selectedProperty = VOICE_PAINTING) public void toggleVoices (ActionEvent e) { }
/** * Action that toggles the display of sentences in selected glyphs * * @param e the event that triggered this action */ @Action(selectedProperty = SENTENCE_PAINTING) public void toggleSentences (ActionEvent e) { }
/** * Action that toggles the display of staff lines * * @param e the event that triggered this action */ @Action(selectedProperty = STAFF_LINE_PAINTING) public void toggleStaffLines (ActionEvent e) { }
/** * Action that toggles the display of inters with translucency. * * @param e the event that triggered this action */ @Action(selectedProperty = TRANSLUCENT_PAINTING) public void toggleTranslucency (ActionEvent e) { }
/** * Action that toggles the display of attachments in selected sticks * * @param e the event that triggered this action */ @Action(selectedProperty = ATTACHMENT_PAINTING) public void toggleAttachments (ActionEvent e) { }
/** * Action that toggles the display of staff peaks * * @param e the event that triggered this action */ @Action(selectedProperty = STAFF_PEAK_PAINTING) public void toggleStaffPeaks (ActionEvent e) { }
/** * Action that toggles the display of translations in selected glyphs * * @param e the event that triggered this action */ @Action(selectedProperty = TRANSLATION_PAINTING) public void toggleTranslations (ActionEvent e) { }
/** * Action that toggles the display of invalid sheets * * @param e the event that triggered this action */ @Action(selectedProperty = INVALID_SHEET_DISPLAY) public void toggleInvalidSheets (ActionEvent e) { }
/** * Action that toggles the display of vertical time slots * * @param e the event that triggered this action */ @Action(selectedProperty = SLOT_PAINTING) public void toggleSlots (ActionEvent e) { }
/** * Action that toggles the display of errors window * * @param e the event that triggered this action */ @Action(selectedProperty = ERRORS_WINDOW_DISPLAYED) public void toggleErrors (ActionEvent e) { }
/** * Action that toggles the display of log window * * @param e the event that triggered this action */ @Action(selectedProperty = LOG_WINDOW_DISPLAYED) public void toggleLog (ActionEvent e) { }