javax.swing.JTextArea.setComponentPopupMenu()方法的使用及代码示例

x33g5p2x  于2022-01-21 转载在 其他  
字(6.6k)|赞(0)|评价(0)|浏览(149)

本文整理了Java中javax.swing.JTextArea.setComponentPopupMenu()方法的一些代码示例,展示了JTextArea.setComponentPopupMenu()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。JTextArea.setComponentPopupMenu()方法的具体详情如下:
包路径:javax.swing.JTextArea
类名称:JTextArea
方法名:setComponentPopupMenu

JTextArea.setComponentPopupMenu介绍

暂无

代码示例

代码示例来源:origin: ron190/jsql-injection

this.textToTranslate[0].setDragEnabled(true);
this.textToTranslate[0].setComponentPopupMenu(new JPopupMenuText(this.textToTranslate[0]));

代码示例来源:origin: undera/jmeter-plugins

private void registerPopup() {
  JPopupMenu popup = new JPopupMenu();
  JMenuItem hideMessagesMenu = new JMenuItem("Hide Error Panel");
  hideMessagesMenu.addActionListener(new HideAction());
  popup.add(hideMessagesMenu);
  errorTextArea.setComponentPopupMenu(popup);
}

代码示例来源:origin: kg.apc/jmeter-plugins-cmn-jmeter

protected void registerPopup() {
  JPopupMenu popup = new JPopupMenu();
  JMenuItem hideMessagesMenu = new JMenuItem("Hide Error Panel");
  hideMessagesMenu.addActionListener(new HideAction());
  popup.add(hideMessagesMenu);
  errorTextArea.setComponentPopupMenu(popup);
}

代码示例来源:origin: undera/jmeter-plugins

protected void registerPopup() {
  JPopupMenu popup = new JPopupMenu();
  JMenuItem hideMessagesMenu = new JMenuItem("Hide Error Panel");
  hideMessagesMenu.addActionListener(new HideAction());
  popup.add(hideMessagesMenu);
  errorTextArea.setComponentPopupMenu(popup);
}

代码示例来源:origin: kg.apc/jmeter-plugins-extras

private void registerPopup() {
  JPopupMenu popup = new JPopupMenu();
  JMenuItem hideMessagesMenu = new JMenuItem("Hide Error Panel");
  hideMessagesMenu.addActionListener(new HideAction());
  popup.add(hideMessagesMenu);
  errorTextArea.setComponentPopupMenu(popup);
}

代码示例来源:origin: kg.apc/jmeter-plugins-standard

private void registerPopup() {
  JPopupMenu popup = new JPopupMenu();
  JMenuItem hideMessagesMenu = new JMenuItem("Hide Error Panel");
  hideMessagesMenu.addActionListener(new HideAction());
  popup.add(hideMessagesMenu);
  errorTextArea.setComponentPopupMenu(popup);
}

代码示例来源:origin: kg.apc/jmeter-plugins-extras

private void registerPopup() {
  JPopupMenu popup = new JPopupMenu();
  JMenuItem hideMessagesMenu = new JMenuItem("Hide Error Panel");
  hideMessagesMenu.addActionListener(new HideAction());
  popup.add(hideMessagesMenu);
  errorTextArea.setComponentPopupMenu(popup);
}

代码示例来源:origin: undera/jmeter-plugins

private void registerPopup() {
  JPopupMenu popup = new JPopupMenu();
  JMenuItem hideMessagesMenu = new JMenuItem("Hide Error Panel");
  hideMessagesMenu.addActionListener(new HideAction());
  popup.add(hideMessagesMenu);
  errorTextArea.setComponentPopupMenu(popup);
}

代码示例来源:origin: undera/jmeter-plugins

private void registerPopup() {
  JPopupMenu popup = new JPopupMenu();
  JMenuItem hideMessagesMenu = new JMenuItem("Hide Error Panel");
  hideMessagesMenu.addActionListener(new HideAction());
  popup.add(hideMessagesMenu);
  errorTextArea.setComponentPopupMenu(popup);
}

代码示例来源:origin: kg.apc/jmeter-plugins-perfmon

private void registerPopup() {
  JPopupMenu popup = new JPopupMenu();
  JMenuItem hideMessagesMenu = new JMenuItem("Hide Error Panel");
  hideMessagesMenu.addActionListener(new HideAction());
  popup.add(hideMessagesMenu);
  errorTextArea.setComponentPopupMenu(popup);
}

代码示例来源:origin: SKCraft/Launcher

private void initComponents() {
  gameKeysText.setFont(prioritySpinner.getFont());
  prioritySpinner.setComponentPopupMenu(TextFieldPopupMenu.INSTANCE);
  gameKeysText.setComponentPopupMenu(TextFieldPopupMenu.INSTANCE);
  JPanel container = new JPanel();
  container.setLayout(new MigLayout("insets dialog"));
  container.add(includeCheck, "span, gapbottom unrel");
  container.add(new JLabel("Priority:"));
  container.add(prioritySpinner, "span, split 2, w 50");
  container.add(new JLabel("(Greater is higher)"));
  container.add(new JLabel("Game Keys:"));
  container.add(SwingHelper.wrapScrollPane(gameKeysText), "span");
  container.add(okButton, "tag ok, span, split 2, sizegroup bttn, gaptop unrel");
  container.add(cancelButton, "tag cancel, sizegroup bttn");
  add(container, BorderLayout.CENTER);
  getRootPane().setDefaultButton(okButton);
  getRootPane().registerKeyboardAction(e -> cancelButton.doClick(), KeyStroke.getKeyStroke(KeyEvent.VK_ESCAPE, 0), JComponent.WHEN_IN_FOCUSED_WINDOW);
}

代码示例来源:origin: SKCraft/SKMCLauncher

textArea.setTabSize(2);
textArea.setEditable(false);
textArea.setComponentPopupMenu(TextFieldPopupMenu.INSTANCE);

代码示例来源:origin: SKCraft/Launcher

textArea.setTabSize(2);
textArea.setEditable(false);
textArea.setComponentPopupMenu(TextFieldPopupMenu.INSTANCE);

代码示例来源:origin: SKCraft/Launcher

private void initComponents() {
  nameText.setComponentPopupMenu(TextFieldPopupMenu.INSTANCE);
  descArea.setComponentPopupMenu(TextFieldPopupMenu.INSTANCE);
  includeArea.setComponentPopupMenu(TextFieldPopupMenu.INSTANCE);
  excludeArea.setComponentPopupMenu(TextFieldPopupMenu.INSTANCE);

代码示例来源:origin: SKCraft/Launcher

private void initComponents() {
  componentsTable.setModel(new FeatureTableModel(features));
  descScroll.setVerticalScrollBarPolicy(ScrollPaneConstants.VERTICAL_SCROLLBAR_ALWAYS);
  descText.setFont(new JLabel().getFont());
  descText.setEditable(false);
  descText.setWrapStyleWord(true);
  descText.setLineWrap(true);
  SwingHelper.removeOpaqueness(descText);
  descText.setComponentPopupMenu(TextFieldPopupMenu.INSTANCE);
  splitPane.setDividerLocation(300);
  splitPane.setDividerSize(6);
  SwingHelper.flattenJSplitPane(splitPane);
  container.setBorder(createEmptyBorder(12, 12, 12, 12));
  container.add(splitPane, BorderLayout.CENTER);
  buttonsPanel.addGlue();
  buttonsPanel.addElement(installButton);
  JLabel descLabel = new JLabel(SharedLocale.tr("features.intro"));
  descLabel.setBorder(createEmptyBorder(12, 12, 4, 12));
  SwingHelper.equalWidth(installButton, new JButton(SharedLocale.tr("button.cancel")));
  add(descLabel, BorderLayout.NORTH);
  add(container, BorderLayout.CENTER);
  add(buttonsPanel, BorderLayout.SOUTH);
  componentsTable.getSelectionModel().addListSelectionListener(new ListSelectionListener() {
    public void valueChanged(ListSelectionEvent e) {
      updateDescription();
    }
  });
  installButton.addActionListener(ActionListeners.dispose(this));
}

代码示例来源:origin: SKCraft/Launcher

private void initComponents() {
  explanationText.setComponentPopupMenu(TextFieldPopupMenu.INSTANCE);

代码示例来源:origin: SKCraft/Launcher

titleText.setComponentPopupMenu(TextFieldPopupMenu.INSTANCE);
gameVersionText.setComponentPopupMenu(TextFieldPopupMenu.INSTANCE);
launchFlagsArea.setComponentPopupMenu(TextFieldPopupMenu.INSTANCE);
userFilesIncludeArea.setComponentPopupMenu(TextFieldPopupMenu.INSTANCE);

代码示例来源:origin: UNIVALI-LITE/Portugol-Studio

console.setComponentPopupMenu(popupMenu);

代码示例来源:origin: raydac/netbeans-mmd-plugin

this.editorPane.setComponentPopupMenu(SwingUtils.addTextActions(UIComponentFactoryProvider.findInstance().makePopupMenu()));

相关文章

JTextArea类方法