Examples of PopupMenuMouseListener


Examples of org.springframework.richclient.util.PopupMenuMouseListener

        final GridBagLayoutBuilder typeListPanelBuilder = new GridBagLayoutBuilder();
        typeListPanelBuilder.append(cf.createLabel("similarTypesView.typeList.label", new ValueModel[] { numSimilarTypesSchema})).nextLine();
        typeListPanelBuilder.append(cf.createScrollPane(masterList, ScrollPaneConstants.VERTICAL_SCROLLBAR_AS_NEEDED, ScrollPaneConstants.HORIZONTAL_SCROLLBAR_AS_NEEDED), 1, 1, true, true);

        final CommandGroup group = getWindowCommandManager().createCommandGroup("similarTypesCommandGroup", new Object[] { similarTypesTypeHierarchyCommand, similarTypesInspectionCommand, "separator", GlobalCommandIds.PROPERTIES});
        masterList.addMouseListener(new PopupMenuMouseListener(group.createPopupMenu()));

        masterList.addListSelectionListener(new ListSelectionListener() {

            @Override
            public void valueChanged(ListSelectionEvent evt) {
                Map<String, XSObject> parameters = new HashMap<String, XSObject>();
                final SimilarTypeListModelEntry similarTypeListModelEntry = (SimilarTypeListModelEntry) masterList.getSelectedValue();
                if (null == similarTypeListModelEntry) return;
                parameters.put(XsElementPropertiesExecutor.OBJECT, similarTypeListModelEntry.getType());
                xsElementPropertiesExecutor.execute(parameters);
            }
        });

        // build client view
        final GridBagLayoutBuilder similarTypesListPanelBuilder = new GridBagLayoutBuilder();
        similarTypesListPanelBuilder.append(cf.createLabel("similarTypesView.similarTypeList.label", new ValueModel[] { numSimilarTypes})).nextLine();
        similarTypesListPanelBuilder.append(cf.createScrollPane(detailList, ScrollPaneConstants.VERTICAL_SCROLLBAR_AS_NEEDED, ScrollPaneConstants.HORIZONTAL_SCROLLBAR_AS_NEEDED), 1, 1, true, true);

        final CommandGroup detailListGroup = getWindowCommandManager().createCommandGroup("typeListCommandGroup", new Object[] { typesListTypeHierarchyCommand, typesListTypeInspectionCommand, "separator", GlobalCommandIds.PROPERTIES});
        detailList.addMouseListener(new PopupMenuMouseListener(detailListGroup.createPopupMenu()));

        detailList.addListSelectionListener(new ListSelectionListener() {

            @Override
            public void valueChanged(ListSelectionEvent evt) {
View Full Code Here

Examples of org.springframework.richclient.util.PopupMenuMouseListener

        jlUnusedTypes.addListSelectionListener(xsPropertiesSelectionListener);

        final CommandGroup group = getWindowCommandManager().createCommandGroup("unusedTypeUsageCommandGroup", new Object[] { unusedTypeHierarchyCommand, unusedTypeInspectionCommand, "separator", GlobalCommandIds.PROPERTIES});
        final JPopupMenu popup = group.createPopupMenu();
        jlUnusedTypes.addMouseListener(new PopupMenuMouseListener(popup));
    }
View Full Code Here

Examples of org.springframework.richclient.util.PopupMenuMouseListener

        jtUsedTypes = new JTree(new DefaultMutableTreeNode(getMessage("usedTypes.tree.noModel")));
        jtUsedTypes.setCellRenderer(new SchemaElementsRenderer());

        final CommandGroup group = getWindowCommandManager().createCommandGroup("usedTypeUsageCommandGroup", new Object[] { usedTypeHierarchyCommand, usedTypeInspectionCommand, "separator", GlobalCommandIds.PROPERTIES});
        final JPopupMenu popup = group.createPopupMenu();
        jtUsedTypes.addMouseListener(new PopupMenuMouseListener(popup));

        jtUsedTypes.addTreeSelectionListener(xsPropertiesSelectionListener);
    }
View Full Code Here

Examples of org.springframework.richclient.util.PopupMenuMouseListener

        table.getColumnModel().getColumn( 0 ).setMaxWidth( 30 );
      }
    }

    //Table popup Listener
    table.addMouseListener( new PopupMenuMouseListener() {
      @Override
      protected JPopupMenu getPopupMenu() {
        return showTablePopup();
      }
    } );
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.