Search in sources :

Example 6 with XAlignedComponentPanel

use of com.mucommander.commons.util.ui.layout.XAlignedComponentPanel in project mucommander by mucommander.

the class ThemeNameDialog method createNamePanel.

// - UI initialisation ---------------------------------------------------------------
// -----------------------------------------------------------------------------------
/**
 * Creates the panel in which we'll store the label and name field.
 * @param  name current name.
 * @return      the panel in which we'll store the label and name field.
 */
private JPanel createNamePanel(String name) {
    XAlignedComponentPanel panel;
    panel = new XAlignedComponentPanel(5);
    nameField = new JTextField();
    nameField.setText(name);
    nameField.setSelectionStart(0);
    nameField.setSelectionEnd(name.length());
    panel.addRow(Translator.get("name"), nameField, 0);
    return panel;
}
Also used : XAlignedComponentPanel(com.mucommander.commons.util.ui.layout.XAlignedComponentPanel) JTextField(javax.swing.JTextField)

Aggregations

XAlignedComponentPanel (com.mucommander.commons.util.ui.layout.XAlignedComponentPanel)6 XBoxPanel (com.mucommander.commons.util.ui.layout.XBoxPanel)2 YBoxPanel (com.mucommander.commons.util.ui.layout.YBoxPanel)2 JCheckBox (javax.swing.JCheckBox)2 JTextField (javax.swing.JTextField)2 ComboBoxListener (com.mucommander.commons.util.ui.combobox.ComboBoxListener)1 EditableComboBox (com.mucommander.commons.util.ui.combobox.EditableComboBox)1 SaneComboBox (com.mucommander.commons.util.ui.combobox.SaneComboBox)1 DialogAction (com.mucommander.ui.dialog.DialogAction)1 InformationPane (com.mucommander.ui.layout.InformationPane)1 FilePathField (com.mucommander.ui.text.FilePathField)1 BorderLayout (java.awt.BorderLayout)1 Container (java.awt.Container)1 GridLayout (java.awt.GridLayout)1 KeyAdapter (java.awt.event.KeyAdapter)1 KeyEvent (java.awt.event.KeyEvent)1 ArrayList (java.util.ArrayList)1 JLabel (javax.swing.JLabel)1 JSeparator (javax.swing.JSeparator)1 JSpinner (javax.swing.JSpinner)1