This might seem like a very trivial problem but I have spent quite some time on this without finding a viable solution.
Nokia devices have a central select button,which allows us to assign soft keys to it.
According to my requirement, I need to assign a specific command as the soft key. For instance it might be "Play" on one screen and "Select" on other. Note that I have a default select command already set using:
setDefaultCommand((Command) v.elementAt(v.size() - 1));
which is always the first command in the menu at the right and is invoked when central select button is pressed.
From what I read, the way commands are assigned to each soft key is very arbitrary and varies from device to device. Since I have a default command already set, my problem can be solved in two ways:
1.By setting a soft key to the central button using
Display.getInstance().setThirdSoftButton(true);
I tried this, but the way commands are assigned is very random. Also,there is a default command "Select" always added to the menu. Is there a way to customize this so that a very specific command is shown above the central button?
2.By just assigning a label so that the default command set as above is displayed in the central soft key.
The 3rd softbutton mode has default implementations for many focusable components but not for labels. You can customize its label by invoking setSelectCommandText(String) on the component.
I suggest that rather than using a label for a center command just use a button and set it's UIID to Label if you want it to appear as a standard label.
Related
In my application, we have various types of dropdown GWT components used. I am using the JAWS latest version for the accessibility.
JAWS have some default keyboard manager setting for the "Downarrow" which perform the respective function. In my application, when the dropdown is opened, on pressing the "downarrow" JAWS is reading the list of values in dropdown one by one along with the respective highlighted thing.
But on the "enter" keypress, the selection of that particular value is not happening.
When in turned-off the JAWS, the down arrow perform its respective function of moving to the next record and on Enter click, that particular value is selected in dropdown.
somewhere JAWS default settings is overridden by the application setting. I tried various attributes like "aria-labelledby", "role - combobox, menuitem". but no luck. Could somebody help on this?
By default, the up/down arrow keys when JAWS is running will move you to the next element in the DOM. If that element is an interactive component that uses the up/down key for interaction (such as a radio), then JAWS will automatically switch to "forms mode" (kind of like a mini application mode) so that the arrow keys can be interpreted by the compoent instead of the screen reader. (The user has options on whether automatic forms mode is turned on). To get out of forms mode, press Escape.
If you have your own custom component that behaves like a native component, as long as you have the proper ARIA roles and attributes (such as role="radiogroup" and role="radio"), JAWS should switch to forms mode automatically.
See https://www.freedomscientific.com/Support/TechnicalSupport/Bulletin/1665 for more details. The title of that article talks about role="applications" and role="document" but it talks about forms mode and the Enter key.
I previously used rectangular selection mode on my Java project in eclipse, but after doing an Android project, ALT+SHIFT+A now opens this box instead:
How can I get the old behaviour back?
If a plugin messes with your keybindings, you can always go to:
Window > Preferences > General > Keys
There, you can search for Toggle Block Selection (which is what I think you mean by "rectangular selection") and either assign a different key combination to it, or change it back to Alt+Shift+A and (if you want) assign a different combination to whatever had replaced it.
When I edit code in the middle of statements, it replaces the current code around it. I cannot find a way to replace this with a normal cursor that only inserts data instead of replacing it. Is that functionality possible in Eclipse?
The problem is also identified in your status bar at the bottom:
You are in overwrite mode instead of insert mode.
The “Insert” key toggles between insert and overwrite modes.
It sounds like you hit the "Insert" key .. in most applications this results in a fat (solid rectangle) cursor being displayed, as your screenshot suggests. This indicates that you are in overwrite mode rather than the default insert mode.
Just hit the "insert" key on your keyboard once more... it's usually near the 'delete' (not backspace), scroll lock and 'Print Screen' (often above the cursor keys in a full size keyboard.)
This will switch back to insert mode and turn your cursor into a vertical line rather than a rectangle.
You might have pressed 0 (also used for insert, shortcut INS) key, which is on the right side of your right scroll button. To solve the problem, just press it again or double click on 'overwrite'.
This problem, in my case, wasn't related to the Insert key. It was related to Vrapper being enabled and editing like Vim, without my knowledge.
I just toggled the Vrapper Icon in Eclipse top bar of menus and then pressed the Insert Key and the problem was solved.
Hopefully this answer will help someone in the future.
In my case, it's related to the Toggle Vrapper Icon in the Eclipse.
If you are getting the bold black cursor, then the icon must be enabled. So, click on the Toggle Vrapper Icon to disable. It's located in the Eclipse's Toolbar. Please see the attached image for the clarity.
This issue can happen not only in eclipse but also in any of the text-editor.
On windows systems, windows-10 in my case, this issue arose when the shift and insert key was pressed in tandem unintentionally which takes the user to the overwrite mode.
To get back to insert mode you need to press shift and insert in tandem again.
I am writing a Java application for digitizing a group of documents in the office that I am working in and I am wanting to check if 5 textfields are populated and 4 combobox fields as well before the save button is enabled (I have it checking if i press a button (that happily says "Check"), but i would much rather have it auto-check to see if they are populated or if they are null).
If it makes a difference i am using NetBeans for this project.
Basically I need the fields to have something in them before the document can be saved.
Any and all help will be greatly appreciated as this is the final step in creating this application... :D
Thanks,
Erik
There are two ways (I can think of):
1- Put a listener on each field, this listener will be triggered when the field is populated. Inside the listener increment a counter for example, or set a flag. If all flags are set or if the counter reaches (9 in your example) then enable the button.
2- Enable the Save button, but call a validate() method before doing the Save action. Any unpopulated field will have a red mark beside it (shown by validating) like in web applications.
I have a JCheckBox that should not be checked by the user when a certain other field is empty.
So now I want to have an error popup and then reset the checkbox (I've considered disabling the checkbox, but the connection to the other field is non-obvious, and a tooltip text IMO not visible enough).
What's the correct way to do that in Swing? Through a PropertyVetoException? Where do I throw it and where do I catch it? My first (probably ugly) idea would be to add a ChangeListener that itself shows the popup and resets the value.
Edit: The question is about Nikki (screenshot below), an app I am developing which geotags images and exports them to Google Earth's KMZ format. The checkbox is used to select the images to include in the export. But this requires the images to be gotagged first (which in turn requires either a timestamp, or manual assignment). I don't think this requirement can be made obvious through the UI layout.
(source: brazzy.de)
I would simply disable the check box and add a message explaining why the option is not available. A nice way to show the message is to display a mini exclamation mark next to the check box and put the message in a tooltip.
Poping up an exception often feels wrong because users don't read error messages. For most users an error message popup means that the application did something wrong, in your case it's the normal behavior.
Edit if you insist on letting the check box enabled, another way to show the user that some info is missing would be to flash the missing data. Eg. if latitude and longitude are missing and the user clicks on export, set a red background onto these fields for a just a second. This will clearly show the user what's missing.
In this screen, don't you want to put the mouse over the red circle to understand what's going on?
validation http://www.vogella.de/articles/EclipseDataBinding/images/validation10.gif
I don't think the Export JCheckBox should be disabled at all. Instead, the Export JButton itself should examine the current export list and display any anomalous entries in a way that allows navigation to a chosen photograph. If all entries are correct, Export would proceed as usual.
Addendum: It think you are right to keep the interface as non-modal as possible. My model for this would be unsaved files when exiting an editor or uncommitted changes when closing a project in an IDE.
If that's a status line at the bottom of the window, you might indicate the number of photographs currently selected for export, adding a count if any still need geocoding.
The field should simply be allowed to disable the checkbox. If the coupling is unintuitive then the GUI layout may have to be reconsidered.
EDIT: I ran it from your page, and I believe the issue here is that you actually have a third and fourth step in addition to select folder, select images. The third step is validate image, and fourth is select images for export. I think your problem is that this is not clearly conveyed in the current layout, and that reflects in your question.
I would suggest that you create a separate column containing the checkbox for each image, and that THAT checkbox is disabled until the image passes validation (step 3). Perhaps with an explanatory text in the column about why the image hasn't passed yet.