javax.swing.JTextField.setDropTarget()方法的使用及代码示例

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

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

JTextField.setDropTarget介绍

暂无

代码示例

代码示例来源:origin: org.appdapter/org.appdapter.lib.gui

JTextField getReadOnlyTextField() {
  if (readOnly == null) {
    readOnly = new JTextField(getText());
    readOnly.setPreferredSize(MAX_TEXTWIDTH);
    readOnly.setEditable(false);
    readOnly.setName(title);
    readOnly.setDropTarget(null);
  }
  return readOnly;
}

代码示例来源:origin: org.rwshop/org.rwshop.swing.common

private void addReadOnlyField(String s) {
  JTextField field;
  
  if(myConfig.getPropertyValue(s) != null) {
    field = new JTextField(myConfig.getPropertyValue(s).toString());
  } else {
    field = new JTextField("null");
  }
  field.setEditable(false);
  field.setName(s);
  field.setDropTarget(null);
  add(field, myConstraints);
}

代码示例来源:origin: org.fudaa.framework.ctulu/ctulu-bu

public void setDropTarget(DropTarget _dt) {
 super.setDropTarget(_dt);
 if (_dt != null) {
  // FuLog.debug("BTF: setDropTarget");
  try {
   _dt.removeDropTargetListener(DtDragSensible.SINGLETON);
  } catch (IllegalArgumentException ex) {}
  try {
   _dt.addDropTargetListener(DtDragSensible.SINGLETON);
  } catch (TooManyListenersException ex) {}
 }
}

代码示例来源:origin: apache/ctakes

public FileChooserPanel( final String name, final String defaultDirectory, final boolean selectDir,
            final ActionListener fileChangeListener ) {
 super( new BorderLayout( 10, 10 ) );
 setBorder( new EmptyBorder( 2, 10, 2, 10 ) );
 final JLabel label = new JLabel( name );
 label.setPreferredSize( new Dimension( 100, 0 ) );
 label.setHorizontalAlignment( SwingConstants.TRAILING );
 final JTextField textField = new JTextField( defaultDirectory );
 textField.setEditable( false );
 final JButton openChooserButton
    = new JButton( new OpenFileChooserAction( textField, selectDir, fileChangeListener ) );
 add( label, BorderLayout.WEST );
 add( textField, BorderLayout.CENTER );
 add( openChooserButton, BorderLayout.EAST );
 textField.setDropTarget( new FileDropTarget( textField, selectDir, fileChangeListener ) );
 textField.addActionListener( fileChangeListener );
}

代码示例来源:origin: org.rwshop/org.rwshop.swing.common

field.setDropTarget(null);

代码示例来源:origin: dschanoeh/Kayak

fields[i].setDropTarget(dt);

代码示例来源:origin: dschanoeh/Kayak

jTextField3.setDropTarget(latitudeDropTarget);
jTextField4.setDropTarget(longitudeDropTarget);

代码示例来源:origin: org.rwshop/org.rwshop.swing.common

jTextField1.setDropTarget(null);

相关文章

JTextField类方法