Example usage for javax.swing JSeparator JSeparator

List of usage examples for javax.swing JSeparator JSeparator

Introduction

In this page you can find the example usage for javax.swing JSeparator JSeparator.

Prototype

public JSeparator() 

Source Link

Document

Creates a new horizontal separator.

Usage

From source file:org.kuali.test.ui.components.dialogs.HtmlCheckPointDlg.java

private void initComponents(JWebBrowser webBrowser) {
    String[] labels = new String[] { "Checkpoint Name", "" };

    name = new JTextField(checkpoint.getName(), 30);
    name.setEditable(!isEditmode());//from w  w w  . java 2s . c  o  m

    saveScreen = new JCheckBox("Save screen with checkpoint");

    JComponent[] components = new JComponent[] { name, saveScreen };

    JPanel p = new BasePanel(getMainframe());
    p.add(UIUtils.buildEntryPanel(labels, components), BorderLayout.NORTH);

    JPanel p2 = new JPanel(new BorderLayout());

    p2.add(new JLabel("Comment:"), BorderLayout.NORTH);
    p2.add(createCommentField(), BorderLayout.CENTER);
    p.add(p2, BorderLayout.CENTER);
    p.add(new JSeparator(), BorderLayout.SOUTH);

    getContentPane().add(p, BorderLayout.NORTH);
    getContentPane().add(checkpointPanel = new HtmlCheckpointPanel(this, webBrowser, testHeader),
            BorderLayout.CENTER);
    addStandardButtons();

    getSaveButton().setEnabled(!checkpointPanel.isEmpty());

    setDefaultBehavior();
    setResizable(true);
}

From source file:org.kuali.test.ui.components.dialogs.TestExecutionParameterDlg.java

private void initComponents(JWebBrowser wb, TestHeader testHeader) {
    String[] labels = new String[] { "Name", "Handler", "Existing Parameters", "Value" };

    name = new JTextField(30);

    getContentPane().add(//w w  w . jav a  2 s. c  o  m
            valuesPanel = new HtmlCheckpointPanel(TestExecutionParameterDlg.this, wb, testHeader, true),
            BorderLayout.CENTER);

    ParameterHandler[] handlers;
    parameterHandlers = new JComboBox(handlers = getParameterHandlers());
    additionalInformationSelect = new JComboBox();

    parameterHandlers.addActionListener(new ActionListener() {
        @Override
        public void actionPerformed(ActionEvent e) {
            additionalInformationSelect.removeAllItems();
            additionalInformationSelect.setEnabled(false);
            if (isAdditionalInformationHandlerClass()) {
                List<String> additionalInformation = getAdditionalInformation();
                if ((additionalInformation != null) && !additionalInformation.isEmpty()) {
                    for (String s : additionalInformation) {
                        additionalInformationSelect.addItem(s);
                    }
                }

                additionalInformationSelect.setEnabled(true);
            }

            additionalInformationEntry.setText("");
            ParameterHandler ph = (ParameterHandler) parameterHandlers.getSelectedItem();
            additionalInformationEntry.setEnabled(ph.isTextEntryAllowed() || ph.isTextEntryRequired());
        }
    });

    List<String> tooltips = new ArrayList<String>();

    for (ParameterHandler ph : handlers) {
        tooltips.add("<html><div style='width: 300px;'>" + ph.getDescription() + "</div></html>");
    }

    parameterHandlers.setRenderer(new ComboBoxTooltipRenderer(tooltips));
    additionalInformationEntry = new JTextField(20);
    additionalInformationEntry.setEnabled(false);

    JComponent[] components = new JComponent[] { name, parameterHandlers, additionalInformationSelect,
            additionalInformationEntry };

    JPanel p = new JPanel(new BorderLayout(1, 1));

    p.add(UIUtils.buildEntryPanel(labels, components), BorderLayout.CENTER);
    p.add(new JSeparator(), BorderLayout.SOUTH);
    getContentPane().add(p, BorderLayout.NORTH);

    addStandardButtons();
    setDefaultBehavior();
}

From source file:org.kuali.test.ui.components.panels.WebServicePanel.java

/**
 *
 *//*from  w w  w  .ja v a  2  s . co m*/
@Override
protected void handleStartTest() {
    final WebService ws = Utils.findWebServiceByName(getMainframe().getConfiguration(),
            getPlatform().getWebServiceName());

    if (ws != null) {
        if (LOG.isDebugEnabled()) {
            LOG.debug("web service: " + ws.getName());
            LOG.debug("wsdl: " + ws.getWsdlUrl());
        }

        TablePanel tp = new TablePanel(inputParameters = createInputParametersTable());

        String[] labels = { "Web Service Operations", "Return Type", "Expected Result", "On Failure", "" };

        returnType = new JLabel("           ");
        expectedResult = new JTextField(20);
        expectedResult.setEnabled(false);
        failureAction = new JComboBox(Utils.getXmlEnumerations(FailureAction.class));
        failureAction.setEnabled(false);

        poll = new JCheckBox("Poll web service");
        poll.setSelected(getMainframe().getConfiguration().getDefaultWebServicePolling());

        JComponent[] components = { operations = new JComboBox(), returnType, expectedResult, failureAction,
                poll };

        operations.addActionListener(this);

        JPanel p = new JPanel(new BorderLayout());
        JPanel p2 = new JPanel(new FlowLayout(FlowLayout.LEFT, 1, 1));
        p2.add(UIUtils.buildEntryPanel(labels, components));
        p.add(p2, BorderLayout.NORTH);
        p.add(new JSeparator(), BorderLayout.SOUTH);
        tp.add(p, BorderLayout.NORTH);
        add(tp, BorderLayout.CENTER);

        new SplashDisplay(getMainframe(), "Loading WSDL", "Loading web service definition...") {
            @Override
            protected void runProcess() {
                try {
                    ServiceClient wsClient = new ServiceClient(null, new URL(ws.getWsdlUrl()), null, null);
                    Options options = wsClient.getOptions();

                    if (StringUtils.isNotBlank(ws.getUsername())) {
                        options.setUserName(ws.getUsername());
                        options.setPassword(
                                Utils.decrypt(getMainframe().getEncryptionPassword(), ws.getPassword()));
                    }

                    Iterator<AxisOperation> it = wsClient.getAxisService().getOperations();

                    List<OperationWrapper> l = new ArrayList<OperationWrapper>();
                    while (it.hasNext()) {
                        l.add(new OperationWrapper(it.next()));
                    }

                    Collections.sort(l);

                    l.add(0, new OperationWrapper(null));

                    for (OperationWrapper ow : l) {
                        operations.addItem(ow);
                        if (LOG.isDebugEnabled()) {
                            if (ow.getOperation() != null) {
                                LOG.debug("operation: " + ow.getOperation().getName());
                            }
                        }
                    }

                    if (LOG.isDebugEnabled()) {
                        ByteArrayOutputStream bos = new ByteArrayOutputStream();
                        wsClient.getAxisService().printSchema(bos);
                        LOG.debug(new String(bos.toByteArray()));
                    }

                    xmlSchema = wsClient.getAxisService().getSchema(0);
                }

                catch (Exception ex) {
                    UIUtils.showError(getMainframe(), "Web Service Error",
                            "Error coccurred while attempting to connect to web service - " + ex.toString());
                    LOG.error(ex.toString(), ex);
                }
            }
        };
    }
}

From source file:org.languagetool.gui.LanguageToolSupport.java

private void showPopup(MouseEvent event) {
    if (documentSpans.isEmpty() && languageTool.getDisabledRules().isEmpty()) {
        //No errors and no disabled Rules
        return;/*from  ww  w  .ja  v  a2  s . c  o  m*/
    }

    int offset = this.textComponent.viewToModel(event.getPoint());
    Span span = getSpan(offset);
    JPopupMenu popup = new JPopupMenu("Grammar Menu");
    if (span != null) {
        JLabel msgItem = new JLabel("<html>"
                + span.msg.replace("<suggestion>", "<b>").replace("</suggestion>", "</b>") + "</html>");
        msgItem.setToolTipText(span.desc.replace("<suggestion>", "").replace("</suggestion>", ""));
        msgItem.setBorder(new JMenuItem().getBorder());
        popup.add(msgItem);

        popup.add(new JSeparator());

        for (String r : span.replacement) {
            ReplaceMenuItem item = new ReplaceMenuItem(r, span);
            popup.add(item);
            item.addActionListener(actionListener);
        }

        popup.add(new JSeparator());

        JMenuItem moreItem = new JMenuItem(messages.getString("guiMore"));
        moreItem.addActionListener(e -> showDialog(textComponent, span.msg, span.desc, span.rule, span.url));
        popup.add(moreItem);

        JMenuItem ignoreItem = new JMenuItem(messages.getString("guiTurnOffRule"));
        ignoreItem.addActionListener(e -> disableRule(span.rule.getId()));
        popup.add(ignoreItem);
        popup.applyComponentOrientation(ComponentOrientation.getOrientation(Locale.getDefault()));
    }

    List<Rule> disabledRules = getDisabledRules();
    if (!disabledRules.isEmpty()) {
        JMenu activateRuleMenu = new JMenu(messages.getString("guiActivateRule"));
        addDisabledRulesToMenu(disabledRules, activateRuleMenu);
        popup.add(activateRuleMenu);
    }

    if (span != null) {
        textComponent.setCaretPosition(span.start);
        textComponent.moveCaretPosition(span.end);
    }

    popup.addPopupMenuListener(new PopupMenuListener() {
        @Override
        public void popupMenuWillBecomeVisible(PopupMenuEvent e) {
        }

        @Override
        public void popupMenuWillBecomeInvisible(PopupMenuEvent e) {
        }

        @Override
        public void popupMenuCanceled(PopupMenuEvent e) {
            if (span != null) {
                textComponent.setCaretPosition(span.start);
            }
        }
    });
    popup.show(textComponent, event.getPoint().x, event.getPoint().y);

}

From source file:org.mbs3.juniuploader.gui.frmMain.java

private void initGUI() {
    try {/*from  ww  w  .  j  av a  2 s  .  c o m*/
        BorderLayout thisLayout = new BorderLayout();
        getContentPane().setLayout(thisLayout);
        this.setTitle("jUniUploader " + jUniUploader.VERSION);
        {
            lblStatus = new JLabel();
            getContentPane().add(lblStatus, BorderLayout.SOUTH);
            lblStatus.setText("Lots of status text will go here");
            lblStatus.setBorder(BorderFactory.createBevelBorder(BevelBorder.LOWERED));
        }
        {
            jTabbedPane1 = new JTabbedPane();
            getContentPane().add(jTabbedPane1, BorderLayout.CENTER);
            jTabbedPane1.setPreferredSize(new java.awt.Dimension(665, 402));
            {
                pnlMainMenu1 = new pnlMainMenu();
                jTabbedPane1.addTab("Main Menu", null, getPnlMainMenu1(), null);
            }
            {
                pnlWoWDirectories1 = new pnlWoWDirectories();
                jTabbedPane1.addTab("WoW Directories", null, getPnlWoWDirectories1(), null);
            }
            {
                pnlRemoteInterface1 = new pnlRemoteInterface();
                jTabbedPane1.addTab("UniAdmin Interface", null, getPnlRemoteInterface1(), null);
            }
            {
                pnlUploadSites1 = new pnlUploadSites();
                jTabbedPane1.addTab("Upload Sites", null, getPnlUploadSites1(), null);
            }
            {
                pnlFormVariables1 = new pnlFormVariables();
                jTabbedPane1.addTab("Form Variables", null, getPnlFormVariables1(), null);
            }
            {
                pnlUploadRules1 = new pnlUploadRules();
                jTabbedPane1.addTab("Upload Rules", null, getPnlUploadRules1(), null);
            }
            {
                pnlDebug1 = new pnlDebug();
                jTabbedPane1.addTab("Debug Log", null, pnlDebug1, null);
            }
            {
                pnlLoggingOptions1 = new pnlSettings();
                jTabbedPane1.addTab("Application Settings", null, getPnlLoggingOptions1(), null);
            }
            {
                pnlAbout1 = new pnlAbout();
                jTabbedPane1.addTab("About", null, getPnlAbout1(), null);
            }
        }
        this.setSize(673, 456);

        jMenuBar1 = new JMenuBar();
        setJMenuBar(jMenuBar1);

        jMenu3 = new JMenu();
        jMenuBar1.add(jMenu3);
        jMenu3.setText("File");

        newFileMenuItem = new JMenuItem();
        jMenu3.add(newFileMenuItem);
        newFileMenuItem.setText("New");

        openFileMenuItem = new JMenuItem();
        jMenu3.add(openFileMenuItem);
        openFileMenuItem.setText("Open");

        saveMenuItem = new JMenuItem();
        jMenu3.add(saveMenuItem);
        saveMenuItem.setText("Save");

        saveAsMenuItem = new JMenuItem();
        jMenu3.add(saveAsMenuItem);
        saveAsMenuItem.setText("Save As ...");

        closeFileMenuItem = new JMenuItem();
        jMenu3.add(closeFileMenuItem);
        closeFileMenuItem.setText("Close");

        jSeparator2 = new JSeparator();
        jMenu3.add(jSeparator2);

        exitMenuItem = new JMenuItem();
        jMenu3.add(exitMenuItem);
        exitMenuItem.setText("Exit");
        exitMenuItem.addActionListener(new ActionListener() {

            public void actionPerformed(ActionEvent evt) {
                exitMenuItemActionPerformed(evt);
            }
        });

        jMenu4 = new JMenu();
        jMenuBar1.add(jMenu4);
        jMenu4.setText("Edit");
        jMenu4.setEnabled(false);

        cutMenuItem = new JMenuItem();
        jMenu4.add(cutMenuItem);
        cutMenuItem.setText("Cut");

        copyMenuItem = new JMenuItem();
        jMenu4.add(copyMenuItem);
        copyMenuItem.setText("Copy");

        pasteMenuItem = new JMenuItem();
        jMenu4.add(pasteMenuItem);
        pasteMenuItem.setText("Paste");

        jSeparator1 = new JSeparator();
        jMenu4.add(jSeparator1);

        deleteMenuItem = new JMenuItem();
        jMenu4.add(deleteMenuItem);
        deleteMenuItem.setText("Delete");

        jMenu5 = new JMenu();
        jMenuBar1.add(jMenu5);
        jMenu5.setText("Help");

        helpMenuItem = new JMenuItem();
        jMenu5.add(helpMenuItem);
        helpMenuItem.setText("Help");
    } catch (Exception ex) {
        log.error("Error", ex);
    }
}

From source file:org.n52.ifgicopter.spf.gui.FrameworkCorePanel.java

/**
 * default constructor to create the framework core panel.
 *//*w  w  w  . j a v  a  2  s. com*/
public FrameworkCorePanel() {

    /*
     * INPUT PLUGIN LIST
     */
    this.pluginsPanel = new JPanel();
    this.pluginsPanel.setLayout(new GridBagLayout());
    this.pluginsPanel.setBackground(DEFAULT_COLOR);

    this.globalGBC = new GridBagConstraints();
    this.globalGBC.gridx = 0;
    this.globalGBC.gridy = 0;
    this.globalGBC.weightx = 0.0;
    this.globalGBC.weighty = 0.0;
    this.globalGBC.anchor = GridBagConstraints.NORTHWEST;
    this.globalGBC.fill = GridBagConstraints.HORIZONTAL;

    this.pluginsPanel.add(
            new JLabel("<html><body><div><strong>" + "Active Plugins</strong></div></body></html>"),
            this.globalGBC);

    this.globalGBC.gridy++;
    this.globalGBC.gridwidth = GridBagConstraints.REMAINDER;
    this.globalGBC.insets = new Insets(0, 0, 5, 0);
    this.pluginsPanel.add(new JSeparator(), this.globalGBC);
    this.globalGBC.insets = new Insets(0, 0, 0, 0);

    this.globalGBC.weightx = 1.0;
    this.globalGBC.gridy = 0;
    this.globalGBC.gridx = 1;
    this.pluginsPanel.add(Box.createHorizontalGlue(), this.globalGBC);
    this.globalGBC.weightx = 0.0;
    this.globalGBC.gridx = 0;
    this.globalGBC.gridy = 1;

    /*
     * the contentpanel
     */
    this.contentPanel = new JPanel();
    this.contentPanel.setLayout(new CardLayout());
    this.contentPanel.setBorder(BorderFactory.createEtchedBorder());
    this.contentPanel.add(WelcomePanel.getInstance(), WELCOME_PANEL);
    // ((CardLayout) contentPanel.getLayout()).show(contentPanel, WELCOME_PANEL);

    JScrollPane startupS = new JScrollPane(this.contentPanel);
    startupS.setViewportBorder(null);

    /*
     * wrap the plugins to ensure top alignment
     */
    JPanel pluginsPanelWrapper = new JPanel(new BorderLayout());
    pluginsPanelWrapper.add(this.pluginsPanel, BorderLayout.NORTH);
    pluginsPanelWrapper.add(Box.createVerticalGlue(), BorderLayout.CENTER);
    pluginsPanelWrapper.setBorder(BorderFactory.createEtchedBorder());
    pluginsPanelWrapper.setBackground(this.pluginsPanel.getBackground());
    JScrollPane wrapperS = new JScrollPane(pluginsPanelWrapper);
    wrapperS.setViewportBorder(null);

    /*
     * add both scroll panes to the split pane
     */
    JSplitPane splitPane = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT, wrapperS, startupS);
    splitPane.setOneTouchExpandable(true);
    splitPane.setDividerLocation(250);
    splitPane.setContinuousLayout(true);

    Dimension minimumSize = new Dimension(100, 100);
    startupS.setMinimumSize(minimumSize);

    this.setLayout(new BorderLayout());
    this.add(splitPane);
}

From source file:org.nuxeo.launcher.gui.NuxeoFrame.java

protected Component buildSummaryPanel() {
    JPanel summaryPanel = new JPanel();
    summaryPanel.setLayout(new BoxLayout(summaryPanel, BoxLayout.PAGE_AXIS));
    summaryPanel.setBackground(new Color(35, 37, 59));
    summaryPanel.setForeground(Color.WHITE);

    summaryPanel.add(/* w ww . j  a v  a2  s .com*/
            new JLabel("<html><font color=#ffffdd>" + NuxeoLauncherGUI.getMessage("summary.status.label")));
    summaryStatus = new JLabel(controller.launcher.status());
    summaryStatus.setForeground(Color.WHITE);
    summaryPanel.add(summaryStatus);

    summaryPanel
            .add(new JLabel("<html><font color=#ffffdd>" + NuxeoLauncherGUI.getMessage("summary.url.label")));
    summaryURL = new JLabel(controller.launcher.getURL());
    summaryURL.setForeground(Color.WHITE);
    summaryPanel.add(summaryURL);

    errorMessageLabel = new JLabel();
    errorMessageLabel.setForeground(Color.RED);
    summaryPanel.add(errorMessageLabel);

    summaryPanel.add(new JSeparator());
    ConfigurationGenerator config = controller.launcher.getConfigurationGenerator();
    summaryPanel.add(
            new JLabel("<html><font color=#ffffdd>" + NuxeoLauncherGUI.getMessage("summary.homedir.label")));
    summaryPanel.add(new JLabel("<html><font color=white>" + config.getNuxeoHome().getPath()));
    summaryPanel.add(
            new JLabel("<html><font color=#ffffdd>" + NuxeoLauncherGUI.getMessage("summary.nuxeoconf.label")));
    summaryPanel.add(new JLabel("<html><font color=white>" + config.getNuxeoConf().getPath()));
    summaryPanel.add(
            new JLabel("<html><font color=#ffffdd>" + NuxeoLauncherGUI.getMessage("summary.datadir.label")));
    summaryPanel.add(new JLabel("<html><font color=white>" + config.getDataDir().getPath()));
    return summaryPanel;
}

From source file:org.nyu.edu.dlts.dbCopyFrame.java

private void initComponents() {
    // JFormDesigner - Component initialization - DO NOT MODIFY  //GEN-BEGIN:initComponents
    // Generated using JFormDesigner non-commercial license
    dialogPane = new JPanel();
    contentPanel = new JPanel();
    apiLabel = new JLabel();
    panel4 = new JPanel();
    label9 = new JLabel();
    beanShellRadioButton = new JRadioButton();
    jrubyRadioButton = new JRadioButton();
    pythonRadioButton = new JRadioButton();
    javascriptRadioButton = new JRadioButton();
    loadExcelFileButton = new JButton();
    excelTextField = new JTextField();
    loadMapperScriptButton = new JButton();
    mapperScriptTextField = new JTextField();
    editScriptButton = new JButton();
    separator2 = new JSeparator();
    panel5 = new JPanel();
    createRepositoryCheckBox = new JCheckBox();
    repoShortNameTextField = new JTextField();
    repoNameTextField = new JTextField();
    repoCodeTextField = new JTextField();
    repoURLTextField = new JTextField();
    panel2 = new JPanel();
    label1 = new JLabel();
    label3 = new JLabel();
    label10 = new JLabel();
    locationsTextField = new JTextField();
    locationsLabel = new JLabel();
    label5 = new JLabel();
    subjectsTextField = new JTextField();
    subjectsLabel = new JLabel();
    label4 = new JLabel();
    namesTextField = new JTextField();
    namesLabel = new JLabel();
    label6 = new JLabel();
    accessionsTextField = new JTextField();
    accessionsLabel = new JLabel();
    label7 = new JLabel();
    digitalObjectsTextField = new JTextField();
    digitalObjectLabel = new JLabel();
    label8 = new JLabel();
    resourcesTextField = new JTextField();
    resourcesLabel = new JLabel();
    separator1 = new JSeparator();
    copyToASpaceButton = new JButton();
    hostLabel = new JLabel();
    hostTextField = new JTextField();
    simulateCheckBox = new JCheckBox();
    adminLabel = new JLabel();
    adminTextField = new JTextField();
    adminPasswordLabel = new JLabel();
    adminPasswordTextField = new JTextField();
    label2 = new JLabel();
    repositoryURITextField = new JTextField();
    developerModeCheckBox = new JCheckBox();
    outputConsoleLabel = new JLabel();
    copyProgressBar = new JProgressBar();
    scrollPane1 = new JScrollPane();
    consoleTextArea = new JTextArea();
    recordURIComboBox = new JComboBox();
    panel1 = new JPanel();
    paramsLabel = new JLabel();
    paramsTextField = new JTextField();
    viewRecordButton = new JButton();
    buttonBar = new JPanel();
    errorLogButton = new JButton();
    saveErrorsLabel = new JLabel();
    errorCountLabel = new JLabel();
    stopButton = new JButton();
    utillitiesButton = new JButton();
    okButton = new JButton();
    CellConstraints cc = new CellConstraints();

    //======== this ========
    setTitle("Archives Space Excel Data Migrator");
    Container contentPane = getContentPane();
    contentPane.setLayout(new BorderLayout());

    //======== dialogPane ========
    {//from  w  w w.  jav a  2 s. c  om
        dialogPane.setBorder(Borders.DIALOG_BORDER);
        dialogPane.setLayout(new BorderLayout());

        //======== contentPanel ========
        {
            contentPanel.setLayout(new FormLayout(
                    new ColumnSpec[] { FormFactory.DEFAULT_COLSPEC, FormFactory.LABEL_COMPONENT_GAP_COLSPEC,
                            new ColumnSpec(ColumnSpec.FILL, Sizes.DEFAULT, FormSpec.DEFAULT_GROW),
                            FormFactory.LABEL_COMPONENT_GAP_COLSPEC,
                            new ColumnSpec(ColumnSpec.FILL, Sizes.DEFAULT, FormSpec.DEFAULT_GROW),
                            FormFactory.LABEL_COMPONENT_GAP_COLSPEC, FormFactory.DEFAULT_COLSPEC,
                            FormFactory.LABEL_COMPONENT_GAP_COLSPEC, FormFactory.DEFAULT_COLSPEC },
                    new RowSpec[] { FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC,
                            FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC,
                            FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC,
                            FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC,
                            new RowSpec(RowSpec.TOP, Sizes.DEFAULT, FormSpec.NO_GROW),
                            FormFactory.LINE_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC,
                            FormFactory.LINE_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC,
                            FormFactory.LINE_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC,
                            FormFactory.LINE_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC,
                            FormFactory.LINE_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC,
                            FormFactory.LINE_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC,
                            FormFactory.LINE_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC,
                            FormFactory.LINE_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC }));

            //---- apiLabel ----
            apiLabel.setText("  Archives Space Version: v1.1.0");
            apiLabel.setHorizontalTextPosition(SwingConstants.CENTER);
            apiLabel.setFont(new Font("Lucida Grande", Font.BOLD, 14));
            contentPanel.add(apiLabel, cc.xy(1, 1));

            //======== panel4 ========
            {
                panel4.setLayout(new FormLayout(
                        new ColumnSpec[] {
                                new ColumnSpec(ColumnSpec.FILL, Sizes.DEFAULT, FormSpec.DEFAULT_GROW),
                                FormFactory.LABEL_COMPONENT_GAP_COLSPEC,
                                new ColumnSpec(ColumnSpec.FILL, Sizes.DEFAULT, FormSpec.DEFAULT_GROW),
                                FormFactory.LABEL_COMPONENT_GAP_COLSPEC,
                                new ColumnSpec(ColumnSpec.FILL, Sizes.DEFAULT, FormSpec.DEFAULT_GROW),
                                FormFactory.LABEL_COMPONENT_GAP_COLSPEC,
                                new ColumnSpec(ColumnSpec.FILL, Sizes.DEFAULT, FormSpec.DEFAULT_GROW),
                                FormFactory.LABEL_COMPONENT_GAP_COLSPEC,
                                new ColumnSpec(ColumnSpec.FILL, Sizes.DEFAULT, FormSpec.DEFAULT_GROW) },
                        RowSpec.decodeSpecs("default")));

                //---- label9 ----
                label9.setText("Select Script Type");
                panel4.add(label9, cc.xy(1, 1));

                //---- beanShellRadioButton ----
                beanShellRadioButton.setText("Beanshell");
                beanShellRadioButton.setSelected(true);
                beanShellRadioButton.addActionListener(new ActionListener() {
                    public void actionPerformed(ActionEvent e) {
                        clearMapperScript();
                    }
                });
                panel4.add(beanShellRadioButton, cc.xy(3, 1));

                //---- jrubyRadioButton ----
                jrubyRadioButton.setText("JRuby");
                jrubyRadioButton.addActionListener(new ActionListener() {
                    public void actionPerformed(ActionEvent e) {
                        clearMapperScript();
                    }
                });
                panel4.add(jrubyRadioButton, cc.xy(5, 1));

                //---- pythonRadioButton ----
                pythonRadioButton.setText("Jython");
                pythonRadioButton.addActionListener(new ActionListener() {
                    public void actionPerformed(ActionEvent e) {
                        clearMapperScript();
                    }
                });
                panel4.add(pythonRadioButton, cc.xy(7, 1));

                //---- javascriptRadioButton ----
                javascriptRadioButton.setText("Javascript");
                javascriptRadioButton.addActionListener(new ActionListener() {
                    public void actionPerformed(ActionEvent e) {
                        clearMapperScript();
                    }
                });
                panel4.add(javascriptRadioButton, cc.xy(9, 1));
            }
            contentPanel.add(panel4, cc.xywh(3, 1, 7, 1));

            //---- loadExcelFileButton ----
            loadExcelFileButton.setText("Load Excel File");
            loadExcelFileButton.addActionListener(new ActionListener() {
                public void actionPerformed(ActionEvent e) {
                    loadExcelFileButtonActionPerformed();
                }
            });
            contentPanel.add(loadExcelFileButton, cc.xy(1, 3));
            contentPanel.add(excelTextField, cc.xywh(3, 3, 5, 1));

            //---- loadMapperScriptButton ----
            loadMapperScriptButton.setText("Load Mapper Script");
            loadMapperScriptButton.addActionListener(new ActionListener() {
                public void actionPerformed(ActionEvent e) {
                    loadMapperScriptButtonActionPerformed();
                }
            });
            contentPanel.add(loadMapperScriptButton, cc.xy(1, 5));

            //---- mapperScriptTextField ----
            mapperScriptTextField.addActionListener(new ActionListener() {
                public void actionPerformed(ActionEvent e) {
                    loadMapperScript();
                }
            });
            contentPanel.add(mapperScriptTextField, cc.xywh(3, 5, 5, 1));

            //---- editScriptButton ----
            editScriptButton.setText("Edit");
            editScriptButton.addActionListener(new ActionListener() {
                public void actionPerformed(ActionEvent e) {
                    editScriptButtonActionPerformed();
                }
            });
            contentPanel.add(editScriptButton, cc.xy(9, 5));
            contentPanel.add(separator2, cc.xywh(1, 7, 9, 1));

            //======== panel5 ========
            {
                panel5.setLayout(new FormLayout(ColumnSpec.decodeSpecs("default:grow"),
                        new RowSpec[] { FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC,
                                FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC,
                                FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC,
                                FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC,
                                FormFactory.DEFAULT_ROWSPEC }));

                //---- createRepositoryCheckBox ----
                createRepositoryCheckBox.setText("Create Repository");
                createRepositoryCheckBox.setSelected(true);
                panel5.add(createRepositoryCheckBox, cc.xy(1, 1));

                //---- repoShortNameTextField ----
                repoShortNameTextField.setText("Repo Short Name 1");
                panel5.add(repoShortNameTextField, cc.xy(1, 3));

                //---- repoNameTextField ----
                repoNameTextField.setText("Repo Name 1");
                panel5.add(repoNameTextField, cc.xy(1, 5));

                //---- repoCodeTextField ----
                repoCodeTextField.setText("Organization Code 1");
                panel5.add(repoCodeTextField, cc.xy(1, 7));

                //---- repoURLTextField ----
                repoURLTextField.setText("http://repository.url.org");
                panel5.add(repoURLTextField, cc.xy(1, 9));
            }
            contentPanel.add(panel5, cc.xy(1, 9));

            //======== panel2 ========
            {
                panel2.setLayout(new FormLayout("default, default:grow, right:default",
                        "default, default, default, fill:default:grow, fill:default:grow, default, fill:default:grow"));

                //---- label1 ----
                label1.setText("Record Type");
                panel2.add(label1, cc.xy(1, 1));

                //---- label3 ----
                label3.setText("Spreadsheet Number (starting at 1)");
                panel2.add(label3, cc.xy(2, 1));

                //---- label10 ----
                label10.setText("Locations");
                panel2.add(label10, cc.xy(1, 2));

                //---- locationsTextField ----
                locationsTextField.setText("1");
                panel2.add(locationsTextField, cc.xy(2, 2));

                //---- locationsLabel ----
                locationsLabel.setText("not supported");
                panel2.add(locationsLabel, cc.xy(3, 2));

                //---- label5 ----
                label5.setText("Subjects");
                panel2.add(label5, cc.xy(1, 3));

                //---- subjectsTextField ----
                subjectsTextField.setColumns(2);
                subjectsTextField.setText("2");
                panel2.add(subjectsTextField, cc.xy(2, 3));

                //---- subjectsLabel ----
                subjectsLabel.setText("not supported");
                panel2.add(subjectsLabel, cc.xy(3, 3));

                //---- label4 ----
                label4.setText("Names");
                panel2.add(label4, cc.xy(1, 4));

                //---- namesTextField ----
                namesTextField.setColumns(12);
                namesTextField.setText("3");
                panel2.add(namesTextField, cc.xy(2, 4));

                //---- namesLabel ----
                namesLabel.setText("not supported");
                panel2.add(namesLabel, cc.xy(3, 4));

                //---- label6 ----
                label6.setText("Accessions");
                panel2.add(label6, cc.xy(1, 5));

                //---- accessionsTextField ----
                accessionsTextField.setColumns(2);
                accessionsTextField.setText("4");
                panel2.add(accessionsTextField, cc.xy(2, 5));

                //---- accessionsLabel ----
                accessionsLabel.setText("not supported");
                panel2.add(accessionsLabel, cc.xy(3, 5));

                //---- label7 ----
                label7.setText("Digital Objects");
                panel2.add(label7, cc.xy(1, 6));

                //---- digitalObjectsTextField ----
                digitalObjectsTextField.setColumns(2);
                digitalObjectsTextField.setText("5");
                panel2.add(digitalObjectsTextField, cc.xy(2, 6));

                //---- digitalObjectLabel ----
                digitalObjectLabel.setText("not supported");
                panel2.add(digitalObjectLabel, cc.xy(3, 6));

                //---- label8 ----
                label8.setText("Resources");
                panel2.add(label8, cc.xy(1, 7));

                //---- resourcesTextField ----
                resourcesTextField.setText("6, 7");
                resourcesTextField.setColumns(2);
                panel2.add(resourcesTextField, cc.xy(2, 7));

                //---- resourcesLabel ----
                resourcesLabel.setText("not supported");
                panel2.add(resourcesLabel, cc.xy(3, 7));
            }
            contentPanel.add(panel2, cc.xywh(3, 9, 7, 1));
            contentPanel.add(separator1, cc.xywh(1, 11, 9, 1));

            //---- copyToASpaceButton ----
            copyToASpaceButton.setText("Copy To Archives Space");
            copyToASpaceButton.addActionListener(new ActionListener() {
                public void actionPerformed(ActionEvent e) {
                    CopyToASpaceButtonActionPerformed();
                }
            });
            contentPanel.add(copyToASpaceButton, cc.xy(1, 13));

            //---- hostLabel ----
            hostLabel.setText("Archives Space Host");
            contentPanel.add(hostLabel, cc.xywh(3, 13, 2, 1));

            //---- hostTextField ----
            hostTextField.setText("http://localhost:8089");
            contentPanel.add(hostTextField, cc.xywh(5, 13, 5, 1));

            //---- simulateCheckBox ----
            simulateCheckBox.setText("Simulate REST Calls");
            simulateCheckBox.setSelected(true);
            contentPanel.add(simulateCheckBox, cc.xy(1, 15));

            //---- adminLabel ----
            adminLabel.setText("Administrator User ID");
            contentPanel.add(adminLabel, cc.xy(3, 15));

            //---- adminTextField ----
            adminTextField.setText("admin");
            contentPanel.add(adminTextField, cc.xywh(5, 15, 2, 1));

            //---- adminPasswordLabel ----
            adminPasswordLabel.setText("Password");
            contentPanel.add(adminPasswordLabel, cc.xy(7, 15));

            //---- adminPasswordTextField ----
            adminPasswordTextField.setText("admin");
            contentPanel.add(adminPasswordTextField, cc.xy(9, 15));

            //---- label2 ----
            label2.setText("Target Repository URI");
            contentPanel.add(label2, cc.xy(3, 17));
            contentPanel.add(repositoryURITextField, cc.xywh(5, 17, 5, 1));

            //---- developerModeCheckBox ----
            developerModeCheckBox.setText(
                    "Developer Mode (Locations/Names/Subjects are copied once and random IDs are used other records)");
            contentPanel.add(developerModeCheckBox, cc.xywh(1, 19, 9, 1));

            //---- outputConsoleLabel ----
            outputConsoleLabel.setText("Output Console:");
            contentPanel.add(outputConsoleLabel, cc.xy(1, 21));
            contentPanel.add(copyProgressBar, cc.xywh(3, 21, 7, 1));

            //======== scrollPane1 ========
            {

                //---- consoleTextArea ----
                consoleTextArea.setRows(12);
                scrollPane1.setViewportView(consoleTextArea);
            }
            contentPanel.add(scrollPane1, cc.xywh(1, 23, 9, 1));

            //---- recordURIComboBox ----
            recordURIComboBox.setModel(new DefaultComboBoxModel(new String[] { "/repositories", "/users",
                    "/subjects", "/agents/families/1", "/agents/people/1", "/agents/corporate_entities/1",
                    "/repositories/2/accessions/1", "/repositories/2/resources/1",
                    "/repositories/2/archival_objects/1", "/config/enumerations" }));
            recordURIComboBox.setEditable(true);
            contentPanel.add(recordURIComboBox, cc.xy(1, 25));

            //======== panel1 ========
            {
                panel1.setLayout(new FlowLayout(FlowLayout.LEFT));

                //---- paramsLabel ----
                paramsLabel.setText("Params");
                panel1.add(paramsLabel);

                //---- paramsTextField ----
                paramsTextField.setColumns(20);
                panel1.add(paramsTextField);
            }
            contentPanel.add(panel1, cc.xywh(3, 25, 3, 1));

            //---- viewRecordButton ----
            viewRecordButton.setText("View");
            viewRecordButton.addActionListener(new ActionListener() {
                public void actionPerformed(ActionEvent e) {
                    viewRecordButtonActionPerformed();
                }
            });
            contentPanel.add(viewRecordButton, cc.xywh(7, 25, 3, 1));
        }
        dialogPane.add(contentPanel, BorderLayout.CENTER);

        //======== buttonBar ========
        {
            buttonBar.setBorder(Borders.BUTTON_BAR_GAP_BORDER);
            buttonBar.setLayout(new FormLayout(
                    new ColumnSpec[] { FormFactory.LABEL_COMPONENT_GAP_COLSPEC, FormFactory.DEFAULT_COLSPEC,
                            FormFactory.LABEL_COMPONENT_GAP_COLSPEC, FormFactory.DEFAULT_COLSPEC,
                            FormFactory.LABEL_COMPONENT_GAP_COLSPEC, FormFactory.DEFAULT_COLSPEC,
                            FormFactory.GLUE_COLSPEC, FormFactory.LABEL_COMPONENT_GAP_COLSPEC,
                            FormFactory.DEFAULT_COLSPEC, FormFactory.LABEL_COMPONENT_GAP_COLSPEC,
                            FormFactory.DEFAULT_COLSPEC, FormFactory.DEFAULT_COLSPEC,
                            FormFactory.DEFAULT_COLSPEC, FormFactory.BUTTON_COLSPEC },
                    RowSpec.decodeSpecs("pref")));

            //---- errorLogButton ----
            errorLogButton.setText("View Error Log");
            errorLogButton.addActionListener(new ActionListener() {
                public void actionPerformed(ActionEvent e) {
                    errorLogButtonActionPerformed();
                }
            });
            buttonBar.add(errorLogButton, cc.xy(2, 1));

            //---- saveErrorsLabel ----
            saveErrorsLabel.setText(" Errors: ");
            buttonBar.add(saveErrorsLabel, cc.xy(4, 1));

            //---- errorCountLabel ----
            errorCountLabel.setText("N/A ");
            errorCountLabel.setForeground(Color.red);
            errorCountLabel.setFont(new Font("Lucida Grande", Font.BOLD, 13));
            buttonBar.add(errorCountLabel, cc.xy(6, 1));

            //---- stopButton ----
            stopButton.setText("Cancel Copy");
            stopButton.setEnabled(false);
            stopButton.addActionListener(new ActionListener() {
                public void actionPerformed(ActionEvent e) {
                    stopButtonActionPerformed();
                    stopButtonActionPerformed();
                }
            });
            buttonBar.add(stopButton, cc.xy(9, 1));

            //---- utillitiesButton ----
            utillitiesButton.setText("Utilities");
            buttonBar.add(utillitiesButton, cc.xy(11, 1));

            //---- okButton ----
            okButton.setText("Close");
            okButton.addActionListener(new ActionListener() {
                public void actionPerformed(ActionEvent e) {
                    okButtonActionPerformed();
                }
            });
            buttonBar.add(okButton, cc.xy(14, 1));
        }
        dialogPane.add(buttonBar, BorderLayout.SOUTH);
    }
    contentPane.add(dialogPane, BorderLayout.CENTER);
    pack();
    setLocationRelativeTo(getOwner());

    //---- buttonGroup1 ----
    ButtonGroup buttonGroup1 = new ButtonGroup();
    buttonGroup1.add(beanShellRadioButton);
    buttonGroup1.add(jrubyRadioButton);
    buttonGroup1.add(pythonRadioButton);
    buttonGroup1.add(javascriptRadioButton);
    // JFormDesigner - End of component initialization  //GEN-END:initComponents
}

From source file:org.omegat.gui.scripting.ScriptingWindow.java

private void addScriptCommandToOmegaT() {
    JMenu toolsMenu = Core.getMainWindow().getMainMenu().getToolsMenu();
    toolsMenu.add(new JSeparator());

    JMenuItem scriptMenu = new JMenuItem();
    Mnemonics.setLocalizedText(scriptMenu, OStrings.getString("TF_MENU_TOOLS_SCRIPTING"));
    scriptMenu.addActionListener(e -> frame.setVisible(true));

    toolsMenu.add(scriptMenu);/*from   w ww  .  j  a  v a 2  s. com*/

    for (int i = 0; i < NUMBERS_OF_QUICK_SCRIPTS; i++) {
        JMenuItem menuItem = new JMenuItem();
        m_quickMenus[i] = menuItem;

        unsetQuickScriptMenu(i);

        // Since the script is run while editing a segment, the shortcut should not interfere
        // with the segment content, so we set it to a Function key.
        m_quickMenus[i].setAccelerator(KeyStroke.getKeyStroke("shift ctrl F" + (i + 1)));

        toolsMenu.add(menuItem);
    }
}

From source file:org.openconcerto.erp.core.supplychain.receipt.component.BonReceptionSQLComponent.java

public void addViews() {
    this.setLayout(new GridBagLayout());
    final GridBagConstraints c = new DefaultGridBagConstraints();

    // Champ Module
    c.gridx = 0;//w  ww  .j a  va2 s.  co m
    c.gridy++;
    c.gridwidth = GridBagConstraints.REMAINDER;
    final JPanel addP = ComptaSQLConfElement.createAdditionalPanel();
    this.setAdditionalFieldsPanel(new FormLayouter(addP, 1));
    this.add(addP, c);

    c.gridy++;
    c.gridwidth = 1;

    this.textTotalHT.setOpaque(false);
    this.textTotalTVA.setOpaque(false);
    this.textTotalTTC.setOpaque(false);

    this.selectCommande = new ElementComboBox();
    // Numero
    JLabel labelNum = new JLabel(getLabelFor("NUMERO"));
    labelNum.setHorizontalAlignment(SwingConstants.RIGHT);
    this.add(labelNum, c);

    this.textNumeroUnique = new JUniqueTextField(16);
    c.gridx++;
    c.weightx = 1;
    c.weighty = 0;
    c.fill = GridBagConstraints.NONE;
    DefaultGridBagConstraints.lockMinimumSize(this.textNumeroUnique);
    this.add(this.textNumeroUnique, c);

    // Date
    JLabel labelDate = new JLabel(getLabelFor("DATE"));
    labelDate.setHorizontalAlignment(SwingConstants.RIGHT);
    c.fill = GridBagConstraints.HORIZONTAL;
    c.gridx++;
    c.weightx = 0;
    this.add(labelDate, c);

    JDate date = new JDate(true);
    c.gridx++;
    c.weightx = 0;
    c.weighty = 0;
    this.add(date, c);
    // Reference
    c.gridy++;
    c.gridx = 0;
    final JLabel labelNom = new JLabel(getLabelFor("NOM"));
    labelNom.setHorizontalAlignment(SwingConstants.RIGHT);
    this.add(labelNom, c);
    c.gridx++;
    c.fill = GridBagConstraints.HORIZONTAL;
    DefaultGridBagConstraints.lockMinimumSize(this.textReference);
    this.add(this.textReference, c);
    // Fournisseur
    JLabel labelFournisseur = new JLabel(getLabelFor("ID_FOURNISSEUR"));
    labelFournisseur.setHorizontalAlignment(SwingConstants.RIGHT);
    c.gridx = 0;
    c.gridy++;
    c.weightx = 0;
    c.weighty = 0;
    this.add(labelFournisseur, c);

    this.fournisseur = new ElementComboBox();
    c.gridx++;
    c.weightx = 0;
    c.weighty = 0;
    c.fill = GridBagConstraints.NONE;
    this.add(this.fournisseur, c);

    // Devise
    c.gridx = 0;
    c.gridy++;
    c.weightx = 0;
    c.fill = GridBagConstraints.HORIZONTAL;
    this.add(new JLabel(getLabelFor("ID_DEVISE"), SwingConstants.RIGHT), c);

    final ElementComboBox boxDevise = new ElementComboBox();
    c.gridx = GridBagConstraints.RELATIVE;
    c.gridwidth = 1;
    c.weightx = 1;
    c.weighty = 0;
    c.fill = GridBagConstraints.NONE;
    this.add(boxDevise, c);
    this.addView(boxDevise, "ID_DEVISE");

    // Element du bon
    this.tableBonItem = new BonReceptionItemTable();
    c.gridx = 0;
    c.gridy++;
    c.weightx = 1;
    c.weighty = 1;
    c.gridwidth = GridBagConstraints.REMAINDER;
    c.fill = GridBagConstraints.BOTH;
    this.add(this.tableBonItem, c);
    this.fournisseur.addValueListener(new PropertyChangeListener() {

        @Override
        public void propertyChange(PropertyChangeEvent evt) {
            tableBonItem.setFournisseur(fournisseur.getSelectedRow());
        }
    });

    c.anchor = GridBagConstraints.EAST;
    // Totaux
    reconfigure(this.textTotalHT);
    reconfigure(this.textTotalTVA);
    reconfigure(this.textTotalTTC);

    // Poids Total
    c.gridy++;
    c.gridx = 1;
    c.weightx = 0;
    c.weighty = 0;
    c.anchor = GridBagConstraints.EAST;
    c.gridwidth = 1;
    c.fill = GridBagConstraints.NONE;

    DefaultProps props = DefaultNXProps.getInstance();
    Boolean b = props.getBooleanValue("ArticleShowPoids");
    if (b) {
        JPanel panelPoids = new JPanel(new GridBagLayout());
        GridBagConstraints c2 = new DefaultGridBagConstraints();
        c2.fill = GridBagConstraints.NONE;

        panelPoids.add(new JLabel(getLabelFor("TOTAL_POIDS")), c2);
        // Necessaire pour ne pas avoir de saut de layout
        DefaultGridBagConstraints.lockMinimumSize(this.textPoidsTotal);
        this.textPoidsTotal.setEnabled(false);
        this.textPoidsTotal.setHorizontalAlignment(JTextField.RIGHT);
        this.textPoidsTotal.setDisabledTextColor(Color.BLACK);
        c2.gridx++;
        c2.weightx = 1;
        c2.fill = GridBagConstraints.HORIZONTAL;
        panelPoids.add(this.textPoidsTotal, c2);
        this.add(panelPoids, c);

    }

    c.gridx = 2;
    c.gridwidth = GridBagConstraints.REMAINDER;
    c.weightx = 0;
    c.weighty = 0;
    c.anchor = GridBagConstraints.EAST;
    c.fill = GridBagConstraints.HORIZONTAL;

    final GridBagConstraints cTotalPan = new DefaultGridBagConstraints();

    JPanel panelTotalHT = new JPanel();
    panelTotalHT.setLayout(new GridBagLayout());
    cTotalPan.gridx = 0;
    cTotalPan.weightx = 0;
    cTotalPan.fill = GridBagConstraints.HORIZONTAL;
    cTotalPan.anchor = GridBagConstraints.WEST;
    final JLabelBold labelTotalHT = new JLabelBold(getLabelFor("TOTAL_HT"));
    panelTotalHT.add(labelTotalHT, cTotalPan);
    cTotalPan.anchor = GridBagConstraints.EAST;
    cTotalPan.gridx++;
    cTotalPan.weightx = 1;
    this.textTotalHT.setFont(labelTotalHT.getFont());
    DefaultGridBagConstraints.lockMinimumSize(this.textTotalHT);
    panelTotalHT.add(this.textTotalHT, cTotalPan);
    this.add(panelTotalHT, c);

    JPanel panelTotalTVA = new JPanel();
    panelTotalTVA.setLayout(new GridBagLayout());
    cTotalPan.gridx = 0;
    cTotalPan.weightx = 0;
    cTotalPan.anchor = GridBagConstraints.WEST;
    cTotalPan.fill = GridBagConstraints.HORIZONTAL;
    panelTotalTVA.add(new JLabelBold(getLabelFor("TOTAL_TVA")), cTotalPan);
    cTotalPan.anchor = GridBagConstraints.EAST;
    cTotalPan.gridx++;
    cTotalPan.weightx = 1;
    DefaultGridBagConstraints.lockMinimumSize(this.textTotalTVA);
    panelTotalTVA.add(this.textTotalTVA, cTotalPan);
    c.gridy++;
    c.fill = GridBagConstraints.HORIZONTAL;
    this.add(panelTotalTVA, c);

    JPanel panelTotalTTC = new JPanel();
    panelTotalTTC.setLayout(new GridBagLayout());
    cTotalPan.gridx = 0;
    cTotalPan.anchor = GridBagConstraints.WEST;
    cTotalPan.gridwidth = GridBagConstraints.REMAINDER;
    cTotalPan.fill = GridBagConstraints.BOTH;
    cTotalPan.weightx = 1;
    panelTotalTTC.add(new JSeparator(), cTotalPan);
    cTotalPan.gridwidth = 1;
    cTotalPan.fill = GridBagConstraints.NONE;
    cTotalPan.weightx = 0;
    cTotalPan.gridy++;
    panelTotalTTC.add(new JLabelBold(getLabelFor("TOTAL_TTC")), cTotalPan);
    cTotalPan.anchor = GridBagConstraints.EAST;
    cTotalPan.gridx++;
    this.textTotalTTC.setFont(labelTotalHT.getFont());
    DefaultGridBagConstraints.lockMinimumSize(this.textTotalTTC);
    panelTotalTTC.add(this.textTotalTTC, cTotalPan);
    c.gridy++;
    // probleme de tremblement vertical
    this.add(panelTotalTTC, c);
    c.anchor = GridBagConstraints.WEST;

    /*******************************************************************************************
     * * INFORMATIONS COMPLEMENTAIRES
     ******************************************************************************************/
    c.gridwidth = GridBagConstraints.REMAINDER;
    c.weightx = 1;
    c.fill = GridBagConstraints.HORIZONTAL;
    c.gridx = 0;
    c.gridy++;
    TitledSeparator sep = new TitledSeparator("Informations complmentaires");
    c.insets = new Insets(10, 2, 1, 2);
    this.add(sep, c);
    c.insets = new Insets(2, 2, 1, 2);

    c.gridx = 0;
    c.gridy++;
    c.gridheight = 1;
    c.gridwidth = GridBagConstraints.REMAINDER;
    c.weightx = 1;
    c.weighty = 0;
    c.fill = GridBagConstraints.BOTH;
    final ITextArea textInfos = new ITextArea(4, 4);
    JScrollPane scrollPane = new JScrollPane(textInfos);
    DefaultGridBagConstraints.lockMinimumSize(scrollPane);

    this.add(textInfos, c);

    this.addRequiredSQLObject(date, "DATE");
    this.addSQLObject(textInfos, "INFOS");
    this.addSQLObject(this.textReference, "NOM");
    this.addSQLObject(this.selectCommande, "ID_COMMANDE");
    this.addRequiredSQLObject(this.textNumeroUnique, "NUMERO");
    this.addSQLObject(this.textPoidsTotal, "TOTAL_POIDS");
    this.addRequiredSQLObject(this.textTotalHT, "TOTAL_HT");
    this.addRequiredSQLObject(this.textTotalTVA, "TOTAL_TVA");
    this.addRequiredSQLObject(this.textTotalTTC, "TOTAL_TTC");
    this.addRequiredSQLObject(this.fournisseur, "ID_FOURNISSEUR");

    this.textNumeroUnique.setText(NumerotationAutoSQLElement.getNextNumero(BonReceptionSQLElement.class));

    // Listeners
    this.tableBonItem.getModel().addTableModelListener(new TableModelListener() {
        public void tableChanged(TableModelEvent e) {

            int columnIndexHT = BonReceptionSQLComponent.this.tableBonItem.getModel().getColumnIndexForElement(
                    BonReceptionSQLComponent.this.tableBonItem.getPrixTotalHTElement());
            int columnIndexTTC = BonReceptionSQLComponent.this.tableBonItem.getModel().getColumnIndexForElement(
                    BonReceptionSQLComponent.this.tableBonItem.getPrixTotalTTCElement());
            int columnIndexPoids = BonReceptionSQLComponent.this.tableBonItem.getModel()
                    .getColumnIndexForElement(
                            BonReceptionSQLComponent.this.tableBonItem.getPoidsTotalElement());

            if (e.getColumn() == TableModelEvent.ALL_COLUMNS || e.getColumn() == columnIndexHT
                    || e.getColumn() == columnIndexTTC) {
                updateTotal();
            }
            if (e.getColumn() == TableModelEvent.ALL_COLUMNS || e.getColumn() == columnIndexPoids) {
                BonReceptionSQLComponent.this.textPoidsTotal.setText(String
                        .valueOf(Math.round(BonReceptionSQLComponent.this.tableBonItem.getPoidsTotal() * 1000)
                                / 1000.0));
            }
        }
    });

    // Lock UI
    DefaultGridBagConstraints.lockMinimumSize(this.fournisseur);

}