use of javafx.scene.control.ScrollPane in project Gargoyle by callakrsos.
the class FxControlsTreeViewExam method getTestNod.
Node getTestNod() {
/* [시작] 분석하고자하는 UI구조 */
BorderPane borderPane = new BorderPane();
ScrollPane scrollPane2 = new ScrollPane();
scrollPane2.setContent(new TextArea());
borderPane.setTop(new HBox(new Button(), new Button(), new HTMLEditor()));
borderPane.setCenter(new BorderPane(scrollPane2));
/* [끝] 분석하고자하는 UI구조 */
return borderPane;
}
use of javafx.scene.control.ScrollPane in project Gargoyle by callakrsos.
the class PolygonEx method start.
@Override
public void start(Stage stage) {
Pane g = new Pane();
ScrollPane convert = XY.convert(g);
{
//한 점의 좌표가 주어진경우
double x = 150;
double y = 150;
//빗변의 길이
double r = 100;
double degree = Math.atan2(y, x);
double x1 = x + (r / Math.tan(degree));
double y1 = y;
double x2 = x1;
double y2 = y + y - r;
Polygon polygon = new Polygon();
polygon.setLayoutX(x);
polygon.setLayoutY(x);
polygon.getPoints().addAll(new Double[] { x, y, x1, y1, x2, y2 });
g.getChildren().add(polygon);
g.getChildren().add(new Line(1, 1, 10, 10));
}
{
//한 점의 좌표가 주어진경우
double x = 150;
double y = 150;
//빗변의 길이
double r = 100;
double degree = Math.atan2(y, x);
double x1 = x + (r / Math.tan(degree));
double y1 = y;
double x2 = x1;
double y2 = y + r;
Polygon polygon = new Polygon();
polygon.getPoints().addAll(new Double[] { x, y, x1, y1, x2, y2 });
g.getChildren().add(polygon);
}
// Line line = new Line();
// line.setStartX(x);
// line.setStartY(y);
// line.setEndX(x2);
// line.setEndY(y2);
//
// Text text = new Text("x : " + x + " y : " + y);
// text.setX(x);
// text.setY(y - 20);
//
// Text text1 = new Text("x1 : " + x1 + " y1 : " + y1);
// text1.setX(x1);
// text1.setY(y1 - 20);
//
// Text text2 = new Text("x2 : " + x2 + " y2 : " + y2);
// text2.setX(x2);
// text2.setY(y2 - 20);
// g.getChildren().addAll(polygon, text, text1, text2);
Scene scene = new Scene(convert, 1800, 900);
stage.setScene(scene);
stage.show();
}
use of javafx.scene.control.ScrollPane in project bitsquare by bitsquare.
the class SettingsView method loadView.
private void loadView(Class<? extends View> viewClass) {
final Tab tab;
View view = viewLoader.load(viewClass);
if (view instanceof PreferencesView)
tab = preferencesTab;
else if (view instanceof NetworkSettingsView)
tab = networkSettingsTab;
else if (view instanceof AboutView)
tab = aboutTab;
else
throw new IllegalArgumentException("Navigation to " + viewClass + " is not supported");
if (tab.getContent() != null && tab.getContent() instanceof ScrollPane) {
((ScrollPane) tab.getContent()).setContent(view.getRoot());
} else {
tab.setContent(view.getRoot());
}
root.getSelectionModel().select(tab);
}
Aggregations