Example usage for javax.swing JCheckBox getName

List of usage examples for javax.swing JCheckBox getName

Introduction

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

Prototype

public String getName() 

Source Link

Document

Gets the name of the component.

Usage

From source file:nz.govt.natlib.ndha.manualdeposit.StructMapFileDescMgmtPresenter.java

StructMapFileDescMgmtPresenter(final JList lstDescription, final JTextField textfldDescription,
        final JTextField textfldFilePrefix, final JCheckBox checkAllowMultiples, final JCheckBox checkMandatory,
        final JComboBox cmbPosition, final JTextField textfldDescriptionMain, final JCheckBox checkExtraLayers,
        final JTextField textfldDescriptionL2, final JTextField textfldFilePrefixL2,
        final JCheckBox checkAllowMultiplesL2, final JTextField textfldDescriptionL3,
        final JTextField textfldFilePrefixL3, final JCheckBox checkAllowMultiplesL3,
        final JTextField textfldDescriptionL4, final JTextField textfldFilePrefixL4,
        final JCheckBox checkAllowMultiplesL4, final JButton btnAddNew, final JButton btnDelete,
        final JButton btnSave, final JButton btnCancel, final JButton btnClose, final JButton btnMoveUp,
        final JButton btnMoveDown, final JButton btnGenMainDesc, final String xmlFileName,
        final IStructMapFileDescManagement theForm) {
    jlstDescription = lstDescription;/*  w ww  .  j a v  a  2  s. c o m*/
    this.textfldDescription = textfldDescription;
    this.textfldFilePrefix = textfldFilePrefix;
    this.checkAllowMultiples = checkAllowMultiples;
    this.checkMandatory = checkMandatory;
    cmboPosition = cmbPosition;
    this.checkExtraLayers = checkExtraLayers;
    this.textfldDescriptionMain = textfldDescriptionMain;

    // Extra Layers
    extraLayers = new HashMap<String, JComponent>();
    extraLayers.put(textfldDescriptionL2.getName(), textfldDescriptionL2);
    extraLayers.put(textfldFilePrefixL2.getName(), textfldFilePrefixL2);
    extraLayers.put(checkAllowMultiplesL2.getName(), checkAllowMultiplesL2);
    extraLayers.put(textfldDescriptionL3.getName(), textfldDescriptionL3);
    extraLayers.put(textfldFilePrefixL3.getName(), textfldFilePrefixL3);
    extraLayers.put(checkAllowMultiplesL3.getName(), checkAllowMultiplesL3);
    extraLayers.put(textfldDescriptionL4.getName(), textfldDescriptionL4);
    extraLayers.put(textfldFilePrefixL4.getName(), textfldFilePrefixL4);
    extraLayers.put(checkAllowMultiplesL4.getName(), checkAllowMultiplesL4);

    bttnAddNew = btnAddNew;
    bttnDelete = btnDelete;
    bttnSave = btnSave;
    bttnCancel = btnCancel;
    bttnClose = btnClose;
    bttnMoveUp = btnMoveUp;
    bttnMoveDown = btnMoveDown;
    bttnGenMainDesc = btnGenMainDesc;
    theXmlFileName = xmlFileName;
    theStructForm = theForm;
    loadData();

    // Restrict the values of this combo box to that of possible "Position"
    // enums
    cmboPosition.setModel(new DefaultComboBoxModel(FileType.Position.values()));
    // Restrict the contents of the description and file prefix to not allow
    // special characters
    textfldDescription.setDocument(new SpecialCharFilterDocument());
    textfldFilePrefix.setDocument(new SpecialCharFilterDocument());

    loadListData();
    addEventHandlers();
    checkButtons();
}