Loading fxml too slow in javafx8 - javafx-2

Hi i am just beginner to javafx. Created one project. And faces problem for slowness for loading javafx.
So,found its solution from one of stack overflow question (Scene loads too slow - Scene loads too slow follows:-
i. Use custom loader as given in (JavaFX2 - very poor performance when adding custom made (fxml)panels to gridpane dynamically) - Successfully integrated and using
ii. Store controller in HashMap and reuse it with your loader
iii. Use Tom Schindl module (https://tomsondev.bestsolution.at/2013/08/29/convert-fxml-to-java-as-part-of-the-build/)- for loading fxml. - Don't know how to do it, and as also there are plenty of problem scene as i googled.
Can anybody please provide a way for acomplish ii and iii task using javafx8. Please it will be great help if any body help me.

Final Working Solution :-
Drastic performance change as done following thing :-
i. Optimized CSS file. ii. CSS Minification. iii. Converted .css file to .bss file iv. Used this converted .bss file instead of .css

Related

Lazy loading - fontawesome

I have a site that is using fontawesome. I am lazy loading many of the CSS files to increase first page load time, etc.
However, I need the fa-phone-alt to working on first load because it appears at the top of the page.
Can anyone provide guidance as to how I an add inline style just for the fa-phone-alt so that it works without having to load the entire style sheet?
Hope I am explaining this well enough.
Thanks.
I'm not sure how to solve exactly what you're asking, but a workaround could be that you download an SVG of a phone and place it so it loads instantly.

Vaadin - SVG Generator, any alternative?

I have been working with Vaadin charts during this week and I found a problem that I cannot solve. I need to send several charts to a PDF generation (using iTextpdf) and I could do it using SVGGenerator. The main problem is I cannot use this solution because the final laptop doesn't allow any installation, and Phantomjs is required for SVG Generator (no add-on can be installed neither). I tried to find a different solution to convert the chart content into file or buffer that I can manage, but I think I have been reading so much posts and I am not able to distinguish the solution.
So, I will try to clarify basic questions first:
a) Is it possible to manage SVG Generator without any installation in the laptop?
b) If not, is there a different way to convert a chart into an object which class could be managed to insert it into a PDF?
I can assure you I tried to read all documentation in this forum and official Vaadin forum related to this topic but I couldn't find any solution. I don't want to seem lazy, I only want to avoid spending more time and clarify the maining pre-conditions to solve this issue.
thanks in advance for your time and help.
Kind regards,
David.
You can take a screenshot of your chart and append it to pdf:
Screenshot screenshot = new Screenshot();
screenshot.setTargetComponent(myTargetComponent);
myChartLayout.addComponent(screenshot);
//when complete
screenshot.addScreenshotListener(new ScreenshotListener() {
public void screenshotComplete(ScreenshotImage image) {
//do something
}
});
//take screenshot
screenshot.takeScreenshot();
You will not be able to render a Vaadin Chart without a web browser engine of some kind. That's what PhantomJS provides. If you have a full-blown web browser at your disposal, though, you can grab the SVG markup manually from there; it's just a bit more difficult to automate. This works in Chrome:
Open your Charts app in the browser
Open the JavaScript console (Ctrl/Cmd + Shift + J)
Type something like this: copy(document.getElementsByTagName('svg')[0].outerHTML)
Paste the contents of your clipboard to a new text file and save it as an SVG.
You don't need to install phantomjs, just bundle its binary along with your web application (Reference). I did the same thing with my Amazon AWS deployment and it works just fine.

Loading local data into a WebView with "loadHtmlString" or "loadRequest"?

I'm testing the WebView as a RichTextEditor.
I've noticed there are 3 methods to load data into it, so I googled to find out which are the differences between them, but find no clear answer.
Could someone please give me some insight about that?
Am I right supposing it's best to use loadHtmlString for local content and loadRequest for web content?
Thanks for your support!
There are three recipes in the MonoTouch docs (see bottom of page) that pretty clearly illustrate the three methods.
LoadData() - load non-HTML data, can specify MIME type
LoadRequest() - load content using async HTTP request
LoadHTMLData() - load an HTML string

How to save any website by depth in JavaFX 2.0?

I am working on a JavaFX 2.0 application and i want to save a website and it's content by depth, but i do not know how to do this. For example if i want depth 0, it will save the first html page. If the depth is 1 i will save the first html page of the website and all the Subpages of it with their content! I do not know how to do this.
I have this project as homework. I am student!
Anyone can help me out here? I will be very greatfull.
Thanks a lot!
I'm not sure that JavaFX has some special API for this task. The main idea of javaFX may be defined as "tool for builing really cool GUI", but not like "some special tool for some specific tasks on web". Maybe WebView component can help you with your task (as its purpose is working with web). If not - you should work with javaFX on this task just the same way you'll walk with some other framework on it: write your own parser for HTML pages (read a website as a string, parse it for finding all html tags... and so on... XPath can help you there), or find some already existing libraries and use them in your application.
So, javaFX can help you in this project as a framework for building GUI, but business logic must be done by some other frameworks.

Iphone route-me application issue

I am using route-me MapView for displaying offline map. It works well in the sample. I followed the Embedding guides and added the MapView.XCodeProj to my Xcode project it compiles successfully. But in my viewcontroller if i add RMMapView view as a subview to main view. It gives an error as "RMMapView refrence not found"
Need a bit more information, the exact error output would be helpful, but it sounds like you are missing the libraries. Make sure that libMapView.a has been added to Target->Build Phases->Link Binary With Libraries.
You might want to double check every step of the embedding guides.
Ciao!
-- Randy

Resources