DatePicker with Time in Flex - apache-flex

I have used the datepicker object in flex to choose dates. I was wondering if anyone knew of any component that allowed the time to be picked from the same object.
For example something similar to
from http://jdevadf.oracle.com/adf-richclient-demo/docs/tagdoc/af_inputDate.html
I have some space issues in my UI and this would really help. Does anyone know of a library for this sort of component
Thanks

I don't know of any custom component which can suit your needs. You can develop your own custom component in Flex, by following UIComponent life cycle. Refer to any existing component e.g. Panel to understand it better. (You can find the source of the component in flex sdk folder)

Related

What is the best practice for creating customized UI component in tornadofx?

i am new to JavaFX and tornadofx, and now i need to create some highly customized UI components(including submit button, text input field, password input field, datetime picker, dropdown selector etc) shown as the picture bellow:
so, what is the best practice for creating these components?
my question includes:
which super class my customized UI component should extend?
is there any existing example in tornadofx?
can i use bootstrap in my case? and if yes, how can i use bootstrap?
thanks
(this question also posted here: https://github.com/edvin/tornadofx/issues/498)
There really isn't anything TornadoFX specific to this process, but I have two recommendations:
Don't create a custom control unless you really need to. To add custom functionality to a Button or a TextField, install a custom skin instead.
If you really need a custom control, consider extending the Control class. For more layout centric components you might extend a layout instead, or simply Pane.
To learn more about custom components, consider reading this brilliant book:
https://www.amazon.com/Mastering-JavaFX-Controls-Oracle-Press-ebook/dp/B00L3TF02K
Also check out these videos:
https://www.youtube.com/watch?v=L9xtOhdSx6k
https://www.youtube.com/watch?v=7PPcM0E5yQw

Flex 4 - What is meant by skinning and what is meant by custom components?

I want to know what is skinning and what is custom components? I know this is so chilly question. But I would like know about it. And where we have to use skinning and where we have to use custom components? If it has any similarities , please tell me about it.
I just want the clear explanation about these two things.
Thank you.
Skinning -
For example, dropdownlist open dropdown, which has default hovered color, selected color, etc. which you have to change according to your application, then you can change it by skinning the dropdownlist component...
Custom component -
For example, button component has default events like, click event, mouse evnt, etc. and according to your application you have to remove some of events or modify some then create button with your event...
Please check below links...which will help you more...
Need the example to use custom component in FLEX application
http://coenraets.org/blog/2010/01/creating-a-custom-component-and-skins-in-flex-4/
Skinning is about the look and feel of the application. What colors to use, drops shadows etc.
Custom component is tweaking an existing widget, combining widgets or creating a new one from scratch to achieve functionality that does not exist in the standard Sdk. Good examples of custom components are charts from 3rd party vendors

Few basic questions on flex/AS

Guys i have struggling with flex since a day or two.I havent found a nice short tutorials.Actually i also have been struggling with FLEX IDE too.Please indicate a nice good tutorials for this
I basically have questions like
Cannot use Alert in AS
Including a AS file in mxml file
org.com.structure and the as file in it.Why do we need to say pacakage org.com inside the as file
You can use flex Alert class. In pure AS, unlike JavaScript, there is no alert().
<mx:Script source="script.as"/>. But script.as will not know about MXML file, it's better to use class defined in as file as a control in MXML.
Because packages are compiler-enforced design decision, and who we are to discuss it.
Flex in a week!
http://www.adobe.com/devnet/flex/videotraining.html
This video series helped me a lot..

Does Flex allow full control over UI components?

I'm wondering what the best tool is for developing a mobile UI is. My requirements are that I retain full control over the look and movement of every UI component. I think Flex might be the best way to do this but I can't tell if I'll have that level of control using their UI components.
Any links would be appreciated. Thanks!
Edit: For example, looking at the documentation I see there's a an 'enabled' field which dims the color of a container and it's children if false. Am I able to change that so, maybe a repeated bitmap pattern appears if false?
Or, if there's a sliding menu can I edit the speed and change in speed as it closes?
You can create any component you like and make it look like anything you want. You don't have to use standard components. You can reskin any components just by specifying a new skin. It's really pretty easy.
You can create custom skins for Flex, for both Spark and Halo components. You also can create custom components, either based on other existing components, or based on the base component. You could even create custom objects which are just based on Sprites or similar (if you like to have control over everything :P).
edit
In response to your updated question. Regarding the enabled/disabled property, yes, it is possible to skin that. Spark components have states, for example a Button has a up, over and down state – and an disabled state. That state is exactly what is active when the enabled property is set to false. So yes, you can skin that.
Regarding the sliding menu animation, I'm not totally sure if that would be easily possible as I believe that this is coded into the component itself and not part of the skin to decide. However even if that is the case, you could instead create your own component that basically features exactly the same functionality but has a changed animation there.
I'm not sure if the Spark skinning wouldn't be able to do this though, because what you definitely can do is creating transitions between states. So if the slide is made with different states, you'll probably be able to change the transition as well.

How to create/use themes in a Flex project

I just started out with Flex, and while I have worked with Actionscript2 for a few years, I'm still getting my head around Actionscript3. I've been diving into Flex for the past week, and can't figure this one thing out.
I am looking into the best way (or 'a' way) to allow me and other folks working on this project to easily create new themes for kind-of an video player. I show two videos, and need to be able to reposition them, style them, add images and anything else, really. I'm not looking to create a full-on templating engine, but if I could have a separate file/folder for each template, that would totally make my day.
I imagined having a solution in which I would have a folder inside src/templates/, and inside that folder I would have view.mxml that contains everything I need to display the videos. I would then be able to add other files such as images and such to make this template look the way it should.
Which template should be used should be defined by a variable in the main video file. This will either be provided to the swf file on playback, or provided by the video loading an external configuration file (but this is not part of my question :).
So, in short; How do I include mxml files that are inside one or two sub-folders inside src, and how do I do this in a way that the file I wish to include can be chosen via a variable.
Thanks so much in advance!
-Dave
You'd be surprised to what degree a Flex application can change its appearance through styling. Check out the following project:
http://www.fillcolors.com/
If you need more flexibility still, you could have an application with multiple views, one for each theme you want to show. An easy way to do this in Flex is to make use of the ViewStack component which basically layers view displays, showing only one at a given time.
As a very simple example, you could have something along these lines:
<mx:ViewStack selectedIndex="{currentIndex}">
<themes:CustomTheme1/>
<themes:CustomTheme2/>
<themes:CustomTheme3/>
</mx:ViewStack>
Here, currentIndex is a variable bound to the ViewStack, determining which of the three children is currently visible, each of which represent a custom MXML component (in your case, a theme).
Response to comment:
Yes, the above example is designed to do exactly that, but it's really not a feature of Flex, but of AS3. The CustomThemeX components are located using the themes namespace. The namespace is defined within the parent components root tag. In this example, the parent is a Canvas component:
<mx:Canvas xmlns:themes="themes">
This tells the compiler to look for these custom components within the themes sub-folder of your application; in other words, the src/themes folder, which contains the CustomThemeX components.
If the preceding paragraph didn't really sense to you, I'd recommend picking up a book/reading through the documentation about AS3/Flex and learning more about some of the core concepts of AS3 and object oriented programming. I wish I could help out more, but this question is starting to get a little too broad. I hope you understand. :)
I'm not an expert on Flex. But I've seen a tutorial on skins in Flex on gotoAndLearn.com. Maybe that kan give you some hints: Introduction to Flex: Part 3

Resources