Package com.nexirius.ulc.ulcviewer

Examples of com.nexirius.ulc.ulcviewer.ULCViewerFactory


     * @param model The model for which a dialog window is opened
     * @param duplicate If true then a copy of the model is displayed and not only the OK but also a Cancel button is displayed at the bottom of the winndow
     * @return The created dialog window
     */
    public ULCDialog popup(DataModel model, boolean duplicate, ULCDialogListener ulcDialogListener) {
        ULCViewerFactory ulcFactory = application.getUlcFactory();
        ULCDialogViewerFactory ulcDialogViewerFactory = new ULCDialogViewerFactory(ulcFactory.getClientResource());
        ulcDialogViewerFactory.setUlcViewerCreatorMap(ulcFactory.getUlcViewerCreatorMap());
        ulcDialogViewerFactory.startDialog();

        try {
            ULCDialog dialog = createDialog();
            DataModel copy = null;

            String fieldName = model.getFieldName();

            if (fieldName != null) {
                dialog.setTitle(ulcFactory.getClientResource().getLabel(fieldName));
            }

            if (duplicate) {
                copy = model.duplicate(null, null);
            }
View Full Code Here


        }
    }

    public void init() {
        try {
            ULCViewerFactory ulcFactory = getUlcFactory();

            //ulcFactory.getUlcViewerCreatorMap().register(ItemModel.class, new ULCViewerCreator(ItemULCEditor.class));
            ulcFactory.getUlcViewerCreatorMap().register(ItemListModel.class, new ULCViewerCreator(ItemListULCViewer.class));

            ULCViewer editor = ulcFactory.createDefaultUlcEditor(mainModel);
            ULCComponent ulcComponent = editor.getULCComponent(ulcFactory);

            getMainULCPanel().add(ULCBoxPane.BOX_EXPAND_EXPAND, ulcComponent);
        } catch (Exception e) {
            e.printStackTrace()//TODO
View Full Code Here

TOP

Related Classes of com.nexirius.ulc.ulcviewer.ULCViewerFactory

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.