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

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

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

Widget.setCheckClipping介绍

[英]Sets a clipping for the widget.
[中]设置小部件的剪辑。

代码示例

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

public CardLayout (Widget cardLayoutWidget) {
  assert cardLayoutWidget != null;
  this.cardLayoutWidget = cardLayoutWidget;
  cardLayoutWidget.setCheckClipping (true);
}

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

public CardLayout (Widget cardLayoutWidget) {
  assert cardLayoutWidget != null;
  this.cardLayoutWidget = cardLayoutWidget;
  cardLayoutWidget.setCheckClipping (true);
}

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

/**
 * Attaches a pin widget to the node widget.
 * @param widget the pin widget
 */
public void attachPinWidget (Widget widget) {
  widget.setCheckClipping (true);
  addChild (widget);
  if (stateModel.getBooleanState ()  && isMinimizableWidget (widget))
    widget.setPreferredBounds (new Rectangle ());
}

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

/**
 * Attaches a pin widget to the node widget.
 * @param widget the pin widget
 */
public void attachPinWidget (Widget widget) {
  widget.setCheckClipping (true);
  addChild (widget);
  if (stateModel.getBooleanState ()  && isMinimizableWidget (widget))
    widget.setPreferredBounds (new Rectangle ());
}

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

/**
 * Creates a scroll widget.
 * @param scene
 */
public SwingScrollWidget (Scene scene) {
  super (scene);
  setLayout (new SwingScrollWidget.ScrollLayout ());
  setCheckClipping (true);
  viewport = new Widget (scene);
  viewport.setCheckClipping (true);
  addChild (viewport);
  verticalScroll = new JScrollBar (JScrollBar.VERTICAL);
  verticalScroll.setUnitIncrement (16);
  verticalScroll.setBlockIncrement (64);
  verticalWidget = new ComponentWidget (scene, verticalScroll);
  horizontalScroll = new JScrollBar (JScrollBar.HORIZONTAL);
  horizontalScroll.setUnitIncrement (16);
  horizontalScroll.setBlockIncrement (64);
  horizontalWidget = new ComponentWidget (scene, horizontalScroll);
}

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

/**
 * Creates a scroll widget.
 * @param scene
 */
public SwingScrollWidget (Scene scene) {
  super (scene);
  setLayout (new SwingScrollWidget.ScrollLayout ());
  setCheckClipping (true);
  viewport = new Widget (scene);
  viewport.setCheckClipping (true);
  addChild (viewport);
  verticalScroll = new JScrollBar (JScrollBar.VERTICAL);
  verticalScroll.setUnitIncrement (16);
  verticalScroll.setBlockIncrement (64);
  verticalWidget = new ComponentWidget (scene, verticalScroll);
  horizontalScroll = new JScrollBar (JScrollBar.HORIZONTAL);
  horizontalScroll.setUnitIncrement (16);
  horizontalScroll.setBlockIncrement (64);
  horizontalWidget = new ComponentWidget (scene, horizontalScroll);
}

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

/**
 * Creates a scroll widget.
 * @param scene
 */
public ScrollWidget (Scene scene) {
  super (scene);
  setLayout (new ScrollLayout ());
  setCheckClipping (true);
  viewport = new Widget (scene);
  viewport.setCheckClipping (true);
  addChild (viewport);
  addChild (upArrow = createUpArrow ());
  addChild (verticalSlider = createVerticalSlider ());
  addChild (downArrow = createDownArrow ());
  addChild (leftArrow = createLeftArrow ());
  addChild (horizontalSlider = createHorizontalSlider ());
  addChild (rightArrow = createRightArrow ());
  upArrow.getActions ().addAction (ActionFactory.createSelectAction (new UnitScrollProvider (0, -16)));
  downArrow.getActions ().addAction (ActionFactory.createSelectAction (new UnitScrollProvider (0, 16)));
  leftArrow.getActions ().addAction (ActionFactory.createSelectAction (new UnitScrollProvider (-16, 0)));
  rightArrow.getActions ().addAction (ActionFactory.createSelectAction (new UnitScrollProvider (16, 0)));
  horizontalSlider.getActions ().addAction (new BlockScrollAction (horizontalSlider, - 64, 0));
  verticalSlider.getActions ().addAction (new BlockScrollAction (verticalSlider, 0, - 64));
  horizontalSlider.getActions ().addAction (new SliderAction (horizontalSlider));
  verticalSlider.getActions ().addAction (new SliderAction (verticalSlider));
}

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

/**
 * Creates a scroll widget.
 * @param scene
 */
public ScrollWidget (Scene scene) {
  super (scene);
  setLayout (new ScrollLayout ());
  setCheckClipping (true);
  viewport = new Widget (scene);
  viewport.setCheckClipping (true);
  addChild (viewport);
  addChild (upArrow = createUpArrow ());
  addChild (verticalSlider = createVerticalSlider ());
  addChild (downArrow = createDownArrow ());
  addChild (leftArrow = createLeftArrow ());
  addChild (horizontalSlider = createHorizontalSlider ());
  addChild (rightArrow = createRightArrow ());
  upArrow.getActions ().addAction (ActionFactory.createSelectAction (new UnitScrollProvider (0, -16)));
  downArrow.getActions ().addAction (ActionFactory.createSelectAction (new UnitScrollProvider (0, 16)));
  leftArrow.getActions ().addAction (ActionFactory.createSelectAction (new UnitScrollProvider (-16, 0)));
  rightArrow.getActions ().addAction (ActionFactory.createSelectAction (new UnitScrollProvider (16, 0)));
  horizontalSlider.getActions ().addAction (new BlockScrollAction (horizontalSlider, - 64, 0));
  verticalSlider.getActions ().addAction (new BlockScrollAction (verticalSlider, 0, - 64));
  horizontalSlider.getActions ().addAction (new SliderAction (horizontalSlider));
  verticalSlider.getActions ().addAction (new SliderAction (verticalSlider));
}

相关文章