Examples of ULCBoxPane


Examples of com.ulcjava.base.application.ULCBoxPane

            DialogModel dialogModel = new DialogModel(ulcDialogViewerFactory, dialog, model, copy, ulcDialogListener);
            ULCComponent editorPanel = ulcDialogViewerFactory.createDefaultUlcEditor(duplicate ? copy : model).getULCComponent(ulcDialogViewerFactory);
            ULCComponent buttonPanel = ulcDialogViewerFactory.createDefaultUlcEditor(dialogModel).getULCComponent(ulcDialogViewerFactory);

            ULCBoxPane boxPane = new ULCBoxPane(1, 0);
            boxPane.add(ULCBoxPane.BOX_EXPAND_EXPAND, editorPanel);
            boxPane.add(buttonPanel);

            dialog.add(boxPane);
            dialog.setVisible(true);

            return dialog;
View Full Code Here

Examples of com.ulcjava.base.application.ULCBoxPane

            mainFrame.setIconImage(icon);
        }

        mainFrame.setDefaultCloseOperation(ULCFrame.DO_NOTHING_ON_CLOSE);

        mainPanel = new ULCBoxPane(true);
        mainFrame.add(ULCBoxPane.BOX_EXPAND_EXPAND, mainPanel);
    }
View Full Code Here

Examples of com.ulcjava.base.application.ULCBoxPane

    public ULCComponent getULCComponent(ULCViewerFactory factory) {
        if (component != null) {
            return component;
        }

        ULCBoxPane fieldPane = new ULCBoxPane(2, 0);

        DataModelEnumeration fields = model.getEnumeration();
        while (fields.hasMore()) {
            DataModel child = fields.next();
            try {
                ULCViewer editor = factory.createDefaultUlcEditor(child);

                fieldPane.add(new ULCLabel(factory.getClientResource().getLabel(child.getFieldName())));
                fieldPane.add(ULCBoxPane.BOX_EXPAND_EXPAND, editor.getULCComponent(factory));
            } catch (Exception e) {
                e.printStackTrace()//TODO
            }
        }

        ULCBoxPane buttonPane = new ULCBoxPane(0, 1);

        if (model.getMethods() != null) {
            Enumeration methods = model.getMethods().elements();
            while (methods.hasMoreElements()) {
                DataModelCommand child = (DataModelCommand) methods.nextElement();
                try {
                    ULCViewer editor = factory.createDefaultUlcEditor(child);
                    buttonPane.add(editor.getULCComponent(factory));
                } catch (Exception e) {
                    e.printStackTrace()//TODO
                }
            }
        }

        component = new ULCBoxPane(1, 2);
        component.add(ULCBoxPane.BOX_EXPAND_EXPAND, fieldPane);
        component.add(buttonPane);

        return component;
    }
View Full Code Here

Examples of com.ulcjava.base.application.ULCBoxPane

    public ULCComponent getULCComponent(ULCViewerFactory factory) {
        if (component != null) {
            return component;
        }

        component = new ULCBoxPane(2, 0);

        BooleanModel booleanField = itemModel.getBooleanField();
        DateModel dateField = itemModel.getDateField();
        IntModel intField = itemModel.getIntField();
        DoubleModel doubleField = itemModel.getDoubleField();
View Full Code Here

Examples of com.ulcjava.base.application.ULCBoxPane

public class ItemListULCViewer implements ULCViewer {
    private ItemListModel mainModel;

    public ULCComponent getULCComponent(ULCViewerFactory factory) {
        ULCBoxPane panel = new ULCBoxPane(1, 0);
        Insets insets = new Insets(2, 2, 2, 2);
        GridBagConstraints c1 = new GridBagConstraints(0, 0, 3, 1, 1.0, 1.0, GridBagConstraints.NORTHWEST, GridBagConstraints.BOTH, insets, 0, 0);
        GridBagConstraints bc1 = new GridBagConstraints(0, 1, 1, 1, 1.0, 0.0, GridBagConstraints.NORTHWEST, GridBagConstraints.NONE, insets, 0, 0);
        GridBagConstraints bc2 = new GridBagConstraints(1, 1, 1, 1, 1.0, 0.0, GridBagConstraints.NORTHWEST, GridBagConstraints.NONE, insets, 0, 0);
        GridBagConstraints bc3 = new GridBagConstraints(2, 1, 1, 1, 1.0, 0.0, GridBagConstraints.NORTHWEST, GridBagConstraints.NONE, insets, 0, 0);
        try {
            ULCComponent table = factory.createUlcViewer(mainModel.getArray(), false).getULCComponent(factory);
            panel.add(table, c1);

            ULCComponent editButton = factory.createUlcViewer(mainModel.getViewableChild(ItemListModel.EDIT_ITEM_COMMAND), true).getULCComponent(factory);
            ULCComponent newButton = factory.createUlcViewer(mainModel.getViewableChild(ItemListModel.NEW_ITEM_COMMAND), true).getULCComponent(factory);
            ULCComponent deleteButton = factory.createUlcViewer(mainModel.getViewableChild(ItemListModel.DELETE_ITEM_COMMAND), true).getULCComponent(factory);

            panel.add(editButton, bc1);
            panel.add(newButton, bc2);
            panel.add(deleteButton, bc3);
        } catch (Exception e) {
            e.printStackTrace()//TODO
        }
        return panel;
    }
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.