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

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

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

Widget.setOpaque介绍

[英]Sets the widget opacity.
[中]设置小部件的不透明度。

代码示例

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

public void installUI (VMDNodeWidget widget) {
  widget.setBorder (VMDFactory.createVMDNodeBorder ());
  widget.setOpaque (false);
  Widget header = widget.getHeader ();
  header.setBorder (BORDER_PIN);
  header.setBackground (COLOR_SELECTED);
  header.setOpaque (false);
  Widget minimize = widget.getMinimizeButton ();
  minimize.setBorder (BORDER_MINIMIZE);
  Widget pinsSeparator = widget.getPinsSeparator ();
  pinsSeparator.setForeground (BORDER_CATEGORY_BACKGROUND);
}

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

public void installUI (VMDNodeWidget widget) {
  widget.setBorder (VMDFactory.createVMDNodeBorder ());
  widget.setOpaque (false);
  Widget header = widget.getHeader ();
  header.setBorder (BORDER_PIN);
  header.setBackground (COLOR_SELECTED);
  header.setOpaque (false);
  Widget minimize = widget.getMinimizeButton ();
  minimize.setBorder (BORDER_MINIMIZE);
  Widget pinsSeparator = widget.getPinsSeparator ();
  pinsSeparator.setForeground (BORDER_CATEGORY_BACKGROUND);
}

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

public void updateUI (VMDNodeWidget widget, ObjectState previousState, ObjectState state) {
  if (! previousState.isSelected ()  &&  state.isSelected ())
    widget.bringToFront ();
  else if (! previousState.isHovered ()  &&  state.isHovered ())
    widget.bringToFront ();
  Widget header = widget.getHeader ();
  header.setOpaque (state.isSelected ());
  header.setBorder (state.isFocused () || state.isHovered () ? BORDER_PIN_HOVERED : BORDER_PIN);
}

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

public void updateUI (VMDNodeWidget widget, ObjectState previousState, ObjectState state) {
  if (! previousState.isSelected ()  &&  state.isSelected ())
    widget.bringToFront ();
  else if (! previousState.isHovered ()  &&  state.isHovered ())
    widget.bringToFront ();
  Widget header = widget.getHeader ();
  header.setOpaque (state.isSelected ());
  header.setBorder (state.isFocused () || state.isHovered () ? BORDER_PIN_HOVERED : BORDER_PIN);
}

代码示例来源:origin: it.tidalwave.semantic/it-tidalwave-semantic-graph

propertiesWidget.setOpaque(false);
propertiesWidget.setBorder(BORDER_4);
addChild(propertiesWidget);

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

public void updateUI (VMDNodeWidget widget, ObjectState previousState, ObjectState state) {
  if (! previousState.isSelected ()  &&  state.isSelected ())
    widget.bringToFront ();
  boolean hover = state.isHovered () || state.isFocused ();
  widget.getHeader ().setOpaque (hover);
  if (state.isSelected ())
    widget.setBorder (BORDER60_SELECT);
  else if (state.isHovered ())
    widget.setBorder (BORDER60_HOVER);
  else if (state.isFocused ())
    widget.setBorder (BORDER60_HOVER);
  else
    widget.setBorder (BORDER60);
}

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

public void updateUI (VMDNodeWidget widget, ObjectState previousState, ObjectState state) {
  if (! previousState.isSelected ()  &&  state.isSelected ())
    widget.bringToFront ();
  boolean hover = state.isHovered () || state.isFocused ();
  widget.getHeader ().setOpaque (hover);
  if (state.isSelected ())
    widget.setBorder (BORDER60_SELECT);
  else if (state.isHovered ())
    widget.setBorder (BORDER60_HOVER);
  else if (state.isFocused ())
    widget.setBorder (BORDER60_HOVER);
  else
    widget.setBorder (BORDER60);
}

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

widget.setOpaque (false);
header.addChild (widget, 1000);
header.addChild (minimizeWidget);

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

widget.setOpaque (false);
header.addChild (widget, 1000);
header.addChild (minimizeWidget);

相关文章