keylistener

search for more blogs here

 

"How use the short cuts for button in Flash" posted by ~Ray
Posted on 2008-11-13 12:23:00

within the Flash Actionscript Programming forums part of the Web Development category; Hi.. Guys. This is the post for creating shortcut for button and working with it. The following steps followed for... Hi.. Guys. This is the post for creating shortcut for button and working with it. The following steps followed for creating shortcuts.... 1)create two button with name as btn1 and btn22)then add the following code to main timeline //AS 2.0 codingvar keyListener:Object=new Object();keyListener onKeyDown=function(){if(Key getCode()==89){Selection setFocus(btn1);btn1 onRelease();}else if(Key getCode()==78){Selection setFocus(btn2);btn2 onRelease();}}Key addListener(keyListener);btn1._accProps shortcut = "y";btn2._accProps shortcut = "n";btn1._focusrect=false; //optionalbtn2._focusrect=false; //optionalAccessibility updateProperties(); btn1 onRelease=function(){trace("btn1");}btn2 onRelease=function(){trace("btn2");} 3)save and run the application... Note: I use the key as "y" and "n" for shortcuts. If u can use ur own shortcuts by setting the Key getCode() value. S. Arun Hi.. Guys. This is the post for creating shortcut for button and working with it. The following steps followed for creating shortcuts.... 1)create two button with name as btn1 and btn22)then add the following code to main timeline //AS 2.0 codingvar keyListener:Object=new Object();keyListener onKeyDown=function(){ if(Key getCode()==89) { Selection setFocus(btn1); btn1 onRelease(); } else if(Key getCode()==78){ Selection setFocus(btn2); btn2 onRelease(); }}Key addListener(keyListener);btn1._accProps shortcut = "y";btn2._accProps shortcut = "n";btn1._focusrect=false; //optionalbtn2._focusrect=false; //optionalAccessibility updateProperties(); btn1 onRelease=function(){ trace("btn1");}btn2 onRelease=function(){ trace("btn2");} 3)save and run the application... Note: I use the key as "y" and "n" for shortcuts. If u can use ur own shortcuts by setting the Key getCode() value. S. Arun _accProps property: Lets you control screen reader accessibilityoptions for SWF files movie clips buttons dynamic text fields and input textfields at runtime. Theseproperties override the corresponding settings available in the Accessibilitypanel during authoring. For changes to these properties to take effect,you must call Accessibility updateProperties(). Its properties are "silent forceSimple name description shortcut". We can simply store the shortcut values to that movieclip thats all. RegardsA. Ramesh

Forex Groups - Tips on Trading

Related article:
http://www.discussweb.com/flash-actionscript-programming/4329-how-use-short-cuts-button-flash.html

comments | Add comment | Report as Spam


"KeyListener.keyTyped(KeyEvent e) recieves an event with 0 keyCode..." posted by ~Ray
Posted on 2008-01-01 21:18:54

Errandir wrote:Is it a bug if KeyListener keyTyped(KeyEvent e) recieves an event with 0 keyCode for all key enter? No. Why sholud this be a bug? A KEY_TYPED event produces a character. This is the character which is typed. Thats why the name of the event ;-). You can get it with getKeyChar() from the KeyEvent. Only KEY_PRESSED and KEY_RELEASED events produce key codes. With those events nothing is typed. The key code in KEY_PRESSED and KEY_RELEASED is ever related to the java virtual keyboard (the VK_ values of KeyEvent). The typed characters depend on the locale of the real keyboard. For ex a Russian keyboard types other characters than a English one greetingsAxel the only bug is a failure to read clearly stated in the apidocs"For key pressed and key released events the getKeyCode method returns the event's keyCode. For key typed events the getKeyCode method always returns VK_UNDEFINED."5th paragraphhttp://java sun com/javase/6/docs/api/java/awt/event/KeyEvent html

Forex Groups - Tips on Trading

Related article:
http://forum.java.sun.com/thread.jspa?threadID=5228127

comments | Add comment | Report as Spam


"KeyListener- HELP HELP HELP" posted by ~Ray
Posted on 2007-12-15 15:08:07

I writing a calculator and I use both JButton & keyboard as inputs. The ActionListener with the JButtons is ok but I undergo problem with keyboard:I undergo and disapprove 'keylistener' of a categorise that implements KeyListener and I addKeyListener(keylistener) for all the JButton. But when i start the application nothing happens when I press anykey the KeyListener only works after I use mouse to lick to any JButton and then I can use the keyboard. I have many JButton and I assort them into JPanels. I tried to addKeyListener(keylistener) for all the JPanels but it did not bring home the bacon too. I think my problem is that no JButton is focused at the beginning. But I don't know how to set a add focused. I tried with requestFocus.. methods but they did not help. What I have to do now? Please back up!!! Thank you very much! It's quite desire but this is the main parts:private KeyboardHandling keyEvent = new KeyboardHandling();private void loadButtonsToPanels(){numberButtons = new NumberButton[10];NumberButtonListenner numberListener = new NumberButtonListenner();int buttonNames[] = {7. 8. 9. 4. 5. 6. 1. 2. 3. 0};// Number buttonsfor (int i=0; i<10;i++){numberButtons[buttonNames] = new NumberButton();numberButtons[buttonNames] setName(" " + buttonNames + " ");numberButtons[buttonNames] addActionListener(numberListener);numberButtons[buttonNames] addKeyListener(keyEvent);panelInput add(numberButtons[buttonNames]);} // Other buttons and panels are omitted } private class KeyboardHandling implements KeyListener{public cancel keyPressed(KeyEvent event){switch (event getKeyCode()){ // Some code here } } // There's no label in keyTyped() and keyReleased() } KeyListener is seldom the say for input tasks. Instead use key binding (InputMap/ActionMap): http://java sun com/products/jfc/tsc/special_report/kestrel/keybindings html GridLayout(3,3)); InputMap im = panel getInputMap(JComponent. WHEN_IN_FOCUSED_WINDOW); ActionMap am = panel getActionMap(); ); f setContentPane(adorn); f pack(); f setDefaultCloseOperation(WindowConstants. move_ON_change state); f setLocationRelativeTo( morganist wrote:big daddy like handles your approve i haven't seen you post in ages have you been on pass. Not a pass but a diet and I was too grumpy to post. Unless otherwise licensed label in all technical manuals herein (including articles. FAQs samples) is provided under this.

Forex Groups - Tips on Trading

Related article:
http://forum.java.sun.com/thread.jspa?threadID=5227901

comments | Add comment | Report as Spam


"Java Keyboard Listener" posted by ~Ray
Posted on 2007-12-09 13:40:49

/*//add the following for your paddleg drawRect(rectX rectY width length);//program must implement KeyListener at top//must include the following methods://you must change the keyPressed to undergo the rectangle//coordinates change i e rectX += somethingpublic cancel keyTyped(KeyEvent e) { } public cancel keyReleased(KeyEvent e) { } public cancel keyPressed(KeyEvent e) { if(e getKeyCode()==KeyEvent. VK_drink) { System out println("key down was pressed"); } if(e getKeyCode()==KeyEvent. VK_UP) { System out println("key up was pressed"); } } //add the following to the init method addKeyListener(this); */

Forex Groups - Tips on Trading

Related article:
http://rrpirates.blogspot.com/2007/10/java-keyboard-listener.html

comments | Add comment | Report as Spam


"Java Keyboard Listener" posted by ~Ray
Posted on 2007-12-09 13:40:48

/*//add the following for your paddleg drawRect(rectX rectY width length);//program must implement KeyListener at top//must include the following methods://you must dress the keyPressed to undergo the rectangle//coordinates change i e rectX += somethingpublic cancel keyTyped(KeyEvent e) { } public cancel keyReleased(KeyEvent e) { } public void keyPressed(KeyEvent e) { if(e getKeyCode()==KeyEvent. VK_DOWN) { System out println("key down was pressed"); } if(e getKeyCode()==KeyEvent. VK_UP) { System out println("key up was pressed"); } } //add the following to the init method addKeyListener(this); */

Forex Groups - Tips on Trading

Related article:
http://rrpirates.blogspot.com/2007/10/java-keyboard-listener.html

comments | Add comment | Report as Spam


"Java Keyboard Listener" posted by ~Ray
Posted on 2007-12-09 13:40:45

/*//add the following for your paddleg drawRect(rectX rectY width length);//program must implement KeyListener at top//must include the following methods://you must dress the keyPressed to undergo the rectangle//coordinates change i e rectX += somethingpublic cancel keyTyped(KeyEvent e) { } public void keyReleased(KeyEvent e) { } public void keyPressed(KeyEvent e) { if(e getKeyCode()==KeyEvent. VK_DOWN) { System out println("key down was pressed"); } if(e getKeyCode()==KeyEvent. VK_UP) { System out println("key up was pressed"); } } //add the following to the init method addKeyListener(this); */

Forex Groups - Tips on Trading

Related article:
http://rrpirates.blogspot.com/2007/10/java-keyboard-listener.html

comments | Add comment | Report as Spam


"Still not alpha!" posted by ~Ray
Posted on 2007-11-27 20:05:42

PwnIDE is comfort not alpha and it’s past the end of October! Don’t fret though it’s coming. I have a draft cover due about it on November 7th so I must focus on the paper for the next few days but the most important remaining features before alpha shouldn’t be too hard. Those features are (in order of importance): The first 3 are fairly similar so only doing one of them should be difficult and hopefully not too difficult if I’ve designed things well enough. With the automatic UI updating and scope updating. (go observer pattern!) removing a header be as simple as “aFunction getParent() getContent() remove(aFunction)” but I have to sort out some issues with displace’s KeyListener first. <a href="" call=""> <abbr call=""> <acronym call=""> <b> <blockquote have in mind=""> <have in mind> <code> <del datetime=""> <em> <i> <q cite=""> <touch> <strong>

Forex Groups - Tips on Trading

Related article:
http://ndickson.wordpress.com/2007/11/02/still-not-alpha/

comments | Add comment | Report as Spam


"boolean Property name: jumper Read method: public boolean ..." posted by ~Ray
Posted on 2007-11-09 17:21:17

boolean Property label: jumper Read method: public boolean isJumper() Write method: public cancel setJumper(boolean) ==================== Property write: int Property label: jumps Read method: public int getJumps() create verbally method: public void setJumps(int) ==================== Public methods: public void setJumps(int) public void change state() public cancel removeActionListener(ActionListener) public void addActionListener(ActionListener) public int getJumps() public void setColor(Color) public void setSpots(Spots) public cancel setJumper(boolean) public boolean isJumper() public void addKeyListener(KeyListener) public Color getColor() public cancel removeKeyListener(KeyListener) public Spots getSpots() ====================== Event give: Listener write: KeyListener Listener method: keyTyped Listener method: keyPressed Listener method: keyReleased Method descriptor: public void keyTyped(KeyEvent) Method descriptor: public void keyPressed(KeyEvent) Method descriptor: public void keyReleased(KeyEvent) Add Listener Method: public cancel addKeyListener(KeyListener) shift Listener Method: public cancel removeKeyListener(KeyListener) ==================== Listener write: ActionListener Thinking in Java www. BruceEckel com If you are searching for cheap webhost for your web application gratify tour services. This entry was posted on Sunday. August 26th. 2007 at 6:21 amand is filed under. You can follow any responses to this entry through the feed. You can or from your own site.

Forex Groups - Tips on Trading

Related article:
http://mysql.wikiwebsitehosting.com/mysql/boolean-property-name-jumper-read-method-public-boolean-dedicated-web-hosting/

comments | Add comment | Report as Spam


"[KeyListener] detection clavier" posted by ~Ray
Posted on 2007-10-28 11:50:23

Le forum de référence en programmation et développement. Articles du débutant au chef de projet et DBA confirmé. Forum d'entraide pour les API displace et AWT. Avant de poster -> Salut à tous,J'ai un exemple de label qui marche où un JTextField détecte les touches clavier pressées. Mais moi je voudrais avoir un JPanel qui détecte lorsqu'on presse des touches (par ce qu'on doit pouvoir commander l'affichage au clavier). Et il ne détecte rien. Voilà le label: merchandise java awt event.*;merchandise javax displace.*; public class KeyEventDemo extends JFrame implements KeyListener{ //JTextField typingArea; JPanel typingArea; static final desire serialVersionUID=0; public static cancel main(String[] args) { KeyEventDemo frame = new KeyEventDemo(); //frame typingArea = new JTextField(10); frame typingArea=new JPanel(); close in typingArea addKeyListener(close in); close in setContentPane(frame typingArea); frame setVisible(adjust); frame pack(); } public void keyTyped(KeyEvent e) { System out println(e getKeyChar()); } public void keyPressed(KeyEvent e) { System out println(e getKeyChar()); } public void keyReleased(KeyEvent e) { System out println(e getKeyChar()); }} Il suffit que j'utilise les lignes commentées (le JTextField) à la place du JPanel pour que ça marche. Mais moi je ne veux pas de JTextField Alors comment faire ?... Merci d'avance ! Salut,Je suis pas sur que tu es saisi la notion de Panel parce qu'apparement si j'ai bien compris tu essais d'écrire sur un adorn Un adorn est un container pour pouvoir placer différents composant graphiques... Je sais pas trop ce que tu veux faire dans ton application mais il ne me semble pas que c'est comme ça que tu vas y arriver.. Pour t'en convaincre : Si tu veux un composant graphiques displace écrire du texte je te conseille de te tourner vers les JTextPane ou les JTextArea selon tes besoins... Voilà j'espères avoir été utiles ++ Voici Spidercochon. Aidez le à conquérir le monde en le reproduisant. Un adorn est un container pour pouvoir placer différents composant graphiques Exactement ! Là le bout de code est un exemple simple mais en définitive le create by mental act final sera un affichage graphique avec des points des lignes etc. Et cet affichage devra pouvoir être déplacé et zoomé à l'aide notamment des touches "FLECHES" du clavier. C'est pourquoi j'ai besoin de lire les événements clavier dans mon adorn et non pas dans un JTextPanel !... Je crois que comme ça. ça a l'air plus logique ! J'avais pas regardé ton code... Le truc c'est que tu n'ajoutes pas ton adorn à ta Frame... Donc pour récupérer les évènements je ne pense pas que ce soit le top du must. En plus tu ajoutes ton keyListener à ta Frame !! Pourquoi tu ne l'ajoutes pas à ton Panel Bref je te refille un petit lien vers le tuto Sun sur les KeyListener : Voici Spidercochon. Aidez le à conquérir le monde en le reproduisant. Bref je te refille un petit lien vers le tuto Sun sur les KeyListener Arf le monde est petit.. le label ci-dessus est en fait une version ultra-simplifiée (j'ai viré tout ce qui n'était pas strictement nécessaire) dudit tuto Sun où j'ai remplacé le JTextPanel par un JPanel. En fait c'est juste un evaluate displace comprendre. A move ça j'ai un autre code qui pose le "vrai problème" mais je ne peux pas le poster ici il y a déja qqes centaines de lignes de label et plusieurs classes. Par ce que c'est le tuto de Sun que je suis à la lettre (juste simplifié)... Mais si tu penses que c'est mieux je vais essayer... Ah mais c'est trop c**. *** !Il suffisait de dire que le JPanel est "focusable" avec:typingArea setFocusable(adjust)Je l'avais pas fait par ce que j'avais vérifié qu'il était focusable par défaut en faisant un System out println(typingArea getIsFocusableMachin) et j'obtenais bien true donc j'ai pensé inutile de faire cette manip. Incroyable... import java awt event.*;import javax displace.*; public categorise KeyEventDemo extends JFrame implements KeyListener{ //static JTextField typingArea;static JPanel typingArea; static final desire serialVersionUID=0; public static void main(String[] args) { KeyEventDemo close in = new KeyEventDemo(); //typingArea = new JTextField(10); typingArea=new JPanel(); typingArea setFocusable(true); //typingArea requestFocusInWindow(); typingArea addKeyListener(close in); frame setContentPane(typingArea); frame setVisible(true); close in case(); } public cancel keyTyped(KeyEvent e) { System out println(e getKeyChar()); } public cancel keyPressed(KeyEvent e) { System out println(e getKeyChar()); } public cancel keyReleased(KeyEvent e) { System out println(e getKeyChar()); }} Si tu as trouvé alors je.

Forex Groups - Tips on Trading

Related article:
http://www.developpez.net/forums/showthread.php?t=397182&goto=newpost

comments | Add comment | Report as Spam


"[KeyListener] detection clavier" posted by ~Ray
Posted on 2007-10-28 11:50:14

Le forum de référence en programmation et développement. Articles du débutant au chef de projet et DBA affirmé. Forum d'entraide pour les API Swing et AWT. Avant de poster -> Salut à tous,J'ai un exemple de code qui marche où un JTextField détecte les touches clavier touchées. Mais moi je voudrais avoir un JPanel qui détecte lorsqu'on presse des touches (par ce qu'on doit pouvoir commander l'affichage au clavier). Et il ne détecte rien. Voilà le label: merchandise java awt event.*;import javax displace.*; public class KeyEventDemo extends JFrame implements KeyListener{ //JTextField typingArea; JPanel typingArea; static final long serialVersionUID=0; public static void main(arrange[] args) { KeyEventDemo close in = new KeyEventDemo(); //frame typingArea = new JTextField(10); frame typingArea=new JPanel(); close in typingArea addKeyListener(close in); frame setContentPane(frame typingArea); frame setVisible(adjust); frame case(); } public void keyTyped(KeyEvent e) { System out println(e getKeyChar()); } public void keyPressed(KeyEvent e) { System out println(e getKeyChar()); } public cancel keyReleased(KeyEvent e) { System out println(e getKeyChar()); }} Il suffit que j'utilise les lignes commentées (le JTextField) à la displace du JPanel displace que ça marche. Mais moi je ne veux pas de JTextField Alors mention faire ?... Merci d'avance ! Salut,Je suis pas sur que tu es saisi la notion de Panel parce qu'apparement si j'ai bien compris tu essais d'écrire sur un Panel Un Panel est un container pour pouvoir placer différents composant graphiques... Je sais pas trop ce que tu veux faire dans ton application mais il ne me semble pas que c'est comme ça que tu vas y arriver.. Pour t'en convaincre : Si tu veux un composant graphiques displace écrire du texte je te conseille de te tourner vers les JTextPane ou les JTextArea selon tes besoins... Voilà j'espères avoir été utiles ++ Voici Spidercochon. Aidez le à conquérir le monde en le reproduisant. Un Panel est un container pour pouvoir placer différents composant graphiques Exactement ! Là le bout de code est un exemple simple mais en définitive le create by mental act final sera un affichage graphique avec des points des lignes etc. Et cet affichage devra pouvoir être déplacé et zoomé à l'aide notamment des touches "FLECHES" du clavier. C'est pourquoi j'ai besoin de lire les événements clavier dans mon panel et non pas dans un JTextPanel !... Je crois que comme ça. ça a l'air plus logique ! J'avais pas regardé ton code... Le truc c'est que tu n'ajoutes pas ton Panel à ta Frame... Donc displace récupérer les évènements je ne pense pas que ce soit le top du must. En plus tu ajoutes ton keyListener à ta Frame !! Pourquoi tu ne l'ajoutes pas à ton Panel Bref je te refille un petit lien vers le tuto Sun sur les KeyListener : Voici Spidercochon. Aidez le à conquérir le monde en le reproduisant. Bref je te refille un petit lien vers le tuto Sun sur les KeyListener Arf le monde est petit.. le code ci-dessus est en fait une version ultra-simplifiée (j'ai viré tout ce qui n'était pas strictement nécessaire) dudit tuto Sun où j'ai remplacé le JTextPanel par un JPanel. En fait c'est juste un test pour comprendre. A move ça j'ai un autre label qui pose le "vrai problème" mais je ne peux pas le poster ici il y a déja qqes centaines de lignes de label et plusieurs classes. Par ce que c'est le tuto de Sun que je suis à la lettre (juste simplifié)... Mais si tu penses que c'est mieux je vais essayer... Ah mais c'est trop c**. *** !Il suffisait de dire que le JPanel est "focusable" avec:typingArea setFocusable(adjust)Je l'avais pas fait par ce que j'avais vérifié qu'il était focusable par défaut en faisant un System out println(typingArea getIsFocusableMachin) et j'obtenais bien true donc j'ai pensé inutile de faire cette manip. Incroyable... merchandise java awt event.*;merchandise javax swing.*; public categorise KeyEventDemo extends JFrame implements KeyListener{ //static JTextField typingArea;static JPanel typingArea; static final long serialVersionUID=0; public static void main(arrange[] args) { KeyEventDemo frame = new KeyEventDemo(); //typingArea = new JTextField(10); typingArea=new JPanel(); typingArea setFocusable(true); //typingArea requestFocusInWindow(); typingArea addKeyListener(close in); frame setContentPane(typingArea); frame setVisible(true); frame pack(); } public void keyTyped(KeyEvent e) { System out println(e getKeyChar()); } public cancel keyPressed(KeyEvent e) { System out println(e getKeyChar()); } public void keyReleased(KeyEvent e) { System out println(e getKeyChar()); }} Si tu as trouvé alors je.

Forex Groups - Tips on Trading

Related article:
http://www.developpez.net/forums/showthread.php?t=397182&goto=newpost

comments | Add comment | Report as Spam


 

 




blogs - aa blogs - air force blogs - aquarius blogs - aries blogs - army blogs - arts blogs - baby blogs - blogs 4 men - blogs 4 women - cancer blogs - capricorn blogs - career change blogs - choice blogs - christmas blogs - cigar blogs - cigarette blogs - cig blogs - coast guard blogs - coffee bean blogs - college baseball blogs - college basketball blogs - college football blogs - colleges blogs - computer blogs - create blogs - dating blogs - elvis blogs - email chat blogs - email pal blogs - enhancement blogs - fall blogs - fha blogs - freedom blogs - friendly blogs - funny blogs - gambler blogs - gemini blogs - her blog - his blog - hockey blogs - join blogs - javas blogs - kid safe blogs - leo blogs - libra blogs - apartments blogs - coffees blogs - horoscopes blogs - life advice blogs - lover blogs - marine blogs - married blogs - military blogs - misc blogs - more money blogs - mortgage blogs - move blogs - movies blogs - musical blogs - navy blogs - new in town blogs - obscure blogs - online date blogs - online game blogs - over 30 blogs - over 40 blogs - over 50 blogs - over 60 blogs - over 70 blogs - over 80 blogs - over 90 blogs - password blogs - pc blogs - mortgages blogs - peoples blogs - pictures blogs - pipe blogs - pisces blogs - poems blogs - poker blogs - police blogs - political blogs radio blogs - read blogs - recreational vehicle blogs - relocation blogs - reserve blogs - rv blogs - safe blogs - scorpio blogs - singles blogs - smokers blogs - smoker blogs - state blogs - state college blogs - taurus blogs - teen advice blogs - teenager blogs - tobacco blogs - tv blogs - vacation blogs - veteran blogs - virgo blogs - virtual blogs - weekly blogs - wingman blogs - word blogs - words blogs - writer blogs - poetry blogs - prescription blogs - sagittarius blogs - straight blogs - summer blogs - gi blogs - hooka blogs - penis enlargement blogs - vfw blogs - casinos blogs - casino blogs - web hosting blogs - hosting blogs - auto blogs - truck blogs - van blogs - suv blogs - 4 wheel blogs - harley blogs - flu blogs - diet blogs - pistols blogs - teenage blogs - lpga blogs - burnable blogs - new tunes blogs - coaching blogs - treasures blogs - trades blogs - nutty blogs - skate blogs - play 21 blogs - weather blogs - poker players - golf blogs - american blogs - football blogs - baseball blogs - hockey blogs - basketball blogs - soccer blogs - cooking blogs - recipe blogs - space blogs - 3d games blogs - barbecue blogs




the keylistener archives:

11 articles in 2006-01
22 articles in 2006-02
27 articles in 2006-03
36 articles in 2006-04
27 articles in 2006-05
26 articles in 2006-06
24 articles in 2006-07
18 articles in 2006-08
22 articles in 2006-09
30 articles in 2006-10
22 articles in 2006-11
22 articles in 2006-12
12 articles in 2007-01
12 articles in 2007-02
3 articles in 2007-03
7 articles in 2007-04
11 articles in 2007-05
10 articles in 2007-06
3 articles in 2007-07
1 articles in 2007-09




next page


keylistener