org.netbeans.api.visual.widget.Widget.equals()方法的使用及代码示例

x33g5p2x  于2022-02-03 转载在 其他  
字(2.8k)|赞(0)|评价(0)|浏览(149)

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

Widget.equals介绍

[英]Returns whether a specified object is the same as the widget.
[中]返回指定的对象是否与小部件相同。

代码示例

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

key = _key;
  val = _value;
}else if(key.equals(_key)){
  val = _value;
}else if(next != null){
if(key != null && key.equals(_key)){
  return val;
}else if(next != null){

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

if (gotWidget.equals(widget))
 i.remove();

代码示例来源:origin: org.netbeans.api/org-netbeans-api-visual

private boolean resolveTargetWidgetCoreDive (Widget[] result, Widget widget, Point parentLocation) {
  if (interractionLayer.equals (widget))
    return false;
  Point widgetLocation = widget.getLocation ();
  Point location = new Point (parentLocation.x - widgetLocation.x, parentLocation.y - widgetLocation.y);
  if (! widget.getBounds ().contains (location))
    return false;
  java.util.List<Widget> children = widget.getChildren ();
  for (int i = children.size () - 1; i >= 0; i --) {
    if (resolveTargetWidgetCoreDive (result, children.get (i), location))
      return true;
  }
  if (! widget.isHitAt (location))
    return false;
  ConnectorState state = provider.isTargetWidget (sourceWidget, widget);
  if (state == ConnectorState.REJECT)
    return false;
  if (state == ConnectorState.ACCEPT)
    result[0] = widget;
  return true;
}

代码示例来源:origin: in.jlibs/org-netbeans-api-visual

private boolean resolveTargetWidgetCoreDive (Widget[] result, Widget widget, Point parentLocation) {
  if (interractionLayer.equals (widget))
    return false;
  Point widgetLocation = widget.getLocation ();
  Point location = new Point (parentLocation.x - widgetLocation.x, parentLocation.y - widgetLocation.y);
  if (! widget.getBounds ().contains (location))
    return false;
  java.util.List<Widget> children = widget.getChildren ();
  for (int i = children.size () - 1; i >= 0; i --) {
    if (resolveTargetWidgetCoreDive (result, children.get (i), location))
      return true;
  }
  if (! widget.isHitAt (location))
    return false;
  ConnectorState state = provider.isTargetWidget (sourceWidget, widget);
  if (state == ConnectorState.REJECT)
    return false;
  if (state == ConnectorState.ACCEPT)
    result[0] = widget;
  return true;
}

代码示例来源:origin: org.netbeans.modules/org-netbeans-modules-cnd-callgraph

private ConnectionWidget oppositeConnection(ConnectionWidget c0) {
  Widget sourceAnchorWidget = c0.getSourceAnchor().getRelatedWidget();
  Widget targetAnchorWidget = c0.getTargetAnchor().getRelatedWidget();
  for (Widget w : connectionLayer.getChildren()) {
    if (w instanceof ConnectionWidget) {
      ConnectionWidget c1 = (ConnectionWidget) w;
      Anchor sourceAnchor = c1.getSourceAnchor();
      Anchor targetAnchor = c1.getTargetAnchor();
      if (sourceAnchor == null || targetAnchor == null) {
        continue;
      }
      if (sourceAnchor.getRelatedWidget().equals(targetAnchorWidget) && targetAnchor.getRelatedWidget().equals(sourceAnchorWidget)) {
        return c1;
      }
    }
  }
  return null;
}

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

if(source.equals(tabList[i]))

相关文章