Package org.springframework.richclient.factory

Examples of org.springframework.richclient.factory.ComponentFactory


        createJcbEnableHtml();
        setupListeners();
    }

    public JPanel getPanel() {
        ComponentFactory cf = getComponentFactory();
        JLabel label = cf.createLabelFor(getMessage("annotationToolWindow.annotations.comboBox.label"), this.jcbAnnotations);
        GridBagLayoutBuilder builder = new GridBagLayoutBuilder();
        builder.setAutoSpanLastComponent(false);
        builder.setDefaultInsets(new Insets(5, 5, 5, 5));
        builder.appendLabel(label).append(this.jcbAnnotations, 1, 1, false, false).append(Box.createHorizontalStrut(10), 1, 1, true, false).append(jcbEnableHtml, 1, 1, false, false, new Insets(5, 5, 5, 5)).nextLine();
        builder.append(cf.createScrollPane(jetDocumentation, JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED, JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED), 4, 1, true, true).nextLine();

        return builder.getPanel();
    }
View Full Code Here


    @Override
    protected JComponent createControl() {
        createSchemaElementsChart();
        GridBagLayoutBuilder builder = new GridBagLayoutBuilder();

        final ComponentFactory cf = getComponentFactory();
        builder.append(cf.createTitleLabel("schemaInfoView.titleLabel"), 1, 1, true, false).nextLine();
        builder.append(cf.createLabel("schemaInfoView.schema.targetNamespace", new ValueModel[] { targetNamespace}), 1, 1, true, false).nextLine();

        builder.append(cpSchemaElements, 1, 1, true, true);
        return builder.getPanel();
    }
View Full Code Here

        final JPopupMenu popup = group.createPopupMenu();
        detailList.addMouseListener(new PopupMenuMouseListener(popup));

        // build master view
        final GridBagLayoutBuilder masterPanelBuilder = new GridBagLayoutBuilder();
        final ComponentFactory cf = getComponentFactory();
        masterPanelBuilder.append(cf.createLabel("sameNameDifferentTypesView.nameList.label", new ValueModel[] { numNames})).nextLine();
        masterPanelBuilder.append(cf.createScrollPane(masterList, JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED, JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED), 1, 1, true, true);

        // build detail view
        final GridBagLayoutBuilder detailPanelBuilder = new GridBagLayoutBuilder();
        detailPanelBuilder.append(FilterToolbarFactory.createFilterToolBar(elementTypeConstraint), 1, 1, true, false).nextLine();
        detailPanelBuilder.append(cf.createLabel("sameNameDifferentTypesView.typeList.label", new ValueModel[] { numTypes})).nextLine();
        detailPanelBuilder.append(cf.createScrollPane(detailList, JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED, JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED), 1, 1, true, true);

        final JSplitPane jsp = new JSplitPane(JSplitPane.VERTICAL_SPLIT);
        jsp.setDividerLocation(0.5f);
        jsp.setTopComponent(masterPanelBuilder.getPanel());
        jsp.setBottomComponent(detailPanelBuilder.getPanel());
View Full Code Here

     *
     * @see org.springframework.richclient.application.support.AbstractView#createControl()
     */
    @Override
    protected JComponent createControl() {
        final ComponentFactory cf = getComponentFactory();

        final JList masterList = masterDetailList.getMasterList();
        final JList detailList = masterDetailList.getDetailList();
        detailList.setCellRenderer(new SchemaElementsRenderer());
        masterList.setCellRenderer(new SimilarTypeRenderer());

        // build master view
        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) {
                Map<String, XSObject> parameters = new HashMap<String, XSObject>();
                parameters.put(XsElementPropertiesExecutor.OBJECT, (XSObject) detailList.getSelectedValue());
                xsElementPropertiesExecutor.execute(parameters);
            }
        });

        // build main component
        JSplitPane jspSimilarTypes = new JSplitPane(JSplitPane.VERTICAL_SPLIT);
        jspSimilarTypes.setDividerLocation(0.66f);
        jspSimilarTypes.setTopComponent(typeListPanelBuilder.getPanel());
        jspSimilarTypes.setBottomComponent(similarTypesListPanelBuilder.getPanel());

        JPanel jpSimilarTypes = cf.createPanel(new BorderLayout());
        jpSimilarTypes.add(jspSimilarTypes, BorderLayout.CENTER);
        jpSimilarTypes.add(FilterToolbarFactory.createFilterToolBar(elementTypeConstraint), BorderLayout.NORTH);

        return jpSimilarTypes;
    }
View Full Code Here

     *
     * @see org.springframework.richclient.dialog.TitledApplicationDialog#createTitledDialogContentPane()
     */
    @Override
    protected JComponent createTitledDialogContentPane() {
        ComponentFactory cf = getComponentFactory();
        GridBagLayoutBuilder builder = new GridBagLayoutBuilder();

        builder.appendLabel(new JLabel(getMessage("runMultiple.analyzerSelectLabel")));
        builder.nextLine();

        for (Analyzer analyzer : getAvailableAnalyzers()) {
            JCheckBox jcb = cf.createCheckBox(analyzer.getLabelProvider().getCaption());
            jcb.addActionListener(new AnalyzerCheckBoxListener(this.selectedAnalyzers, analyzer));
            builder.append(jcb);
            builder.nextLine();
        }

View Full Code Here

    @Override
    protected JComponent createControl() {
        createUnusedTypesList();
        createUsedTypesTree();

        final ComponentFactory cf = getComponentFactory();
        final GridBagLayoutBuilder builder = new GridBagLayoutBuilder();
        builder.setDefaultInsets(new Insets(2, 5, 2, 5));

        final JToolBar filterToolbar = FilterToolbarFactory.createFilterToolBar(new SchemaTypeConstraint[] { unusedTypesConstraint, usedTypesConstraint});
        builder.append(filterToolbar, 1, 1, true, false).nextLine();

        builder.appendLabel(cf.createLabel("typeUsageView.label.unusedTypes", new ValueModel[] { numUnusedTypes})).nextLine();

        builder.append(cf.createScrollPane(jlUnusedTypes, ScrollPaneConstants.VERTICAL_SCROLLBAR_AS_NEEDED, ScrollPaneConstants.HORIZONTAL_SCROLLBAR_AS_NEEDED), 1, 1, 1, 1).nextLine();

        builder.appendSeparator();

        builder.appendLabel(cf.createLabel("typeUsageView.label.usedTypes", new ValueModel[] { numUsedTypes})).nextLine();

        builder.append(cf.createScrollPane(jtUsedTypes, ScrollPaneConstants.VERTICAL_SCROLLBAR_AS_NEEDED, ScrollPaneConstants.HORIZONTAL_SCROLLBAR_AS_NEEDED), 1, 1, 1, 2);

        builder.setAutoSpanLastComponent(true);
        JPanel jpTypeUsage = builder.getPanel();

        return jpTypeUsage;
View Full Code Here

        return true;
    }

    @Override
    protected JComponent createTitledDialogContentPane() {
        final ComponentFactory cf = getComponentFactory();
        JTabbedPane jtb = cf.createTabbedPane();

        final TypeHierarchyPanel typeHierarchyPanel = new TypeHierarchyPanel();
        typeHierarchyPanel.setType(type);

        GridBagLayoutBuilder builder = new GridBagLayoutBuilder();

        final JTextField jtfLocalName = cf.createTextField();
        jtfLocalName.setText(type.getName());
        jtfLocalName.setEditable(false);

        final JTextField jtfNamespace = cf.createTextField();
        jtfNamespace.setText(type.getNamespace());
        jtfNamespace.setEditable(false);

        builder.append(new JLabel("Local name:")).append(jtfLocalName, 1, 1, true, false).nextLine();
        builder.append(new JLabel("Namespace:")).append(jtfNamespace, 1, 1, true, false).nextLine();
View Full Code Here

TOP

Related Classes of org.springframework.richclient.factory.ComponentFactory

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.