use of javafx.scene.control.Label in project bitsquare by bitsquare.
the class BindingTest method start.
@Override
public void start(Stage primaryStage) {
VBox root = new VBox();
root.setSpacing(20);
Label label = new Label();
StringProperty txt = new SimpleStringProperty();
txt.set("-");
label.textProperty().bind(txt);
Button button = new Button("count up");
button.setOnAction(e -> {
txt.set("counter " + counter++);
});
root.getChildren().addAll(label, button);
primaryStage.setScene(new Scene(root, 400, 400));
primaryStage.show();
}
use of javafx.scene.control.Label in project Gargoyle by callakrsos.
the class CodeAnalysisJavaTextArea method initialize.
@FXML
public void initialize() {
choMethod = new ChoiceBox<>();
choMethod.setConverter(new StringConverter<SourceAnalysisDVO>() {
@Override
public String toString(SourceAnalysisDVO d) {
return d.getMethodName();
}
@Override
public SourceAnalysisDVO fromString(String string) {
return null;
}
});
// jdk1.8.73이후버젼부터 사용가능
choMethod.setOnAction(event -> {
SourceAnalysisDVO selectedItem = choMethod.getSelectionModel().getSelectedItem();
String methodName = selectedItem.getMethodName();
int methodBlockStart = selectedItem.getMethodBlockStart();
int finallyBlockIdx = methodBlockStart - 1;
String string = newInstance.getReadLines().get(finallyBlockIdx);
if (!string.contains(methodName)) {
for (int i = methodBlockStart - 2; i < methodBlockStart + 1; i++) {
if (i < 0)
continue;
if (i == (methodBlockStart - 1))
continue;
string = newInstance.getReadLines().get(i);
if (string.contains(methodName)) {
finallyBlockIdx = i;
break;
}
}
}
IntStream mapToInt = Stream.of(txtJavaTextArea.getText().split("\n")).limit(finallyBlockIdx).mapToInt(mapper -> {
return mapper.length() + 1;
});
int length = string.split("\t").length - 1;
int sum = mapToInt.sum() + length;
System.out.println(string);
txtJavaTextArea.selectRange(sum, sum + methodName.length());
});
this.setTop(new HBox(5, new Label("Method Name : "), choMethod));
}
use of javafx.scene.control.Label in project Gargoyle by callakrsos.
the class DesignerFx method createCodeEditorPanel.
private BorderPane createCodeEditorPanel() {
BorderPane p = new BorderPane();
// JPanel p = new JPanel();
// p.setLayout(new BorderLayout());
// codeEditorPane.setBorder(BorderFactory.createLineBorder(Color.black));
// makeTextComponentUndoable(codeEditorPane);
p.setTop(new Label("Source code:"));
// SwingNode fxScrollPane = new SwingNode();
// createSwingContent(fxScrollPane, new JScrollPane(codeEditorPane));
p.setCenter(codeEditorPane);
// createSwingContent(swingNode, p);
return p;
}
use of javafx.scene.control.Label in project Gargoyle by callakrsos.
the class MergedRowSkin method getNode.
@Override
public Node getNode() {
TableView<T> tableView = this.row.getTableView();
TableColumn<T, S> tableColumn = this.row.getTableColumn();
ObservableValue<S> cellObservableValue = tableColumn.getCellObservableValue(0);
Label label = new Label();
label.setText(cellObservableValue.getValue().toString());
return label;
}
use of javafx.scene.control.Label in project trex-stateless-gui by cisco-system-traffic-generator.
the class LogsView method getMsgLabel.
private Label getMsgLabel(String msgText, String className) {
Label msgLabel = new Label(msgText);
msgLabel.getStyleClass().add(className);
return msgLabel;
}
Aggregations