public ActionTextPane() {
actionText = new Label("Test");
graphic = new ImageView(new Image("assets/icons/editor_action_info_icon.png"));
actionText.setGraphic(graphic);
actionText.setTextFill(Utils.getDefaultTextColor());
actionText.setAlignment(Pos.CENTER);
actionText.setPadding(new Insets(0, 0, 0, 5));
getChildren().add(actionText);
setAlignment(Pos.CENTER);
ft = new FadeTransition(Duration.millis(500), graphic);
ft.setFromValue(1.0);
ft.setToValue(0.0);
ft.setAutoReverse(true);
ft.setCycleCount(4);
}
java类javafx.geometry.Pos的实例源码
ActionTextPane.java 文件源码
项目:textmd
阅读 35
收藏 0
点赞 0
评论 0
HelpView.java 文件源码
项目:Lernkartei_2017
阅读 23
收藏 0
点赞 0
评论 0
public Parent constructContainer () {
this.getWindow().setTitle(Globals.appTitle+"Hilfe"+Globals.appVersion);
this.getWindow().setResizable(false);
impressumBtn.setOnAction(e -> getFXController().showView("impressumview"));
quizletBtn.setOnAction(e -> getFXController().showView("quizletview"));
anleitungBtn.setOnAction(e -> getFXController().showView("manualview"));
indexBtn.setOnAction(e -> getFXController().showView("troubleshootview"));
logBtn.setOnAction(e -> getFXController().showView("logview"));
tempVBox.setId("helpbox");
tempVBox.setPadding(new Insets(10));
tempVBox.setSpacing(5);
tempVBox.setAlignment(Pos.CENTER);
tempVBox.getChildren().addAll(impressumBtn, quizletBtn, anleitungBtn, indexBtn, logBtn, closeBtn);
VBox.setMargin(impressumBtn, new Insets(50,0,0,0));
return tempVBox;
}
ChatController.java 文件源码
项目:ChatRoom-JavaFX
阅读 28
收藏 0
点赞 0
评论 0
/**
* 将自己的对话添加到对话列表中
* @param content
*/
public void addYourMessges(String content){
Platform.runLater(() ->{
//寻找用户的头像名
Image image = new Image("images/" + userPic);
ImageView profileImage = new ImageView(image);
profileImage.setFitHeight(32);
profileImage.setFitWidth(32);
BubbledTextFlow yourBubbled = new BubbledTextFlow(EmojiDisplayer.createEmojiAndTextNode(content));
yourBubbled.setBackground(new Background(new BackgroundFill(Color.LIGHTGREEN,
null, null)));
HBox x = new HBox();
x.setMaxWidth(chatPaneListView.getWidth() - 20);
x.setAlignment(Pos.TOP_RIGHT);
yourBubbled.setBubbleSpec(BubbleSpec.FACE_RIGHT_CENTER);
x.getChildren().addAll(yourBubbled, profileImage);
chatPaneListView.getItems().add(x);
});
}
VBoxSample.java 文件源码
项目:marathonv5
阅读 47
收藏 0
点赞 0
评论 0
public static Node createIconContent() {
StackPane sp = new StackPane();
VBox vbox = new VBox(3);
vbox.setAlignment(Pos.CENTER);
vbox.setPadding(new Insets(5, 5, 5, 5));
Rectangle rectangle = new Rectangle(32, 62, Color.LIGHTGREY);
rectangle.setStroke(Color.BLACK);
vbox.setPrefSize(rectangle.getWidth(), rectangle.getHeight());
Rectangle r1 = new Rectangle(18, 14, Color.web("#1c89f4"));
Rectangle r2 = new Rectangle(18, 14, Color.web("#349b00"));
Rectangle r3 = new Rectangle(18, 20, Color.web("#349b00"));
vbox.getChildren().addAll(r1, r2, r3);
sp.getChildren().addAll(rectangle, vbox);
return new Group(sp);
}
ProgressIndicatorBar.java 文件源码
项目:marathonv5
阅读 23
收藏 0
点赞 0
评论 0
private void initProgressBarUI() {
Label runLabel = new Label("Runs: ");
runLabel.setMinWidth(Region.USE_PREF_SIZE);
nRuns = new Text((int) progress + "/" + maxTestCount);
Label errorLabel = new Label("Errors: ");
errorLabel.setMinWidth(Region.USE_PREF_SIZE);
errorLabel.setGraphic(FXUIUtils.getIcon("error"));
errorLabel.setPadding(new Insets(0, 0, 0, 80));
errorText = new Text(errors + "");
Label failureLabel = new Label("Failures: ");
failureLabel.setMinWidth(Region.USE_PREF_SIZE);
failureLabel.setGraphic(FXUIUtils.getIcon("failure"));
failureLabel.setPadding(new Insets(0, 0, 0, 80));
failureText = new Text(failures + "");
progressBarString.setAlignment(Pos.CENTER);
progressBarString.setPadding(new Insets(5, 0, 5, 0));
progressBarString.getChildren().addAll(runLabel, nRuns, errorLabel, errorText, failureLabel, failureText);
}
RenameView.java 文件源码
项目:Lernkartei_2017
阅读 24
收藏 0
点赞 0
评论 0
@Override
public Parent constructContainer ()
{
headLbl = new Label("Umbenennen");
headLbl.setId("bold");
AppButton backBtn = new AppButton("_Zur�ck");
backBtn.setOnAction(e -> getFXController().showView("doorview"));
BorderPane headLayout = new BorderPane(headLbl);
headLayout.setPadding(new Insets(0, 0, 25, 0));
renameLayout.setPadding(new Insets(10));
renameLayout.setAlignment(Pos.TOP_CENTER);
scroller.setMaxWidth(600);
scroller.setFitToWidth(true);
scroller.setPadding(new Insets(25));
MainLayout maLay = new MainLayout(scroller, headLayout, new ControlLayout(backBtn));
getFXController().getModel("stack").registerView(this);
return maLay;
}
TilePaneSample.java 文件源码
项目:marathonv5
阅读 33
收藏 0
点赞 0
评论 0
public static Node createIconContent() {
StackPane sp = new StackPane();
TilePane iconTilePane = new TilePane();
iconTilePane.setAlignment(Pos.CENTER);
Rectangle rectangle = new Rectangle(62, 62, Color.LIGHTGREY);
rectangle.setStroke(Color.BLACK);
iconTilePane.setPrefSize(rectangle.getWidth(), rectangle.getHeight());
Rectangle[] rec = new Rectangle[9];
for (int i = 0; i < rec.length; i++) {
rec[i] = new Rectangle(14, 14, Color.web("#349b00"));
TilePane.setMargin(rec[i], new Insets(2, 2, 2, 2));
}
iconTilePane.getChildren().addAll(rec);
sp.getChildren().addAll(rectangle, iconTilePane);
return new Group(sp);
}
UserFireSFV.java 文件源码
项目:GameAuthoringEnvironment
阅读 22
收藏 0
点赞 0
评论 0
@Override
protected void initView () {
double spacing = getParser().parseDouble(getMyNumbers().getString("HBoxSpacing"));
HBox header =
getMyUIFactory().makeHBox(spacing, Pos.CENTER, myRemove.draw(),
getSubTitleDisplay());
HBox angles =
getMyUIFactory().makeHBox(spacing, Pos.CENTER, myDecrease.draw(), myIncrease.draw(),
myFire.draw());
HBox fireParams =
getMyUIFactory().makeHBox(spacing, Pos.CENTER, myMissileSelectionView.draw(),
myAngle.draw(), myAngleStep.draw());
HBox rangeParams =
getMyUIFactory().makeHBox(spacing, Pos.CENTER, myWaitTime.draw(),
myIsRanged.draw(), myRangeValue.draw());
myPane =
getMyUIFactory().makeVBox(spacing, Pos.CENTER, header, angles, fireParams,
rangeParams);
getMyUIFactory().addStyling(myPane, "Firer");
}
Welcome.java 文件源码
项目:MasterHash
阅读 23
收藏 0
点赞 0
评论 0
private static HBox setupSignUpAndSubmitButtons() {
HBox signUpAndSubmitButtons = new HBox(10);
submitButton.setOnAction(e -> {
Home.display();
window.close();
});
signUpButton.setOnAction(e -> {
Home.display();
window.close();
});
signUpAndSubmitButtons.getChildren().addAll(submitButton, signUpButton);
signUpAndSubmitButtons.setAlignment(Pos.CENTER);
return signUpAndSubmitButtons;
}
FrmPedidosReserva.java 文件源码
项目:AlphaLab
阅读 29
收藏 0
点赞 0
评论 0
private StackPane buildBoxHorarios(List<Horario> horarios) {
VBox vbox = new VBox(7);
vbox.setAlignment(Pos.CENTER);
Rectangle rect = new Rectangle(150, 100);
rect.setStroke(Color.BLACK);
rect.setStrokeWidth(2);
rect.setFill(Color.TRANSPARENT);
for (Horario horario : horarios) {
vbox.getChildren().add(new Text(horario.getEstampa()));
}
StackPane caixa = new StackPane(rect, vbox);
return caixa;
}
SettingsDialog.java 文件源码
项目:jmonkeybuilder
阅读 36
收藏 0
点赞 0
评论 0
/**
* Create gamma correction control.
*/
@FXThread
private void createGammaCorrectionControl(@NotNull final VBox root) {
final HBox container = new HBox();
container.setAlignment(Pos.CENTER_LEFT);
final Label gammaCorrectionLabel = new Label(Messages.SETTINGS_DIALOG_GAMMA_CORRECTION + ":");
gammaCorrectionCheckBox = new CheckBox();
gammaCorrectionCheckBox.selectedProperty().addListener((observable, oldValue, newValue) -> validate());
FXUtils.addToPane(gammaCorrectionLabel, container);
FXUtils.addToPane(gammaCorrectionCheckBox, container);
FXUtils.addToPane(container, root);
FXUtils.addClassTo(gammaCorrectionLabel, CSSClasses.SETTINGS_DIALOG_LABEL);
FXUtils.addClassTo(gammaCorrectionCheckBox, CSSClasses.SETTINGS_DIALOG_FIELD);
}
NodeBox.java 文件源码
项目:PSE
阅读 24
收藏 0
点赞 0
评论 0
/**
* Creates the Horizontal box container that will contains the NodeBox
* icon.
* @return Horizontal box container.
*/
public HBox createContainer(){
this.container = new HBox();
this.container.setAlignment(Pos.CENTER);
this.container.setMinSize(getMinWidth(),getMinHeight());
this.getActionIcon().setSmooth(true);
this.actionBtn = new Button();
this.actionBtn.setGraphic(getActionIcon());
this.actionBtn.setMinSize(getActionIcon().getFitWidth(), getActionIcon().getFitHeight());
this.actionBtn.setBackground(new Background(new BackgroundFill(Color.TRANSPARENT,null,null)));
this.container.getChildren().add(actionBtn);
return container;
}
HyperlinkWebViewSample.java 文件源码
项目:marathonv5
阅读 28
收藏 0
点赞 0
评论 0
@Override
public void start(Stage stage) {
VBox vbox = new VBox();
Scene scene = new Scene(vbox);
stage.setTitle("Hyperlink Sample");
stage.setWidth(570);
stage.setHeight(550);
selectedImage.setLayoutX(100);
selectedImage.setLayoutY(10);
final WebView browser = new WebView();
final WebEngine webEngine = browser.getEngine();
for (int i = 0; i < captions.length; i++) {
final Hyperlink hpl = hpls[i] = new Hyperlink(captions[i]);
final Image image = images[i] =
new Image(getClass().getResourceAsStream(imageFiles[i]));
hpl.setGraphic(new ImageView (image));
hpl.setFont(Font.font("Arial", 14));
final String url = urls[i];
hpl.setOnAction((ActionEvent e) -> {
webEngine.load(url);
});
}
HBox hbox = new HBox();
hbox.setAlignment(Pos.BASELINE_CENTER);
hbox.getChildren().addAll(hpls);
vbox.getChildren().addAll(hbox, browser);
VBox.setVgrow(browser, Priority.ALWAYS);
stage.setScene(scene);
stage.show();
}
SettingsDialog.java 文件源码
项目:jmonkeybuilder
阅读 39
收藏 0
点赞 0
评论 0
/**
* Create the anisotropy control
*/
@FXThread
private void createAnisotropyControl(@NotNull final VBox root) {
final HBox container = new HBox();
container.setAlignment(Pos.CENTER_LEFT);
final Label label = new Label(Messages.SETTINGS_DIALOG_ANISOTROPY + ":");
anisotropyComboBox = new ComboBox<>();
anisotropyComboBox.prefWidthProperty().bind(root.widthProperty());
anisotropyComboBox.getSelectionModel()
.selectedItemProperty()
.addListener((observable, oldValue, newValue) -> validate());
FXUtils.addToPane(label, container);
FXUtils.addToPane(anisotropyComboBox, container);
FXUtils.addToPane(container, root);
FXUtils.addClassTo(label, CSSClasses.SETTINGS_DIALOG_LABEL);
FXUtils.addClassTo(anisotropyComboBox, CSSClasses.SETTINGS_DIALOG_FIELD);
final ObservableList<Integer> items = anisotropyComboBox.getItems();
items.addAll(ANISOTROPYCS);
}
NewGame.java 文件源码
项目:projectintern
阅读 17
收藏 0
点赞 0
评论 0
private void displayAuxObjects() {
// Format btnTitleScreen
btnTitleScreen.setPrefSize(WIDTH / 4, HEIGHT / 10);
btnTitleScreen.setAlignment(Pos.CENTER);
// Format txtSelectClass
txtSelectClass.setFill(Color.rgb(234, 234, 234));
txtSelectClass.setFont(Font.font("Verdana", FontWeight.BOLD, 50));
// Modify vbTopObjects
vbTopObjects = new VBox(WIDTH / 100);
vbTopObjects.getChildren().addAll(btnTitleScreen, txtSelectClass);
vbTopObjects.setAlignment(Pos.CENTER);
this.setTop(vbTopObjects);
}
CheckBoxControl.java 文件源码
项目:FlashLib
阅读 68
收藏 0
点赞 0
评论 0
public CheckBoxControl(String name) {
super(name, FlashboardSendableType.CHECKBOX);
checkBox = new CheckBox(name);
checkBox.selectedProperty().addListener((obs, o, n)->{
if(localChange)
return;
synchronized (valueMutex) {
lChanged = true;
value = n.booleanValue();
send[0] = (byte) (value? 1: 0);
}
});
root = new VBox();
root.setAlignment(Pos.CENTER);
root.getChildren().add(checkBox);
}
GameRoomController.java 文件源码
项目:board-client
阅读 26
收藏 0
点赞 0
评论 0
public void displayAlert(String title, String message) {
Stage window = new Stage();
window.setResizable(false);
window.setMinWidth(200);
window.initModality(Modality.APPLICATION_MODAL);
window.setTitle(title);
Label label = new Label();
label.setText(message);
Button closeButton = new Button("Ok");
closeButton.setOnAction(e -> window.close());
VBox layout = new VBox(10);
layout.setPadding(new Insets(20));
layout.getChildren().addAll(label, closeButton);
layout.setAlignment(Pos.CENTER);
Scene scene = new Scene(layout);
window.setScene(scene);
window.showAndWait();
}
SettingsDialog.java 文件源码
项目:jmonkeybuilder
阅读 35
收藏 0
点赞 0
评论 0
/**
* Create stop render control.
*/
@FXThread
private void createStopRenderControl(@NotNull final VBox root) {
final HBox container = new HBox();
container.setAlignment(Pos.CENTER_LEFT);
final Label label = new Label(Messages.SETTINGS_DIALOG_STOP_RENDER_ON_LOST_FOCUS + ":");
stopRenderOnLostFocusCheckBox = new CheckBox();
stopRenderOnLostFocusCheckBox.selectedProperty().addListener((observable, oldValue, newValue) -> validate());
FXUtils.addToPane(label, container);
FXUtils.addToPane(stopRenderOnLostFocusCheckBox, container);
FXUtils.addToPane(container, root);
FXUtils.addClassTo(label, CSSClasses.SETTINGS_DIALOG_LABEL);
FXUtils.addClassTo(stopRenderOnLostFocusCheckBox, CSSClasses.SETTINGS_DIALOG_FIELD);
}
SceneComponent.java 文件源码
项目:fx-animation-editor
阅读 25
收藏 0
点赞 0
评论 0
private void initUi() {
root.setMinSize(0, 0);
root.setPrefSize(1, 1); // Decouple from children.
root.setMaxSize(Double.MAX_VALUE, Double.MAX_VALUE);
root.getStyleClass().add(STYLE_CLASS);
root.getStylesheets().add(getClass().getResource(STYLESHEET).toExternalForm());
root.setAlignment(Pos.TOP_LEFT);
root.getChildren().addAll(panningComponent.getRoot(), addButton);
panningComponent.getChildren().addAll(sceneContent, resizerComponent.getRoot(), selectionBox.getRoot());
StackPane.setMargin(addButton, new Insets(15));
addButton.setGraphic(Svg.PLUS_FAT.node());
addButton.setFocusTraversable(false);
FocusHelper.requestFocusOnPress(panningComponent.getRoot());
}
DateCellSkin.java 文件源码
项目:graphing-loan-analyzer
阅读 18
收藏 0
点赞 0
评论 0
public DateCellSkin(final DateCell control) {
this.dateCell = control;
button = new Button();
button.textProperty().bind(control.textProperty());
button.setMaxSize(Double.MAX_VALUE, Double.MAX_VALUE);
button.setAlignment(Pos.CENTER);
button.setMinWidth(30);
button.setOnAction(new EventHandler<ActionEvent>() {
@Override
public void handle(ActionEvent actionEvent) {
control.getCalendarView().setSelectedDate(control.getItem());
}
});
button.tooltipProperty().bind(control.tooltipProperty());
getChildren().add(button);
}
MainController.java 文件源码
项目:CurseSync
阅读 28
收藏 0
点赞 0
评论 0
public void initialize()
{
packList = new VBox();
packList.setMinWidth(400);
packList.setPrefWidth(400);
packList.setMaxWidth(400);
packList.setAlignment(Pos.CENTER);
searchPopOver = new PopOver(packList);
searchPopOver.setArrowLocation(PopOver.ArrowLocation.TOP_CENTER);
searchPopOver.setAutoHide(false);
txtSearch.textProperty().addListener((observable, oldValue, newValue) -> search());
txtSearch.focusedProperty().addListener((observable, oldValue, newValue) ->
{
if (newValue)
{
search();
}
else
{
searchPopOver.hide();
}
});
}
SettingsDialog.java 文件源码
项目:jmonkeybuilder
阅读 39
收藏 0
点赞 0
评论 0
/**
* Create the open GL control
*/
@FXThread
private void createOpenGLControl(@NotNull final VBox root) {
final HBox container = new HBox();
container.setAlignment(Pos.CENTER_LEFT);
final Label label = new Label(Messages.SETTINGS_DIALOG_OPEN_GL_LABEL + ":");
openGLVersionComboBox = new ComboBox<>();
openGLVersionComboBox.prefWidthProperty().bind(root.widthProperty());
openGLVersionComboBox.getSelectionModel()
.selectedItemProperty()
.addListener((observable, oldValue, newValue) -> validate());
FXUtils.addToPane(label, container);
FXUtils.addToPane(openGLVersionComboBox, container);
FXUtils.addToPane(container, root);
FXUtils.addClassTo(label, CSSClasses.SETTINGS_DIALOG_LABEL);
FXUtils.addClassTo(openGLVersionComboBox, CSSClasses.SETTINGS_DIALOG_FIELD);
final ObservableList<OpenGLVersion> items = openGLVersionComboBox.getItems();
items.addAll(GL_VERSIONS);
}
HBoxSample.java 文件源码
项目:marathonv5
阅读 23
收藏 0
点赞 0
评论 0
public static Node createIconContent() {
StackPane sp = new StackPane();
HBox hbox = new HBox(3);
hbox.setAlignment(Pos.CENTER);
Rectangle rectangle = new Rectangle(70, 25, Color.LIGHTGREY);
rectangle.setStroke(Color.BLACK);
hbox.setPrefSize(rectangle.getWidth(), rectangle.getHeight());
Rectangle r1 = new Rectangle(14, 14, Color.web("#1c89f4"));
Rectangle r2 = new Rectangle(14, 14, Color.web("#349b00"));
Rectangle r3 = new Rectangle(18, 14, Color.web("#349b00"));
hbox.getChildren().addAll(r1, r2, r3);
sp.getChildren().addAll(rectangle, hbox);
return new Group(sp);
}
GroupMemberView.java 文件源码
项目:Lernkartei_2017
阅读 26
收藏 0
点赞 0
评论 0
@Override
public Parent constructContainer()
{
bp.setId("loginviewbg");
list = new ListView<String>();
items = FXCollections.observableArrayList("Philippe Kr�ttli","Irina Deck","Javier Martinez Alvarez","Frithjof Hoppe");
list.setItems(items);
AllFields = new VBox(50);
AllFields.setAlignment(Pos.CENTER);
AllFields.setMaxWidth(300);
AllFields.setPadding(new Insets(20));
GroupName = new HBox(50);
Option = new HBox(50);
name = new Label("Name:");
groupname = new Label("{Gruppenname}");
btnAdd = new AppButton("Hinzuf�gen");
btnRemove = new AppButton("Entfernen");
back = new BackButton(getFXController(),"Zur�ck");
GroupName.getChildren().addAll(name,groupname);
Option.getChildren().addAll(back,btnAdd,btnRemove);
AllFields.getChildren().addAll(GroupName,Option,list);
bp.setCenter(AllFields);
back.setOnAction(e -> getFXController().showView("groupview"));
btnAdd.setOnAction(e -> getFXController().showView("userlistview"));
btnRemove.setOnAction(e -> {
Alert alert = new Alert(AlertType.CONFIRMATION);
alert.setTitle("Mitglied l�schen");
alert.setHeaderText("Sie sind gerade dabei ein Mitglied aus der Gruppe zu entfernen.");
alert.setContentText("Sind Sie sich sicher, dass sie das tun wollen?");
Optional<ButtonType> result = alert.showAndWait();
if (result.get() == ButtonType.OK){
// ... user chose OK
} else {
Alert noDeletion = new Alert(AlertType.INFORMATION);
noDeletion.setTitle("L�schvorgang abgebrochen");
noDeletion.setHeaderText("Mitglied nicht gel�scht");
noDeletion.setContentText("Der L�schvorgang wurde abgebrochen.");
noDeletion.showAndWait();
alert.close();
}});
return bp;
}
ProfileCellView.java 文件源码
项目:GameAuthoringEnvironment
阅读 23
收藏 0
点赞 0
评论 0
/**
* For subclasses to alter the HBox not the node
*
* @param profile
* @return
*/
protected HBox getHBox (E profile) {
HBox container = new HBox(myParser.parseDouble(myNumbers.getString("HBoxStandardSize")));
container.setAlignment(Pos.CENTER_LEFT);
container.getChildren().add(createImageProfile(profile.getProfile(), PIC_SIZE));
container.getChildren().add(createTextProfile(profile.getProfile()));
return container;
}
WizardStep.java 文件源码
项目:MineIDE
阅读 24
收藏 0
点赞 0
评论 0
public WizardStep(final String stepName)
{
this.setStepName(stepName);
this.setData(Maps.newHashMap());
this.toValidate = Lists.newArrayList();
this.setHgap(10);
this.setVgap(10);
this.setPadding(new Insets(20, 24, 24, 24));
this.setAlignment(Pos.CENTER);
}
EventSFV.java 文件源码
项目:GameAuthoringEnvironment
阅读 22
收藏 0
点赞 0
评论 0
@Override
protected void initView () {
double spacing = getParser().parseDouble(getMyNumbers().getString("HBoxSpacing"));
myContainer = getMyUIFactory().makeHBox(spacing,
Pos.CENTER,
myEvents.draw(),
myRemove.draw());
}
AllAttendance.java 文件源码
项目:gatepass
阅读 31
收藏 0
点赞 0
评论 0
@SuppressWarnings("unchecked")
private void configureBox(HBox root) {
StackPane container = new StackPane();
//container.setPrefHeight(700);
container.setPrefSize(boxBounds.getWidth(), boxBounds.getHeight());
container.setStyle("-fx-border-width:1px;-fx-border-style:solid;-fx-border-color:#999999;");
table= new TableView<AttClass>();
Label lview= new Label();
lview.setText("View Records");
lview.setId("lview");
bottomPane= new VBox();
tclock= new Text();
tclock.setId("lview");
//tclock.setFont(Font.font("Calibri", 20));
final Timeline timeline = new Timeline(new KeyFrame(Duration.seconds(1), new EventHandler<ActionEvent>() {
@Override
public void handle(ActionEvent event) {
tclock.setText(DateFormat.getDateTimeInstance().format(new Date()));
}
}));
timeline.setCycleCount(Animation.INDEFINITE);
timeline.play();
bottomPane.getChildren().addAll(tclock,lview);
bottomPane.setAlignment(Pos.CENTER);
//table pane
namecol= new TableColumn<>("First Name");
namecol.setMinWidth(170);
namecol.setCellValueFactory(new PropertyValueFactory<>("name"));
admcol= new TableColumn<>("Identication No.");
admcol.setMinWidth(180);
admcol.setCellValueFactory(new PropertyValueFactory<>("adm"));
typecol= new TableColumn<>("Type");
typecol.setMinWidth(130);
typecol.setCellValueFactory(new PropertyValueFactory<>("type"));
timecol= new TableColumn<>("Signin");
timecol.setMinWidth(140);
timecol.setCellValueFactory(new PropertyValueFactory<>("timein"));
datecol= new TableColumn<>("Date");
datecol.setMinWidth(180);
datecol.setCellValueFactory(new PropertyValueFactory<>("date"));
table.getColumns().addAll(namecol, admcol, typecol, timecol, datecol);
table.setItems(getAtt());
att= getAtt();
table.setItems(FXCollections.observableArrayList(att));
table.setMinHeight(500);
btnrefresh = new Button("Refresh");
btnrefresh.setOnAction(new EventHandler<ActionEvent>() {
public void handle(ActionEvent t) {
table.setItems(getAtt());
}
});
laytable= new VBox(10);
laytable.getChildren().addAll(table, btnrefresh);
laytable.setAlignment(Pos.TOP_LEFT);
container.getChildren().addAll(bottomPane,laytable);
setAnimation();
sc.setContent(container);
root.setStyle("-fx-background-color: linear-gradient(#E4EAA2, #9CD672)");
root.getChildren().addAll(getActionPane(),sc);
//service.start();
}
RenameView_old.java 文件源码
项目:Lernkartei_2017
阅读 19
收藏 0
点赞 0
评论 0
@Override
public Parent constructContainer ()
{
backBtn.setOnAction(e ->
{
setData(getMyModel().getString(null));
getWindow().getScene().widthProperty().removeListener(event ->
{
elements.setMinWidth(getWindow().getScene().getWidth() - 80);
});
getFXController().showLastView();
});
elements.setPadding(new Insets(30));
elements.setAlignment(Pos.TOP_CENTER);
VerticalScroller scroLay = new VerticalScroller(elements, 1);
headLabel.setId("bold");
/*
backBtn.setOnAction(e ->
{
setData();
});
*/
BorderPane headLayout = new BorderPane(headLabel);
headLayout.setPadding(new Insets(0, 0, 25, 0));
MainLayout maLay = new MainLayout(scroLay, headLayout, new ControlLayout(backBtn));
return maLay;
}
Controller.java 文件源码
项目:JavaFx-Material-Design
阅读 25
收藏 0
点赞 0
评论 0
@Override
public void initialize(URL location, ResourceBundle resources) {
button.addEventHandler(MouseEvent.MOUSE_CLICKED, e -> {
Notifications notify = Notifications.create().title("Downloading")
.text("Download Started")
.hideAfter(javafx.util.Duration.seconds(5))
.position(Pos.BOTTOM_RIGHT);
notify.darkStyle();
notify.show();
});
}