Standart dialog button style to JFoenixStyling an input type=“file” buttonHow to remove close button on the jQuery UI dialog?How to style a <select> dropdown with only CSS?How to prevent a dialog from closing when a button is clickedHow to style a checkbox using CSS?How to create a dialog with “yes” and “no” options?Remove blue border from css custom-styled button in ChromeHow to show a dialog with JFoenix - JAVAFXsetImage ImageView outside initialize() NullPointerException
What is the actual quality of machine translations?
Trapping Rain Water
What risks are there when you clear your cookies instead of logging off?
What language is the software written in on the ISS?
How did students remember what to practise between lessons without any sheet music?
When conversion from Integer to Single may lose precision
How does an ordinary object become radioactive?
Can anyone identify this tank?
Does an ice chest packed full of frozen food need ice?
Facebook Marketing API asset access suddenly denied
Why doesn’t a normal window produce an apparent rainbow?
Can a black dragonborn's acid breath weapon destroy objects?
Implement Homestuck's Catenative Doomsday Dice Cascader
Should an arbiter claim draw at a K+R vs K+R endgame?
Inconsistent behavior of compiler optimization of unused string
Where does "0 packages can be updated." come from?
Should I give professor gift at the beginning of my PhD?
When 2-pentene reacts with HBr, what will be the major product?
At what point in time did Dumbledore ask Snape for this favor?
How to Analytically Solve this PDE?
Soft question: Examples where lack of mathematical rigour cause security breaches?
Is an early checkout possible at a hotel before its reception opens?
Chemmacros scheme translation
Watts vs. Volt Amps
Standart dialog button style to JFoenix
Styling an input type=“file” buttonHow to remove close button on the jQuery UI dialog?How to style a <select> dropdown with only CSS?How to prevent a dialog from closing when a button is clickedHow to style a checkbox using CSS?How to create a dialog with “yes” and “no” options?Remove blue border from css custom-styled button in ChromeHow to show a dialog with JFoenix - JAVAFXsetImage ImageView outside initialize() NullPointerException
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty height:90px;width:728px;box-sizing:border-box;
I'm making javafx application and using Jfoenix library.
Window with specific information about item from table opens by this code:
@FXML
public void showEditPolicyDialog()
Policy selectedPolicy = policyTable.getSelectionModel().getSelectedItem();
int selectedPolicyIndex = policyTable.getSelectionModel().getSelectedIndex();
if (selectedPolicy == null)
Alert alert = new Alert(Alert.AlertType.INFORMATION);
alert.setTitle("No Policy Selected");
alert.setHeaderText(null);
alert.setContentText("Please select Policy you want to edit.");
alert.showAndWait();
return;
else
selectedPolicy = Datasource.getInstance().getFullPolicyById(selectedPolicy.getId());
Dialog<ButtonType> dialog = new Dialog<>();
dialog.initOwner(mainWindowAnchorPane.getScene().getWindow());
dialog.setTitle("Edit policy " + selectedPolicy.getNumber());
FXMLLoader fxmlLoader = new FXMLLoader();
fxmlLoader.setLocation(getClass().getResource("/ee/insa/views/PolicyDialogLayout.fxml"));
try
dialog.getDialogPane().setContent(fxmlLoader.load());
catch (IOException e)
System.out.println("Couldn't load edit policy dialog");
e.printStackTrace();
return;
dialog.getDialogPane().getButtonTypes().add(ButtonType.OK);
dialog.getDialogPane().getButtonTypes().add(ButtonType.CANCEL);
Button okButton = (Button) dialog.getDialogPane().lookupButton(ButtonType.OK);
okButton.setDefaultButton(false);
dialog.getDialogPane().getStylesheets().add("ee/insa/CSS/PolicyWindowCSS.css");
PolicyController policyController = fxmlLoader.getController();
Policy fullPolicy = Datasource.getInstance().getFullPolicyById(selectedPolicy.getId());
policyController.loadPolicyDataToForm(fullPolicy);
Optional<ButtonType> result = dialog.showAndWait();
if (result.isPresent() && result.get() == ButtonType.OK)
policyController.updatePolicyData(fullPolicy);
Datasource.getInstance().updatePolicy(fullPolicy);
Policy updatedPolicyForMainTable = Datasource.getInstance().getPolicyForMainTableById(fullPolicy.getId());
policyTable.getItems().set(selectedPolicyIndex, updatedPolicyForMainTable);
policyTable.getSelectionModel().select(selectedPolicyIndex);
if (inClientSearch == false)
checkTableView();
How can i set Dialog button style to JFoenix? Now buttons have standart Windows style.
In CSS i can find area, where buttons are (pink color):
.dialog-pane > .button-bar > .container
-fx-background-color: deeppink;
But I can't find exact those 2 buttons. If I start to style by
.dialog-pane > .button
-fx-background-color: deeppink;
then ALL buttons are restyled.
UPDATED:
I tried to implement JFXDialog by this code:
@FXML
public void showEditPolicyDialog()
Policy selectedPolicy = policyTable.getSelectionModel().getSelectedItem();
selectedPolicy = Datasource.getInstance().getFullPolicyById(selectedPolicy.getId());
try
Parent parent = FXMLLoader.load(getClass().getResource("/ee/insa/views/PolicyDialogLayout.fxml"));
JFXDialogLayout dialogLayout = new JFXDialogLayout();
dialogLayout.setBody(parent);
JFXDialog dialog = new JFXDialog( mainWindowStackPane, dialogLayout, JFXDialog.DialogTransition.BOTTOM);
dialog.show();
catch (IOException e)
e.printStackTrace();
but problem is that it is not separate window, it show only in space of main window.
java css javafx dialog jfoenix
add a comment |
I'm making javafx application and using Jfoenix library.
Window with specific information about item from table opens by this code:
@FXML
public void showEditPolicyDialog()
Policy selectedPolicy = policyTable.getSelectionModel().getSelectedItem();
int selectedPolicyIndex = policyTable.getSelectionModel().getSelectedIndex();
if (selectedPolicy == null)
Alert alert = new Alert(Alert.AlertType.INFORMATION);
alert.setTitle("No Policy Selected");
alert.setHeaderText(null);
alert.setContentText("Please select Policy you want to edit.");
alert.showAndWait();
return;
else
selectedPolicy = Datasource.getInstance().getFullPolicyById(selectedPolicy.getId());
Dialog<ButtonType> dialog = new Dialog<>();
dialog.initOwner(mainWindowAnchorPane.getScene().getWindow());
dialog.setTitle("Edit policy " + selectedPolicy.getNumber());
FXMLLoader fxmlLoader = new FXMLLoader();
fxmlLoader.setLocation(getClass().getResource("/ee/insa/views/PolicyDialogLayout.fxml"));
try
dialog.getDialogPane().setContent(fxmlLoader.load());
catch (IOException e)
System.out.println("Couldn't load edit policy dialog");
e.printStackTrace();
return;
dialog.getDialogPane().getButtonTypes().add(ButtonType.OK);
dialog.getDialogPane().getButtonTypes().add(ButtonType.CANCEL);
Button okButton = (Button) dialog.getDialogPane().lookupButton(ButtonType.OK);
okButton.setDefaultButton(false);
dialog.getDialogPane().getStylesheets().add("ee/insa/CSS/PolicyWindowCSS.css");
PolicyController policyController = fxmlLoader.getController();
Policy fullPolicy = Datasource.getInstance().getFullPolicyById(selectedPolicy.getId());
policyController.loadPolicyDataToForm(fullPolicy);
Optional<ButtonType> result = dialog.showAndWait();
if (result.isPresent() && result.get() == ButtonType.OK)
policyController.updatePolicyData(fullPolicy);
Datasource.getInstance().updatePolicy(fullPolicy);
Policy updatedPolicyForMainTable = Datasource.getInstance().getPolicyForMainTableById(fullPolicy.getId());
policyTable.getItems().set(selectedPolicyIndex, updatedPolicyForMainTable);
policyTable.getSelectionModel().select(selectedPolicyIndex);
if (inClientSearch == false)
checkTableView();
How can i set Dialog button style to JFoenix? Now buttons have standart Windows style.
In CSS i can find area, where buttons are (pink color):
.dialog-pane > .button-bar > .container
-fx-background-color: deeppink;
But I can't find exact those 2 buttons. If I start to style by
.dialog-pane > .button
-fx-background-color: deeppink;
then ALL buttons are restyled.
UPDATED:
I tried to implement JFXDialog by this code:
@FXML
public void showEditPolicyDialog()
Policy selectedPolicy = policyTable.getSelectionModel().getSelectedItem();
selectedPolicy = Datasource.getInstance().getFullPolicyById(selectedPolicy.getId());
try
Parent parent = FXMLLoader.load(getClass().getResource("/ee/insa/views/PolicyDialogLayout.fxml"));
JFXDialogLayout dialogLayout = new JFXDialogLayout();
dialogLayout.setBody(parent);
JFXDialog dialog = new JFXDialog( mainWindowStackPane, dialogLayout, JFXDialog.DialogTransition.BOTTOM);
dialog.show();
catch (IOException e)
e.printStackTrace();
but problem is that it is not separate window, it show only in space of main window.
java css javafx dialog jfoenix
add a comment |
I'm making javafx application and using Jfoenix library.
Window with specific information about item from table opens by this code:
@FXML
public void showEditPolicyDialog()
Policy selectedPolicy = policyTable.getSelectionModel().getSelectedItem();
int selectedPolicyIndex = policyTable.getSelectionModel().getSelectedIndex();
if (selectedPolicy == null)
Alert alert = new Alert(Alert.AlertType.INFORMATION);
alert.setTitle("No Policy Selected");
alert.setHeaderText(null);
alert.setContentText("Please select Policy you want to edit.");
alert.showAndWait();
return;
else
selectedPolicy = Datasource.getInstance().getFullPolicyById(selectedPolicy.getId());
Dialog<ButtonType> dialog = new Dialog<>();
dialog.initOwner(mainWindowAnchorPane.getScene().getWindow());
dialog.setTitle("Edit policy " + selectedPolicy.getNumber());
FXMLLoader fxmlLoader = new FXMLLoader();
fxmlLoader.setLocation(getClass().getResource("/ee/insa/views/PolicyDialogLayout.fxml"));
try
dialog.getDialogPane().setContent(fxmlLoader.load());
catch (IOException e)
System.out.println("Couldn't load edit policy dialog");
e.printStackTrace();
return;
dialog.getDialogPane().getButtonTypes().add(ButtonType.OK);
dialog.getDialogPane().getButtonTypes().add(ButtonType.CANCEL);
Button okButton = (Button) dialog.getDialogPane().lookupButton(ButtonType.OK);
okButton.setDefaultButton(false);
dialog.getDialogPane().getStylesheets().add("ee/insa/CSS/PolicyWindowCSS.css");
PolicyController policyController = fxmlLoader.getController();
Policy fullPolicy = Datasource.getInstance().getFullPolicyById(selectedPolicy.getId());
policyController.loadPolicyDataToForm(fullPolicy);
Optional<ButtonType> result = dialog.showAndWait();
if (result.isPresent() && result.get() == ButtonType.OK)
policyController.updatePolicyData(fullPolicy);
Datasource.getInstance().updatePolicy(fullPolicy);
Policy updatedPolicyForMainTable = Datasource.getInstance().getPolicyForMainTableById(fullPolicy.getId());
policyTable.getItems().set(selectedPolicyIndex, updatedPolicyForMainTable);
policyTable.getSelectionModel().select(selectedPolicyIndex);
if (inClientSearch == false)
checkTableView();
How can i set Dialog button style to JFoenix? Now buttons have standart Windows style.
In CSS i can find area, where buttons are (pink color):
.dialog-pane > .button-bar > .container
-fx-background-color: deeppink;
But I can't find exact those 2 buttons. If I start to style by
.dialog-pane > .button
-fx-background-color: deeppink;
then ALL buttons are restyled.
UPDATED:
I tried to implement JFXDialog by this code:
@FXML
public void showEditPolicyDialog()
Policy selectedPolicy = policyTable.getSelectionModel().getSelectedItem();
selectedPolicy = Datasource.getInstance().getFullPolicyById(selectedPolicy.getId());
try
Parent parent = FXMLLoader.load(getClass().getResource("/ee/insa/views/PolicyDialogLayout.fxml"));
JFXDialogLayout dialogLayout = new JFXDialogLayout();
dialogLayout.setBody(parent);
JFXDialog dialog = new JFXDialog( mainWindowStackPane, dialogLayout, JFXDialog.DialogTransition.BOTTOM);
dialog.show();
catch (IOException e)
e.printStackTrace();
but problem is that it is not separate window, it show only in space of main window.
java css javafx dialog jfoenix
I'm making javafx application and using Jfoenix library.
Window with specific information about item from table opens by this code:
@FXML
public void showEditPolicyDialog()
Policy selectedPolicy = policyTable.getSelectionModel().getSelectedItem();
int selectedPolicyIndex = policyTable.getSelectionModel().getSelectedIndex();
if (selectedPolicy == null)
Alert alert = new Alert(Alert.AlertType.INFORMATION);
alert.setTitle("No Policy Selected");
alert.setHeaderText(null);
alert.setContentText("Please select Policy you want to edit.");
alert.showAndWait();
return;
else
selectedPolicy = Datasource.getInstance().getFullPolicyById(selectedPolicy.getId());
Dialog<ButtonType> dialog = new Dialog<>();
dialog.initOwner(mainWindowAnchorPane.getScene().getWindow());
dialog.setTitle("Edit policy " + selectedPolicy.getNumber());
FXMLLoader fxmlLoader = new FXMLLoader();
fxmlLoader.setLocation(getClass().getResource("/ee/insa/views/PolicyDialogLayout.fxml"));
try
dialog.getDialogPane().setContent(fxmlLoader.load());
catch (IOException e)
System.out.println("Couldn't load edit policy dialog");
e.printStackTrace();
return;
dialog.getDialogPane().getButtonTypes().add(ButtonType.OK);
dialog.getDialogPane().getButtonTypes().add(ButtonType.CANCEL);
Button okButton = (Button) dialog.getDialogPane().lookupButton(ButtonType.OK);
okButton.setDefaultButton(false);
dialog.getDialogPane().getStylesheets().add("ee/insa/CSS/PolicyWindowCSS.css");
PolicyController policyController = fxmlLoader.getController();
Policy fullPolicy = Datasource.getInstance().getFullPolicyById(selectedPolicy.getId());
policyController.loadPolicyDataToForm(fullPolicy);
Optional<ButtonType> result = dialog.showAndWait();
if (result.isPresent() && result.get() == ButtonType.OK)
policyController.updatePolicyData(fullPolicy);
Datasource.getInstance().updatePolicy(fullPolicy);
Policy updatedPolicyForMainTable = Datasource.getInstance().getPolicyForMainTableById(fullPolicy.getId());
policyTable.getItems().set(selectedPolicyIndex, updatedPolicyForMainTable);
policyTable.getSelectionModel().select(selectedPolicyIndex);
if (inClientSearch == false)
checkTableView();
How can i set Dialog button style to JFoenix? Now buttons have standart Windows style.
In CSS i can find area, where buttons are (pink color):
.dialog-pane > .button-bar > .container
-fx-background-color: deeppink;
But I can't find exact those 2 buttons. If I start to style by
.dialog-pane > .button
-fx-background-color: deeppink;
then ALL buttons are restyled.
UPDATED:
I tried to implement JFXDialog by this code:
@FXML
public void showEditPolicyDialog()
Policy selectedPolicy = policyTable.getSelectionModel().getSelectedItem();
selectedPolicy = Datasource.getInstance().getFullPolicyById(selectedPolicy.getId());
try
Parent parent = FXMLLoader.load(getClass().getResource("/ee/insa/views/PolicyDialogLayout.fxml"));
JFXDialogLayout dialogLayout = new JFXDialogLayout();
dialogLayout.setBody(parent);
JFXDialog dialog = new JFXDialog( mainWindowStackPane, dialogLayout, JFXDialog.DialogTransition.BOTTOM);
dialog.show();
catch (IOException e)
e.printStackTrace();
but problem is that it is not separate window, it show only in space of main window.
java css javafx dialog jfoenix
java css javafx dialog jfoenix
edited Mar 24 at 19:34
Daniil Peterson
asked Mar 24 at 16:24
Daniil PetersonDaniil Peterson
266
266
add a comment |
add a comment |
2 Answers
2
active
oldest
votes
I found solution. Using this code
for(ButtonType bt : dialog.getDialogPane().getButtonTypes())
Button button = (Button) dialog.getDialogPane().lookupButton(bt);
button.getStyleClass().add("dialogButton");
i can apply CSS class only to those 2 buttons.
.dialogButton
-fx-background-color: -fx-primary;
-fx-text-fill: -fx-primatytext;
-fx-font-size: 12pt;
-fx-background-radius: 0;
-fx-border-width: 1px;
-fx-border-color: -fx-secondary;
.dialogButton:hover
-fx-background-color: -fx-secondary;
Now it looks fine.
add a comment |
Try using the JFoenix JFXDialog
instead of the default JavaFX `Dialog:
JFXDialog<ButtonType> dialog = new JFXDialog<>();
Samuel ,i updated my question.
– Daniil Peterson
Mar 24 at 19:35
add a comment |
Your Answer
StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55325934%2fstandart-dialog-button-style-to-jfoenix%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
I found solution. Using this code
for(ButtonType bt : dialog.getDialogPane().getButtonTypes())
Button button = (Button) dialog.getDialogPane().lookupButton(bt);
button.getStyleClass().add("dialogButton");
i can apply CSS class only to those 2 buttons.
.dialogButton
-fx-background-color: -fx-primary;
-fx-text-fill: -fx-primatytext;
-fx-font-size: 12pt;
-fx-background-radius: 0;
-fx-border-width: 1px;
-fx-border-color: -fx-secondary;
.dialogButton:hover
-fx-background-color: -fx-secondary;
Now it looks fine.
add a comment |
I found solution. Using this code
for(ButtonType bt : dialog.getDialogPane().getButtonTypes())
Button button = (Button) dialog.getDialogPane().lookupButton(bt);
button.getStyleClass().add("dialogButton");
i can apply CSS class only to those 2 buttons.
.dialogButton
-fx-background-color: -fx-primary;
-fx-text-fill: -fx-primatytext;
-fx-font-size: 12pt;
-fx-background-radius: 0;
-fx-border-width: 1px;
-fx-border-color: -fx-secondary;
.dialogButton:hover
-fx-background-color: -fx-secondary;
Now it looks fine.
add a comment |
I found solution. Using this code
for(ButtonType bt : dialog.getDialogPane().getButtonTypes())
Button button = (Button) dialog.getDialogPane().lookupButton(bt);
button.getStyleClass().add("dialogButton");
i can apply CSS class only to those 2 buttons.
.dialogButton
-fx-background-color: -fx-primary;
-fx-text-fill: -fx-primatytext;
-fx-font-size: 12pt;
-fx-background-radius: 0;
-fx-border-width: 1px;
-fx-border-color: -fx-secondary;
.dialogButton:hover
-fx-background-color: -fx-secondary;
Now it looks fine.
I found solution. Using this code
for(ButtonType bt : dialog.getDialogPane().getButtonTypes())
Button button = (Button) dialog.getDialogPane().lookupButton(bt);
button.getStyleClass().add("dialogButton");
i can apply CSS class only to those 2 buttons.
.dialogButton
-fx-background-color: -fx-primary;
-fx-text-fill: -fx-primatytext;
-fx-font-size: 12pt;
-fx-background-radius: 0;
-fx-border-width: 1px;
-fx-border-color: -fx-secondary;
.dialogButton:hover
-fx-background-color: -fx-secondary;
Now it looks fine.
answered Mar 25 at 7:24
Daniil PetersonDaniil Peterson
266
266
add a comment |
add a comment |
Try using the JFoenix JFXDialog
instead of the default JavaFX `Dialog:
JFXDialog<ButtonType> dialog = new JFXDialog<>();
Samuel ,i updated my question.
– Daniil Peterson
Mar 24 at 19:35
add a comment |
Try using the JFoenix JFXDialog
instead of the default JavaFX `Dialog:
JFXDialog<ButtonType> dialog = new JFXDialog<>();
Samuel ,i updated my question.
– Daniil Peterson
Mar 24 at 19:35
add a comment |
Try using the JFoenix JFXDialog
instead of the default JavaFX `Dialog:
JFXDialog<ButtonType> dialog = new JFXDialog<>();
Try using the JFoenix JFXDialog
instead of the default JavaFX `Dialog:
JFXDialog<ButtonType> dialog = new JFXDialog<>();
answered Mar 24 at 17:42
Samuel PhilippSamuel Philipp
5,91481634
5,91481634
Samuel ,i updated my question.
– Daniil Peterson
Mar 24 at 19:35
add a comment |
Samuel ,i updated my question.
– Daniil Peterson
Mar 24 at 19:35
Samuel ,i updated my question.
– Daniil Peterson
Mar 24 at 19:35
Samuel ,i updated my question.
– Daniil Peterson
Mar 24 at 19:35
add a comment |
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55325934%2fstandart-dialog-button-style-to-jfoenix%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown