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

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

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

Widget.isEnabled介绍

[英]Returns whether the widget is enabled. If the widget is disabled then any event is processed by assigned actions.
[中]返回小部件是否已启用。如果小部件被禁用,则任何事件都将由指定的操作处理。

代码示例

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

private Widget resolveTopMostDisabledWidget (Widget widget) {
  Widget disabledWidget = null;
  Widget tempWidget = widget;
  while (tempWidget != null) {
    if (! tempWidget.isVisible ()  ||  ! tempWidget.isEnabled ())
      disabledWidget = tempWidget;
    tempWidget = tempWidget.getParentWidget ();
  }
  return disabledWidget;
}

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

private Widget resolveTopMostDisabledWidget (Widget widget) {
  Widget disabledWidget = null;
  Widget tempWidget = widget;
  while (tempWidget != null) {
    if (! tempWidget.isVisible ()  ||  ! tempWidget.isEnabled ())
      disabledWidget = tempWidget;
    tempWidget = tempWidget.getParentWidget ();
  }
  return disabledWidget;
}

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

private WidgetAction.State processOperator (Operator operator, String tool, Widget widget, WidgetAction.WidgetEvent event) {
  if (! widget.isVisible ()  ||  ! widget.isEnabled ())
    return WidgetAction.State.REJECTED;
  WidgetAction.State state;
  List<Widget> children = widget.getChildren ();
  Widget[] childrenArray = children.toArray (new Widget[children.size ()]);
  for (int i = childrenArray.length - 1; i >= 0; i --) {
    Widget child = childrenArray[i];
    state = processOperator (operator, tool, child, event);
    if (state.isConsumed ())
      return state;
  }
  state = operator.operate (widget.getActions (), widget, event);
  if (state.isConsumed ())
    return state;
  WidgetAction.Chain actions = widget.getActions (tool);
  if (actions != null) {
    state = operator.operate (actions, widget, event);
    if (state.isConsumed ())
      return state;
  }
  return WidgetAction.State.REJECTED;
}

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

private WidgetAction.State processOperator (Operator operator, String tool, Widget widget, WidgetAction.WidgetEvent event) {
  if (! widget.isVisible ()  ||  ! widget.isEnabled ())
    return WidgetAction.State.REJECTED;
  WidgetAction.State state;
  List<Widget> children = widget.getChildren ();
  Widget[] childrenArray = children.toArray (new Widget[children.size ()]);
  for (int i = childrenArray.length - 1; i >= 0; i --) {
    Widget child = childrenArray[i];
    state = processOperator (operator, tool, child, event);
    if (state.isConsumed ())
      return state;
  }
  state = operator.operate (widget.getActions (), widget, event);
  if (state.isConsumed ())
    return state;
  WidgetAction.Chain actions = widget.getActions (tool);
  if (actions != null) {
    state = operator.operate (actions, widget, event);
    if (state.isConsumed ())
      return state;
  }
  return WidgetAction.State.REJECTED;
}

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

private WidgetAction.State processLocationOperator (Operator operator, String tool, Widget widget, WidgetAction.WidgetLocationEvent event) {
  if (! widget.isVisible ()  ||  ! widget.isEnabled ())
    return WidgetAction.State.REJECTED;

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

private WidgetAction.State processLocationOperator (Operator operator, String tool, Widget widget, WidgetAction.WidgetLocationEvent event) {
  if (! widget.isVisible ()  ||  ! widget.isEnabled ())
    return WidgetAction.State.REJECTED;

相关文章