Package org.apache.cayenne.modeler.editor

Examples of org.apache.cayenne.modeler.editor.CallbackType


     * performs adding new callback method
     *
     * @param e event
     */
    public final void performAction(ActionEvent e) {
        CallbackType callbackType = getProjectController().getCurrentCallbackType();

        // generate methodName
        String methodNamePrefix = toMethodName(callbackType.getType());
        String methodName;
        // now that we're generating the method names based on the callback type, check to
        // see if the
        // raw prefix, no numbers, is taken.
        if (!getCallbackMap()
                .getCallbackDescriptor(callbackType.getType())
                .getCallbackMethods()
                .contains(methodNamePrefix)) {
            methodName = methodNamePrefix;
        }
        else {
            int counter = 1;
            do {
                methodName = methodNamePrefix + counter;
                counter++;
            } while (getCallbackMap()
                    .getCallbackDescriptor(callbackType.getType())
                    .getCallbackMethods()
                    .contains(methodName));
        }

        createCallbackMethod(getCallbackMap(), callbackType, methodName);
View Full Code Here


     * base logic for callback method removing
     * @param actionEvent event
     */
    private void removeCallbackMethods(ActionEvent actionEvent) {
        ProjectController mediator = getProjectController();
        CallbackType callbackType = mediator.getCurrentCallbackType();

        String[] callbackMethods = mediator.getCurrentCallbackMethods();

        for (String callbackMethod : callbackMethods) {
            removeCallbackMethod(getCallbackMap(), callbackType, callbackMethod);
View Full Code Here

TOP

Related Classes of org.apache.cayenne.modeler.editor.CallbackType

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.