How to get Multiple Key Combinations
Hi,
I am trying to get the event for multiple key combinations, ie some thing like "*Ctrl + I + M*" or "*Alt + A + S + D*".
For two key combinations ( like Ctrl+I or Ctrl+M) i am able to get, but for more than two keys combinations, can someone give an idea how to get it.
I tried with both KeyCodeCombination and KeyCharacterCombination.
Below is a quick example to check for the key combination demo.
import javafx.application.Application;
import javafx.event.EventHandler;
import javafx.scene.Scene;
import javafx.scene.control.Label;
import javafx.scene.input.KeyCharacterCombination;
import javafx.scene.input.KeyCode;
import javafx.scene.input.KeyCodeCombination;
import javafx.scene.input.KeyCombination;
import javafx.scene.input.KeyEvent;
import javafx.scene.layout.StackPane;
import javafx.scene.paint.Color;
import javafx.stage.Stage;
public class KeyCombinationDemo extends Application {
Stage stage;
Scene scene;
StackPane root;
public static void main(String[] args) {
Application.launch(args);
@Override
public void start(Stage stage) throws Exception {
this.stage = stage;
root = new StackPane();
root.getChildren().add(new Label("Enter any Key"));
this.scene = new Scene(root, Color.LINEN);
stage.setTitle(this.getClass().getSimpleName());
stage.setWidth(600);
stage.setHeight(600);
stage.setScene(this.scene);
stage.show();
final KeyCombination keyComb1=new KeyCodeCombination(KeyCode.I,KeyCombination.CONTROL_DOWN);
final KeyCharacterCombination keyComb2 = new KeyCharacterCombination("M",KeyCombination.CONTROL_DOWN);
this.scene.addEventHandler(KeyEvent.KEY_RELEASED, new EventHandler<KeyEvent>() {
@Override
public void handle(KeyEvent event) {
if(keyComb1.match(event)){
System.out.println("Ctrl+I pressed");
}else if(keyComb2.match(event)){
System.out.println("Ctrl+M pressed");
}Thanks in Advance.
Regards,
Sai Pradeep Dandem.
Hi John,
Thanks for the prompt response.
I tried the way you suggested and it worked well !! Thanks :)
But, still i am expecting a direct way to handle this. :p
Anyway here is code which i modified accordingly
final String keyCombination1 = "_ALT_E_O";
final String keyCombination2 = "_ALT_E_P";
final String keyCombination3 = "_CONTROL_H";
final StringBuilder key = new StringBuilder();
this.scene.addEventHandler(KeyEvent.KEY_PRESSED, new EventHandler<KeyEvent>() {
@Override
public void handle(KeyEvent event) {
String codeStr = event.getCode().toString();
if(!key.toString().endsWith("_"+codeStr)){
key.append("_"+codeStr);
this.scene.addEventHandler(KeyEvent.KEY_RELEASED, new EventHandler<KeyEvent>() {
@Override
public void handle(KeyEvent event) {
if(key.length()>0){
if(key.toString().equals(keyCombination1)){
System.out.println("Key Combination 1 pressed");
}else if(key.toString().equals(keyCombination2)){
System.out.println("Key Combination 2 pressed");
}else if(key.toString().equals(keyCombination3)){
System.out.println("Key Combination 3 pressed");
key.setLength(0);
});Thanks & Regards,
Sai Pradeep Dandem
Similar Messages
-
Im trying to make a postersize picture collage and I don't know how to get multiple pictues arranged. Someone said I can use the layer option. But Im just not getting it. Please help!
Click File >> Open and select all of your photos
That will add them to the project bin
Then select File >> New >> Blank File
Select background color White (or whatever you prefer) and add your width and height for your final image (set resolution 72 for web usage or 240 to 300 for printing) then click OK
In the project bin click your first photo and drag it up into the main window on top of your new background.
Click on the move tool and click in the center of the photo and drag to arrange it where you want on the background - you can hold down the shift key to maintain original proportions whilst dragging the corner handles of the bounding box to get the size you want.
Do the same with the next photo (drag it up into the main window) and use the move tool to position it. Then continue with each image.
Finally Click Layer >>Flatten image and save as jpeg. (Save as PSD if you want to preserve the layers for editing again)
N.B. as you add images they get dropped in the center. So you need to use the move tool to drag them apart. Click in the middle of one and move it around, and then the others until you get them positioned as you want.
When you click again with the move tool a bounding box appears around the image and you can drag out the corner handles to re-size your photos. Hold down the shift key when dragging the corner handle and that will maintain the proportions of the original.
Finally click Layer >>Flatten Image and save your collage - you may then want to use the crop tool to cut away any surplus white canvas, and then re-save. Click the T tool to add text. -
How to get multiple selected fields in list
Hello all,
I am trying to get multiple selected value from a list but i dont know how to get multiple selected fields from a list though AS3.
Actually i want to pass the selected fields to php, so for that i need to get the selections and send to php.
Thankx..i want to put the selected fields of list in an array through AS3....
actually......i figured it out how to do that...........
Its simple......use
list.selectedItems[index]
and to get the number of items selected......
list.selectedItems.length
simple..... -
How to get multiple records using fn-bea:execute-sql()
Hi,
I created Proxy service(ALSB3.0) to get records from DB table. I have used Xquery function(fn-bea:execute-sql()). Using simple SQL query I got single record, but my table having multiple records. Please suggest how to get multiple records using fn-bea:execute-sql() and how to assign them in ALSB variable.
Regards,
Nagaraju
Edited by: user10373980 on Sep 29, 2008 6:11 AMHi,
Am facing the same issue stated above that I couldnt get all the records in the table that am querying in the Proxyservice.
For example:
fn-bea:execute-sql('EsbDataSource', 'student', 'select Name from StudentList' ) is the query that am using to fetch the records from the table called StudentList which contains more than one records like
Id Name
01 XXX
02 YYY
03 ZZZ
I tried to assign the result of the above query in a variable and while trying to log the variable, I can see the below
<student>
<Name>XXX</Name>
</student>
I want to have all the records from my table in xml format but it's not coming up. I get the value only from the first row of my table.
Please suggest.
regards,
Venkat -
How to get the Key value in the value help?
Hi All,
I am using dropdown by key to display the values from the RFC. I am able to get the text by,
ISimpleValueSet div = wdThis.wdGetContext().getContext().getModifiableTypeOf ("Header.VH_BUnit").getSVServices().getModifiableSimpleValueSet();
return div.getText(wdContext.currentHeaderElement().getVH_BUnit());
Please say how to get the key ?
Thanks & Regards,
MugundhanHi,
Thanks for ur reply. wdContext.currentHeaderElement().getVH_BUnit() is returning the value in the dropdown only.
Consider this line..
return div.getText(wdContext.currentHeaderElement().getVH_BUnit() );
More simillarly return div.gettKey(................); is there. What value should be given inside. if i gave wdContext.currentHeaderElement().getVH_BUnit() means, it sowing "Cannot convert from object to String " error.
So i created an object like this,
Object attributevalue = wdContext.currentHeaderElement().getAttributeValue(IPublicReportrtComp.IHeaderElement.VH__B_UNIT);
But this too not accepting..
Thanks & Regards,
Mugundhan -
How to get the "Key" for Dimension in SSAS.
Hi
How to get the "Key" for Dimension in SSAS.
(Below value is the PPSParameters table XML column value in PPSDatabase in SharePoint.
Below three key values are belongs to "Dimension". I have tried to find the key but I could net get it.)
<NewDataSet>
<UserValues><Key>16A201A9E75128559F947D58E6D187A9</Key></UserValues>
<UserValues><Key>7FBEA449A6ED5606973306445839619E</Key></UserValues>
<UserValues><Key>A8F75F9720817BCD2E1DFC1C1CF1E678</Key></UserValues>
</NewDataSet>
Thanks & Regards
Poomani SankaranTo Be Honest there is not one straight Cmdlet that atleast I have come across
The best way would if you have Lync monitoring server
Using the Lync Server 2013 Monitoring Server
If you have the Monitoring Server role configured in your environment, and for Lync Server 2013 everyone should!, you can use information contained in the LcsCDR database to pull back the last time a user signed in. You can run the following query* to
pull back the user's SIP URI and their last login time:
USE LcsCDR
SELECT dbo.Users.UserUri, dbo.UserStatistics.LastLogInTime
FROM dbo.UserStatistics
JOIN dbo.Users ON dbo.Users.UserId = dbo.UserStatistics.UserId
ORDER BY UserUri
Which produces the following output:
The advantage to using the Monitoring Server to obtain this data is that unlike the information contained in the rtcdyn database, the information from the LcsCDR data will persist even when the user isn't signed into Lync.
To get approx count of users enable for Lync Server in your organisation
Get-CsUser -Filter {Enabled -eq $true} | MeasurE
Please not the above command let will give you an approx number not exact
From the Monitoring report yet the SIP account that signed in and then from count find out how many user havent signed in this is manual task
Hope this is helpful
Please remember, if you see a post that helped you please click ;Vote As Helpful" and if it answered your question please click "Mark As Answer" Regards Edwin Anthony Joseph -
How to get multiple beep sound?
Hi
I want to get multiple beep sounds as output if a comparison condition gives output as true.
Can anyone tell me how to get multiple beep sound?
Solved!
Go to Solution.You could make it more pleasant if you would play a different sound file based on the comparison. (look in the windows\media folder for the sounds used by the OS. Try e.g. c:\windows\media\tada.wav)
Very few people still communicate in morse code.
LabVIEW Champion . Do more with less code and in less time . -
How to get Multiple FLV duration?
How to get Multiple FLV duration in single shot?. Am using Netstream concept.
I have more flv files and taking it via XML. I want to play the multiple flv video in single timeline. For that i need duration of multiple flv in for loop. Is it possible to take without metadata?
-
I use iPhoto and want to know how to get the 'key photo' i select on my McBook Pro to be the same one that gets used on my iPhone 5s when i sync. i also want the events to appear on the iPhone in the same order i have them on my macbook. any ideas there too?
Killerfinch wrote:
My new yahoo account nestles comfortably in iCloud on the mine iPad.
No, your Yahoo account is not in iCloud (which only handles iCloud mail), it is in Yahoo, and the Yahoo mail account is on your iPad.
But the MacBook Pro will have none of it! I write this question now as I fear that I will be totally demented very soon and unable to formulate my thoughts clearly!
Get the correct settings for your account from Yahoo and set it up manually.
By the way, I also find the "password" issue problematical. It seems Apple want my Apple password rather than my eMail password. All very confusing.
That would depend on what you are trying to do. -
How to get multiple measures in measure hierarchy in Essbase Studio
Hi All,
Previously we are using one measure column which will gives the count.Now the current requirement is to get multiple measures in measure hierarchy.
For Example
Measure
Count
SalesCount(count*Sales/10)
CustomerCount(count*customer/10)
In the fact we will be having only column called "count".
So,I created the remaining two user defined dimension elements and applied formula in filters.
When i am using individual dimension element in measure hierarchy the data is coming correct,However when I am combing these three hierarchies under measure hierarchiy I am getting no data.Can someone help me out how to resolve this issue
Thanks,
SatyaBThanks Gleen.
This is how the actual scenerio,currently i am creating a cube for testing domain.
For all defects we will having a column called defect count.Now there are asking a new requirement to add addtional metrics contains sev1open defect,sev2 open defect etc...
So,I created hierarchy like this
Measures(Hierarchy)
Count
SalesMeasure
For this member I returned in filter as ( 'contains'( connection : 'STATUS', "New" ) and 'contains'( 'TESTING_SEVERITY', "2-High" ))
However when I am trying build this individually working fine getting correct data
When I am combining due to overwrite it seems getting no data.Like this I have to create 16 metrics
Is there any other method where I can proceed further to resolve this issue
So,can you help me on this Gleen.Thanks
Regards,
SatyaB -
How to get multiple values from the list
I've a list of an item which I queried it from the database. I also created a button that will takes a selected items from the list when it was clicked. I used javabean to get the data from database.
<% // clicked on Select District Button
Vector vselectedDistrict = new Vector();
Vector vdistrictID = new Vector();
String tmpSelectDistrict = "";
tmpSelectDistrict = request.getParameter("bSelectDistrict");
if(tmpSelectDistrict != null)
// get multiple values from the list
String[] selectedDistrict = request.getParameterValues("usrTDistrict");
vselectedDistrict.clear();
vdistrictID.clear();
if((selectedDistrict != null) && (selectedDistrict.length != 0))
for(int i=0;i<selectedDistrict.length;i++)
vselectedDistrict.addElement(selectedDistrict);
vdistrictID = dbaseInfo.getcurrentDistrictID(nstate,vselectedDistrict);
for(int i=0;i<vdistrictID.size();i++)
out.println("district = " + selectedDistrict[i]); out.println("district ID= " + vdistrictID.get(i).toString());
%>
// get vdistrict from the database here......
<select name="usrTDistrict" size="5" multiple>
<% for(int i = 0; i< vdistrict.size(); i++)
%>
<option value="<%=vdistrict.get(i).toString()%>"><%=vdistrict.get(i).toString()%></option>
<%
%>
</select>
<input type="submit" name="bSelectDistrict" value="Select District">
Lets say the item that i selected from the list is 'Xplace' and I clicked on the Select District button,
what I got is this error message:
org.apache.jasper.JasperException: Unable to convert string 'Xplace' to class java.util.Vector for attribute usrTDistrict: java.lang.IllegalArgumentException: Property Editor not registered with the PropertyEditorManager
So where is going wrong and what the message means?. Any help very much appreciated. ThanksThese are just guesses that might hopefully steer you in directions you haven't looked in yet.
I presume you used triangle brackets (< >) to avoid having the Jive Forum think it was the "italics" tag?
Are you certain this: dbaseInfo.getcurrentDistrictID(nstate,vselectedDistrict);
expects a Vector as its second parameter? And returns a Vector?
I don't believe you've shown how you use the javabean, or its code? Perhaps it should be rewritten to accept an array of strings instead of a Vector? -
How to get multiple selections from jsp page in my servlet
Hello Everyone,
I've a list that allows users to make multiple selections.
<select name=location multiple="multiple">
<option>
All
</option>
<option>
Hyd
</option>
<option>
Dub
</option>
<option>
Mtv
</option>
</select>I want to get the selections made by user in jsp page from my servlet, selections can be multiple too.
ArrayList locList = new ArrayList();
locList = request.getParameter("location");when I do so, I get compilation error as the request returns string type. How do I then get multiple selections made by the user.
Please let me know.For those kind of basic questions it would help a lot if you just gently consult the javadocs and tutorials.
HttpServletRequest API: [http://java.sun.com/javaee/5/docs/api/javax/servlet/http/HttpServletRequest.html]
Java EE tutorial part II: [http://java.sun.com/javaee/5/docs/tutorial/doc/]
Coreservlet tutorials: [http://courses.coreservlets.com/Course-Materials/] -
How to get multiple rows from database table?
hello !
I need to get multiple rows from a OLEDB database table and display them on a table object.
I did "Wrap in subfrom" on the table, set subform of the table to "flowed", and checked "Repeat row for each data item" of Row1 of the table.
But I can get only one row on the table object.
I need your help.
ThanksHi,
best practices when deleting multiple rows is to do this on the business service, not the view layer for performance reasons. When you selected the rows to delete and press submit, then in a managed bean you access thetable instance (put a reference to a managed bean from the table "binding" property") and call getSeletedRowKeys. In JDeveloper 11g, ADF Faces returns the RowKeySet as a Set of List, where each list conatins the server side row key (e.g. oracle.jbo.Key) if you use ADF BC. Then you create a List (ArrayList) with this keys in it and call a method exposed on the business service (through a method activity in ADF) and pass the list as an argument. On the server side you then access the View Object that holds the data and find the row to delte by the keys in the list
Example 134 here: http://blogs.oracle.com/smuenchadf/examples/#134 provides you with the code
Frank -
How to get multiple records from internal table through BDC
PERFORM DYNPRO USING:
'X' 'SAPMM61L' '0500',
' ' 'BDC_OKCODE' '=NEWC',
'X' 'SAPMM61L' '0500',
' ' 'BDC_CURSOR' 'PLPTU-PLWRK(01)',
' ' 'BDC_OKCODE' '=TAKE',
' ' 'PLPTU-PLWRK(01)' '2531'. (2531 is a plant)
This is the recording used to get plant via BDC of MS31.
Using this code i can get only single plant...
If i want to get multiple plants from an internal table,how i can change this code?
Since it is a recording i cant put this code in LOOP..ENDLOOP.
Suggest any method for doing this....
Awaiting for ur reply...Hi,
While recording also record the scroll down button.
The you can place different plant in the BDC using loop and endloop
Regards
Arun -
Hey Guys
I'm trying to find a way to get multiple values using the following method
HttpSession.getAttribute(java.lang.String)
Here's the scenerio. Its a already written application and now i'm trying to make some changes. earlier in the jsp page a combo box was used and value was retrieved in the servlet using the getAttribute method of Session. Now I'm using a html multiple selection list and have to retrieve all the values selected in the list in the servlet. Can anyone please suggest me how to do that. HTTPRequest class has a method getParameterValues which will let me do that but i have to do is using HTTPSession.
Thanks for your time to read thisI'm not sure what you are trying to do. You can only use session.getAttribute to retrieve something that has already been stored in the session with a previous setAttribute. If you need to store multiple values under one attribute name using setAttribute, you can store an array, or an ArrayList or whatever type of Collection you want. The request.getParameterValues method is the only way you can retrieve form parameters than can have multiple values. If the servlet hasn't already processed these parameters and put them into the session for you, you have to use request.getParameterValues.
Maybe you are looking for
-
How to use in Firefox, install is ok.
-
Error starting batch job through Data Services Web Service
I have a customer running our web service interface to BODS. We have not been able to successfully start any jobs due to the following error: Services sent the request to start batch job 'Job_Test_Web_Services' on server 'null'. The Job Server refuse
-
Time machine backup error in Mavericks
I"m getting backup errors in Mavericks when it tries to back up to the Backups.backupdb folder in my 3TB external backup drive. This happens even when I turn Time Machine off! This is the error I'm getting (taken from the console) when I manually s
-
Plz provide if sum new TCodes are there in ECC 6.0 Thanks in advance Regards
-
Where are Automator workflows in Snow Leopard?
I have created a number of workflows in Leopard, and the ones I created for Finder were always available via contectual menus (right click on file). I cannot get how to use them in Snow Leopard. The ones I moved over don't show up at all.