当前位置: 首页>>代码示例>>Java>>正文


Java BooleanPropertyBase类代码示例

本文整理汇总了Java中javafx.beans.property.BooleanPropertyBase的典型用法代码示例。如果您正苦于以下问题:Java BooleanPropertyBase类的具体用法?Java BooleanPropertyBase怎么用?Java BooleanPropertyBase使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


BooleanPropertyBase类属于javafx.beans.property包,在下文中一共展示了BooleanPropertyBase类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: objectEvent

import javafx.beans.property.BooleanPropertyBase; //导入依赖的package包/类
private void objectEvent(final ObservableDataContainer container) 
{
	dataContainer = container; 
	
	Platform.runLater( () -> { 
		PropertyListener propertyListener = new PropertyListener();
		List<BooleanPropertyBase> leftList = dataContainer.getLeftPropertyList();
		List<BooleanPropertyBase> rightList = dataContainer.getRigtPropertyList();
				
		dupTableView.setItems(container.getObservableList());
		
		for(int i = 0; i < leftList.size(); i++)
		{
			leftList.get(i).addListener(propertyListener);
			rightList.get(i).addListener(propertyListener);
		}
	});
}
 
开发者ID:tengai650,项目名称:SnapDup,代码行数:19,代码来源:MainDisplay.java

示例2: QualityGauge

import javafx.beans.property.BooleanPropertyBase; //导入依赖的package包/类
public QualityGauge() {
    aspectRatio     = PREFERRED_HEIGHT / PREFERRED_WIDTH;
    backgroundPaint = Color.TRANSPARENT;
    borderPaint     = Color.TRANSPARENT;
    borderWidth     = 0d;
    model           = GaugeBuilder.create()
                                  .minValue(0)
                                  .maxValue(10)
                                  .startAngle(0)
                                  .angleRange(180)
                                  .sectionsVisible(true)
                                  .sections(NORMAL_ORDER)
                                  .build();
    reverseOrder = new BooleanPropertyBase(false) {
        @Override protected void invalidated() { model.setSections(get() ? REVERSE_ORDER : NORMAL_ORDER); }
        @Override public Object getBean() { return QualityGauge.this; }
        @Override public String getName() { return "reverseOrder"; }
    };
    setAlignment(Pos.TOP_CENTER);
    init();
    initGraphics();
    registerListeners();
}
 
开发者ID:gluonhq,项目名称:javaone2016,代码行数:24,代码来源:QualityGauge.java

示例3: Btn

import javafx.beans.property.BooleanPropertyBase; //导入依赖的package包/类
public Btn(final String TEXT) {
    getStyleClass().setAll("btn");
    rounded     = new BooleanPropertyBase(false) {
        @Override public Object getBean() { return Btn.this; }
        @Override public String getName() { return "rounded"; }
    };
    buttonColor = new ObjectPropertyBase<Color>(Color.WHITE) {
        @Override public Object getBean() { return Btn.this; }
        @Override public String getName() { return "buttonColor"; }
    };
    thumbColor  = new ObjectPropertyBase<Color>(Color.WHITE) {
        @Override public Object getBean() { return Btn.this; }
        @Override public String getName() { return "thumbColor"; }
    };
    textColor   = new ObjectPropertyBase<Color>(Color.WHITE) {
        @Override public Object getBean() { return Btn.this; }
        @Override public String getName() { return "textColor"; }
    };
    text        = new StringPropertyBase(TEXT) {
        @Override public Object getBean() { return Btn.this; }
        @Override public String getName() { return "textOn"; }
    };

    disabledProperty().addListener(o -> setOpacity(isDisabled() ? 0.4 : 1.0));
}
 
开发者ID:HanSolo,项目名称:MoodFX,代码行数:26,代码来源:Btn.java

示例4: CardBox

import javafx.beans.property.BooleanPropertyBase; //导入依赖的package包/类
public CardBox(final Card... CARDS) {
    super(CARDS);
    cards = FXCollections.observableArrayList();
    cards.addAll(CARDS);
    firstTime       = true;
    open            = new BooleanPropertyBase(false) {
        @Override protected void invalidated() { handleState(get()); }
        @Override public Object getBean() { return CardBox.this; }
        @Override public String getName() { return "open"; }
    };
    cardHandler     = e -> handleCardSelect((Card) e.getSource());
    selectedCard    = cards.size() == 0 ? null : cards.get(cards.size() - 1);
    openTransition  = new ParallelTransition();
    closeTransition = new SequentialTransition();
    initGraphics();
    registerListeners();
}
 
开发者ID:HanSolo,项目名称:cardnav,代码行数:18,代码来源:CardBox.java

示例5: QualityGauge

import javafx.beans.property.BooleanPropertyBase; //导入依赖的package包/类
public QualityGauge() {
    aspectRatio     = PREFERRED_HEIGHT / PREFERRED_WIDTH;
    backgroundPaint = Color.TRANSPARENT;
    borderPaint     = Color.TRANSPARENT;
    borderWidth     = 0d;
    model           = GaugeBuilder.create()
                                  .minValue(0)
                                  .maxValue(10)
                                  .startAngle(0)
                                  .angleRange(180)
                                  .sectionsVisible(true)
                                  .sections(NORMAL_ORDER)
                                  .build();
    reverseOrder = new BooleanPropertyBase(false) {
        @Override protected void invalidated() { model.setSections(get() ? REVERSE_ORDER : NORMAL_ORDER); }
        @Override public Object getBean() { return QualityGauge.this; }
        @Override public String getName() { return "reverseOrder"; }
    };
    init();
    initGraphics();
    registerListeners();
}
 
开发者ID:mars-sim,项目名称:mars-sim,代码行数:23,代码来源:QualityGauge.java

示例6: includePseudoClassWhen

import javafx.beans.property.BooleanPropertyBase; //导入依赖的package包/类
public static void includePseudoClassWhen(Node node, PseudoClass pseudoClass, ObservableValue<? extends Boolean> condition) {
    BooleanProperty pseudoClassState = new BooleanPropertyBase(false) {
        @Override
        protected void invalidated() {
            node.pseudoClassStateChanged(pseudoClass, get());
        }

        @Override
        public Object getBean() {
            return node;
        }

        @Override
        public String getName() {
            return pseudoClass.getPseudoClassName();
        }
    };
    pseudoClassState.bind(condition);
}
 
开发者ID:JabRef,项目名称:jabref,代码行数:20,代码来源:BindingsHelper.java

示例7: Alarm

import javafx.beans.property.BooleanPropertyBase; //导入依赖的package包/类
public Alarm() {
    getStyleClass().add("alarm");
    currentValue                = new BooleanPropertyBase(false) {
        @Override
        public Object getBean() {
            return Alarm.this;
        }
        @Override
        public String getName() {
            return "currentValue";
        }
    };
    name                        = new SimpleStringProperty(Alarm.this, "name", "");
}
 
开发者ID:assemblits,项目名称:dynamo,代码行数:15,代码来源:Alarm.java

示例8: call

import javafx.beans.property.BooleanPropertyBase; //导入依赖的package包/类
@Override
public Void call(Pair<ObservableList<Integer>, Boolean> pair)
{
	List<BooleanPropertyBase> leftList = dataContainer.getLeftPropertyList();
	
	for(Integer index : pair.first)
   	{
		if(pair.second.booleanValue())
			leftList.get(index.intValue()).set(true);
		else if(leftList.get(index.intValue()).get())
			leftList.get(index.intValue()).set(false);
   	}
	
	return null;
}
 
开发者ID:tengai650,项目名称:SnapDup,代码行数:16,代码来源:MainDisplay.java

示例9: ObservableDataContainer

import javafx.beans.property.BooleanPropertyBase; //导入依赖的package包/类
public ObservableDataContainer(ObservableList<DupData> list, List<BooleanPropertyBase> leftList, List<BooleanPropertyBase> rightList, Map<BooleanPropertyBase, BooleanPropertyBase> propertyMap, Map<String, String> deviceMap)
{
	this.observableList = list;
	this.booleanLeftPropertyList = leftList;
	this.booleanRightPropertyList = rightList;
	this.booleanPropertyMap = propertyMap;
	this.deviceMap = deviceMap;
}
 
开发者ID:tengai650,项目名称:SnapDup,代码行数:9,代码来源:ObservableDataContainer.java

示例10: Segment

import javafx.beans.property.BooleanPropertyBase; //导入依赖的package包/类
public Segment(final boolean ACTIVE) {
    getStylesheets().add(Segment.class.getResource("styles.css").toExternalForm());
    getStyleClass().add("segment");
    timeline = new Timeline();
    active   = new BooleanPropertyBase(ACTIVE) {
        @Override public Object getBean() { return Segment.this; }
        @Override public String getName() { return "active"; }
    };

    init();
    initGraphics();
    registerListeners();
}
 
开发者ID:HanSolo,项目名称:bpmgauge,代码行数:14,代码来源:Segment.java

示例11: MyControl

import javafx.beans.property.BooleanPropertyBase; //导入依赖的package包/类
public MyControl() {
    getStyleClass().add("my-control");
    on     = new BooleanPropertyBase(false) {
        @Override protected void invalidated() { pseudoClassStateChanged(ON_PSEUDO_CLASS, get()); }
        @Override public Object getBean() { return MyControl.this; }
        @Override public String getName() { return "on"; }
    };
    color  = new SimpleStyleableObjectProperty<>(COLOR, MyControl.this, "color");
    _value = 0;
}
 
开发者ID:HanSolo,项目名称:hol1634,代码行数:11,代码来源:MyControl.java

示例12: Led

import javafx.beans.property.BooleanPropertyBase; //导入依赖的package包/类
public Led() {
    on    = new BooleanPropertyBase(false) {
        @Override protected void invalidated() { pseudoClassStateChanged(ON_PSEUDO_CLASS, get()); }
        @Override public Object getBean() { return this; }
        @Override public String getName() { return "on"; }
    };
    color = new SimpleStyleableObjectProperty<>(COLOR, this, "color");
    initGraphics();
    registerListeners();
}
 
开发者ID:HanSolo,项目名称:hol1634,代码行数:11,代码来源:Led.java

示例13: CustomControl

import javafx.beans.property.BooleanPropertyBase; //导入依赖的package包/类
public CustomControl(final SkinType SKIN_TYPE) {
    getStyleClass().add("custom-control");
    skinType = SKIN_TYPE;
    on       = new BooleanPropertyBase(false) {
        @Override protected void invalidated() { pseudoClassStateChanged(ON_PSEUDO_CLASS, get()); }
        @Override public Object getBean() { return this; }
        @Override public String getName() { return "on"; }
    };
    color    = new SimpleStyleableObjectProperty<>(COLOR, this, "color");
}
 
开发者ID:HanSolo,项目名称:hol1634,代码行数:11,代码来源:CustomControl.java

示例14: ChannelCell

import javafx.beans.property.BooleanPropertyBase; //导入依赖的package包/类
/**
 * Channelist ChannelCell
 */
public ChannelCell() {
    this.isOnline = new BooleanPropertyBase() {
        @Override
        public void invalidated() {
            pseudoClassStateChanged(ONLINE_PSEUDOCLASS, get());
        }

        @Override
        public String getName() {
            return "online";
        }

        @Override
        public Object getBean() {
            return ChannelCell.this;
        }
    };
    getStyleClass().add("channel-cell");
    this.isPlaylist = new BooleanPropertyBase() {
        @Override
        public void invalidated() {
            pseudoClassStateChanged(PLAYLIST_PSEUDOCLASS, get());
        }

        @Override
        public String getName() {
            return "isPlaylist";
        }

        @Override
        public Object getBean() {
            return ChannelCell.this;
        }
    };
    getStyleClass().add("channel-cell");
    this.hasReminder = new SimpleBooleanProperty();
}
 
开发者ID:westerwave,项目名称:livestreamer_twitch_gui,代码行数:41,代码来源:ChannelCell.java

示例15: createMainMenuVisibleProperty

import javafx.beans.property.BooleanPropertyBase; //导入依赖的package包/类
private BooleanProperty createMainMenuVisibleProperty() {
	BooleanProperty mainMenuVisibleProperty = new BooleanPropertyBase(true) {

		@Override
		public String getName() {
			return "mainMenuVisibleProperty";
		}

		@Override
		public Object getBean() {
			return this;
		}

	};
	mainMenuVisibleProperty.addListener(new ChangeListener<Boolean>() {
		@Override
		public void changed(ObservableValue<? extends Boolean> observable, Boolean oldValue,
				Boolean newValue) {
			if (newValue) {
				onMainMenuShow();
			} else if (tabsProperty.size() > 0) {
				onMainMenuHide();
			}
		}
	});
	return mainMenuVisibleProperty;
}
 
开发者ID:ntenhoeve,项目名称:Introspect-Framework,代码行数:28,代码来源:RfxWindow.java


注:本文中的javafx.beans.property.BooleanPropertyBase类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。