Using HTML in Swing Applications - html

Need some help here..I am trying to write a simple swing application which displays some text based on user actions. Its like help where user clicks on some url and he is redirected to that page. I have huge html code and I want to render it in swing components. I was able to do it in JDK1.6 software but not in JDK1.4. Is there any way we can render complex html in swing components in JDK 1.4 software?
I appreciate help.
Thanks
Padur

I have used Flying Saucer to render complex XHTML on Swing components. It does render very well and includes listener for links. Two caveats:
Document must be XHTML (not HTML)
I haven't tested on JRE 1.4 (which is out of support at Sun/Oracle)
Maybe it's worth a try.

Related

Suitable C++ widget for showing static html page

I need to create simple cross platform C++ project for rendering (displaying) html pages (let it be application that displays help materials). This pages can include some images and styles (css inserted in html). So I search for the best approach to have the next functionality in my project:
Possibility to show and zoom formatted html text;
Possibility to show and zoom images as well as text;
CSS support;
Easy to deploy - widget used in app should be lightweight and shouldn't have a lot of extra dependencies.
I tried to use QTextEdit. But unfortunately as the Qt documentation says, QTextEdit zoom methods do not change the size of any images.
Also tried to use QWebView there (Qt5.4). But after switching to Qt5.6 I noticed that Qt WebKit is deprecated and not supported any more. On other hand replacing Qt WebKit functionality with one from the Qt WebEngine is painful. Furthermore Qt WebEngine module is huge and has a lot of dependencies from parts that I actually not used (e. g. it depends a lot from chromium web engine). So I don't need full web browser in my application.
So what is the best approach (may be some lightweight widget that is free to use) to implement functionality mentioned above?
Thanks in advance.
I have no experience with this library, but I've heard lots of good things about it:
http://www.libnavajo.org/
It looks to be extremely lightweight (< 20 classes) and perhaps something that could work. The documentation is unclear about some of your other specifications, but it's something to try perhaps.

How can I find the source of a particular portion of markup in an Angular app?

I'm learning Angular on the fly while working on the front-end of a web app. I'm having to make some changes to the markup and because the final output comprises of many templates it is often difficult to find sources of some of the markup. Is there something similar to source maps, or at least comments for debug purposes?
Just view source in the browser. Injected templates will be under something like <ui-view style="ng-scope"> or similar.

Is HTML5 compatible with C#?

I am having trouble finding a clear answer on this one. I have an ASP.NET 4.0 Silverlight app, but recently a ton of users are complaining about not being able to use the site on mobile devices and Linux distro's. The app is built on MVVM architecture, and thus we are considering changing the UI to alleviate the complaints. We are leaning toward HTML5, but I'm not sure if this is even technically possible with ASP.NET 4.0. I've seen some posts saying that HTML5 only works with javascript code behinds, and that with ASP.NET 4.5 HTML5 support will be added. Am I understanding this correctly? Maybe it would make more sense to just go with an ASPX UI, what are the advantages of HTML5 over .ASPX? Any help is appreciated.
HTML5 is a set of client-side technologies.
ASP.Net is a server-side technology.
They have nothing to do with each-other.
However, it will be easier in ASP.Net MVC.
You would replace what is currently in the Silverlight plugin that runs in the users browser with some html and javascript instead.
It is not technically possible with ASP.NET 4.0. ASP.NET certainly needs the upgrade in order to handle any HTML5-producing code behind or 'plug-ins.' I second the notion of ASP.NET MVC. Also it seems you are comparing a car to gasoline when you ask the advantages of HTML5 over ASPX.
HTML5 works in conjunction with Javascript on the client side. You can still use ASP.NET to process data and deliver content server side. Here are some quick links.
http://visualstudiomagazine.com/articles/2011/09/01/pfcov_html5.aspx
http://mvchtml5.codeplex.com/ (I know it's mvc, but it might be helpful regardless.)
I'm really surprised where somebody telling that all the C# code of the ViewModel and xaml code behind replace with Javascript . Is is possible ? Where in MVVM architecture code are huge and all are responsible for higher task(like communicate with service layer or database).
Is it possible to convert all C# code in JavaScript.
Even I have seen if a JavaScript function take over 25 lines than it becomes some clumsy fro developer to understand . Simple or small functionality can easy develop with javaScript .
C# is very standard and object oriented language ,to develop LOB it has great role but Javascript is not too much .
I'm think Using asp.net mvc is nice to use HTML5 , see we just need to change UI page look using HTML5 but rest of application functionality should remain Same .

Object relation graphical control that generates HTML

I am planning to create a small research web application, that will have a graphical data representation control as a main data layout mechanism. The following sketch shows a primitive layout for a part of a web page:
Since it will be a part of a web app displayed in browser, I want to have some logic that allows me to create, edit and render such "maps" or you can call it "hierarchical trees" into HTML markup to sent to the browser.
Maybe one of you knows a good and elegant way to create such visual elements in plain html.
If not - I am a .Net developer, so I can, as a last resort, reduce to using a silverlight to render such visuals, but than I will have a huge visitor loss on a first visit, since most of them, I suppose, won't be willing to install Silverlight Plugin, just to get acquainted with my web site.
Anyways, a plain HTML generator for such visual trees, or a Silverlight analog will be great. Thanks for the tip in advance.
P.S. I need the element to be interactive, so generating a simple image on a server is not the solution.
The JavaScript vector engine Raphael is a great option.
But if you just want to render the map and display the result on your page, then I recommend GraphViz which takes in a description of your graph in a simple language and outputs the graph in a few different formats.

Tools to convert html layouts to Silverlight 3.0

I have a couple of applications for clients that were dragged into the web kicking and screaming. I'd like to take a crack at moving some to Silverlight 3.0 if even just as a proof of concept exercise. I'd like to see if I could make them full apps, layout and all. I think the layout of the web app along w/ the graphics is good and don't want to lose that aspect.
Which leads to my question, are there tools to convert existing HTML/graphics to Xaml? I'd rather use SL 3.0 navigation and not embed Silverlight xaps on every page as I would have to do w/ an ASP.NET MVC / Silverlight type solution.
Thanks.
I asked a related in spirit question after doing some research I can pretty confidently say no. There are some tools for Silverlight 1.0 and 2.0 you can find with a simple google search ( terms: html to xaml converter) but nothing specifically for Silverlight 3.0
The xaml exporter for Infragistics may be helpful if you've used Fireworks to design your sites, if not you may be out of luck.
Having just gone through this (existing ASP.NET to Silverlight 3), I’d recommend against any attempt to automatically convert the layouts. With Silverlight having a very discrete set of controls and layout mechanisms compared to ASP.NET I’d be very surprised is any tool did a neat translation. Tools for auto-generating code (be it XAML or HTML) tend to create pretty sub-optimal syntax (Expression Design -> XAML comes to mind). If you were successful, you’d still need to consider the entire data access pattern which will also drive the structure of your XAML.