gpt4 book ai didi

com.github.bordertech.wcomponents.WText.getParent()方法的使用及代码示例

转载 作者:知者 更新时间:2024-03-25 17:33:05 26 4
gpt4 key购买 nike

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

WText.getParent介绍

暂无

代码示例

代码示例来源:origin: com.github.bordertech.wcomponents/wcomponents-examples

@Override
  public void execute(final ActionEvent event) {
    editor.setIsFace(imageEditorIsFace.isSelected());
    if (hackFaceTracker.getParent() == null && imageEditorIsFace.isSelected()) {
      add(hackFaceTracker);
    }
  }
});

代码示例来源:origin: com.github.bordertech.wcomponents/wcomponents-core

/**
 * test remove - child from shared list.
 */
@Test
public void testRemoveCommon() {
  AbstractWComponent comp = new MockContainer();
  WText text1 = new WText("XYZ");
  WText text2 = new WText("ABC");
  comp.add(text1);
  comp.add(text2);
  comp.remove(text1); // from shared list
  Assert.assertNull("shared should not contain text1", text1.getParent());
  Assert.assertSame("shared should contain text2", text2, comp.getChildAt(0));
}

代码示例来源:origin: com.github.bordertech.wcomponents/wcomponents-core

/**
 * test remove - child from specific uic list.
 */
@Test
public void testRemoveSpecific() {
  UIContext uic1 = createUIContext();
  UIContext uic2 = createUIContext();
  AbstractWComponent comp = new MockContainer();
  WText text1 = new WText("XYZ");
  WText text2 = new WText("ABC");
  comp.add(text1);
  comp.add(text2);
  comp.setLocked(true);
  // from uic2 list
  setActiveContext(uic2);
  comp.remove(text1);
  resetContext();
  Assert.assertSame("shared should contain text1", text1, comp.getChildAt(0));
  Assert.assertSame("shared should contain text2", text2, comp.getChildAt(1));
  setActiveContext(uic1);
  Assert.assertSame("uic1 should contain text1", text1, comp.getChildAt(0));
  Assert.assertSame("uic1 should contain text2", text2, comp.getChildAt(1));
  setActiveContext(uic2);
  Assert.assertNull("uic2 should not contain text1", text1.getParent());
  Assert.assertSame("uic2 should contain text2", text2, comp.getChildAt(0));
}

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com