Search in sources :

Example 1 with CheckObjectType

use of jgnash.engine.checks.CheckObject.CheckObjectType in project jgnash by ccavanaugh.

the class CheckDesignDialog method initComponents.

private void initComponents() {
    toolBar = new JToolBar();
    toolBar.setRollover(true);
    openButton = new RollOverButton(rb.getString("Menu.Open.Name").replace("_", ""), IconUtils.getIcon("/jgnash/resource/document-open.png"));
    saveButton = new RollOverButton(rb.getString("Menu.Save.Name").replace("_", ""), IconUtils.getIcon("/jgnash/resource/document-save.png"));
    toolBar.add(openButton);
    toolBar.add(saveButton);
    checkLayout = new CheckLayout();
    layout = new PrintableCheckLayout(checkLayout);
    countField = getIntegerField();
    xPosField = getFloatField();
    yPosField = getFloatField();
    heightField = getFloatField();
    previewPanel = new PrintPreviewPanel(layout, layout.getPageFormat());
    objectList = new JList<>();
    //objectList.setPrototypeCellValue("Some dummy text");
    setupButton = new JButton(rb.getString("Button.PageSetup"));
    addButton = new JButton(rb.getString("Button.Add"));
    removeButton = new JButton(rb.getString("Button.Remove"));
    clearButton = new JButton(rb.getString("Button.Clear"));
    applyButton = new JButton(rb.getString("Button.Apply"));
    printButton = new JButton(rb.getString("Button.PrintSample"));
    closeButton = new JButton(rb.getString("Button.Close"));
    nameField = new JTextFieldEx();
    typeCombo = new JComboBox<>();
    DefaultComboBoxModel<CheckObjectType> comboModel = new DefaultComboBoxModel<>(CheckObjectType.values());
    typeCombo.setModel(comboModel);
    model = new DefaultListModel<>();
    objectList.setModel(model);
    objectList.addListSelectionListener(this);
    addButton.addActionListener(this);
    applyButton.addActionListener(this);
    closeButton.addActionListener(this);
    clearButton.addActionListener(this);
    countField.addActionListener(this);
    removeButton.addActionListener(this);
    setupButton.addActionListener(this);
    heightField.addActionListener(this);
    saveButton.addActionListener(this);
    openButton.addActionListener(this);
    printButton.addActionListener(this);
    heightField.addFocusListener(this);
    countField.addFocusListener(this);
}
Also used : RollOverButton(jgnash.ui.components.RollOverButton) JButton(javax.swing.JButton) JToolBar(javax.swing.JToolBar) JTextFieldEx(jgnash.ui.components.JTextFieldEx) DefaultComboBoxModel(javax.swing.DefaultComboBoxModel) CheckObjectType(jgnash.engine.checks.CheckObject.CheckObjectType) CheckLayout(jgnash.engine.checks.CheckLayout)

Aggregations

DefaultComboBoxModel (javax.swing.DefaultComboBoxModel)1 JButton (javax.swing.JButton)1 JToolBar (javax.swing.JToolBar)1 CheckLayout (jgnash.engine.checks.CheckLayout)1 CheckObjectType (jgnash.engine.checks.CheckObject.CheckObjectType)1 JTextFieldEx (jgnash.ui.components.JTextFieldEx)1 RollOverButton (jgnash.ui.components.RollOverButton)1