Is it possible to display ComboBox items by categories? - javafx

I am working on a software program which enables to send specific commands to an external machine. This software has a command editor which starts with a ComboBox listing every possible command tag. I have 62 command tags which are separated into 5 distinct categories and I would like to specify it to the user with 5 headers on the items list.
I know we can do it in C# using ComboBox.GroupStyle, but I can't find an equivalent in Java. Is there a solution for this? Thank you in advance :)

Related

Learning Qt: Which methodology to be used for this "advanced UI"?

I am learning Qt5 using PyQt.
My goal is to create a UI with several goals (I will base my need on the screenshot below).
So here are my goals:
My need
Add directories to a list of directories to be scanned (I know how to use QFileDialog.getExistingDirectory for that). For this I'd like to have a "+" button.
When pressed the QFileDialog would open and a new row would be added.
Then I would scan the directory to look for files. It won't be my first implementation but I'd like to have a circular progress bar being displayed during the scan (at the place of the classic progress bar).
When the scan is done, the UI would display the number of files found during the scan. And the progress bar would be replaced by a tick mark icon (not shown on the screenshot...).
At the beginning of each row, I'd like to have a "-" button to delete the row.
My goal is to learn
This is important, I know I am not the first one to have the idea of such a UI.
So I not looking for a third party lib on top of Qt.
My goal is to learn Qt5 (with PyQt) with this example.
But if its unrealistic, please tell me!
My knowledge
Mode View: I implemented some basic model view widgets to display strings, and I understand how to extend the idea to tables or trees.
In this case the number of rows in the table would be handled automatically.
But is it possible to created a table that would display not only strings but also widgets?
Widget Mapper: I read that another methodology is the QDataWidgetMapper. In this case, I would have to deal with creation of news rows by myself, and then I would map data onto them.
But it seems to be a hard and long job.
So, is it a good idea?
So finally could someone tell what is the best direction for that?
I am not looking for code, but since it takes a lots of time to learn new concepts, I'd like to learn and use the correct one before starting coding.
Thank you for your help :)!
After so more searches, I found that I need to use the delegate methodology.
In Qt5 it's QStyledItemDelegate and in Qt4 it's QItemDelegate.
I could find a nice tutorial at the moment, but I started coded it.

drupal 7 internationalisation il8n load node

I'm a part-time developer (ranked Enthusiastic Amateur) and am trying to develop my first multilingual site in Drupal 7 using the Internationlisation (il8n) suite.
After following the initial setup directions, I'm now trying to implement a "featured article" column where Articles flagged as Featured appear in a list in the right-hand column of the page.
Ordinarily I'd simply do a "db_query" to return a list of node ids and then do a node_load() for each result.
However, how do I do this using il8n to ensure that I'm pulling out the correct language versions of the Articles?
Any and all help is greatly appreciated,
~Matt Bridger
Use the i18n_node_get_lang() function to check the language of the nodes and load only the ones with the right language.
Typically you would use Views module (http://drupal.org/project/views). To create a block listing the nodes you want, and then under Filter Language, use Content: Language set to Current User's Language to filter for only the language being viewed. With this solution, there is no need to write any code, unless you need some advanced theming for your list.

Program that clicks 3 buttons in a web app in a specified order

I was wondering if i can write a program that clicks some buttons in a specified order in a web app or a web site. For example click Autos then weather then sports in http://www.bbc.co.uk/ with that order.
I have made some search but i didn't find anything about that.
I don't know even in what language i can write it or how to start.
It is possible. Here are 2 possible ways you can take:
Java with Robot class
Python with pywin32 or see example from stackoverflow
Java example:
Robot r=new Robot();
r.mouseMove(x,y);
r.mousePress(InputEvent.BUTTON1_MASK);

Is InfoPath right for this purpose?

I'm currently looking for a way to make a dynamic checklist-type document for my job to be used for software upgrades. Right now, we have a generic Word checklist that has all the steps for upgrading a client's software, but due to its nature, not all steps apply to each client, and to list all possible options would make it difficult to navigate and difficult to use, which goes against its purpose.
What I'm looking for is a way to input information (checkboxes, drop-downs, and text fields), and based on that information, produce a list of tasks in some format that is user-readable. For example, if I check one box to indicate that they have a certain feature installed, then add 3 items to the task list.
Is InfoPath the right tool for the job, or am I barking up the wrong tree?
From what you describe, I'd say InfoPath is a very good choice for your project. My first thought would be to work in two different views. The first view would be for your people to input the information about what features are installed (there can be hidden content that only shows if certain answers are given, making it less unwieldy than your Word form). Then I'd have another view designed for printing out and giving to the client, containing only the task list info derived from the data in the first view. Bark away!

I want to create an RSS feed that is customizable

I want to create a dropdown of RSS feeds and users can pick and choose the feeds they want and a custom feed would be created. Is this possible using straight up HTML and java script or do I need a server technology. There are 7 separate feeds so the possible combinations are 7! - far too many for me to individually code into if statements and separate feeds. Is there a program that will generate the possible feeds for me automatically after I update one of them? Then I could just upload the updated xml files.
Right. So I set up my xml files, say I have one for birthdays, one for deaths, and one for mid life crises. So that is three xml files with three separate links for rss feeds. Now what I want is for people to be able to check off the ones to which they wish to subscribe rather than hitting each one separately. So I would have a form with three checkboxes and a submit button. I could do this with javascript by having 6 separate xml feeds, one for each possible combination. But if I have 4 feeds then I need to set up 24 feeds, and 5 would be 120 possible feed combinations.
So the question becomes, is there some software or library that will either handle this computation for me and crank out RSS mixes/blends similar to what some RSS mixing software seems to do. The problem with the services and software I have seen is that it provides blending for people subscribing to feeds but not for providers. I can see in my head how easily this could be done programmatically even though it would spit out alot of xml and html/javascript.
I guess another way about it would be for them to sign up for multiple feeds simultaneously but I'm not sure if that can be done.
If I am making no sense I apologize. I have never seen this done so it might not be possible. I am just going to go with the page with a bunch of RSS links.
Thanks for everyones responses. I appreciate it.
Just because there are 7 options doesn't mean you need to write 7! if statements. You only need to check if each one of the options is set, and output something appropriately.
So, yes, you need to do this server side. And it's not at all difficult.
Where are you stuck, specifically? Your question is missing a few details.

Resources