本文整理了Java中javax.swing.JTable.setTransferHandler()
方法的一些代码示例,展示了JTable.setTransferHandler()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。JTable.setTransferHandler()
方法的具体详情如下:
包路径:javax.swing.JTable
类名称:JTable
方法名:setTransferHandler
暂无
代码示例来源:origin: net.sf.squirrel-sql.thirdparty-non-maven/toniclf
protected void uninstallDefaults()
{
if(table.getTransferHandler() instanceof UIResource)
{
table.setTransferHandler(null);
}
}
代码示例来源:origin: net.sf.squirrel-sql.thirdparty-non-maven/toniclf
public void setTransferHandler(TransferHandler newHandler)
{
if (table != null)
{
table.setTransferHandler(newHandler);
}
else
{
super.setTransferHandler(newHandler);
}
}
代码示例来源:origin: stackoverflow.com
JTable table = t_objects;
table.setDragEnabled(true);
table.setDropMode(DropMode.INSERT_ROWS);
table.setTransferHandler(new TableRowTransferHandler(table));
代码示例来源:origin: stackoverflow.com
JPanel panel = new JPanel(new MigLayout("insets 0, wrap 1", "[grow]"));
JPanel listsPanel = new JPanel(new MigLayout("insets 0, wrap 1",
"[grow]", "[]0[5:5:5]0[]"));
JLabel separatorLabel = new JLabel("_");
separatorLabel.setBorder(new LineBorder(Color.BLACK, 300));
JTable upper = new JTable(20, 3);
JTable lower = new JTable(20, 3);
// enable drag in upper
upper.setDragEnabled(true);
TransferHandler tableTransfer = new TransferHandler() {
@Override
public boolean canImport(JComponent comp,
DataFlavor[] transferFlavors) {
return true;
}
};
lower.setTransferHandler(tableTransfer);
listsPanel.add(upper, "growx");
listsPanel.add(separatorLabel, "growx");
listsPanel.add(lower, "growx");
panel.add(listsPanel, "growx");
JScrollPane pane = new JScrollPane(panel);
代码示例来源:origin: khuxtable/seaglass
/**
* @see javax.swing.plaf.basic.BasicTableUI#uninstallDefaults()
*/
protected void uninstallDefaults() {
table.setDefaultRenderer(Date.class, dateRenderer);
table.setDefaultRenderer(Number.class, numberRenderer);
table.setDefaultRenderer(Double.class, doubleRender);
table.setDefaultRenderer(Float.class, floatRenderer);
table.setDefaultRenderer(Icon.class, iconRenderer);
table.setDefaultRenderer(ImageIcon.class, imageIconRenderer);
table.setDefaultRenderer(Boolean.class, booleanRenderer);
table.setDefaultRenderer(Object.class, objectRenderer);
if (table.getTransferHandler() instanceof UIResource) {
table.setTransferHandler(null);
}
SeaGlassContext context = getContext(table, ENABLED);
style.uninstallDefaults(context);
context.dispose();
style = null;
}
代码示例来源:origin: Vhati/Slipstream-Mod-Manager
table.setTransferHandler( new TableRowTransferHandler( table ) );
代码示例来源:origin: com.synaptix/SynaptixSwing
table.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
table.setDragEnabled(true);
table.setTransferHandler(new LabelTransferHandler());
代码示例来源:origin: openpnp/openpnp
stagesTable.setDragEnabled(true);
stagesTable.setDropMode(DropMode.INSERT_ROWS);
stagesTable.setTransferHandler(new TableRowTransferHandler(stagesTable));
stagesTable.getColumnModel().getColumn(0).setPreferredWidth(50);
stagesTable.getColumnModel().getColumn(1).setPreferredWidth(50);
代码示例来源:origin: com.synaptix/SynaptixSwing
table.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
table.setDragEnabled(true);
table.setTransferHandler(new LabelTransferHandler());
代码示例来源:origin: net.sourceforge.jadex/jadex-runtimetools-swing
usertable.getColumnModel().getColumn(0).setCellRenderer(userrend);
usertable.setTransferHandler(new TransferHandler()
代码示例来源:origin: org.activecomponents.jadex/jadex-runtimetools-swing
usertable.getColumnModel().getColumn(0).setCellRenderer(userrend);
usertable.setTransferHandler(new TransferHandler()
代码示例来源:origin: com.googlecode.vfsjfilechooser2/vfsjfilechooser2
public void mouseEntered(MouseEvent evt)
{
JComponent source = (JComponent) evt.getSource();
if (source instanceof JTable)
{
JTable table = (JTable) evt.getSource();
TransferHandler th1 = getFileChooser().getTransferHandler();
TransferHandler th2 = table.getTransferHandler();
if (th1 != th2)
{
table.setTransferHandler(th1);
}
boolean dragEnabled = getFileChooser().getDragEnabled();
if (dragEnabled != table.getDragEnabled())
{
table.setDragEnabled(dragEnabled);
}
}
else if (source instanceof JList)
{
// Forward event to Basic
if (getDoubleClickListener() != null)
{
getDoubleClickListener().mouseEntered(evt);
}
}
}
代码示例来源:origin: omegat-org/omegat
setKeyboardShortcut(panel.table, "selectPreviousColumnExtendSelection", 'B');
panel.table.setTransferHandler(new AlignTransferHandler());
panel.table.addPropertyChangeListener("dropLocation", new DropLocationListener());
if (Preferences.isPreference(Preferences.PROJECT_FILES_USE_FONT)) {
代码示例来源:origin: net.sf.squirrel-sql.thirdparty-non-maven/toniclf
if(th==null || th instanceof UIResource)
table.setTransferHandler(defaultTransferHandler);
代码示例来源:origin: cpesch/RouteConverter
tableRoutes.setTransferHandler(new TableDragHandler());
tableRoutes.getSelectionModel().addListSelectionListener(new ListSelectionListener() {
public void valueChanged(ListSelectionEvent e) {
代码示例来源:origin: cpesch/RouteConverter
tablePositions.setDropMode(ON);
TableDragAndDropHandler dropHandler = new TableDragAndDropHandler(new PanelDropHandler());
tablePositions.setTransferHandler(dropHandler);
内容来源于网络,如有侵权,请联系作者删除!