javax.swing.JTree.getDropLocation()方法的使用及代码示例

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

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

JTree.getDropLocation介绍

暂无

代码示例

代码示例来源:origin: khuxtable/seaglass

/**
 * @inheritDoc
 */
@Override
protected void paintDropLine(Graphics g) {
  JTree.DropLocation loc = tree.getDropLocation();
  if (!isDropLine(loc)) {
    return;
  }
  Color c = (Color) style.get(paintContext, "Tree.dropLineColor");
  if (c != null) {
    g.setColor(c);
    Rectangle rect = getDropLineRect(loc);
    g.fillRect(rect.x, rect.y, rect.width, rect.height);
  }
}

代码示例来源:origin: khuxtable/seaglass

/**
 * @inheritDoc
 */
@Override
public void propertyChange(PropertyChangeEvent event) {
  if (SeaGlassLookAndFeel.shouldUpdateStyle(event)) {
    updateStyle((JTree) event.getSource());
  }
  if ("dropLocation" == event.getPropertyName()) {
    JTree.DropLocation oldValue = (JTree.DropLocation) event.getOldValue();
    repaintDropLocation(oldValue);
    repaintDropLocation(tree.getDropLocation());
  }
}

代码示例来源:origin: org.java.net.substance/substance

oldBounds.height);
JTree.DropLocation currLocation = tree.getDropLocation();
if (currLocation != null) {
  TreePath newDrop = currLocation.getPath();

代码示例来源:origin: com.github.insubstantial/substance

oldBounds.height);
JTree.DropLocation currLocation = tree.getDropLocation();
if (currLocation != null) {
  TreePath newDrop = currLocation.getPath();

代码示例来源:origin: org.swinglabs.swingx/swingx-core

private boolean checkDropOnState() {
  if ((getComponent() == null)) {
    return false;
  }
  JTree.DropLocation dropLocation = getComponent().getDropLocation();
  if (dropLocation != null
      && dropLocation.getChildIndex() == -1
      && getComponent().getRowForPath(dropLocation.getPath()) == row) {
    return true;
  }
  return false;
}

代码示例来源:origin: org.swinglabs.swingx/swingx-all

private boolean checkDropOnState() {
  if ((getComponent() == null)) {
    return false;
  }
  JTree.DropLocation dropLocation = getComponent().getDropLocation();
  if (dropLocation != null
      && dropLocation.getChildIndex() == -1
      && getComponent().getRowForPath(dropLocation.getPath()) == row) {
    return true;
  }
  return false;
}

代码示例来源:origin: org.bidib.jbidib.swinglabs.swingx/swingx-core

private boolean checkDropOnState() {
  if ((getComponent() == null)) {
    return false;
  }
  JTree.DropLocation dropLocation = getComponent().getDropLocation();
  if (dropLocation != null
      && dropLocation.getChildIndex() == -1
      && getComponent().getRowForPath(dropLocation.getPath()) == row) {
    return true;
  }
  return false;
}

代码示例来源:origin: com.haulmont.thirdparty/swingx-core

private boolean checkDropOnState() {
  if ((getComponent() == null)) {
    return false;
  }
  JTree.DropLocation dropLocation = getComponent().getDropLocation();
  if (dropLocation != null
      && dropLocation.getChildIndex() == -1
      && getComponent().getRowForPath(dropLocation.getPath()) == row) {
    return true;
  }
  return false;
}

代码示例来源:origin: com.github.insubstantial/substance

JTree.DropLocation dropLocation = tree.getDropLocation();
Rectangle rowRectangle = new Rectangle(this.tree.getInsets().left,
    bounds.y, this.tree.getWidth() - this.tree.getInsets().right

代码示例来源:origin: org.java.net.substance/substance

JTree.DropLocation dropLocation = tree.getDropLocation();
Rectangle rowRectangle = new Rectangle(this.tree.getInsets().left,
    bounds.y, this.tree.getWidth() - this.tree.getInsets().right

代码示例来源:origin: org.java.net.substance/substance

JTree.DropLocation dropLocation = tree.getDropLocation();
boolean isDropLocation = (dropLocation != null
    && dropLocation.getChildIndex() == -1 && tree

代码示例来源:origin: com.github.insubstantial/substance

JTree.DropLocation dropLocation = tree.getDropLocation();
boolean isDropLocation = (dropLocation != null
    && dropLocation.getChildIndex() == -1 && tree

代码示例来源:origin: khuxtable/seaglass

JTree.DropLocation dropLocation = tree.getDropLocation();
boolean isDrop = dropLocation != null && dropLocation.getChildIndex() == -1 && path == dropLocation.getPath();

相关文章

JTree类方法