protected JPanel getFontFamilyPanel() { if (fontNamePanel == null) { fontNamePanel = new JPanel(); fontNamePanel.setLayout(new BorderLayout()); fontNamePanel.setBorder(BorderFactory.createEmptyBorder(5, 5, 5, 5)); fontNamePanel.setPreferredSize(new Dimension(180, 130)); JScrollPane scrollPane = new JScrollPane(getFontFamilyList()); scrollPane.getVerticalScrollBar().setFocusable(false); scrollPane.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_ALWAYS); JPanel p = new JPanel(); p.setLayout(new BorderLayout()); p.add(getFontFamilyTextField(), BorderLayout.NORTH); p.add(scrollPane, BorderLayout.CENTER); JLabel label = new JLabel(("Font Name")); label.setHorizontalAlignment(JLabel.LEFT); label.setHorizontalTextPosition(JLabel.LEFT); label.setLabelFor(getFontFamilyTextField()); label.setDisplayedMnemonic('F'); fontNamePanel.add(label, BorderLayout.NORTH); fontNamePanel.add(p, BorderLayout.CENTER); } return fontNamePanel; }
private static void configure0(JLabel label, MnemonicText mnemonicText) { label.setText(mnemonicText.text); label.setDisplayedMnemonic(mnemonicText.key); label.setDisplayedMnemonicIndex(mnemonicText.index); }
protected JPanel getFontStylePanel() { if (fontStylePanel == null) { fontStylePanel = new JPanel(); fontStylePanel.setLayout(new BorderLayout()); fontStylePanel.setBorder(BorderFactory.createEmptyBorder(5, 5, 5, 5)); fontStylePanel.setPreferredSize(new Dimension(140, 130)); JScrollPane scrollPane = new JScrollPane(getFontStyleList()); scrollPane.getVerticalScrollBar().setFocusable(false); scrollPane.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_ALWAYS); JPanel p = new JPanel(); p.setLayout(new BorderLayout()); p.add(getFontStyleTextField(), BorderLayout.NORTH); p.add(scrollPane, BorderLayout.CENTER); JLabel label = new JLabel(("Font Style")); label.setHorizontalAlignment(JLabel.LEFT); label.setHorizontalTextPosition(JLabel.LEFT); label.setLabelFor(getFontStyleTextField()); label.setDisplayedMnemonic('Y'); fontStylePanel.add(label, BorderLayout.NORTH); fontStylePanel.add(p, BorderLayout.CENTER); } return fontStylePanel; }
private static void configureLabel(JLabel target, String text, int key, int index) { target.setText(text); if (key != KeyEvent.VK_UNDEFINED) { target.setDisplayedMnemonic(key); } if (index != -1) { target.setDisplayedMnemonicIndex(index); } } }
protected JPanel getFontSizePanel() { if (fontSizePanel == null) { fontSizePanel = new JPanel(); fontSizePanel.setLayout(new BorderLayout()); fontSizePanel.setPreferredSize(new Dimension(70, 130)); fontSizePanel.setBorder(BorderFactory.createEmptyBorder(5, 5, 5, 5)); JScrollPane scrollPane = new JScrollPane(getFontSizeList()); scrollPane.getVerticalScrollBar().setFocusable(false); scrollPane.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_ALWAYS); JPanel p = new JPanel(); p.setLayout(new BorderLayout()); p.add(getFontSizeTextField(), BorderLayout.NORTH); p.add(scrollPane, BorderLayout.CENTER); JLabel label = new JLabel(("Font Size")); label.setHorizontalAlignment(JLabel.LEFT); label.setHorizontalTextPosition(JLabel.LEFT); label.setLabelFor(getFontSizeTextField()); label.setDisplayedMnemonic('S'); fontSizePanel.add(label, BorderLayout.NORTH); fontSizePanel.add(p, BorderLayout.CENTER); } return fontSizePanel; }
private void updateMnemonic() { Integer mnemonic = getMnemonic(); if (mnemonic != null) { titleLabel.setDisplayedMnemonic(mnemonic); } int index = getMnemonicIndex(); if (index != -1) { titleLabel.setDisplayedMnemonicIndex(index); } }
jp_center_west.setLayout(new GridLayout(2, 1, RESTViewImpl.BORDER_WIDTH, RESTViewImpl.BORDER_WIDTH)); JLabel jl_in = new JLabel("Input: "); jl_in.setDisplayedMnemonic('i'); jl_in.setLabelFor(jtf_in); JLabel jl_out = new JLabel("Output: ");
if(!keys.isEmpty()) {AutoCompleteDecorator.decorate(jtf_key, keys, false);} final JTextField jtf_value = new JTextField(TEXT_FIELD_SIZE); jl_key.setDisplayedMnemonic('k'); jl_key.setLabelFor(jtf_key); JButton jb_add = new JButton(UIUtil.getIconFromClasspath(RCFileView.iconBasePath + "add.png"));
jl_url.setDisplayedMnemonic('u'); rest_ui.getFrame().getRootPane().setDefaultButton(jb_request);
/** * Wrapper for AbstractButton.setMnemonic and JLabel.setDisplayedMnemonic * @param item AbstractButton/JLabel * @param mnem Mnemonic char to set, latin [a-z,A-Z], digit [0-9], or any VK_ code */ private static void setMnemonic(Object item, int mnem) { if (isAquaLF()) { // there shall be no mnemonics on macosx. //#55864 return; } if ((mnem >= 'a') && (mnem <= 'z')) { mnem = mnem + ('A' - 'a'); } if (item instanceof AbstractButton) { AbstractButton b = (AbstractButton) item; b.putClientProperty(PROP_MNEMONIC, mnem); b.setMnemonic(mnem); } else { ((JLabel) item).setDisplayedMnemonic(mnem); } }
l.setDisplayedMnemonic(Node.getString("LAB_listOrder_Mnemonic").charAt(0)); constraints = new GridBagConstraints(); constraints.gridx = 0;
/** * @see AbstractComponentProperty#setPropertyValueToComponent(Object) */ @Override protected void setPropertyValueToComponent(Integer value) { Integer effectiveValue = value; if (effectiveValue == null) { effectiveValue = KeyEvent.VK_UNDEFINED; } component.setDisplayedMnemonic(effectiveValue); } }
private void addLabel(String string, char c, JComponent jComponent) { JLabel label = new JLabel(string); p.add(label); label.setDisplayedMnemonic(c); label.setLabelFor(jComponent); p.add(jComponent, "growx, wrap"); }
protected void addLabel(String string, char c, JComponent labelFor, JComponent jComponent, JPanel panelToAdd) { JLabel label = new JLabel(string); panelToAdd.add(label); label.setDisplayedMnemonic(c); label.setLabelFor(labelFor); panelToAdd.add(jComponent, "wrap"); }
private void addSizeLabel() { sizeLabel.setLabelFor(sizePane); sizeLabel.setDisplayedMnemonic(ResourceBundleUtil.getFirstChar(resourceBundle, "font.size.mnemonic")); sizeLabel.setText(resourceBundle.getString("font.size")); GridBagConstraints gridBagConstraints = new GridBagConstraints(); gridBagConstraints.anchor = GridBagConstraints.LINE_START; gridBagConstraints.insets = new Insets(0, 0, 5, 0); fontPanel.add(sizeLabel, gridBagConstraints); }
public ValidationView() { super("validView", "Validation view", "View with validation,"); jPanel = new JPanel(new MigLayout()); tf = new JTextField(20); PromptSupport.setPrompt("Enter name with uppercase", tf); JLabel jLabel = new JLabel("Name: "); jLabel.setDisplayedMnemonic('m'); jLabel.setLabelFor(tf); jPanel.add(jLabel); jPanel.add(tf); }
public EbliFindComponentDefault(final String _lb) { txtFind_ = new BuTextField(10); txtFind_.setToolTipText(getIndiceHelpComplete()); setLayout(new BuGridLayout(2, 5, 5)); final JLabel lb = new JLabel(_lb); lb.setLabelFor(txtFind_); lb.setDisplayedMnemonic(_lb.charAt(0)); add(lb); add(txtFind_); }
/** Creates new form SaveMacroPanel */ public JavaFastImportPanel(JavaFastImport jfi) { this.jfi = jfi; initComponents(); getAccessibleContext().setAccessibleDescription(LocaleSupport.getString("ACSD_JFI")); // NOI18N listLabel.setDisplayedMnemonic(LocaleSupport.getString("JFI_listLabelMnemonic", "M").charAt(0)); // NOI18N javax.swing.JList jl = jfi.getResultList(); listScrollPane.setViewportView(jl); listLabel.setLabelFor(jl); jl.getAccessibleContext().setAccessibleDescription(LocaleSupport.getString("ACSD_JFI_listLabel")); // NOI18N setMaximumSize(new Dimension(400, 200)); }
/** Creates new form KeySequenceInputPanel with empty sequence */ public KeySequenceInputPanel() { initComponents(); keySequenceLabel.setDisplayedMnemonic(LocaleSupport.getString("LBL_KSIP_Sequence_Mnemonic").charAt(0)); // NOI18N keySequenceInputField.getAccessibleContext().setAccessibleDescription(LocaleSupport.getString("ACSD_LBL_KSIP_Sequence")); // NOI18N getAccessibleContext().setAccessibleName(LocaleSupport.getString("MSP_AddTitle")); // NOI18N getAccessibleContext().setAccessibleDescription(LocaleSupport.getString("ACSD_KSIP")); // NOI18N }
/** Creates new form KeySequenceInputPanel with empty sequence*/ public KeySequenceInputPanel() { initComponents (); keySequenceLabel.setDisplayedMnemonic(LocaleSupport.getString("LBL_KSIP_Sequence_Mnemonic").charAt(0)); // NOI18N keySequenceInputField.getAccessibleContext().setAccessibleDescription(LocaleSupport.getString("ACSD_LBL_KSIP_Sequence")); // NOI18N getAccessibleContext().setAccessibleName(LocaleSupport.getString("MSP_AddTitle")); // NOI18N getAccessibleContext().setAccessibleDescription(LocaleSupport.getString("ACSD_KSIP")); // NOI18N }