本文整理了Java中javax.swing.JTable.setSurrendersFocusOnKeystroke()
方法的一些代码示例,展示了JTable.setSurrendersFocusOnKeystroke()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。JTable.setSurrendersFocusOnKeystroke()
方法的具体详情如下:
包路径:javax.swing.JTable
类名称:JTable
方法名:setSurrendersFocusOnKeystroke
JTable.setSurrendersFocusOnKeystroke介绍
暂无
代码示例
代码示例来源:origin: org.jspresso/jspresso-swing-application
table.setSurrendersFocusOnKeystroke(true);
代码示例来源:origin: org.jspresso.framework/jspresso-ulc-components-client
/**
* {@inheritDoc}
*/
@Override
protected Object createBasicObject(@SuppressWarnings("unused")
Anything args) {
JTable table = new UiJTable();
table.setSurrendersFocusOnKeystroke(true);
return table;
}
代码示例来源:origin: org.jspresso/jspresso-ulc-components-client
/**
* {@inheritDoc}
*/
@Override
protected Object createBasicObject(@SuppressWarnings("unused")
Anything args) {
JTable table = new UiJTable();
table.setSurrendersFocusOnKeystroke(true);
return table;
}
代码示例来源:origin: jpos/jPOS
private JTable createTable (TableModel model) {
JTable table = new JTable (model);
table.setSurrendersFocusOnKeystroke(true);
table.setFillsViewportHeight(true);
table.setShowVerticalLines(true);
table.setCellSelectionEnabled(false);
table.setDoubleBuffered(true);
TableColumnModel tcm = table.getColumnModel();
tcm.getColumn(0).setPreferredWidth(10);
tcm.getColumn(1).setPreferredWidth(25);
tcm.getColumn(2).setPreferredWidth(100);
tcm.getColumn(3).setPreferredWidth(600);
return table;
}
private JComponent createTPSPanel () {
代码示例来源:origin: de.dfki.mary/marytts-transcription
public TranscriptionTable() throws Exception {
super();
setLayout(new BoxLayout(this, BoxLayout.Y_AXIS));
transcriptiOnModel= new TranscriptionTableModel();
table = new JTable(transcriptionModel);
table.setPreferredScrollableViewportSize(new Dimension(500, 70));
// table.setFillsViewportHeight(true);
table.getSelectionModel().addListSelectionListener(new RowListener());
table.getColumnModel().getColumn(0).setCellRenderer(new CustomTableCellRenderer());
table.getColumnModel().getColumn(2).setCellRenderer(new CustomTableCellRenderer());
table.addKeyListener(new KeyEventListener());
table.setFont(new Font("Serif", Font.TRUETYPE_FONT, 12));
scrollpane = new JScrollPane(table);
add(scrollpane);
TableColumn column = table.getColumnModel().getColumn(1);
int columnSize = column.getPreferredWidth();
column.setPreferredWidth(2 * columnSize);
table.getColumnModel().getColumn(2).setPreferredWidth(2 * columnSize);
table.setSurrendersFocusOnKeystroke(true);
table.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
}
代码示例来源:origin: net.preibisch/multiview-reconstruction
table.setSurrendersFocusOnKeystroke( true );
table.setSelectionMode( ListSelectionModel.SINGLE_INTERVAL_SELECTION );
代码示例来源:origin: io.ultreia.java4all.jaxx/jaxx-runtime
table.setSurrendersFocusOnKeystroke(true);
table.addKeyListener(new KeyAdapter() {
代码示例来源:origin: Waikato/weka-trunk
/**
* Initializes the component
*/
public void initComponent() {
m_tableModel = new InteractiveTableModel(m_columnNames);
m_tableModel
.addTableModelListener(new InteractiveTablePanel.InteractiveTableModelListener());
m_table = new JTable();
m_table.setModel(m_tableModel);
m_table.setSurrendersFocusOnKeystroke(true);
if (!m_tableModel.hasEmptyRow()) {
m_tableModel.addEmptyRow();
}
InteractiveTableModel model = (InteractiveTableModel) m_table.getModel();
m_scroller = new javax.swing.JScrollPane(m_table);
m_table.setPreferredScrollableViewportSize(new java.awt.Dimension(500, 80));
TableColumn hidden =
m_table.getColumnModel().getColumn(model.m_hidden_index);
hidden.setMinWidth(2);
hidden.setPreferredWidth(2);
hidden.setMaxWidth(2);
hidden.setCellRenderer(new InteractiveRenderer(model.m_hidden_index));
setLayout(new BorderLayout());
add(m_scroller, BorderLayout.CENTER);
}
代码示例来源:origin: nz.ac.waikato.cms.weka/weka-stable
/**
* Initializes the component
*/
public void initComponent() {
m_tableModel = new InteractiveTableModel(m_columnNames);
m_tableModel
.addTableModelListener(new InteractiveTablePanel.InteractiveTableModelListener());
m_table = new JTable();
m_table.setModel(m_tableModel);
m_table.setSurrendersFocusOnKeystroke(true);
if (!m_tableModel.hasEmptyRow()) {
m_tableModel.addEmptyRow();
}
InteractiveTableModel model = (InteractiveTableModel) m_table.getModel();
m_scroller = new javax.swing.JScrollPane(m_table);
m_table.setPreferredScrollableViewportSize(new java.awt.Dimension(500, 80));
TableColumn hidden =
m_table.getColumnModel().getColumn(model.m_hidden_index);
hidden.setMinWidth(2);
hidden.setPreferredWidth(2);
hidden.setMaxWidth(2);
hidden.setCellRenderer(new InteractiveRenderer(model.m_hidden_index));
setLayout(new BorderLayout());
add(m_scroller, BorderLayout.CENTER);
}
代码示例来源:origin: org.nuiton.jaxx/jaxx-runtime
table.setSurrendersFocusOnKeystroke(true);
table.addKeyListener(new KeyAdapter() {
代码示例来源:origin: net.sf.taverna.t2.ui-components/report-view
table.getSelectionModel().addListSelectionListener(
tableListener);
table.setSurrendersFocusOnKeystroke(false);
table.getInputMap(JInternalFrame.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT)
.put(KeyStroke.getKeyStroke(KeyEvent.VK_ENTER, 0), "configure");
代码示例来源:origin: org.netbeans.modules/org-netbeans-modules-cnd-refactoring
paramTable.getInputMap().put(KeyStroke.getKeyStroke(KeyEvent.VK_F2, 0), ACTION_INLINE_EDITOR); //NOI18N
paramTable.setSurrendersFocusOnKeystroke(true);
paramTable.setCellSelectionEnabled(false);
paramTable.setRowSelectionAllowed(true);
代码示例来源:origin: stackoverflow.com
table.setColumnSelectionAllowed(true);
table.setFillsViewportHeight(true);
table.setSurrendersFocusOnKeystroke(true);
代码示例来源:origin: stackoverflow.com
table.setColumnSelectionAllowed(true);
table.setFillsViewportHeight(true);
table.setSurrendersFocusOnKeystroke(true);
代码示例来源:origin: bit4woo/knife
table.setSurrendersFocusOnKeystroke(true);
table.setFillsViewportHeight(true);
table.setCursor(Cursor.getPredefinedCursor(Cursor.TEXT_CURSOR));
代码示例来源:origin: net.preibisch/multiview-reconstruction
table.setSurrendersFocusOnKeystroke( true );
table.setSelectionMode( ListSelectionModel.MULTIPLE_INTERVAL_SELECTION );
代码示例来源:origin: stackoverflow.com
setLayout(new BorderLayout());
JTable table = new JTable(new MyTableModel());
table.setSurrendersFocusOnKeystroke(true);
TableColumnModel model = table.getColumnModel();
model.getColumn(1).setCellRenderer(new MyTableCellRenderer());
代码示例来源:origin: stackoverflow.com
table.setSurrendersFocusOnKeystroke(true);
table.setRowHeight(64);
return new JScrollPane(table);
代码示例来源:origin: stackoverflow.com
table.getSelectionModel().setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
table.setCellSelectionEnabled(true);
table.setSurrendersFocusOnKeystroke(false);
table.setDefaultEditor(Object.class,new SimpleMultiRowCellEditor());
table.getInputMap(JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT).put(KeyStroke.getKeyStroke(java.awt.event.
代码示例来源:origin: org.xworker/xworker_core
comp.setSurrendersFocusOnKeystroke(surrendersFocusOnKeystroke);