JavaFX8 external canvas in a pane - html

My application calls for a canvas to be rendered externally. Imagine a BorderPane where the centre pane is a canvas. This canvas needs to be rendered from a combination of an external .html, a .js and a .css file. My JavaFX app will write these files as a result of what the user chooses in the left pane, right pane etc. of the BorderPane. In other words, much like a paint program, the user can create a design.
Then my thoughts were to execute a browser in the centre pane and use something like liveReload to monitor the underlying file system. That works, but I have no control over the browser window e.g. Chrome in kiosk mode expands to the screen and not to the centre pane.
Then I looked at external renderers such as Mozilla XUL, but that seems to be close to deprecation.
The reason for needing this, is that the final files (html, js and css) will be rendered in kiosk mode by a totally separate system that does not support JavaFX, but does support HTML canvas.
Should I forget about JavaFX alltogether and write the whole app in some other language/system/framework or can anyone throw some ideas into the pot?

Related

Coded UI - Unable to identify a html controls on a Wpfbrowser

I am new to CodedUI & C#.
I am trying to automate a wpf application which has a WPF Browser.
So basically, It's WPF container with html content inside. I have created a similar sample small application and shared it here. This application opens the amazon.in website within wpfwindow.
WPF Browser application
My problem is Coded UI is not able to identify the Html-Controls/elements like 'Buttons', 'Text input fields' properly.
Below, the top image is from the WPF Browser app [Link which i have shared].
Here you can see a blue square box on the top-left. The coded UI identifies that area has the Search Go button.
Bottom part of the image is of the amazon website in IE browser where coded ui is properly highliting/ identifying the Search Go button.
Does this mean i cannot automate WPFBrowser apps using Coded UI.?
Can someone please tell what to do to identify the buttons properly in coded ui
You need to specify Id attributes for the controls that you want exposed to Coded UI.
To me this looks like CodedUI is getting some control that's similar, rather than the correct one.
You haven't mentioned if you're recording and executing tests or handwriting them in a separate CodedUI solution.
If you're recording them: Be sure that you're recording using your WPF application and interactions inside of them, rather than recording using your browser and then trying to execute tests using the WPF application
If you're writing them by hand: Be sure that you're correctly creating trees of inheritance when writing your tests. For instance, in a traditional CodedUI scenario the absolute top level object that all other controls inherit from is a web browser. In your scenario, that object should be the WPF object. There are probably going to be some other windows or various controls that are children of the WPF application which in turn will finally have the browser as a child.

Use AS3 to open an swf. in a browser without the browser toolbar (forward / back buttons)

I have developed a very large swf. that will only be accessed in-house. There are over 100 scenes & 10000 frames (I had no idea the project would grow this large). I have developed a navigation system within the swf., but I have found that many users are clicking the forward / back buttons in the browser toolbar (IE8). This is a big issue for me, because the user then has no way to return to the location in the swf. that they were in before hitting the back button. Is there a way to code into the swf. using AS3 to ensure that the browser toolbar is disabled?
Disabling the parts of the user interface that the users are using a lot is a very bad idea.
Instead, simply use the browser buttons for navigation.
SWFAddress let's you do that
You can have deep linking, too. (allows users to send a link of where they are to other people)
Take a look at this answer:
How to make the browser back button work for a Flash-based Website?

Android application on Tizen

I am working on Tizen. Developing an application on Tizen which has been already developed by me on Android.
I have to place an image in the background.and then place button on it. Click on that button and receive its action in javascript.
How can I place image in the background.
Is their any way to transfer android application on Tizen platform.
Can we make our android application on Tizen?
background-image in CSS can do it.
E.g. put mesh_background_1280x720.jpg into images directory than fix your style.css:
body {
background-image: url("../images/mesh_background_1280x720.jpg");
}
For me this works.
You can do it by using Jquery Mobile.
.ui-icon-myapp-custom {
background: url("settings.png") no-repeat rgba(0, 0, 0, 0.4) !important;
}
in HTML,
<a href="#user_info" data-role="button" data-theme="b" data-iconpos="right" data-icon="myapp-custom" >
Custom Icon
</a>
For detail, check
http://jquerymobile.com/test/docs/buttons/buttons-icons.html
Currently there is no support in Tizen SDK to convert Android app to Tizen. But there is a way. A company Open Mobile developed ACL(Application Compatible Layer) for tizen. If you have Android app, you can submit it to them, they can convert it for Tizen. All application credit will be name on you. They will get a amount from samsung. Search ACL in Tizen store, you will find several application under ACL.
I can tell you how to do this using Tizen Native (WYSIWYG). If you are seeking a code based answer, then ignore this. HOWEVER, for those trying to learn and navigate within Tizen Studio this is very helpful!
Start Tizen Studio
File/New Tizen Project
Template / Next
Mobile / Next
Native Application / Next
UI Builder Single View (Bottom Left) / Next
In the Project Explorer (Top Left) open the tree to Layout / Layout.xml (Double click to open the Layout).
Choose Design Tab (Center)
In Palette , UI Container (just to right of center)
Drag "Grid" from the Palette onto your screen
In Properties Tab (far right or turn on: Window/ Show View/ Other/ choose properties OK)
Change Col Count to 720 and Row Count to 1280
Drag "Grid" from the Palette onto your screen
Now you should see more (22) UI Components
Drag "Background" from the Palette onto your screen
If it does not automatically resize (Hello BUG) then do the following. Drag to a little LARGER then your screen size (assuming HD, Look into this I think this is REQUIRED by the Tizen Store).
With Background highlighted, again go to Properties Tab, bottom Variation Attributes make:
Left 0, Top 0, Width 720, Height 1280. The first few times it will give you trouble until you figure out that the BG resized window can't go higher than the BLUE TOP and the window should be larger on the bottom, until you manually type in the CORRECT SIZE as shown above.
Now go to or open your Resource Tab (just drag and drop files here from Windows Explorer) and find your background image that you already RESIZED CORRECTLY in Adobe PS and used SAVE FOR WEB to reduce jpg file size.
Drag onto Background "layer" on your Screen.
For a button you can:
Drag "BUTTON" from UI components onto Background OR BETTER is to drag "IMAGE" from UI components onto Background...
Then drag and drop (PRE-MADE BUTTON from Adobe PS) image from the Resource Manager Tab onto the empty image place holder. You will have to resize it manually in the Properties Tab to get the correct proportions.
REPEAT for more Images and Buttons and Text since the built in text "Label" is horrible to say the least. You can always make any of these do Button Actions.
This is as far as I have come, now I need to learn how to program said buttons and actions.
Whew! This will save you many weeks!
Wish I had found a step by step like this!
Now where to post this?
IO
P.S. If you find this useful. Tick the little black up arrow to up vote this. Purely to help others, I receive no reward for "likes".

AS3 - Keeping scrollbars on empty ScrollPane

In my app I'm using a ScrollPane. I can load a DisplayObject into it, and it works fine. The thing is that when it's empty, i.e. I haven't loaded anything into it, there aren't any scrollbars on the pane. This makes sense, since there's no scrolling to do, but I'd like there to be "greyed out" scrollbars if possible.
It's not necessary or anything but most programs have it (open an empty .txt file in Notepad and you'll see what I mean), I'd just like to know if my app can do this.
If it helps at all, it's an AIR app made using FlashDevelop with the open-source Flex 4 SDK. I'm getting my components (ScrollPane, etc.) from a SWC.
Set the vertical or horizontal scroll policy according to what you want.
http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/fl/containers/BaseScrollPane.html#verticalScrollPolicy
scrollPane.verticalScrollPolicy=ScrollPolicy.ON;
scrollPane.horizontalScrollPolicy=ScrollPolicy.ON;

Show a PDF document in a browser without the menu bar

I have a touch screen kiosk that displays a webpage and a pdf document. Can I remove the menu bar? Users must not have "save", "print" and other such features.
Update
random screenshot on flickr - I am refering to the print, back/forward, zoom bar that controls the PDF -- not the browser menu. Sorry for not beeing specific.
OK - you should be able to set up most of that in the pdf document itself.
This is going from the menus in Acrobat Pro 9:
File -> Properties -> Initial View
There are some options there for: Hide menu bar, tool bars, window controls
This has been around in acrobat for a while, so most version should do it.
It is alo possible to set these programmatically if you have the right libraries, but easiest to download a demo of acrobat.
OpenOffice also has options to hide controls and forbid printing under:
File->Export as PDF->User Interface
Unfortunately, you can't modify current PDFs. You'll have to have a Word or OOorg document to export.
You should really use PDF Open Parameters for this.
Good discussion on using IE7 in Kiosk mode:
http://samanathon.com/internet-explorer-7s-kiosk-mode/
If Firefox is on option for you, see this plugin:
R-kiosk
Real Kiosk is a Firefox 2.0 - 3.0 extension that defaults to full screen, disables all menus, toolbars, key commands and right button menus. Alt+Home still takes you home
If you are running a machine with the .net framework you could throw together a windows forms app with an embedded web browser control, which gives you a little more control (how do they go back from pdf without a toolbar or a right click?)
But the quickest option that I have used (done a few touchscreens) is just using IE in kiosk mode, which is easily accomplished with command line switches, and setting that to run fullscreen on windows startup.
u need pdf professional version to do that when you create the pdf file,
File -- Properties -- Initial Vies
check the "Hide menu bar" and "Hide tool bars"
Save
Good Luck
Or just use this open source component and get rid of acrobat reader
http://flexpaper.devaldi.com/