javax.swing.JScrollPane.setFocusable()方法的使用及代码示例

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

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

JScrollPane.setFocusable介绍

暂无

代码示例

代码示例来源:origin: magefree/mage

jScrollPane1.setFocusable(false);

代码示例来源:origin: magefree/mage

/**
 * This method is called from within the constructor to initialize the form.
 * WARNING: Do NOT modify this code. The content of this method is always
 * regenerated by the Form Editor.
 */
@SuppressWarnings("unchecked")
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
private void initComponents() {
  jScrollPane1 = new javax.swing.JScrollPane();
  text = new javax.swing.JTextPane();
  setMinimumSize(getPreferredSize());
  setOpaque(false);
  setPreferredSize(new Dimension(dimension.frameWidth, dimension.frameHeight));
  setLayout(null);
  jScrollPane1.setBorder(null);
  jScrollPane1.setHorizontalScrollBarPolicy(javax.swing.ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER);
  jScrollPane1.setFocusable(false);
  jScrollPane1.setOpaque(false);
  text.setBorder(null);
  text.setEditable(false);
  text.setFont(new java.awt.Font("Arial", 0, 9));
  text.setFocusable(false);
  text.setOpaque(false);
  jScrollPane1.setViewportView(text);
  add(jScrollPane1);
  jScrollPane1.setBounds(20, 110, 130, 100);
  jScrollPane1.setBounds(new Rectangle(dimension.contentXOffset, dimension.textYOffset, dimension.textWidth, dimension.textHeight));
}// </editor-fold>//GEN-END:initComponents

代码示例来源:origin: magefree/mage

jScrollPaneSystem.setHorizontalScrollBarPolicy(javax.swing.ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER);
jScrollPaneSystem.setCursor(new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR));
jScrollPaneSystem.setFocusable(false);
jScrollPaneSystem.setOpaque(false);

代码示例来源:origin: com.eas.platypus/platypus-js-forms

@ScriptFunction
@Override
public void setFocusable(boolean aValue) {
  super.setFocusable(aValue);
}

代码示例来源:origin: com.synaptix/SynaptixTattoo

/**
 * Configures the scrollable portion which holds the list within the combo
 * box popup. This method is called when the UI class is created.
 */
protected void configureScroller() {
  scroller.setFocusable(false);
  scroller.getVerticalScrollBar().setFocusable(false);
  scroller.setBorder(null);
}

代码示例来源:origin: elki-project/elki

/**
 * Creates the scroll pane which houses the scrollable tree.
 */
protected JScrollPane createScroller() {
 JScrollPane sp = new JScrollPane(tree, ScrollPaneConstants.VERTICAL_SCROLLBAR_AS_NEEDED, ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER);
 sp.setHorizontalScrollBar(null);
 sp.setName("TreePopup.scrollPane");
 sp.setFocusable(false);
 sp.getVerticalScrollBar().setFocusable(false);
 sp.setBorder(null);
 return sp;
}

代码示例来源:origin: de.lmu.ifi.dbs.elki/elki

/**
 * Creates the scroll pane which houses the scrollable tree.
 */
protected JScrollPane createScroller() {
 JScrollPane sp = new JScrollPane(tree, ScrollPaneConstants.VERTICAL_SCROLLBAR_AS_NEEDED, ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER);
 sp.setHorizontalScrollBar(null);
 sp.setName("TreePopup.scrollPane");
 sp.setFocusable(false);
 sp.getVerticalScrollBar().setFocusable(false);
 sp.setBorder(null);
 return sp;
}

代码示例来源:origin: de.lmu.ifi.dbs.elki/elki-gui-minigui

/**
 * Creates the scroll pane which houses the scrollable tree.
 */
protected JScrollPane createScroller() {
 JScrollPane sp = new JScrollPane(tree, ScrollPaneConstants.VERTICAL_SCROLLBAR_AS_NEEDED, ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER);
 sp.setHorizontalScrollBar(null);
 sp.setName("TreePopup.scrollPane");
 sp.setFocusable(false);
 sp.getVerticalScrollBar().setFocusable(false);
 sp.setBorder(null);
 return sp;
}

代码示例来源:origin: kaikramer/keystore-explorer

private JScrollPane wrapKeyStoreTableInScrollPane(JTable jtKeyStore) {
  jtKeyStore.setOpaque(true);
  jtKeyStore.setShowGrid(false);
  jtKeyStore.setFillsViewportHeight(true);
  JScrollPane jspKeyStoreTable = PlatformUtil.createScrollPane(ScrollPaneConstants.VERTICAL_SCROLLBAR_AS_NEEDED,
      ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER);
  jspKeyStoreTable.setViewportView(jtKeyStore);
  jspKeyStoreTable.setBorder(BorderFactory.createEtchedBorder());
  jspKeyStoreTable.setFocusable(false);
  return jspKeyStoreTable;
}

代码示例来源:origin: edu.toronto.cs.savant/savant-core

jScrollPane3.setHorizontalScrollBarPolicy(javax.swing.ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER);
jScrollPane3.setVerticalScrollBarPolicy(javax.swing.ScrollPaneConstants.VERTICAL_SCROLLBAR_NEVER);
jScrollPane3.setFocusable(false);
jScrollPane3.setOpaque(false);

代码示例来源:origin: pvto/konte-art

jScrollPane1.setHorizontalScrollBarPolicy(javax.swing.ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER);
jScrollPane1.setVerticalScrollBarPolicy(javax.swing.ScrollPaneConstants.VERTICAL_SCROLLBAR_NEVER);
jScrollPane1.setFocusable(false);
jScrollPane1.setOpaque(false);

代码示例来源:origin: org.gephi/directory-chooser

public FileCompletionPopup(JFileChooser chooser, JTextField textField, Vector<File> files) {
  this.list = new JList(files);
  this.textField = textField;
  this.chooser = chooser;
  list.setVisibleRowCount(4);
  list.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
  
  JScrollPane jsp = new JScrollPane(list);
  add(jsp);
  
  list.setFocusable(false);
  jsp.setFocusable(false);
  setFocusable(false);
  
  list.addFocusListener(new FocusHandler());
  list.addMouseListener(new MouseHandler());
  list.addMouseMotionListener(new MouseHandler());
  
  textField.addKeyListener(this);
}

代码示例来源:origin: antlr/antlrworks

public ToolTipList(ToolTipListDelegate delegate) {
  super(new BorderLayout());
  this.delegate = delegate;
  tipsModel = new DefaultListModel();
  tipsList = new JList(tipsModel);
  tipsList.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
  tipsList.setBackground(BACKGROUND_COLOR);
  tipsList.setSelectionForeground(Color.black);
  tipsList.setSelectionBackground(BACKGROUND_COLOR);
  tipsList.setPrototypeCellValue("This is a rule name g");
  tipsList.addKeyListener(new MyListKeyAdapter());
  tipsList.setFocusable(false);
  tipsScrollPane = new JScrollPane(tipsList, JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED, JScrollPane.HORIZONTAL_SCROLLBAR_NEVER);
  tipsScrollPane.setFocusable(false);
  tipsScrollPane.setBorder(BorderFactory.createLineBorder(Color.lightGray));
  addMouseListener(new MyMouseAdapter());
  add(tipsScrollPane, BorderLayout.CENTER);
}

代码示例来源:origin: org.netbeans.modules/org-netbeans-modules-cnd-makeproject

jScrollPane1.setFocusable(false);

代码示例来源:origin: org.netbeans.modules/org-netbeans-modules-dlight-nativeexecution-nb

public CompletionPopup(Completable completable) {
  this.list = new JList();
  enabledColor = list.getForeground();
  list.setVisibleRowCount(4);
  list.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
  this.completable = completable;
  JScrollPane jsp = new JScrollPane(list);
  add(jsp);
  list.setFocusable(false);
  jsp.setFocusable(false);
  setFocusable(false);
  list.addFocusListener(new FocusHandler());
  list.addMouseListener(new MouseHandler());
  list.addMouseMotionListener(new MouseHandler());
  completable.addKeyListener(CompletionPopup.this);
}

代码示例来源:origin: omegat-org/omegat

public AutoCompleter(EditorTextArea3 editor) {
  this.editor = editor;
  scroll = new JScrollPane();
  scroll.setBorder(new EmptyBorder(0, 0, 0, 0));
  scroll.setPreferredSize(new Dimension(200, 200));
  scroll.setColumnHeaderView(null);
  scroll.setFocusable(false);
  scroll.getVerticalScrollBar().setFocusable(false);
  scroll.getHorizontalScrollBar().setFocusable(false);
  // add any views here
  addView(new GlossaryAutoCompleterView());
  addView(new AutotextAutoCompleterView());
  addView(new TagAutoCompleterView());
  addView(new CharTableAutoCompleterView());
  addView(new HistoryCompleter());
  addView(new HistoryPredictor());
  viewLabel = new JLabel();
  viewLabel.setBorder(new CompoundBorder(
      new MatteBorder(1, 0, 0, 0, UIManager.getColor("OmegaTBorder.color")),
      new EmptyBorder(5, 5, 5, 5)));
  viewLabel.setOpaque(true);
  popup.setBorder(new MatteBorder(1, 1, 1, 1, UIManager.getColor("OmegaTBorder.color")));
  popup.setLayout(new BorderLayout());
  popup.add(scroll, BorderLayout.CENTER);
  popup.add(viewLabel, BorderLayout.SOUTH);
  resetKeys();
}

代码示例来源:origin: org.netbeans.modules/org-netbeans-modules-php-editor

add(jPanel2, gridBagConstraints);
hierarchyPane.setFocusable(false);
gridBagConstraints = new java.awt.GridBagConstraints();
gridBagConstraints.gridx = 0;

代码示例来源:origin: org.netbeans.modules/org-netbeans-modules-cnd-callgraph

private void initGraph() {
  JComponent view = scene.createView();
  graphView.setViewportView(view);
  view.setFocusable(isCalls);
  int aInt = NbPreferences.forModule(CallGraphPanel.class).getInt(INITIAL_LAYOUT, 0);
  switch (aInt) {
    case 0:
      scene.setLayout(LayoutKind.grid);
      break;
    case 1:
      scene.setLayout(LayoutKind.hierarchical);
      break;
    case 2:
      scene.setLayout(LayoutKind.hierarchical_inverted);
      break;
    case 3:
      scene.setLayout(LayoutKind.horizontal);
      break;
  }
  graphView.setFocusable(false);
}

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

@SuppressWarnings("unchecked")
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
private void initComponents()
{
  jScrollPaneTabelaMensagens = new javax.swing.JScrollPane();
  tabelaMensagens = new javax.swing.JTable();
  setBorder(javax.swing.BorderFactory.createEmptyBorder(8, 8, 8, 8));
  setFocusable(false);
  setOpaque(false);
  setLayout(new java.awt.BorderLayout());
  jScrollPaneTabelaMensagens.setBorder(null);
  jScrollPaneTabelaMensagens.setFocusable(false);
  jScrollPaneTabelaMensagens.setName("scrollMensagensCompilador"); // NOI18N
  jScrollPaneTabelaMensagens.setOpaque(false);
  tabelaMensagens.setBackground(new java.awt.Color(245, 245, 245));
  tabelaMensagens.setToolTipText("");
  tabelaMensagens.setFillsViewportHeight(true);
  tabelaMensagens.setName("tabelaMensagensCompilador"); // NOI18N
  tabelaMensagens.setOpaque(false);
  tabelaMensagens.setRequestFocusEnabled(false);
  tabelaMensagens.setRowHeight(24);
  tabelaMensagens.setSelectionBackground(new java.awt.Color(0, 84, 148));
  tabelaMensagens.setShowHorizontalLines(false);
  tabelaMensagens.setShowVerticalLines(false);
  jScrollPaneTabelaMensagens.setViewportView(tabelaMensagens);
  add(jScrollPaneTabelaMensagens, java.awt.BorderLayout.CENTER);
}// </editor-fold>//GEN-END:initComponents
// Variables declaration - do not modify//GEN-BEGIN:variables

代码示例来源:origin: vgrazi/java-concurrent-animated

snippetLabel.setFocusable(true);
snippetLabel.setFocusTraversalKeysEnabled(true);
snippetPane.setFocusable(true);
snippetPane.setFocusTraversalKeysEnabled(true);
snippetLabel.addKeyListener(keyListener);

相关文章

JScrollPane类方法