Package lcmc.common.ui

Examples of lcmc.common.ui.EditableInfo


        /* Actions */
        buttonPanel.add(getActionsButton(), BorderLayout.LINE_END);

        /* params */
        mConstraintsReadLock.lock();
        EditableInfo firstConstraint = null;
        try {
            for (final HbConstraintInterface c : constraints) {
                if (firstConstraint == null) {
                    firstConstraint = (EditableInfo) c;
                }
                final String[] params = c.getParametersFromXML();
                final JPanel panel = getLabels(c);

                optionsPanel.add(panel);
                c.addParams(optionsPanel,
                            params,
                            application.getServiceLabelWidth(),
                            application.getServiceFieldWidth(),
                            null);
            }
        } finally {
            mConstraintsReadLock.unlock();
        }
        getApplyButton().addActionListener(
            new ActionListener() {
                @Override
                public void actionPerformed(final ActionEvent e) {
                    final Thread thread = new Thread(new Runnable() {
                        @Override
                        public void run() {
                            getBrowser().clStatusLock();
                            apply(getBrowser().getDCHost(), Application.RunMode.LIVE);
                            getBrowser().clStatusUnlock();
                        }
                    });
                    thread.start();
                }
            }
        );
        getRevertButton().addActionListener(
            new ActionListener() {
                @Override
                public void actionPerformed(final ActionEvent e) {
                    final Thread thread = new Thread(new Runnable() {
                        @Override
                        public void run() {
                            getBrowser().clStatusLock();
                            revert();
                            getBrowser().clStatusUnlock();
                        }
                    });
                    thread.start();
                }
            }
        );

        /* apply button */
        addApplyButton(buttonPanel);
        addRevertButton(buttonPanel);
        application.invokeLater(new Runnable() {
            @Override
            public void run() {
                setApplyButtons(null, null);
            }
        });
        mainPanel.add(optionsPanel);

        final JPanel newPanel = new JPanel();
        newPanel.setBackground(ClusterBrowser.PANEL_BACKGROUND);
        newPanel.setLayout(new BoxLayout(newPanel, BoxLayout.PAGE_AXIS));
        newPanel.add(buttonPanel);
        if (firstConstraint != null) {
        newPanel.add(firstConstraint.getMoreOptionsPanel(application.getServiceLabelWidth()
                                                         + application.getServiceFieldWidth() + 4));
        }
        newPanel.add(new JScrollPane(mainPanel));
        newPanel.setMinimumSize(new Dimension(
                                application.getDefaultSize("HostBrowser.ResourceInfoArea.Width"),
View Full Code Here

TOP

Related Classes of lcmc.common.ui.EditableInfo

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.