Java 类javafx.beans.property.BooleanPropertyBase 实例源码

项目:SnapDup    文件:MainDisplay.java   
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);
        }
    });
}
项目:javaone2016    文件:QualityGauge.java   
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();
}
项目:MoodFX    文件:Btn.java   
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));
}
项目:cardnav    文件:CardBox.java   
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();
}
项目:mars-sim    文件:QualityGauge.java   
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();
}
项目:jabref    文件:BindingsHelper.java   
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);
}
项目:dynamo    文件:Alarm.java   
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", "");
}
项目:SnapDup    文件:MainDisplay.java   
@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;
}
项目:SnapDup    文件:MainDisplay.java   
@Override
public Void call(Pair<ObservableList<Integer>, Boolean> pair)
{
    List<BooleanPropertyBase> rightList = dataContainer.getRigtPropertyList();

    for(Integer index : pair.first)
    {
        if(pair.second.booleanValue())
            rightList.get(index.intValue()).set(true);
        else if(rightList.get(index.intValue()).get())
            rightList.get(index.intValue()).set(false);
    }

    return null;
}
项目:SnapDup    文件:ObservableDataContainer.java   
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;
}
项目:bpmgauge    文件:Segment.java   
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();
}
项目:hol1634    文件:MyControl.java   
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;
}
项目:hol1634    文件:Led.java   
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();
}
项目:hol1634    文件:CustomControl.java   
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");
}
项目:livestreamer_twitch_gui    文件:ChannelCell.java   
/**
 * 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();
}
项目:Introspect-Framework    文件:RfxWindow.java   
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;
}
项目:SnapDup    文件:GenerateScriptTask.java   
@Override
protected String call() throws Exception
{
    final List<BooleanPropertyBase> leftList = dataContainer.getLeftPropertyList();
    final List<BooleanPropertyBase> rightList = dataContainer.getRigtPropertyList();
    final ObservableList<DupData> dupDataList = dataContainer.getObservableList();

    if(isWindows)
        buff.append("@setlocal\n");
    else
        buff.append("#!/bin/sh\n");

    for(Entry<String, String> entry : dataContainer.getDeviceMap().entrySet())
    {
        if(isWindows)
        {
            buff.append("set ");
            buff.append(entry.getKey().toUpperCase()).append("=").append(entry.getValue().replace('/', '\\')).append("\n");
        }
        else
            buff.append(entry.getKey().toUpperCase()).append("=").append(entry.getValue()).append("\n");
    }

    for(int i = 0; i < leftList.size(); i++)
    {
        if(leftList.get(i).get())
        {
            if(isWindows)
            {
                buff.append("del \"%").append(dupDataList.get(i).getDevice1().toUpperCase()).append("%");
                buff.append(dupDataList.get(i).getFile1().replace('/', '\\')).append("\"\n");
            }
            else
            {
                buff.append("rm \"${").append(dupDataList.get(i).getDevice1().toUpperCase()).append("}");
                buff.append(dupDataList.get(i).getFile1()).append("\"\n");
            }
        }
        else if(rightList.get(i).get())
        {
            if(isWindows)
            {
                buff.append("del \"%").append(dupDataList.get(i).getDevice2().toUpperCase()).append("%");
                buff.append(dupDataList.get(i).getFile2().replace('/', '\\')).append("\"\n");
            }
            else
            {
                buff.append("rm \"${").append(dupDataList.get(i).getDevice2().toUpperCase()).append("}");
                buff.append(dupDataList.get(i).getFile2()).append("\"\n");
            }
        }
    }

    if(isWindows)
    {
        buff.append("@endlocal");
    }

    return buff.toString();
}
项目:SnapDup    文件:DupParserTask.java   
@Override
protected String call() throws Exception 
{       
    try
    {
        LineNumberReader reader = new LineNumberReader(new FileReader(file));
        ObservableList<DupData> tableDataModel = FXCollections.<DupData> observableArrayList();
        Map<String, String> deviceMap = new HashMap<String, String>();

        try
        {
            int txtLen = 0;

            while(reader.ready())
            {
                String line = reader.readLine();
                String[] group  = dupPattern.split(line.subSequence(0, line.length()));

                if(group.length > 0)
                {
                    if(group.length == 3 && group[0].equals("data"))
                        deviceMap.put(group[1], group[2]);
                    else if(group.length == 7 && group[0].equals("dup"))
                    {
                        String[] devices = new String[2];
                        String[] files = new String[2];
                        int[] offsets = new int[2];

                        devices[0] = group[1];
                        devices[1] = group[3];

                        files[0] = group[2];
                        files[1] = group[4];

                        offsets[0] = txtLen;
                        offsets[1] = txtLen + line.length();

                        tableDataModel.add(new DupData(devices, files, Long.parseLong(group[5]), offsets));
                    }
                }

                txtLen += line.length();
                txtLen++; // increment needed for line feed.
                buff.append(line).append("\n");
            }
        }
        finally
        {
            reader.close();
        }

        Map<BooleanPropertyBase, BooleanPropertyBase> booleanPropertyMap  = new HashMap<>();;
        List<BooleanPropertyBase> booleanLeftPropertyList = new ArrayList<>(tableDataModel.size());
        List<BooleanPropertyBase> booleanRightPropertyList = new ArrayList<>(tableDataModel.size());

        for(int i = 0; i < tableDataModel.size(); i++)
        {
            BooleanPropertyBase propertyLeft = new SimpleBooleanProperty();
            BooleanPropertyBase propertyRight = new SimpleBooleanProperty();

            booleanLeftPropertyList.add(propertyLeft);
            booleanRightPropertyList.add(propertyRight);

            booleanPropertyMap.put(propertyLeft, propertyRight);
            booleanPropertyMap.put(propertyRight, propertyLeft);
        }

        ObjectEventDispatcher.postObject(new ObservableDataContainer(tableDataModel, booleanLeftPropertyList, booleanRightPropertyList, booleanPropertyMap, deviceMap));

        return buff.toString();
    }
    catch(Exception e)
    {
        ByteArrayOutputStream stream = new ByteArrayOutputStream();
        e.printStackTrace(new PrintStream(stream));

        return stream.toString();
    }
}
项目:SnapDup    文件:DeleteTask.java   
@Override
protected String call() throws Exception
{
    final List<BooleanPropertyBase> leftList = dataContainer.getLeftPropertyList();
    final List<BooleanPropertyBase> rightList = dataContainer.getRigtPropertyList();
    final ObservableList<DupData> dupDataList = dataContainer.getObservableList();
    final Map<String, String> deviceMap = dataContainer.getDeviceMap();

    FileSystem fs = FileSystems.getDefault();

    buff.setLength(0);

    for(int i = 0; i < leftList.size(); i++)
    {
        final boolean leftSelected = leftList.get(i).get();
        final boolean rightSelected = rightList.get(i).get();

        if(leftSelected || rightSelected)
        {
            final DupData data = dupDataList.get(i);
            final Path fileName1 = fs.getPath(deviceMap.get(data.getDevice1()),  data.getFile1());
            final Path fileName2 = fs.getPath(deviceMap.get(data.getDevice2()), data.getFile2());

            File file1 = fileName1.toFile();
            File file2 = fileName2.toFile();

            if(file1.isFile() && file2.isFile()) // both files must exist in order to delete one.
            {
                if(leftSelected)
                {
                    if(file1.delete())
                        buff.append("Deleted file (1): ").append(fileName1).append("\n");
                    else
                        buff.append("Failed to delete file (2): ").append(fileName1).append("\n");
                }
                else if(rightSelected)
                {
                    if(file2.delete())
                        buff.append("Deleted file (2): ").append(fileName2).append("\n");
                    else
                        buff.append("Failed to delete file (2): ").append(fileName2).append("\n");
                }
            }
            else
            {
                if(!file1.exists())
                    buff.append("File (1) does not exist: ").append(fileName1).append("\n");

                if(!file2.exists())
                    buff.append("File (2) does not exist: ").append(fileName2).append("\n");
            }
        }
    }

    return buff.toString();
}
项目:zest-writer    文件:MenuController.java   
public BooleanPropertyBase isOnReadingTabProperty() {
    return isOnReadingTab;
}
项目:zest-writer    文件:MdTextController.java   
public BooleanPropertyBase currentSavedProperty() {
    return currentSaved;
}
项目:MoodFX    文件:Switch.java   
public Switch() {
    getStyleClass().setAll("switch");
    rounded               = new BooleanPropertyBase(false) {
        @Override public Object getBean() { return Switch.this; }
        @Override public String getName() { return "rounded"; }
    };
    selected              = new BooleanPropertyBase(false) {
        @Override protected void invalidated() {
            if (null != getToggleGroup()) {
                if (get()) {
                    getToggleGroup().selectToggle(Switch.this);
                } else if (getToggleGroup().getSelectedToggle() == Switch.this) {
                    getToggleGroup().selectToggle(null);
                }
            }
            fireEvent(new SwitchEvent(Switch.this, null, selected.get() ? SwitchEvent.ON : SwitchEvent.OFF));
        }
        @Override public Object getBean() { return null; }
        @Override public String getName() { return null; }
    };
    toggleGroup           = new ObjectPropertyBase<ToggleGroup>(null) {
        private ToggleGroup oldToggleGroup;
        @Override protected void invalidated() {
            final ToggleGroup toggleGroup = get();
            if (null != toggleGroup && !toggleGroup.getToggles().contains(Switch.this)) {
                if (oldToggleGroup != null) { oldToggleGroup.getToggles().remove(Switch.this); }
                toggleGroup.getToggles().add(Switch.this);
            } else if (null == toggleGroup) {
                oldToggleGroup.getToggles().remove(Switch.this);
            }
            oldToggleGroup = toggleGroup;
        }
        @Override public Object getBean() { return Switch.this; }
        @Override public String getName() { return "toggleGroup"; }
    };
    switchColor           = new ObjectPropertyBase<Color>(Color.WHITE) {
        @Override public Object getBean() { return Switch.this; }
        @Override public String getName() { return "switchColor"; }
    };
    text                  = new StringPropertyBase("OFF") {
        @Override public Object getBean() { return Switch.this; }
        @Override public String getName() { return "text"; }
    };
    selectedText          = new StringPropertyBase("ON") {
        @Override public Object getBean() { return Switch.this; }
        @Override public String getName() { return "selectedText"; }
    };
    textColor             = new ObjectPropertyBase<Color>(Color.WHITE) {
        @Override public Object getBean() { return Switch.this; }
        @Override public String getName() { return "switchColorOff"; }
    };
    selectedTextColor     = new ObjectPropertyBase<Color>(Color.WHITE) {
        @Override public Object getBean() { return Switch.this; }
        @Override public String getName() { return "selectedTextColor"; }
    };
    handlerMap            = new ConcurrentHashMap<>(2);

    disabledProperty().addListener(o -> setOpacity(isDisabled() ? 0.4 : 1.0));
}
项目:CircularProgressIndicator    文件:CircularProgressIndicator.java   
public CircularProgressIndicator() {
    getStylesheets().add(CircularProgressIndicator.class.getResource("circular-progress-indicator.css").toExternalForm());
    getStyleClass().add("circular-progress");
    progress      = new DoublePropertyBase(0) {
        @Override public void invalidated() {
            if (get() < 0) {
                startIndeterminate();
            } else {
                stopIndeterminate();
                set(clamp(0d,1d, get()));
                redraw();
            }
        }
        @Override public Object getBean() { return CircularProgressIndicator.this;}
        @Override public String getName() { return "progress"; }
    };
    indeterminate = new BooleanPropertyBase(false) {
        @Override public Object getBean() { return CircularProgressIndicator.this; }
        @Override public String getName() { return "indeterminate"; }
    };
    roundLineCap  = new BooleanPropertyBase(false) {
        @Override public void invalidated() {
            if (get()) {
                circle.setStrokeLineCap(StrokeLineCap.ROUND);
                arc.setStrokeLineCap(StrokeLineCap.ROUND);
            } else {
                circle.setStrokeLineCap(StrokeLineCap.SQUARE);
                arc.setStrokeLineCap(StrokeLineCap.SQUARE);
            }
        }
        @Override public Object getBean() { return CircularProgressIndicator.this; }
        @Override public String getName() { return "roundLineCap"; }
    };
    isRunning     = false;
    timeline      = new Timeline();
    listener      = observable -> {
        circle.setStrokeDashOffset(dashOffset.get());
        circle.getStrokeDashArray().setAll(dashArray_0.getValue(), 200d);
    };
    init();
    initGraphics();
    registerListeners();
}
项目:regulators    文件:ColorRegulator.java   
public ColorRegulator() {
    scaleFactor    = 1.0;
    baseColor      = Color.YELLOW;
    targetValue    = new DoublePropertyBase(0) {
        @Override protected void invalidated() { setOn(Double.compare(get(), 0) != 0); }
        @Override public void set(final double VALUE) {
            super.set(clamp(MIN_VALUE, MAX_VALUE, VALUE));
        }
        @Override public Object getBean() { return ColorRegulator.this; }
        @Override public String getName() { return "targetValue"; }
    };
    targetColor    = new ObjectPropertyBase<Color>(baseColor) {
        @Override protected void invalidated() {
            super.set(null == get() ? Color.BLACK : get());
            currentColorCircle.setFill(get());
            indicatorRotate.setAngle(((gradientLookup.getValueFrom(baseColor) * 100.0) - MIN_VALUE) * angleStep - ANGLE_RANGE * 0.5);
        }
        @Override public Object getBean() { return ColorRegulator.this; }
        @Override public String getName() { return "targetColor"; }
    };
    textColor      = new ObjectPropertyBase<Color>(Color.WHITE) {
        @Override protected void invalidated() {
            super.set(null == get() ? Color.WHITE:  get());
            redraw();
        }
        @Override public Object getBean() { return ColorRegulator.this; }
        @Override public String getName() { return "textColor"; }
    };
    color          = new ObjectPropertyBase<Color>(DEFAULT_COLOR) {
        @Override protected void invalidated() {
            super.set(null == get() ? DEFAULT_COLOR : get());
            redraw();
        }
        @Override public Object getBean() { return ColorRegulator.this; }
        @Override public String getName() { return "color"; }
    };
    indicatorColor = new ObjectPropertyBase<Color>(Color.WHITE) {
        @Override protected void invalidated() { indicatorGlow.setColor(get()); }
        @Override public Object getBean() { return ColorRegulator.this; }
        @Override public String getName() { return "indicatorColor"; }
    };
    selected       = new BooleanPropertyBase(false) {
        @Override protected void invalidated() {
            if (get()) {
                indicator.setFill(getIndicatorColor());
                indicator.setStroke(getIndicatorColor().darker().darker());
                indicator.setEffect(indicatorGlow);
            } else {
                indicator.setFill(getColor().darker());
                indicator.setStroke(getColor().darker().darker());
                indicator.setEffect(null);
            }
        }
        @Override public Object getBean() { return ColorRegulator.this; }
        @Override public String getName() { return "selected"; }
    };
    on             = new BooleanPropertyBase(false) {
        @Override protected void invalidated() { currentColorCircle.setVisible(get()); }
        @Override public Object getBean() { return ColorRegulator.this; }
        @Override public String getName() { return "on"; }
    };
    brightness     = new DoublePropertyBase(1.0) {
        @Override protected void invalidated() {
            set(clamp(0.0, 1.0, get()));
            targetColor.set(baseColor.deriveColor(0, 1, get(), 1));
        }
        @Override public Object getBean() { return ColorRegulator.this; }
        @Override public String getName() { return "brightness"; }
    };
    angleStep      = ANGLE_RANGE / (MAX_VALUE - MIN_VALUE);

    init();
    initGraphics();
    registerListeners();
}
项目:mars-sim    文件:CircularProgressIndicator.java   
public CircularProgressIndicator() {
    getStylesheets().add(CircularProgressIndicator.class.getResource("/fxui/css/circular-progress-indicator.css").toExternalForm());
    getStyleClass().add("circular-progress");
    progress      = new DoublePropertyBase(0) {
        @Override public void invalidated() {
            if (get() < 0) {
                startIndeterminate();
            } else {
                stopIndeterminate();
                set(clamp(0d,1d, get()));
                redraw();
            }
        }
        @Override public Object getBean() { return CircularProgressIndicator.this;}
        @Override public String getName() { return "progress"; }
    };
    indeterminate = new BooleanPropertyBase(false) {
        @Override public Object getBean() { return CircularProgressIndicator.this; }
        @Override public String getName() { return "indeterminate"; }
    };
    roundLineCap  = new BooleanPropertyBase(false) {
        @Override public void invalidated() {
            if (get()) {
                circle.setStrokeLineCap(StrokeLineCap.ROUND);
                arc.setStrokeLineCap(StrokeLineCap.ROUND);
            } else {
                circle.setStrokeLineCap(StrokeLineCap.SQUARE);
                arc.setStrokeLineCap(StrokeLineCap.SQUARE);
            }
        }
        @Override public Object getBean() { return CircularProgressIndicator.this; }
        @Override public String getName() { return "roundLineCap"; }
    };
    isRunning     = false;
    timeline      = new Timeline();
    listener      = observable -> {
        circle.setStrokeDashOffset(dashOffset.get());
        circle.getStrokeDashArray().setAll(dashArray_0.getValue(), 200d);
    };
    init();
    initGraphics();
    registerListeners();
}
项目:mars-sim    文件:CircularProgressIndicator.java   
public CircularProgressIndicator() {
    getStylesheets().add(CircularProgressIndicator.class.getResource("/fxui/css/circular-progress-indicator.css").toExternalForm());
    getStyleClass().add("circular-progress");
    progress      = new DoublePropertyBase(0) {
        @Override public void invalidated() {
            if (get() < 0) {
                startIndeterminate();
            } else {
                stopIndeterminate();
                set(clamp(0d,1d, get()));
                redraw();
            }
        }
        @Override public Object getBean() { return CircularProgressIndicator.this;}
        @Override public String getName() { return "progress"; }
    };
    indeterminate = new BooleanPropertyBase(false) {
        @Override public Object getBean() { return CircularProgressIndicator.this; }
        @Override public String getName() { return "indeterminate"; }
    };
    roundLineCap  = new BooleanPropertyBase(false) {
        @Override public void invalidated() {
            if (get()) {
                circle.setStrokeLineCap(StrokeLineCap.ROUND);
                arc.setStrokeLineCap(StrokeLineCap.ROUND);
            } else {
                circle.setStrokeLineCap(StrokeLineCap.SQUARE);
                arc.setStrokeLineCap(StrokeLineCap.SQUARE);
            }
        }
        @Override public Object getBean() { return CircularProgressIndicator.this; }
        @Override public String getName() { return "roundLineCap"; }
    };
    isRunning     = false;
    timeline      = new Timeline();
    listener      = observable -> {
        circle.setStrokeDashOffset(dashOffset.get());
        circle.getStrokeDashArray().setAll(dashArray_0.getValue(), 200d);
    };
    init();
    initGraphics();
    registerListeners();
}
项目:SnapDup    文件:ObservableDataContainer.java   
public List<BooleanPropertyBase> getLeftPropertyList() { return booleanLeftPropertyList; }
项目:SnapDup    文件:ObservableDataContainer.java   
public List<BooleanPropertyBase> getRigtPropertyList() { return booleanRightPropertyList; }
项目:SnapDup    文件:ObservableDataContainer.java   
public Map<BooleanPropertyBase, BooleanPropertyBase> getPropertyMap() { return booleanPropertyMap; }