Guide to Uploading SamplesThis site is open to contributions from anyone who has JavaFX language projects that they would like to share with the community. There are three basic steps to uploading new content on the JFXtras Samples website.
The end result is that you will have a customized listing for your JavaFX application that allows anyone to browse the source code, launch the application, download a project file, and even run it as a desktop widget (if applicable). It is also possible to add an Inline Applet by following the optional instructions in Part 4. The rest of this guide goes over how to accomplish each of these steps in detail. 1. Committing Source Code to SubversionTo commit source code to the JFXtras Samples project you must first become a project member. Please post a request on the JFXtras Mailing List mentioning the sample you are working on or would like to submit. One of the project admins will then grant you project member status so you can commit to the source control repository. Once you are a JFXtras project member, you will have https access with write permission to the repository. Using the subversion client of your choice, sync the following url: https://jfxtras.googlecode.com/svn/jfxtras.samples/trunk/
The source code repository is organized first by source and then in folders by individual samples. If this is your first time creating a sample, feel free to create a new top-level folder for all your projects. When checking in source code, please try to adhere to the following guidelines:
Once you have committed your code to subversion, you are ready to move on to the next step. 2. Uploading Artifacts to the Document LibraryThis portal also houses a Document Library that you can use to store your samples. Some artifacts that you may want to upload include:
Before uploading any artifacts you must first have an account with the proper access priveleges. Please create a new account using the link on the left side of this page. Once your account has been created, post a message on the JFXtras Mailing List requesting access to the website, and you will be granted community member status. Once you are logged into an account with the right level of permissions, you should be able to create new folders and upload files in the Document Library (notice the link on the left navigation bar for future convenience). The document library is structured very similarly to the source code repository. Create a top-level folder for your project, a sub-folder with your sample name, and upload all your artifacts into that folder. One file that will require special treatment during the upload process is your JNLP file. If you used the javafxpackager to create a JNLP file for you, there are a few things that will need to be corrected:
Once you have uploaded all your artifacts you are ready to proceed to the final step. 3. Creating a New Project EntryTo create a new project entry you will have to add a new Web Content item that follows the uses the per-built Sample Structure and Template. As a shortcut, you can simply click on the "Add New Sample" link on the left side of this page. On the add sample page, you will be presented with a list of fields with different options. Here is a brief description of what to populate for each field:
You may also want to add some labels at this time. There are categorizations based on source, project category, chapter number, etc. Remember, you can always go back and update anything in this form later on. After completing all the fields that pertain to your widget, click the Save button. This will send your sample through the workflow approval process. As soon as an administrator reviews the entry and approves it, the sample will be available to all the visitors of the JFXtras Samples website. Congratulations on successfully completing your first JFXtras Sample!
4. Adding an Inline Applet (optional)It is also possible to add an Inline Applet to your sample entry. This is accomplished by following exactly the same steps as above (1-3), with some extra html code added to the full description of your sample. Assuming that you have already uploaded the jar and jnlp files as specified above, the following html snippet would add a draggable applet with dimenions 500x400:
<script src="http://dl.javafx.com/1.2/dtfx.js"></script>
<script>
javafx(
{
archive: "http://jfxtras.org/portal/webdav/liferay.com/guest/document_library/Samples/bobsamples/dancing%20pandas/DancingPandas.jar",
draggable: true,
width: 500,
height: 400,
code: "org.bob.dancingpandas.Main",
name: "Dancing Pandas",
id: "dancingPandas"
},
{ isApplet: "true" }
);
</script>
To enter this in to the editor, make sure you have "Source" mode selected so that it does not apply any WYSIWYG format |