Package com.nexirius.framework.gadgets

Examples of com.nexirius.framework.gadgets.ArrayPanel


public class AddressEditor extends StandardStructEditor {
    protected AddressModel addressModel;

    public JComponent createJComponent(ViewerFactory factory) {
        ArrayPanel panel = new ArrayPanel(false, ArrayLayout.FULL_SIZE);

        panel.setOpaque(false);

        panel.add(createBanner(factory, "Address"));
        try {
            panel.add(createField(AddressModel.FIELD_STREET, factory, isEditor()));
            panel.add(createDualField(factory, isEditor(), "zipCity", AddressModel.FIELD_ZIP, AddressModel.FIELD_CITY, 30));
            panel.add(createField(AddressModel.FIELD_STATE, factory, isEditor()));
        } catch (Exception e) {
            e.printStackTrace();
        }

        return panel;
View Full Code Here


    public JComponent createJComponent(ViewerFactory factory) {
        ClientResource cr = factory.getClientResource();
        CFJTabbedPane tabbedPane = new CFJTabbedPane(cr);

        try {
            JPanel personPanel = new ArrayPanel(false, ArrayLayout.FULL_SIZE);

            JComponent personEditor = factory.createDefaultEditor(memberModel.getPerson()).getJComponent();
            personPanel.add(personEditor);
            personPanel.add(createFieldEditor(MemberModel.FIELD_TYPE, factory));
            tabbedPane.addTab(PersonModel.FIELD_PERSON, createTabComponent(personPanel));
            DataModel addressList = memberModel.getChild(AddressListModel.FIELD_ADDRESS_LIST);
            tabbedPane.addTab(AddressListModel.FIELD_ADDRESS_LIST, createTabComponent(factory.createDefaultEditor(addressList).getJComponent()));
            DataModel phoneList = memberModel.getChild(PhoneListModel.FIELD_PHONE_LIST);
            tabbedPane.addTab(PhoneListModel.FIELD_PHONE_LIST, createTabComponent(factory.createDefaultEditor(phoneList).getJComponent()));
View Full Code Here

public class PhoneEditor extends StandardStructEditor {
    protected PhoneModel phoneModel;

    public JComponent createJComponent(ViewerFactory factory) {
        ArrayPanel panel = new ArrayPanel(false, ArrayLayout.FULL_SIZE);

        panel.setOpaque(false);

        panel.add(createBanner(factory, "Phone"));
        try {
            panel.add(createField(PhoneModel.FIELD_DESCRIPTION, factory, isEditor()));
            panel.add(createField(PhoneModel.FIELD_NUMBER, factory, isEditor()));
        } catch (Exception e) {
            e.printStackTrace();
        }

        return panel;
View Full Code Here

public class PersonEditor extends StandardStructEditor {
    protected PersonModel personModel;

    public JComponent createJComponent(ViewerFactory factory) {
        ArrayPanel panel = new ArrayPanel(false, ArrayLayout.FULL_SIZE);

        panel.setOpaque(false);

        panel.add(createBanner(factory, "Person"));
        try {
            panel.add(createField(PersonModel.FIELD_NAME, factory, isEditor()));
            panel.add(createField(PersonModel.FIELD_FIRSTNAME, factory, isEditor()));
            panel.add(createField(PersonModel.FIELD_BIRTHDATE, factory, isEditor()));
        } catch (Exception e) {
            e.printStackTrace();
        }

        return panel;
View Full Code Here

     */
    public void create() {
        Assert.pre(this.factory != null, "Can't create a StructViewer with null factory (call setFactory())");

        if (getLayout() == null) {
            ArrayPanel arrayPanel = new ArrayPanel(false, ArrayLayout.FULL_SIZE);

            setJComponent(arrayPanel);
            Border border = arrayPanel.getBorder();
            Border margin = new EtchedBorder();
            arrayPanel.setBorder(new CompoundBorder(border, margin));
            arrayPanel.setInnerMargin(5);
        } else {
            JPanel p = new JPanel(null);

            p.setSize(100, 50);
            setJComponent(p);
View Full Code Here

    /**
     * Creates the dialog window buttons (Ok and Cancel)
     */
    public JComponent createButtons() {
        JButton buttons[];
        JPanel panel = new ArrayPanel(true);

        if (factory == null) {
            buttons = new JButton[3];
            panel.add(buttons[0] = new JButton("OK"));
            panel.add(buttons[1] = new JButton("Cancel"));
            panel.add(buttons[2] = new JButton("Help"));
        } else {
            String button_labels[] = new String[2];

            if (getHelp() == null) {
                if (noDuplicate) {
View Full Code Here

            StringVector sv = new StringVector(text, "\n");
            JComponent q;
            Icon icon = factory.getIcon("QUESTION");

            if (sv.size() > 1) {
                JPanel qpanel = new ArrayPanel(false, ArrayLayout.FULL_SIZE);
                String s;

                if (icon != null) {
                    qpanel.add(new JLabel(icon));
                }

                for (s = sv.firstItem(); s != null; s = sv.nextItem()) {
                    qpanel.add(new JLabel(s));
                }

                q = qpanel;
            } else {
                JLabel label = new JLabel(text);
View Full Code Here

TOP

Related Classes of com.nexirius.framework.gadgets.ArrayPanel

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.