javax.swing.JTable.getTransferHandler()方法的使用及代码示例

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

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

JTable.getTransferHandler介绍

暂无

代码示例

代码示例来源:origin: stackoverflow.com

final JTable actionTbl = new JTable();
actionTbl.addMouseListener(new MouseAdapter() {
  @Override
  public void mousePressed(MouseEvent evt) {
    actionTbl.getTransferHandler().exportAsDrag(actionTbl, evt, TransferHandler.MOVE);
  }
});

代码示例来源:origin: stackoverflow.com

final JTable actionTbl = new JTable();
 actionTbl.addMouseListener(new MouseAdapter() {
   @Override
   public void mousePressed(MouseEvent evt) {
     // Need to explicitly start a drag operation when the mouse is pressed.
     // Otherwise drags are only started *after* the user has clicked once
     // on the JTable (this could be down to the L&F not doing the right thing).
     actionTbl.getTransferHandler().exportAsDrag(actionTbl, evt, TransferHandler.COPY);
   }
 });

代码示例来源:origin: net.sf.squirrel-sql.thirdparty-non-maven/toniclf

public TransferHandler getTransferHandler()
{
  if (table != null)
  {
    return table.getTransferHandler();
  }
  else
  {
    return super.getTransferHandler();
  }
}

代码示例来源:origin: de.sciss/jtreetable

public TransferHandler getTransferHandler() {
  TransferHandler th = treeTable.getTransferHandler();
  if (th != null)
    return th;
  return super.getTransferHandler();
}

代码示例来源:origin: net.sf.squirrel-sql.thirdparty-non-maven/toniclf

protected void uninstallDefaults()
{
  if(table.getTransferHandler() instanceof UIResource)
  {
    table.setTransferHandler(null);
  }
}

代码示例来源: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: 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: net.sf.squirrel-sql.thirdparty-non-maven/toniclf

TransferHandler th=table.getTransferHandler();
if(th==null || th instanceof UIResource)

相关文章

JTable类方法