本文整理汇总了Java中fr.ourten.teabeans.value.BaseListProperty类的典型用法代码示例。如果您正苦于以下问题:Java BaseListProperty类的具体用法?Java BaseListProperty怎么用?Java BaseListProperty使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
BaseListProperty类属于fr.ourten.teabeans.value包,在下文中一共展示了BaseListProperty类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: GuiTextfield
import fr.ourten.teabeans.value.BaseListProperty; //导入依赖的package包/类
public GuiTextfield(final String text)
{
this.textProperty = new BaseProperty<>(text, "textProperty");
this.promptTextProperty = new BaseProperty<>("", "promptTextProperty");
this.maxTextLengthProperty = new BaseProperty<>(-1, "maxTextLength");
this.cursorPositionProperty = new BaseProperty<>(0, "cursorPositionProperty");
this.promptTextAlwaysDisplayedProperty = new BaseProperty<>(false, "promptTextAlwaysDisplayedProperty");
this.editableProperty = new BaseProperty<>(true, "editableProperty");
this.validatedProperty = new BaseProperty<>(true, "validatedProperty");
this.validatorsProperty = new BaseListProperty<>(null, "validatorsProperty");
this.setFocusable(true);
}
示例2: TileKeypunch
import fr.ourten.teabeans.value.BaseListProperty; //导入依赖的package包/类
public TileKeypunch()
{
super("keypunch", 2);
this.isCraftTabProperty = new BaseProperty<>(true, "isCraftTabProperty");
this.canPrintProperty = new BaseProperty<>(false, "canPrintProperty");
this.craftStacks = new BaseListProperty<>(() -> NonNullList.withSize(9, ItemStack.EMPTY), null);
this.filterStacks = new BaseListProperty<>(() -> NonNullList.withSize(9, ItemStack.EMPTY), null);
this.isCraftTabProperty.addListener(obs ->
{
if (this.isCraftTabProperty.getValue())
this.canPrintProperty.setValue(!this.getRecipeResult().isEmpty());
else
this.canPrintProperty.setValue(true);
});
this.craftStacks.addListener(obs ->
{
if (this.isCraftTabProperty.getValue())
this.canPrintProperty.setValue(!this.getRecipeResult().isEmpty());
});
this.grid = -1;
}
示例3: GuiTabPane
import fr.ourten.teabeans.value.BaseListProperty; //导入依赖的package包/类
public GuiTabPane()
{
this.tabsProperty = new BaseListProperty<>(null, "tabsProperty");
this.selectedTabProperty = new BaseProperty<>(-1, "selectedTabProperty");
this.defaultTabProperty = new BaseProperty<>(-1, "defaultTabProperty");
this.sideProperty = new BaseProperty<>(ESide.UP, "sideProperty");
this.tabHeightRatioProperty = new BaseProperty<>(.1f, "tabHeightRatioProperty");
this.setOverflowPolicy(EOverflowPolicy.TRIM_ALL);
}
示例4: GuiListView
import fr.ourten.teabeans.value.BaseListProperty; //导入依赖的package包/类
public GuiListView(final List<T> elements)
{
this.elementsProperty = new BaseListProperty<>(elements, "elementsListProperty");
this.editableProperty = new BaseProperty<>(false, "editableProperty");
this.placeholderProperty = new BaseProperty<>(null, "placeholderProperty");
this.orientationProperty = new BaseProperty<>(EOrientation.VERTICAL, "orientationProperty");
this.cellFactoryProperty = new BaseProperty<>(null, "cellFactoryProperty");
this.cellWidthProperty = new BaseProperty<>(0f, "cellWidthProperty");
this.cellHeightProperty = new BaseProperty<>(0f, "cellHeightProperty");
this.selectedCellIndexProperty = new BaseProperty<>(-1, "selectedCellIndexProperty");
}
示例5: TileSplitter
import fr.ourten.teabeans.value.BaseListProperty; //导入依赖的package包/类
public TileSplitter(final boolean hasFilter)
{
super("itemsplitter", 4);
this.hasFilter = hasFilter;
this.whitelistProperty = new BaseListProperty<>(null, "whitelistProperty");
this.whitelistProperty.add(true);
this.whitelistProperty.add(true);
this.whitelistProperty.add(true);
this.facing = EnumFacing.UP;
this.cachedEast = this.cachedNorth = this.cachedWest = ItemStack.EMPTY;
}
示例6: setup
import fr.ourten.teabeans.value.BaseListProperty; //导入依赖的package包/类
@Before
public void setup()
{
this.list = Arrays.asList(0, 2, 3, 5);
this.property = new BaseListProperty<>(this.list, "testIntegerListProperty");
this.count = 0;
}
示例7: testConstructorListOnly
import fr.ourten.teabeans.value.BaseListProperty; //导入依赖的package包/类
@Test
public void testConstructorListOnly()
{
final BaseListProperty<Integer> property = new BaseListProperty<>(this.list);
final String actual = property.getName();
assertThat(actual).isEmpty();
}
示例8: testConstructorListNull
import fr.ourten.teabeans.value.BaseListProperty; //导入依赖的package包/类
@Test
public void testConstructorListNull()
{
final BaseListProperty<Integer> property = new BaseListProperty<>(null);
final int actual = property.size();
assertThat(actual).isEqualTo(0);
assertThat(property.isEmpty()).isTrue();
}
示例9: testConstructorSupplier
import fr.ourten.teabeans.value.BaseListProperty; //导入依赖的package包/类
@Test
public void testConstructorSupplier()
{
final BaseListProperty<Integer> property = new BaseListProperty<>(LinkedList::new, null);
assertThat(property.getModifiableValue()).isInstanceOf(LinkedList.class);
}
示例10: testListRemoval
import fr.ourten.teabeans.value.BaseListProperty; //导入依赖的package包/类
@Test
public void testListRemoval()
{
final List<String> stringList = Arrays.asList("test1", "test2", "test3");
final BaseListProperty<String> stringProperty = new BaseListProperty<>(stringList, "testStringListProperty");
assertThat(stringProperty.remove("something")).isFalse();
assertThat(stringProperty.remove("test2")).isTrue();
assertThat(stringProperty.contains("test2")).isFalse();
}
示例11: testListPropertySort
import fr.ourten.teabeans.value.BaseListProperty; //导入依赖的package包/类
@Test
public void testListPropertySort()
{
final List<Integer> unsorted = Arrays.asList(1, 5, 6, 4, 10);
final BaseListProperty<Integer> property = new BaseListProperty<>(unsorted, "testIntegerListProperty");
property.sort();
assertThat(property.getValue().toArray()).containsExactly(new Integer[] { 1, 4, 5, 6, 10 });
property.sort(Collections.reverseOrder());
assertThat(property.getValue().toArray()).containsExactly(new Integer[] { 10, 6, 5, 4, 1 });
}
示例12: GuiToggleGroup
import fr.ourten.teabeans.value.BaseListProperty; //导入依赖的package包/类
public GuiToggleGroup()
{
this.selectedButtonProperty = new BaseProperty<>(null, "selectedButtonProperty");
this.buttonListProperty = new BaseListProperty<>(null, "buttonListProperty");
}
示例13: getButtonListProperty
import fr.ourten.teabeans.value.BaseListProperty; //导入依赖的package包/类
public BaseListProperty<IGuiTogglable> getButtonListProperty()
{
return this.buttonListProperty;
}
示例14: GuiFather
import fr.ourten.teabeans.value.BaseListProperty; //导入依赖的package包/类
public GuiFather()
{
this.childrensProperty = new BaseListProperty<>(null, "childrensProperty");
this.overflowPolicy = EOverflowPolicy.NONE;
}
示例15: getChildrensProperty
import fr.ourten.teabeans.value.BaseListProperty; //导入依赖的package包/类
protected BaseListProperty<GuiNode> getChildrensProperty()
{
return this.childrensProperty;
}