Skip to content

Commit

Permalink
feat: Added link to JFX-Central in menu Help/JavaFX/<JFX-Central> (#570)
Browse files Browse the repository at this point in the history
  • Loading branch information
Oliver-Loeffler authored Feb 7, 2023
1 parent 81a2f12 commit 50163dc
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,8 @@ public enum DocumentControlAction {
HELP_OPEN_OPENJFX_CSS_REFERENCE,
HELP_OPEN_OPENJFX_FXML_REFERENCE,
HELP_OPEN_GLUON_SCENEBUILDER_HOME,
HELP_COMMUNITY_CONTRIBUTE_SCENEBUILDER,
HELP_COMMUNITY_CONTRIBUTE_SCENEBUILDER,
HELP_OPEN_JFXCENTRAL_HOMEPAGE,
}

public enum DocumentEditAction {
Expand Down Expand Up @@ -654,6 +655,7 @@ public boolean canPerformControlAction(DocumentControlAction controlAction) {
case HELP_OPEN_OPENJFX_CSS_REFERENCE:
case HELP_OPEN_OPENJFX_FXML_REFERENCE:
case HELP_OPEN_GLUON_SCENEBUILDER_HOME:
case HELP_OPEN_JFXCENTRAL_HOMEPAGE:
case HELP_COMMUNITY_CONTRIBUTE_SCENEBUILDER:
result = true;
break;
Expand Down Expand Up @@ -883,7 +885,11 @@ public void performControlAction(DocumentControlAction controlAction) {
case HELP_COMMUNITY_CONTRIBUTE_SCENEBUILDER:
openURL(DocumentationUrls.GLUON_SCENEBUILDER_CONTRIBUTE.toString());
break;


case HELP_OPEN_JFXCENTRAL_HOMEPAGE:
openURL(DocumentationUrls.JFXCENTRAL_HOMEPAGE.toString());
break;

case SHOW_SAMPLE_CONTROLLER:
if (skeletonWindowController == null) {
skeletonWindowController = new SkeletonWindowController(editorController,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -425,6 +425,8 @@ public class MenuBarController {
private MenuItem fxmlIntroductionMenuItem;
@FXML
private MenuItem communityContributeMenuItem;
@FXML
private MenuItem jfxCentralMenuItem;

private static final KeyCombination.Modifier modifier;
private final Map<KeyCombination, MenuItem> keyToMenu = new HashMap<>();
Expand Down Expand Up @@ -646,6 +648,7 @@ private void controllerDidLoadFxml() {
assert fxmlIntroductionMenuItem != null;
assert sceneBuilderHomeMenuItem != null;
assert communityContributeMenuItem != null;
assert jfxCentralMenuItem != null;

/*
* To make MenuBar.fxml editable with SB 1.1, the menu bar is enclosed
Expand Down Expand Up @@ -1157,6 +1160,8 @@ public String getTitle() {
cssReferenceGuideMenuItem.setAccelerator(new KeyCodeCombination(KeyCode.F4));
fxmlIntroductionMenuItem.setUserData(new DocumentControlActionController(DocumentControlAction.HELP_OPEN_OPENJFX_FXML_REFERENCE));
fxmlIntroductionMenuItem.setAccelerator(new KeyCodeCombination(KeyCode.F5));
jfxCentralMenuItem.setUserData(new DocumentControlActionController(DocumentControlAction.HELP_OPEN_JFXCENTRAL_HOMEPAGE));
jfxCentralMenuItem.setAccelerator(new KeyCodeCombination(KeyCode.F6));
sceneBuilderHomeMenuItem.setUserData(new DocumentControlActionController(DocumentControlAction.HELP_OPEN_GLUON_SCENEBUILDER_HOME));
communityContributeMenuItem.setUserData(new DocumentControlActionController(DocumentControlAction.HELP_COMMUNITY_CONTRIBUTE_SCENEBUILDER));
/*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,7 @@ menu.title.help.openjfx.css.reference=JavaFX CSS Reference Guide
menu.title.help.openjfx.fxml.reference=Introduction to FXML
menu.title.help.scenebuilder.contribute=Contribute to Scene Builder
menu.title.help.scenebuilder.home=Gluon Scene Builder Home
menu.title.help.jfxcentral.homepage=JFX-Central
# -----------------------------------------------------------------------------
# Document
# -----------------------------------------------------------------------------
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -307,6 +307,8 @@
<MenuItem fx:id="apiDocMenuItem" mnemonicParsing="true" text="%menu.title.help.openjfx.api.docs" />
<MenuItem fx:id="cssReferenceGuideMenuItem" mnemonicParsing="true" text="%menu.title.help.openjfx.css.reference" />
<MenuItem fx:id="fxmlIntroductionMenuItem" mnemonicParsing="true" text="%menu.title.help.openjfx.fxml.reference" />
<SeparatorMenuItem mnemonicParsing="false" />
<MenuItem fx:id="jfxCentralMenuItem" mnemonicParsing="true" text="%menu.title.help.jfxcentral.homepage" />
</items>
</Menu>
<SeparatorMenuItem mnemonicParsing="false" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,12 @@ public enum DocumentationUrls {
OPENJFX_CSS_REFERENCE("https://openjfx.io/javadoc/{javafx.version.major}/javafx.graphics/javafx/scene/doc-files/cssref.html"),
OPENJFX_FXML_REFERENCE("https://openjfx.io/javadoc/{javafx.version.major}/javafx.fxml/javafx/fxml/doc-files/introduction_to_fxml.html"),

GLUON_SCENEBUILDER_CONTRIBUTE("https://github.com/gluonhq/scenebuilder");
GLUON_SCENEBUILDER_CONTRIBUTE("https://github.com/gluonhq/scenebuilder"),

/**
* 3rd Party
*/
JFXCENTRAL_HOMEPAGE("https://www.jfx-central.com");

private static final String SAFE_DEFAULT_VERSION = "17";

Expand Down

0 comments on commit 50163dc

Please # to comment.