Package com.nexirius.framework.swing

Examples of com.nexirius.framework.swing.SwingViewerCreator


    }

    public void init() {
        ViewerCreatorMap map = factory.getViewerCreatorMap();

        map.register(MainModel.class, new SwingViewerCreator(MainViewer.class));
        map.register(MediaArrayModel.class, new MediaArrayLayout(), false);

        try {
            // create an editor for the main model
            DataViewer editor = getFactory().createViewer(mainModel, true);
View Full Code Here


        getClientResource().setParent(new ClientResourceImpl("License"));

        ViewerCreatorMap map = getFactory().getViewerCreatorMap();
        map.register(ProgressModel.class, new ProgressViewerCreator());
        map.register(MailArrayModel.class, new MailArrayLayout(), false);
        map.register(MainModel.class, new SwingViewerCreator(MainViewer.class));
        map.register(MailModel.class, new SwingViewerCreator(MailViewer.class));
        map.register(ImportArrayModel.class, new SwingViewerCreator(ImportArrayEditor.class));
//        getFactory().getViewerCreatorMap().registerTreeComponentViewerCreator(MailModel.class, new DataModelTreeComponentCreator() {
//            public DataModelTreeComponent createDataModelTreeComponent(DataModelTreeViewer treeViewer, DataModel model) {
//                return new DataModelTreeComponent(treeViewer, model) {
//
//                    public JPanel getBodyPart() {
//                        setDisplayAsEditor(true);
//                        return super.getBodyPart();
//                    }
//                };
//            }
//        }
//        );
        map.register(AttachmentModel.class, new SwingViewerCreator(AttachmentViewer.class));
        map.register(AttachmentListModel.class, new SwingViewerCreator(AttachmentListViewer.class));
        map.register(ReplaceStringsModel.class, new SwingViewerCreator(ReplaceStringsViewer.class));
        map.register(MailListModel.class, new MailListLayout(), true);
        map.register(ReplacePatternModel.class, new ReplacePatternLayout(), true);
        map.register(LicenseModel.class, new SwingViewerCreator(LicenseViewer.class));
        map.register(OrderLicenseModel.class, new SwingViewerCreator(OrderLicenseViewer.class));
    }
View Full Code Here

        DialogManager.setErrorAdaptor(this);
        DialogManager.setPopupEditorAdaptor(this);

        ViewerCreatorMap map = getFactory().getViewerCreatorMap();

        map.register(MainModel.class, new SwingViewerCreator(MainEditor.class));
        map.register(MemberModel.class, new SwingViewerCreator(MemberEditor.class));
        map.register(AddressModel.class, new SwingViewerCreator(AddressEditor.class));
        map.register(AddressModel.class, new SwingViewerCreator(AddressViewer.class));
        map.register(PersonModel.class, new SwingViewerCreator(PersonEditor.class));
        map.register(PersonModel.class, new SwingViewerCreator(PersonViewer.class));
        map.register(PhoneModel.class, new SwingViewerCreator(PhoneEditor.class));
        map.register(MemberArrayModel.class, new MemberArrayLayout(400), false);
        map.register(AddressArrayModel.class, new AddressArrayLayout(400), false);
        map.register(PhoneArrayModel.class, new PhoneArrayLayout(400), false);
        map.register(EditListModel.class, new SwingViewerCreator(EditListEditor.class));

        try {
            mainController = new MainController(getFactory());
        } catch (Exception e) {
            e.printStackTrace();
View Full Code Here

        } catch (Exception ex) {
            about.setText(ex.getClass().getName());
            ex.printStackTrace();
        }

        DialogManager.getPopupEditorAdaptor().noDuplicatePopupEdit(about, new SwingViewerCreator(HelpViewer.class), null);
    }
View Full Code Here

      north.add(createFieldEditor("html", factory));
            north.add(createFieldEditor(ListSortingModel.FIELD_NAME + ';' + ListSortingModel.FIELD_orderBy, factory));
      add(north, BorderLayout.NORTH);
 
      JSplitPane center = new JSplitPane(JSplitPane.VERTICAL_SPLIT);
      JComponent textViewer = factory.createViewer(new SwingViewerCreator(TextViewer.class), mainModel).getJComponent();
      JComponent listViewer = factory.createDefaultEditor(mainModel.getViewableChild("MailList")).getJComponent();

      textViewer.setPreferredSize(new Dimension(1000, 300));
      listViewer.setPreferredSize(new Dimension(1000, 300));
View Full Code Here

        if (!dateModel.getFlag(ModelFlag.NOT_EDITABLE)) {
            button = new JButton("...");

            button.addActionListener(new ActionListener() {
                public void actionPerformed(ActionEvent e) {
                    DialogManager.getPopupEditorAdaptor().popupEdit(dateModel, new SwingViewerCreator(DateChooserEditor.class));
                }
            });
           
            button.setMargin(new Insets(1, 3, 1, 3));
            panel.add(button, BorderLayout.EAST);
View Full Code Here

     *
     * @param viewableClass The class of the Viewable (DataModel) which will be registered
     * @param swingViewerClass The implementing class of a SwingViewer
     */
    public void registerSwingViewer(Class viewableClass, Class swingViewerClass) {
        register(viewableClass.getName(), new SwingViewerCreator(swingViewerClass));
    }
View Full Code Here

    private void createProgressDialog() {
        if (progressDialog == null) {
            progressDialog = DialogManager.createJDialog("progress", false);

            progressDialog.getContentPane().setLayout(new BorderLayout());
            progressDialog.getContentPane().add(ViewerFactory.getInstance().createViewer(new SwingViewerCreator(MainProgressViewer.class), this).getJComponent(), BorderLayout.CENTER);

            progressDialog.pack();
            DialogManager.center(progressDialog, false);
        }
View Full Code Here

        }

    }

    public void doExport() {
        DialogManager.getPopupEditorAdaptor().noDuplicatePopupEdit(separator, new SwingViewerCreator(SeparatorChooserViewer.class), null);

        JFileChooser chooser = new JFileChooser();

        int retval = chooser.showSaveDialog(DialogManager.getToplevelFrame());
View Full Code Here

        appendMethod(new DefaultDataModelCommand("doDeleteEntry"));
        appendMethod(new DefaultDataModelCommand("doToggleDoNotSend"));
    }

    public void doEditList() {
        DialogManager.getPopupEditorAdaptor().popupEdit(mailArray, new ArrayEditorCreator(new SwingViewerCreator(MailArrayEditor.class), 1000));
    }
View Full Code Here

TOP

Related Classes of com.nexirius.framework.swing.SwingViewerCreator

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.