@Override protected Map<String, String> inspectAction( Action action ) throws Exception { Map<String, String> attributes = CollectionUtils.newHashMap(); // UiAction (this is kind of a dummy match) if ( action.isAnnotationPresent( UiAction.class ) ) { attributes.put( NAME, action.getName() ); } return attributes; }
@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; } }
element.setAttribute( NAME, action.getName() );
element.setAttribute( NAME, action.getName() );
@Override protected Map<String, String> inspectAction( Action action ) throws Exception { Map<String, String> attributes = CollectionUtils.newHashMap(); // UiAction (this is kind of a dummy match) if ( action.isAnnotationPresent( UiAction.class ) ) { attributes.put( NAME, action.getName() ); } return attributes; }