This repository has been archived on 2020-09-21. You can view files and clone it, but cannot push or open issues or pull requests.
FRC2016-old/DriveBase/wpilib/tools/plugins/built-in/subsystem/subsystem.fxml
2016-01-28 11:33:19 -05:00

50 lines
1.4 KiB
XML

<?xml version="1.0" encoding="UTF-8"?>
<?import java.lang.*?>
<?import java.util.*?>
<?import javafx.scene.*?>
<?import javafx.scene.control.*?>
<?import javafx.scene.layout.*?>
<?import dashfx.controls.bases.*?>
<?import dashfx.lib.controls.*?>
<?import dashfx.controls.*?>
<?import dashfx.lib.controls.fxmlutils.*?>
<?language javascript?>
<DataHBox dataMode="Nested" fx:id="base" onRegisterRequest="replaced()" alignment="CENTER_LEFT" xmlns:fx="http://javafx.com/fxml">
<fx:script>
var nonelbll = null
var commandd = null;
var swapper = function(ov, old, running) {
commandd.setVisible(running);
nonelbll.setVisible(!running);
};
var runnerVp = null;
function replaced()
{
runnerVp = base.getObservable("hasCommand");
runnerVp["addListener(javafx.beans.value.ChangeListener)"](swapper);
nonelbll = nonelbl;
commandd = command;
if (typeof runnerVp == "boolean")
{
swapper(null, null, runnerVp.getValue());
}
else
{
swapper(null, null, false);
}
}
</fx:script>
<ui style="/*Intentionally blank*/">
<children>
<Label text="${base.baseName}" />
<Label text=": " />
<CollapsableHBox>
<Label text="None" fx:id="nonelbl" />
<Placeholder fx:id="command" controlPath="Label" propList="name: command" maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308" />
</CollapsableHBox>
</children>
</ui>
</DataHBox>