addColumn2();
addColumn3();
}
protected void addColumn1() {
final GridPane grid = new GridPane();
grid.setHgap(0d);
grid.setVgap(0d);
// cam pan
final Label panHeader = createLabel(KEY.CAM_PAN);
grid.add(panHeader, 0, 0);
final UGateGaugeBox<RemoteNode> camPanGauge = new UGateGaugeBox<>(
controlBar.getRemoteNodePA(), RemoteNodeType.CAM_ANGLE_PAN,
null, IndicatorType.KNOB, KNOB_SIZE_SCALE, 10d, 0, 0d, 180d,
19, 0, FORMAT_ANGLE, RS.IMG_PAN, GuiUtil.COLOR_CAM);
controlBar.addHelpTextTrigger(camPanGauge, RS.rbLabel(KEY.CAM_PAN_DESC));
grid.add(camPanGauge, 0, 1);
// cam tilt
final Label tiltHeader = createLabel(KEY.CAM_TILT);
grid.add(tiltHeader, 1, 0);
final ImageView tiltImgView = RS.imgView(camPanGauge.imageView.getImage(), false);
tiltImgView.setRotate(90d);
final UGateGaugeBox<RemoteNode> camTiltGauge = new UGateGaugeBox<>(
controlBar.getRemoteNodePA(), RemoteNodeType.CAM_ANGLE_TILT,
null, IndicatorType.KNOB, KNOB_SIZE_SCALE, 10d, 0, 0, 180d, 19,
0, FORMAT_ANGLE, tiltImgView, GuiUtil.COLOR_CAM);
controlBar.addHelpTextTrigger(camTiltGauge, RS.rbLabel(KEY.CAM_TILT));
grid.add(camTiltGauge, 1, 1);
// sonar/pir pan
final Label sonarPirPanHeader = createLabel(KEY.SONAR_PIR_PAN);
grid.add(sonarPirPanHeader, 0, 2);
final UGateGaugeBox<RemoteNode> sonarPirPanGauge = new UGateGaugeBox<>(
controlBar.getRemoteNodePA(),
RemoteNodeType.SONAR_PIR_ANGLE_PAN, null, IndicatorType.KNOB,
KNOB_SIZE_SCALE, 10d, 0, 0, 180d, 19, 0, FORMAT_ANGLE,
RS.IMG_PAN, GuiUtil.COLOR_MULTI);
controlBar.addHelpTextTrigger(sonarPirPanGauge, RS.rbLabel(KEY.SONAR_PIR_PAN_DESC));
grid.add(sonarPirPanGauge, 0, 3);
// sonar/pir tilt
final Label sonarPirTiltHeader = createLabel(KEY.SONAR_PIR_TILT);
grid.add(sonarPirTiltHeader, 1, 2);
final ImageView sonarPirTiltImgView = RS.imgView(sonarPirPanGauge.imageView.getImage(), false);
sonarPirTiltImgView.setRotate(90d);
final UGateGaugeBox<RemoteNode> sonarPirTiltGauge = new UGateGaugeBox<>(
controlBar.getRemoteNodePA(),
RemoteNodeType.SONAR_PIR_ANGLE_TILT, null, IndicatorType.KNOB,
KNOB_SIZE_SCALE, 10d, 0, 0, 180d, 19, 0, FORMAT_ANGLE,
sonarPirTiltImgView, GuiUtil.COLOR_MULTI);
controlBar.addHelpTextTrigger(sonarPirTiltGauge, RS.rbLabel(KEY.SONAR_PIR_TILT_DESC));
grid.add(sonarPirTiltGauge, 1, 3);
// microwave pan
final Label headerMW = createLabel(KEY.MW_PAN);
grid.add(headerMW, 0, 4);
final UGateGaugeBox<RemoteNode> mwPanGauge = new UGateGaugeBox<>(
controlBar.getRemoteNodePA(), RemoteNodeType.MW_ANGLE_PAN,
null, IndicatorType.KNOB, KNOB_SIZE_SCALE, 10d, 0, 0, 180d, 19,
0, FORMAT_ANGLE, RS.IMG_PAN, GuiUtil.COLOR_MW);
controlBar.addHelpTextTrigger(mwPanGauge, RS.rbLabel(KEY.MW_PAN_DESC));
grid.add(mwPanGauge, 0, 5);
// laser calibration
final Label headerLaser = createLabel(KEY.LASER_CALIBRATION);
grid.add(headerLaser, 1, 4);
final Button laserCalibrate = new Button(); //new Button(RS.rbLabel("laser.calibration"));
laserCalibrate.setGraphic(RS.imgView(RS.IMG_LASER_CALIBRATE));
laserCalibrate.setMaxWidth(125d);
laserCalibrate.setWrapText(true);
laserCalibrate.addEventHandler(MouseEvent.MOUSE_PRESSED, new EventHandler<MouseEvent>() {
@Override
public void handle(final MouseEvent event) {
if (GuiUtil.isPrimaryPress(event)) {
controlBar.createCommandService(Command.SERVO_LASER_CALIBRATE, true);
}
}
});
controlBar.addHelpTextTrigger(laserCalibrate, RS.rbLabel(KEY.LASER_CALIBRATION_DESC));
grid.add(laserCalibrate, 1, 5);
final Parent camCell = createCell(grid);
add(camCell, 0, 0);
}