Package org.springframework.richclient.widget

Examples of org.springframework.richclient.widget.AbstractTitledWidget


        return new FormTester(context);
    }

    public void showFormDialog(final AbstractForm form, boolean modal)
    {
        AbstractTitledWidget widget = new AbstractTitledWidget()
        {
            @Override
            public JComponent createWidgetContent()
            {
                final JTextArea area = new JTextArea(20,40);
View Full Code Here


        frame.setVisible(true);
    }

    public JFrame createJFrame(final AbstractForm form)
    {
        AbstractTitledWidget widget = new AbstractTitledWidget()
        {
            @Override
            public JComponent createWidgetContent()
            {
                form.getFormModel().addPropertyChangeListener(new PropertyChangeListener()
                {
                    public void propertyChange(PropertyChangeEvent evt)
                    {
                        System.out.println(evt.getPropertyName() + ": " + evt.getOldValue() + " -> " + evt.getNewValue());
                    }
                });
                return form.getControl();
            }

            @Override
            public List<? extends AbstractCommand> getCommands()
            {
                List<AbstractCommand> commands = new ArrayList<AbstractCommand>();
                commands.add(form.getCommitCommand());
                commands.add(form.getRevertCommand());
                return commands;
            }
        };
        form.addValidationResultsReporter(new SimpleValidationResultsReporter(form.getFormModel().getValidationResults(), widget));
        JFrame frame = new JFrame();
        frame.add(widget.getComponent());
        return frame;
    }
View Full Code Here

TOP

Related Classes of org.springframework.richclient.widget.AbstractTitledWidget

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.