Package org.apache.cayenne.modeler

Examples of org.apache.cayenne.modeler.Application$PreferencesDelegate


    /**
     * @return remove callback method action
     */
    protected AbstractRemoveCallbackMethodAction getRemoveCallbackMethodAction() {
        Application app = Application.getInstance();
        return (AbstractRemoveCallbackMethodAction) app
                .getAction(RemoveCallbackMethodAction.ACTION_NAME);
    }
View Full Code Here


    private void initView() {
        this.setLayout(new BorderLayout());

        JToolBar toolBar = new JToolBar();
        Application app = Application.getInstance();
        toolBar.add(app.getAction(ObjEntitySyncAction.getActionName()).buildButton());
        toolBar.add(app.getAction(CreateAttributeAction.getActionName()).buildButton());
        toolBar
                .add(app
                        .getAction(CreateRelationshipAction.getActionName())
                        .buildButton());
        add(toolBar, BorderLayout.NORTH);

        // create widgets
View Full Code Here

    private void init() {
        this.setLayout(new BorderLayout());

        JToolBar toolBar = new JToolBar();
        Application app = Application.getInstance();
        toolBar.add(app.getAction(CreateAttributeAction.getActionName()).buildButton());
        toolBar.add(app.getAction(ObjEntitySyncAction.getActionName()).buildButton());
        toolBar.addSeparator();

        Icon ico = ModelerUtil.buildIcon("icon-info.gif");

        resolve = new JButton();
        resolve.setIcon(ico);
        resolve.setToolTipText("Edit Attribute");
        toolBar.add(resolve);

        toolBar.addSeparator();
        toolBar.add(app.getAction(RemoveAttributeAction.getActionName()).buildButton());

        toolBar.addSeparator();
        toolBar.add(app.getAction(CutAttributeAction.getActionName()).buildButton());
        toolBar.add(app.getAction(CopyAttributeAction.getActionName()).buildButton());
        toolBar.add(app.getAction(PasteAction.getActionName()).buildButton());

        add(toolBar, BorderLayout.NORTH);

        table = new CayenneTable();
        table.setDefaultRenderer(String.class, new CellRenderer());

        /**
         * Create and install a popup
         */
        JPopupMenu popup = new JPopupMenu();
        popup.add(app.getAction(RemoveAttributeAction.getActionName()).buildMenu());

        popup.addSeparator();
        popup.add(app.getAction(CutAttributeAction.getActionName()).buildMenu());
        popup.add(app.getAction(CopyAttributeAction.getActionName()).buildMenu());
        popup.add(app.getAction(PasteAction.getActionName()).buildMenu());

        TablePopupHandler.install(table, popup);

        add(PanelFactory.createTablePanel(table, null), BorderLayout.CENTER);
    }
View Full Code Here

    /**
     * @return create callback method action
     */
    protected CayenneAction getCreateCallbackMethodAction() {
        Application app = Application.getInstance();
        return app.getAction(CreateCallbackMethodForDataMapListenerAction.ACTION_NAME);
    }
View Full Code Here

    /**
     * @return remove callback method action
     */
    protected AbstractRemoveCallbackMethodAction getRemoveCallbackMethodAction() {
        Application app = Application.getInstance();
        return (AbstractRemoveCallbackMethodAction) app.getAction(RemoveCallbackMethodForDataMapListenerAction.ACTION_NAME);
    }
View Full Code Here

    }

    private void initView() {

        JToolBar toolBar = new JToolBar();
        Application app = Application.getInstance();
        toolBar.add(app.getAction(CreateObjEntityAction.getActionName()).buildButton());
        toolBar.add(app.getAction(DbEntitySyncAction.getActionName()).buildButton());
        toolBar.addSeparator();

        toolBar.add(app.getAction(CreateAttributeAction.getActionName()).buildButton());
        toolBar
                .add(app
                        .getAction(CreateRelationshipAction.getActionName())
                        .buildButton());

        // create widgets
        name = new TextAdapter(new JTextField()) {
View Full Code Here

        });
    }

    /** Reset the remove buttons */
    private void resetRemoveButtons() {
        Application app = Application.getInstance();
        app.getAction(RemoveAttributeAction.getActionName()).setEnabled(false);
        app.getAction(RemoveRelationshipAction.getActionName()).setEnabled(false);
        app.getAction(RemoveCallbackMethodAction.getActionName()).setEnabled(false);
    }
View Full Code Here

    protected void init() {
        setLayout(new BorderLayout());

        JToolBar toolBar = new JToolBar();

        Application app = Application.getInstance();
        toolBar.add(app.getAction(CreateProcedureParameterAction.getActionName()).buildButton());
        removeParameterButton = app.getAction(RemoveProcedureParameterAction.getActionName()).buildButton();
        toolBar.add(removeParameterButton);
        toolBar.addSeparator();
       
        Icon up = ModelerUtil.buildIcon("icon-move_up.gif");
        Icon down = ModelerUtil.buildIcon("icon-move_down.gif");

        moveUp = new JButton();
        moveUp.setIcon(up);
        moveUp.setToolTipText("Move Parameter Up");
        toolBar.add(moveUp);
       
        moveDown = new JButton();
        moveDown.setIcon(down);
        moveDown.setToolTipText("Move Parameter Down");
        toolBar.add(moveDown);
       
        toolBar.addSeparator();
        toolBar.add(app.getAction(CutProcedureParameterAction.getActionName()).buildButton());
        toolBar.add(app.getAction(CopyProcedureParameterAction.getActionName()).buildButton());
        toolBar.add(app.getAction(PasteAction.getActionName()).buildButton());
       
        add(toolBar, BorderLayout.NORTH);

        // Create table with two columns and no rows.
        table = new CayenneTable();
       
        /**
         * Create and install a popup
         */
        JPopupMenu popup = new JPopupMenu();
       
        removeParameterMenu = app.getAction(RemoveProcedureParameterAction.getActionName()).buildMenu();
       
        popup.add(removeParameterMenu);
        popup.addSeparator();
       
        moveUpMenu = new JMenuItem("Move Parameter Up", up);
        moveDownMenu = new JMenuItem("Move Parameter Down", down);
       
        popup.add(moveUpMenu);
        popup.add(moveDownMenu);
       
        popup.addSeparator();
        popup.add(app.getAction(CutProcedureParameterAction.getActionName()).buildMenu());
        popup.add(app.getAction(CopyProcedureParameterAction.getActionName()).buildMenu());
        popup.add(app.getAction(PasteAction.getActionName()).buildMenu());
       
        TablePopupHandler.install(table, popup);
       
        add(PanelFactory.createTablePanel(table, null), BorderLayout.CENTER);
       
View Full Code Here

        addChangeListener(this);
    }

    /** Reset the remove buttons */
    private void resetRemoveButtons(){
        Application app = Application.getInstance();
        app.getAction(RemoveAttributeAction.getActionName()).setEnabled(false);
        app.getAction(RemoveRelationshipAction.getActionName()).setEnabled(false);
    }
View Full Code Here

    private void init() {
        this.setLayout(new BorderLayout());

        JToolBar toolBar = new JToolBar();
        Application app = Application.getInstance();
        toolBar.add(app.getAction(CreateObjEntityAction.getActionName()).buildButton());
        toolBar.add(app.getAction(CreateAttributeAction.getActionName()).buildButton());
        toolBar.add(app.getAction(DbEntitySyncAction.getActionName()).buildButton());

        toolBar.addSeparator();

        toolBar.addSeparator();
        toolBar.add(app.getAction(RemoveAttributeAction.getActionName()).buildButton());
       
        toolBar.addSeparator();
        toolBar.add(app.getAction(CutAttributeAction.getActionName()).buildButton());
        toolBar.add(app.getAction(CopyAttributeAction.getActionName()).buildButton());
        toolBar.add(app.getAction(PasteAction.getActionName()).buildButton());

        add(toolBar, BorderLayout.NORTH);
       
        // Create table with two columns and no rows.
        table = new CayenneTable();
       
        /**
         * Create and install a popup
         */
        JPopupMenu popup = new JPopupMenu();
        popup.add(app.getAction(RemoveAttributeAction.getActionName()).buildMenu());
       
        popup.addSeparator();
        popup.add(app.getAction(CutAttributeAction.getActionName()).buildMenu());
        popup.add(app.getAction(CopyAttributeAction.getActionName()).buildMenu());
        popup.add(app.getAction(PasteAction.getActionName()).buildMenu());
       
        TablePopupHandler.install(table, popup);
       
        add(PanelFactory.createTablePanel(table, null), BorderLayout.CENTER);
       
View Full Code Here

TOP

Related Classes of org.apache.cayenne.modeler.Application$PreferencesDelegate

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.