Search in sources :

Example 1 with BnComboBox

use of org.beanfabrics.swing.BnComboBox in project grafikon by jub77.

the class ProgramSettingsDialog method initComponents.

private void initComponents() {
    ActionListener closeAction = e -> setVisible(false);
    java.awt.GridBagConstraints gridBagConstraints;
    javax.swing.JPanel dataPanel = new javax.swing.JPanel();
    javax.swing.JLabel nameLabel = new javax.swing.JLabel();
    BnTextField nameTextField = new BnTextField();
    javax.swing.JLabel unitLabel = new javax.swing.JLabel();
    javax.swing.JPanel buttonPanel = new javax.swing.JPanel();
    BnButton okButton = new BnButton();
    javax.swing.JButton cancelButton = new javax.swing.JButton();
    // NOI18N
    setTitle(ResourceLoader.getString("program.settings.title"));
    setResizable(false);
    GridBagLayout gbl_dataPanel = new GridBagLayout();
    gbl_dataPanel.columnWeights = new double[] { 0.0, 0.0, 0.0, 1.0, 0.0 };
    dataPanel.setLayout(gbl_dataPanel);
    // NOI18N
    nameLabel.setText(ResourceLoader.getString("program.settings.username"));
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 0;
    gridBagConstraints.insets = new Insets(5, 5, 5, 5);
    dataPanel.add(nameLabel, gridBagConstraints);
    nameTextField.setColumns(25);
    GridBagConstraints gridBagConstraints_1 = new java.awt.GridBagConstraints();
    gridBagConstraints_1.gridwidth = 4;
    gridBagConstraints_1.gridx = 1;
    gridBagConstraints_1.gridy = 0;
    gridBagConstraints_1.fill = java.awt.GridBagConstraints.HORIZONTAL;
    gridBagConstraints_1.weightx = 1.0;
    gridBagConstraints_1.insets = new Insets(5, 0, 5, 5);
    dataPanel.add(nameTextField, gridBagConstraints_1);
    FlowLayout fl_unitsPanel = new FlowLayout(FlowLayout.LEFT);
    javax.swing.JPanel unitsPanel = new javax.swing.JPanel(fl_unitsPanel);
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 1;
    gridBagConstraints.gridwidth = 5;
    gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
    gridBagConstraints.insets = new Insets(0, 5, 0, 5);
    dataPanel.add(unitsPanel, gridBagConstraints);
    // NOI18N
    unitLabel.setText(ResourceLoader.getString("modelinfo.unit"));
    unitsPanel.add(unitLabel);
    BnComboBox lengthUnitComboBox = new BnComboBox();
    unitsPanel.add(lengthUnitComboBox);
    // $NON-NLS-1$
    JLabel speedUnitLabel = new JLabel(ResourceLoader.getString("modelinfo.speed.unit"));
    unitsPanel.add(speedUnitLabel);
    BnComboBox speedUnitComboBox = new BnComboBox();
    unitsPanel.add(speedUnitComboBox);
    getContentPane().add(dataPanel, java.awt.BorderLayout.CENTER);
    buttonPanel.setLayout(new java.awt.FlowLayout(java.awt.FlowLayout.RIGHT));
    // NOI18N
    okButton.setText(ResourceLoader.getString("button.ok"));
    okButton.addActionListener(closeAction);
    buttonPanel.add(okButton);
    // NOI18N
    cancelButton.setText(ResourceLoader.getString("button.cancel"));
    cancelButton.addActionListener(closeAction);
    buttonPanel.add(cancelButton);
    getContentPane().add(buttonPanel, java.awt.BorderLayout.PAGE_END);
    nameTextField.setModelProvider(provider);
    nameTextField.setPath(new Path("user"));
    speedUnitComboBox.setModelProvider(provider);
    speedUnitComboBox.setPath(new Path("speed"));
    lengthUnitComboBox.setModelProvider(provider);
    lengthUnitComboBox.setPath(new Path("length"));
    okButton.setModelProvider(provider);
    okButton.setPath(new Path("ok"));
}
Also used : java.awt(java.awt) ModelProvider(org.beanfabrics.ModelProvider) ProgramSettingsPM(net.parostroj.timetable.gui.pm.ProgramSettingsPM) FlowLayout(java.awt.FlowLayout) BnTextField(org.beanfabrics.swing.BnTextField) ActionListener(java.awt.event.ActionListener) JLabel(javax.swing.JLabel) Path(org.beanfabrics.Path) BnButton(org.beanfabrics.swing.BnButton) ProgramSettings(net.parostroj.timetable.gui.data.ProgramSettings) BnComboBox(org.beanfabrics.swing.BnComboBox) ResourceLoader(net.parostroj.timetable.utils.ResourceLoader) Path(org.beanfabrics.Path) FlowLayout(java.awt.FlowLayout) FlowLayout(java.awt.FlowLayout) JLabel(javax.swing.JLabel) ActionListener(java.awt.event.ActionListener) JLabel(javax.swing.JLabel) BnTextField(org.beanfabrics.swing.BnTextField) BnComboBox(org.beanfabrics.swing.BnComboBox) BnButton(org.beanfabrics.swing.BnButton) java.awt(java.awt)

Example 2 with BnComboBox

use of org.beanfabrics.swing.BnComboBox in project grafikon by jub77.

the class EditCompanyDialog method initComponents.

private void initComponents() {
    ActionListener closeListener = evt -> setVisible(false);
    BnButton okButton = new BnButton();
    javax.swing.JButton cancelButton = new javax.swing.JButton();
    // NOI18N
    okButton.setText(ResourceLoader.getString("button.ok"));
    okButton.addActionListener(closeListener);
    // NOI18N
    cancelButton.setText(ResourceLoader.getString("button.cancel"));
    cancelButton.addActionListener(closeListener);
    JPanel panel = new JPanel();
    panel.setBorder(new EmptyBorder(5, 5, 5, 5));
    getContentPane().add(panel, BorderLayout.CENTER);
    GridBagLayout gbLayout = new GridBagLayout();
    gbLayout.columnWeights = new double[] { 0.0, 1.0 };
    gbLayout.rowWeights = new double[] { 0.0, 0.0, 0.0, 0.0, 1.0 };
    panel.setLayout(gbLayout);
    // NOI18N
    JLabel abbrLabel = new JLabel(ResourceLoader.getString("edit.company.abbreviation"));
    GridBagConstraints nlCons = new GridBagConstraints();
    nlCons.anchor = GridBagConstraints.WEST;
    nlCons.insets = new Insets(0, 0, 5, 5);
    nlCons.gridx = 0;
    nlCons.gridy = 0;
    panel.add(abbrLabel, nlCons);
    BnTextField abbrTextField = new BnTextField();
    GridBagConstraints gbc_nameTextField = new GridBagConstraints();
    gbc_nameTextField.insets = new Insets(0, 0, 5, 0);
    gbc_nameTextField.fill = GridBagConstraints.HORIZONTAL;
    gbc_nameTextField.gridx = 1;
    gbc_nameTextField.gridy = 0;
    panel.add(abbrTextField, gbc_nameTextField);
    abbrTextField.setColumns(10);
    // NOI18N
    JLabel nameLabel = new JLabel(ResourceLoader.getString("edit.company.name"));
    GridBagConstraints dlCons = new GridBagConstraints();
    dlCons.anchor = GridBagConstraints.WEST;
    dlCons.insets = new Insets(0, 0, 5, 5);
    dlCons.gridx = 0;
    dlCons.gridy = 1;
    panel.add(nameLabel, dlCons);
    BnTextField nameTextField = new BnTextField();
    GridBagConstraints dtfCons = new GridBagConstraints();
    dtfCons.insets = new Insets(0, 0, 5, 0);
    dtfCons.anchor = GridBagConstraints.NORTH;
    dtfCons.fill = GridBagConstraints.HORIZONTAL;
    dtfCons.gridx = 1;
    dtfCons.gridy = 1;
    panel.add(nameTextField, dtfCons);
    nameTextField.setColumns(30);
    // NOI18N
    JLabel partLabel = new JLabel(ResourceLoader.getString("edit.company.part.name"));
    GridBagConstraints plCons = new GridBagConstraints();
    plCons.anchor = GridBagConstraints.WEST;
    plCons.insets = new Insets(0, 0, 5, 5);
    plCons.gridx = 0;
    plCons.gridy = 2;
    panel.add(partLabel, plCons);
    BnTextField partTextField = new BnTextField();
    partTextField.setColumns(30);
    GridBagConstraints ptfCons = new GridBagConstraints();
    ptfCons.insets = new Insets(0, 0, 5, 0);
    ptfCons.fill = GridBagConstraints.HORIZONTAL;
    ptfCons.gridx = 1;
    ptfCons.gridy = 2;
    panel.add(partTextField, ptfCons);
    // NOI18N
    JLabel localeLabel = new JLabel(ResourceLoader.getString("edit.company.locale"));
    GridBagConstraints llCons = new GridBagConstraints();
    llCons.anchor = GridBagConstraints.WEST;
    llCons.insets = new Insets(0, 0, 5, 5);
    llCons.gridx = 0;
    llCons.gridy = 3;
    panel.add(localeLabel, llCons);
    BnComboBox localeComboBox = new BnComboBox();
    GridBagConstraints ltfCons = new GridBagConstraints();
    ltfCons.insets = new Insets(0, 0, 5, 0);
    ltfCons.fill = GridBagConstraints.HORIZONTAL;
    ltfCons.gridx = 1;
    ltfCons.gridy = 3;
    panel.add(localeComboBox, ltfCons);
    Component verticalGlue = Box.createVerticalGlue();
    GridBagConstraints vgCons = new GridBagConstraints();
    vgCons.fill = GridBagConstraints.VERTICAL;
    vgCons.insets = new Insets(0, 0, 0, 5);
    vgCons.gridx = 0;
    vgCons.gridy = 4;
    panel.add(verticalGlue, vgCons);
    JPanel buttonPanel = new JPanel();
    FlowLayout flowLayout = (FlowLayout) buttonPanel.getLayout();
    flowLayout.setAlignment(FlowLayout.RIGHT);
    getContentPane().add(buttonPanel, BorderLayout.SOUTH);
    buttonPanel.add(okButton);
    buttonPanel.add(cancelButton);
    abbrTextField.setModelProvider(provider);
    abbrTextField.setPath(new Path("abbr"));
    nameTextField.setModelProvider(provider);
    nameTextField.setPath(new Path("name"));
    localeComboBox.setModelProvider(provider);
    localeComboBox.setPath(new Path("locale"));
    partTextField.setModelProvider(provider);
    partTextField.setPath(new Path("part"));
    okButton.setModelProvider(provider);
    okButton.setPath(new Path("ok"));
}
Also used : ActionListener(java.awt.event.ActionListener) BnTextField(org.beanfabrics.swing.BnTextField) Collection(java.util.Collection) Path(org.beanfabrics.Path) BnComboBox(org.beanfabrics.swing.BnComboBox) java.awt(java.awt) CompanyPM(net.parostroj.timetable.gui.pm.CompanyPM) ModelProvider(org.beanfabrics.ModelProvider) Company(net.parostroj.timetable.model.Company) ResourceLoader(net.parostroj.timetable.gui.utils.ResourceLoader) Locale(java.util.Locale) EmptyBorder(javax.swing.border.EmptyBorder) BnButton(org.beanfabrics.swing.BnButton) javax.swing(javax.swing) Path(org.beanfabrics.Path) javax.swing(javax.swing) ActionListener(java.awt.event.ActionListener) BnTextField(org.beanfabrics.swing.BnTextField) BnComboBox(org.beanfabrics.swing.BnComboBox) BnButton(org.beanfabrics.swing.BnButton) EmptyBorder(javax.swing.border.EmptyBorder)

Example 3 with BnComboBox

use of org.beanfabrics.swing.BnComboBox in project grafikon by jub77.

the class EditRegionDialog method initComponents.

private void initComponents() {
    ActionListener closeListener = evt -> setVisible(false);
    BnButton okButton = new BnButton();
    javax.swing.JButton cancelButton = new javax.swing.JButton();
    // NOI18N
    okButton.setText(ResourceLoader.getString("button.ok"));
    okButton.addActionListener(closeListener);
    // NOI18N
    cancelButton.setText(ResourceLoader.getString("button.cancel"));
    cancelButton.addActionListener(closeListener);
    JPanel panel = new JPanel();
    panel.setBorder(new EmptyBorder(5, 5, 5, 5));
    getContentPane().add(panel, BorderLayout.CENTER);
    GridBagLayout gbLayout = new GridBagLayout();
    gbLayout.columnWeights = new double[] { 0.0, 1.0 };
    gbLayout.rowWeights = new double[] { 0.0, 0.0, 0.0 };
    panel.setLayout(gbLayout);
    // NOI18N
    JLabel nameLabel = new JLabel(ResourceLoader.getString("edit.region.name"));
    GridBagConstraints dlCons = new GridBagConstraints();
    dlCons.anchor = GridBagConstraints.WEST;
    dlCons.insets = new Insets(0, 0, 5, 5);
    dlCons.gridx = 0;
    dlCons.gridy = 0;
    panel.add(nameLabel, dlCons);
    BnTextField nameTextField = new BnTextField();
    GridBagConstraints dtfCons = new GridBagConstraints();
    dtfCons.insets = new Insets(0, 0, 5, 0);
    dtfCons.anchor = GridBagConstraints.NORTH;
    dtfCons.fill = GridBagConstraints.HORIZONTAL;
    dtfCons.gridx = 1;
    dtfCons.gridy = 0;
    panel.add(nameTextField, dtfCons);
    nameTextField.setColumns(30);
    nameTextField.setModelProvider(provider);
    nameTextField.setPath(new Path("name"));
    // NOI18N
    JLabel localeLabel = new JLabel(ResourceLoader.getString("edit.region.locale"));
    GridBagConstraints llCons = new GridBagConstraints();
    llCons.anchor = GridBagConstraints.WEST;
    llCons.insets = new Insets(0, 0, 5, 5);
    llCons.gridx = 0;
    llCons.gridy = 1;
    panel.add(localeLabel, llCons);
    BnComboBox localeComboBox = new BnComboBox();
    GridBagConstraints ltfCons = new GridBagConstraints();
    ltfCons.insets = new Insets(0, 0, 5, 0);
    ltfCons.fill = GridBagConstraints.HORIZONTAL;
    ltfCons.gridx = 1;
    ltfCons.gridy = 1;
    panel.add(localeComboBox, ltfCons);
    localeComboBox.setModelProvider(provider);
    localeComboBox.setPath(new Path("locale"));
    // NOI18N
    JLabel superRegionLabel = new JLabel(ResourceLoader.getString("edit.region.super.region"));
    GridBagConstraints srlCons = new GridBagConstraints();
    srlCons.anchor = GridBagConstraints.WEST;
    srlCons.insets = new Insets(0, 0, 5, 5);
    srlCons.gridx = 0;
    srlCons.gridy = 2;
    panel.add(superRegionLabel, srlCons);
    BnComboBox superRegionComboBox = new BnComboBox();
    GridBagConstraints srltfCons = new GridBagConstraints();
    srltfCons.insets = new Insets(0, 0, 5, 0);
    srltfCons.fill = GridBagConstraints.HORIZONTAL;
    srltfCons.gridx = 1;
    srltfCons.gridy = 2;
    panel.add(superRegionComboBox, srltfCons);
    superRegionComboBox.setModelProvider(provider);
    superRegionComboBox.setPath(new Path("superRegion"));
    // NOI18N
    JLabel colorRegionLabel = new JLabel(ResourceLoader.getString("edit.region.color.region"));
    GridBagConstraints cclCons = new GridBagConstraints();
    cclCons.anchor = GridBagConstraints.WEST;
    cclCons.insets = new Insets(0, 0, 5, 5);
    cclCons.gridx = 0;
    cclCons.gridy = 3;
    panel.add(colorRegionLabel, cclCons);
    BnCheckBox colorRegionCheckBox = new BnCheckBox();
    colorRegionCheckBox.setBorder(null);
    GridBagConstraints cccbCons = new GridBagConstraints();
    cccbCons.insets = new Insets(0, 0, 5, 0);
    cccbCons.fill = GridBagConstraints.HORIZONTAL;
    cccbCons.gridx = 1;
    cccbCons.gridy = 3;
    panel.add(colorRegionCheckBox, cccbCons);
    colorRegionCheckBox.setModelProvider(provider);
    colorRegionCheckBox.setPath(new Path("colorRegion"));
    JScrollPane scrollPane = new JScrollPane();
    BnTable mapTable = new BnTable();
    Dimension viewportSize = mapTable.getPreferredScrollableViewportSize();
    viewportSize.setSize(0, mapTable.getRowHeight() * DEFAULT_ROW_COUNT);
    mapTable.setPreferredScrollableViewportSize(viewportSize);
    GridBagConstraints mapCons = new GridBagConstraints();
    mapCons.insets = new Insets(0, 0, 5, 0);
    mapCons.fill = GridBagConstraints.BOTH;
    mapCons.gridx = 0;
    mapCons.gridy = 4;
    mapCons.weighty = 1.0;
    mapCons.gridwidth = 2;
    panel.add(scrollPane, mapCons);
    scrollPane.setViewportView(mapTable);
    mapTable.setModelProvider(provider);
    mapTable.setPath(new Path("colorMap"));
    // NOI18N
    mapTable.addColumn(new BnColumn(new Path("color"), ResourceLoader.getString("edit.region.color")));
    // NOI18N
    mapTable.addColumn(new BnColumn(new Path("region"), ResourceLoader.getString("edit.region.region")));
    mapTable.setSortable(true);
    JPanel addRemovePanel = new JPanel();
    GridBagConstraints arCons = new GridBagConstraints();
    arCons.insets = new Insets(0, 0, 5, 0);
    arCons.fill = GridBagConstraints.HORIZONTAL;
    arCons.gridx = 0;
    arCons.gridy = 5;
    arCons.gridwidth = 2;
    panel.add(addRemovePanel, arCons);
    addRemovePanel.setLayout(new FlowLayout(FlowLayout.LEFT, 0, 0));
    BnButton addButton = GuiComponentUtils.createBnButton(GuiIcon.ADD, 2);
    addRemovePanel.add(addButton);
    addButton.setModelProvider(provider);
    addButton.setPath(new Path("add"));
    addRemovePanel.add(Box.createHorizontalStrut(5));
    BnButton removeButton = GuiComponentUtils.createBnButton(GuiIcon.REMOVE, 2);
    addRemovePanel.add(removeButton);
    removeButton.setModelProvider(provider);
    removeButton.setPath(new Path("remove"));
    Component verticalGlue = Box.createVerticalGlue();
    GridBagConstraints vgCons = new GridBagConstraints();
    vgCons.fill = GridBagConstraints.VERTICAL;
    vgCons.insets = new Insets(0, 0, 0, 5);
    vgCons.gridx = 0;
    vgCons.gridy = 6;
    panel.add(verticalGlue, vgCons);
    JPanel buttonPanel = new JPanel();
    FlowLayout flowLayout = (FlowLayout) buttonPanel.getLayout();
    flowLayout.setAlignment(FlowLayout.RIGHT);
    getContentPane().add(buttonPanel, BorderLayout.SOUTH);
    buttonPanel.add(okButton);
    buttonPanel.add(cancelButton);
    okButton.setModelProvider(provider);
    okButton.setPath(new Path("ok"));
}
Also used : BnTable(org.beanfabrics.swing.table.BnTable) ActionListener(java.awt.event.ActionListener) BnTextField(org.beanfabrics.swing.BnTextField) Collection(java.util.Collection) GuiComponentUtils(net.parostroj.timetable.gui.utils.GuiComponentUtils) Region(net.parostroj.timetable.model.Region) Path(org.beanfabrics.Path) BnCheckBox(org.beanfabrics.swing.BnCheckBox) BnComboBox(org.beanfabrics.swing.BnComboBox) java.awt(java.awt) ModelProvider(org.beanfabrics.ModelProvider) BnColumn(org.beanfabrics.swing.table.BnColumn) RegionPM(net.parostroj.timetable.gui.pm.RegionPM) ResourceLoader(net.parostroj.timetable.gui.utils.ResourceLoader) GuiIcon(net.parostroj.timetable.gui.utils.GuiIcon) Locale(java.util.Locale) EmptyBorder(javax.swing.border.EmptyBorder) TrainDiagram(net.parostroj.timetable.model.TrainDiagram) BnButton(org.beanfabrics.swing.BnButton) javax.swing(javax.swing) Path(org.beanfabrics.Path) BnCheckBox(org.beanfabrics.swing.BnCheckBox) javax.swing(javax.swing) ActionListener(java.awt.event.ActionListener) BnTextField(org.beanfabrics.swing.BnTextField) BnComboBox(org.beanfabrics.swing.BnComboBox) BnButton(org.beanfabrics.swing.BnButton) EmptyBorder(javax.swing.border.EmptyBorder) BnColumn(org.beanfabrics.swing.table.BnColumn) BnTable(org.beanfabrics.swing.table.BnTable)

Example 4 with BnComboBox

use of org.beanfabrics.swing.BnComboBox in project grafikon by jub77.

the class NewModelDialog method initComponents.

private void initComponents() {
    ActionListener closeAction = e -> setVisible(false);
    java.awt.GridBagConstraints gridBagConstraints;
    javax.swing.JLabel jLabel1 = new javax.swing.JLabel();
    BnComboBox scaleComboBox = new BnComboBox();
    javax.swing.JLabel jLabel2 = new javax.swing.JLabel();
    BnComboBox ratioComboBox = new BnComboBox();
    javax.swing.JPanel panel1 = new javax.swing.JPanel();
    BnButton okButton = new BnButton();
    okButton.addActionListener(closeAction);
    JButton cancelButton = new JButton();
    cancelButton.addActionListener(closeAction);
    javax.swing.JLabel jLabel3 = new javax.swing.JLabel();
    BnComboBox templatesComboBox = new BnComboBox();
    // NOI18N
    setTitle(ResourceLoader.getString("newmodel"));
    setResizable(false);
    getContentPane().setLayout(new java.awt.GridBagLayout());
    // NOI18N
    jLabel1.setText(ResourceLoader.getString("modelinfo.scales"));
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
    gridBagConstraints.insets = new java.awt.Insets(0, 10, 0, 0);
    getContentPane().add(jLabel1, gridBagConstraints);
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
    gridBagConstraints.weightx = 1.0;
    gridBagConstraints.insets = new java.awt.Insets(10, 2, 10, 10);
    getContentPane().add(scaleComboBox, gridBagConstraints);
    // NOI18N
    jLabel2.setText(ResourceLoader.getString("modelinfo.ratio"));
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 1;
    gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
    gridBagConstraints.insets = new java.awt.Insets(0, 10, 10, 0);
    getContentPane().add(jLabel2, gridBagConstraints);
    ratioComboBox.setEditable(true);
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 1;
    gridBagConstraints.gridy = 1;
    gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
    gridBagConstraints.weightx = 1.0;
    gridBagConstraints.insets = new java.awt.Insets(0, 2, 10, 10);
    getContentPane().add(ratioComboBox, gridBagConstraints);
    // NOI18N
    okButton.setText(ResourceLoader.getString("button.ok"));
    panel1.add(okButton);
    // NOI18N
    cancelButton.setText(ResourceLoader.getString("button.cancel"));
    panel1.add(cancelButton);
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 3;
    gridBagConstraints.gridwidth = 2;
    gridBagConstraints.anchor = java.awt.GridBagConstraints.EAST;
    gridBagConstraints.insets = new java.awt.Insets(0, 0, 10, 5);
    getContentPane().add(panel1, gridBagConstraints);
    // NOI18N
    jLabel3.setText(ResourceLoader.getString("newmodel.template"));
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 2;
    gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
    gridBagConstraints.insets = new java.awt.Insets(0, 10, 10, 0);
    getContentPane().add(jLabel3, gridBagConstraints);
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 1;
    gridBagConstraints.gridy = 2;
    gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
    gridBagConstraints.weightx = 1.0;
    gridBagConstraints.insets = new java.awt.Insets(0, 2, 10, 10);
    getContentPane().add(templatesComboBox, gridBagConstraints);
    // binding
    scaleComboBox.setModelProvider(provider);
    scaleComboBox.setPath(new Path("scale"));
    ratioComboBox.setModelProvider(provider);
    ratioComboBox.setPath(new Path("timeScale"));
    templatesComboBox.setModelProvider(provider);
    templatesComboBox.setPath(new Path("template"));
    okButton.setModelProvider(provider);
    okButton.setPath(new Path("ok"));
    pack();
}
Also used : ModelProvider(org.beanfabrics.ModelProvider) ActionListener(java.awt.event.ActionListener) JButton(javax.swing.JButton) TemplateLoader(net.parostroj.timetable.model.templates.TemplateLoader) LSException(net.parostroj.timetable.model.ls.LSException) Path(org.beanfabrics.Path) NewModelPM(net.parostroj.timetable.gui.pm.NewModelPM) Callable(java.util.concurrent.Callable) TrainDiagram(net.parostroj.timetable.model.TrainDiagram) BnButton(org.beanfabrics.swing.BnButton) ResourceLoader(net.parostroj.timetable.utils.ResourceLoader) BnComboBox(org.beanfabrics.swing.BnComboBox) Path(org.beanfabrics.Path) JButton(javax.swing.JButton) ActionListener(java.awt.event.ActionListener) BnComboBox(org.beanfabrics.swing.BnComboBox) BnButton(org.beanfabrics.swing.BnButton)

Aggregations

ActionListener (java.awt.event.ActionListener)4 ModelProvider (org.beanfabrics.ModelProvider)4 Path (org.beanfabrics.Path)4 BnButton (org.beanfabrics.swing.BnButton)4 BnComboBox (org.beanfabrics.swing.BnComboBox)4 java.awt (java.awt)3 BnTextField (org.beanfabrics.swing.BnTextField)3 Collection (java.util.Collection)2 Locale (java.util.Locale)2 javax.swing (javax.swing)2 EmptyBorder (javax.swing.border.EmptyBorder)2 ResourceLoader (net.parostroj.timetable.gui.utils.ResourceLoader)2 TrainDiagram (net.parostroj.timetable.model.TrainDiagram)2 ResourceLoader (net.parostroj.timetable.utils.ResourceLoader)2 FlowLayout (java.awt.FlowLayout)1 Callable (java.util.concurrent.Callable)1 JButton (javax.swing.JButton)1 JLabel (javax.swing.JLabel)1 ProgramSettings (net.parostroj.timetable.gui.data.ProgramSettings)1 CompanyPM (net.parostroj.timetable.gui.pm.CompanyPM)1