Forum |  HardWare.fr | News | Articles | PC | S'identifier | S'inscrire | Shop Recherche
5392 connectés 

 

Sujet(s) à lire :
    - Who's who@Programmation
 

 Mot :   Pseudo :  
  Aller à la page :
 
 Page :   1  2  3  4  5  ..  2269  2270  2271  ..  26992  26993  26994  26995  26996  26997
Auteur Sujet :

[blabla@olympe] Le topic du modo, dieu de la fibre et du monde

n°599564
nraynaud
lol
Posté le 30-12-2003 à 20:57:28  profilanswer
 

Reprise du message précédent :

ce que je préfère, c'est le Class en bas à gauche. Il a rendu son tablier le reverse ?


---------------
trainoo.com, c'est fini
mood
Publicité
Posté le 30-12-2003 à 20:57:28  profilanswer
 

n°599567
skeye
Posté le 30-12-2003 à 20:59:48  profilanswer
 

(dites, votre pseudo apparait toujours en bleu dans le forum pour vous, ou bien noir moche comme les autres?)


---------------
Can't buy what I want because it's free -
n°599573
drasche
Posté le 30-12-2003 à 21:02:19  profilanswer
 

skeye a écrit :

(dites, votre pseudo apparait toujours en bleu dans le forum pour vous, ou bien noir moche comme les autres?)


noir moche.


---------------
Whichever format the fan may want to listen is fine with us – vinyl, wax cylinders, shellac, 8-track, iPod, cloud storage, cranial implants – just as long as it’s loud and rockin' (Billy Gibbons, ZZ Top)
n°599579
skeye
Posté le 30-12-2003 à 21:05:41  profilanswer
 

drasche a écrit :


noir moche.


:/
C'était pratique, pourtant!:o


---------------
Can't buy what I want because it's free -
n°599581
nraynaud
lol
Posté le 30-12-2003 à 21:06:14  profilanswer
 

kadreg a écrit :


 
Il semblerais que non :  
 

Code :
  1. C:\>javap javax.swing.JMenuItem
  2. Compiled from JMenuItem.java
  3. public class javax.swing.JMenuItem extends javax.swing.AbstractButton implements
  4. javax.accessibility.Accessible, javax.swing.MenuElement {
  5.     static java.lang.Class class$javax$swing$JInternalFrame;
  6.     static java.lang.Class class$javax$swing$event$MenuDragMouseListener;
  7.     static java.lang.Class class$javax$swing$event$MenuKeyListener;
  8.     public javax.swing.JMenuItem();
  9.     public javax.swing.JMenuItem(javax.swing.Icon);
  10.     public javax.swing.JMenuItem(java.lang.String);
  11.     public javax.swing.JMenuItem(javax.swing.Action);
  12.     public javax.swing.JMenuItem(java.lang.String,javax.swing.Icon);
  13.     public javax.swing.JMenuItem(java.lang.String,int);
  14.     void initFocusability();
  15.     protected void init(java.lang.String, javax.swing.Icon);
  16.     public void setUI(javax.swing.plaf.MenuItemUI);
  17.     public void updateUI();
  18.     public java.lang.String getUIClassID();
  19.     public void setArmed(boolean);
  20.     public boolean isArmed();
  21.     public void setEnabled(boolean);
  22.     boolean alwaysOnTop();
  23.     public void setAccelerator(javax.swing.KeyStroke);
  24.     public javax.swing.KeyStroke getAccelerator();
  25.     protected void configurePropertiesFromAction(javax.swing.Action);
  26.     protected java.beans.PropertyChangeListener createActionPropertyChangeListen
  27. er(javax.swing.Action);
  28.     public void processMouseEvent(java.awt.event.MouseEvent, javax.swing.MenuEle
  29. ment[], javax.swing.MenuSelectionManager);
  30.     public void processKeyEvent(java.awt.event.KeyEvent, javax.swing.MenuElement
  31. [], javax.swing.MenuSelectionManager);
  32.     public void processMenuDragMouseEvent(javax.swing.event.MenuDragMouseEvent);
  33.     public void processMenuKeyEvent(javax.swing.event.MenuKeyEvent);
  34.     protected void fireMenuDragMouseEntered(javax.swing.event.MenuDragMouseEvent
  35. );
  36.     protected void fireMenuDragMouseExited(javax.swing.event.MenuDragMouseEvent)
  37. ;
  38.     protected void fireMenuDragMouseDragged(javax.swing.event.MenuDragMouseEvent
  39. );
  40.     protected void fireMenuDragMouseReleased(javax.swing.event.MenuDragMouseEven
  41. t);
  42.     protected void fireMenuKeyPressed(javax.swing.event.MenuKeyEvent);
  43.     protected void fireMenuKeyReleased(javax.swing.event.MenuKeyEvent);
  44.     protected void fireMenuKeyTyped(javax.swing.event.MenuKeyEvent);
  45.     public void menuSelectionChanged(boolean);
  46.     public javax.swing.MenuElement getSubElements()[];
  47.     public java.awt.Component getComponent();
  48.     public void addMenuDragMouseListener(javax.swing.event.MenuDragMouseListener
  49. );
  50.     public void removeMenuDragMouseListener(javax.swing.event.MenuDragMouseListe
  51. ner);
  52.     public javax.swing.event.MenuDragMouseListener getMenuDragMouseListeners()[]
  53. ;
  54.     public void addMenuKeyListener(javax.swing.event.MenuKeyListener);
  55.     public void removeMenuKeyListener(javax.swing.event.MenuKeyListener);
  56.     public javax.swing.event.MenuKeyListener getMenuKeyListeners()[];
  57.     protected java.lang.String paramString();
  58.     public javax.accessibility.AccessibleContext getAccessibleContext();
  59.     static java.lang.Class class$(java.lang.String);
  60.     protected class javax.swing.JMenuItem. AccessibleJMenuItem extends javax.swi
  61. ng.AbstractButton. AccessibleAbstractButton implements javax.swing.event.ChangeL
  62. istener
  63.     /* ACC_SUPER bit NOT set */
  64. {
  65.         javax.swing.JMenuItem.AccessibleJMenuItem(javax.swing.JMenuItem);
  66.         public javax.accessibility.AccessibleRole getAccessibleRole();
  67.         public void stateChanged(javax.swing.event.ChangeEvent);
  68.     }
  69. }




ça doit être le code généré pour les innerclasses :

Code :
  1. /*
  2. * @(#)JMenuItem.java 1.107 02/02/11
  3. *
  4. * Copyright 2002 Sun Microsystems, Inc. All rights reserved.
  5. * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
  6. */
  7. package javax.swing;
  8. import java.util.EventListener;
  9. import java.awt.*;
  10. import java.awt.event.*;
  11. import java.awt.image.*;
  12. import java.beans.PropertyChangeEvent;
  13. import java.beans.PropertyChangeListener;
  14. import java.io.Serializable;
  15. import java.io.ObjectOutputStream;
  16. import java.io.ObjectInputStream;
  17. import java.io.IOException;
  18. import javax.swing.plaf.*;
  19. import javax.swing.plaf.basic.*;
  20. import javax.swing.event.*;
  21. import javax.accessibility.*;
  22. /**
  23. * An implementation of an item in a menu. A menu item is essentially a button
  24. * sitting in a list. When the user selects the "button", the action
  25. * associated with the menu item is performed. A <code>JMenuItem</code>
  26. * contained in a <code>JPopupMenu</code> performs exactly that function.
  27. * <p>
  28. * For further documentation and for examples, see
  29. * <a
  30. href="http://java.sun.com/docs/books/tutorial/uiswing/components/menu.html">How to Use Menus</a>
  31. * in <em>The Java Tutorial.</em>
  32. * For the keyboard keys used by this component in the standard Look and
  33. * Feel (L&F) renditions, see the
  34. * <a href="doc-files/Key-Index.html#JMenuItem"><code>JMenuItem</code> key assignments</a>.
  35. * <p>
  36. * <strong>Warning:</strong>
  37. * Serialized objects of this class will not be compatible with
  38. * future Swing releases. The current serialization support is
  39. * appropriate for short term storage or RMI between applications running
  40. * the same version of Swing.  As of 1.4, support for long term storage
  41. * of all JavaBeans<sup><font size="-2">TM</font></sup>
  42. * has been added to the <code>java.beans</code> package.
  43. * Please see {@link java.beans.XMLEncoder}.
  44. *
  45. * @beaninfo
  46. *   attribute: isContainer false
  47. * description: An item which can be selected in a menu.
  48. *
  49. * @version 1.107 02/11/02
  50. * @author Georges Saab
  51. * @author David Karlton
  52. * @see JPopupMenu
  53. * @see JMenu
  54. * @see JCheckBoxMenuItem
  55. * @see JRadioButtonMenuItem
  56. */
  57. public class JMenuItem extends AbstractButton implements Accessible,MenuElement  {
  58.     /**
  59.      * @see #getUIClassID
  60.      * @see #readObject
  61.      */
  62.     private static final String uiClassID = "MenuItemUI";
  63.     /* diagnostic aids -- should be false for production builds. */
  64.     private static final boolean TRACE =   false; // trace creates and disposes
  65.     private static final boolean VERBOSE = false; // show reuse hits/misses
  66.     private static final boolean DEBUG =   false// show bad params, misc.
  67.     /**
  68.      * Creates a <code>JMenuItem</code> with no set text or icon.
  69.      */
  70.     public JMenuItem() {
  71.         this(null, (Icon)null);
  72.     }
  73.     /**
  74.      * Creates a <code>JMenuItem</code> with the specified icon.
  75.      *
  76.      * @param icon the icon of the <code>JMenuItem</code>
  77.      */
  78.     public JMenuItem(Icon icon) {
  79.         this(null, icon);
  80.     }
  81.     /**
  82.      * Creates a <code>JMenuItem</code> with the specified text.
  83.      *
  84.      * @param text the text of the <code>JMenuItem</code>
  85.      */
  86.     public JMenuItem(String text) {
  87.         this(text, (Icon)null);
  88.     }
  89.    
  90.     /**
  91.      * Creates a menu item whose properties are taken from the  
  92.      * specified <code>Action</code>.
  93.      *
  94.      * @param a the action of the <code>JMenuItem</code>
  95.      * @since 1.3
  96.      */
  97.     public JMenuItem(Action a) {
  98.         this();
  99. setAction(a);
  100.     }
  101.     /**
  102.      * Creates a <code>JMenuItem</code> with the specified text and icon.
  103.      *
  104.      * @param text the text of the <code>JMenuItem</code>
  105.      * @param icon the icon of the <code>JMenuItem</code>
  106.      */
  107.     public JMenuItem(String text, Icon icon) {
  108.         setModel(new DefaultButtonModel());
  109.         init(text, icon);
  110.         initFocusability();
  111.     }
  112.     /**
  113.      * Creates a <code>JMenuItem</code> with the specified text and
  114.      * keyboard mnemonic.
  115.      *
  116.      * @param text the text of the <code>JMenuItem</code>
  117.      * @param mnemonic the keyboard mnemonic for the <code>JMenuItem</code>
  118.      */
  119.     public JMenuItem(String text, int mnemonic) {
  120.         setModel(new DefaultButtonModel());
  121.         init(text, null);
  122.         setMnemonic(mnemonic);
  123.         initFocusability();
  124.     }
  125.     /**
  126.      * Inititalizes the focusability of the the <code>JMenuItem</code>.
  127.      * <code>JMenuItem</code>'s are focusable, but subclasses may
  128.      * want to be, this provides them the opportunity to override this
  129.      * and invoke something else, or nothing at all. Refer to
  130.      * {@link javax.swing.JMenu#initFocusability} for the motivation of
  131.      * this.
  132.      */
  133.     void initFocusability() {
  134. setFocusable(false);
  135.     }
  136.     /**
  137.      * Initializes the menu item with the specified text and icon.
  138.      *
  139.      * @param text the text of the <code>JMenuItem</code>
  140.      * @param icon the icon of the <code>JMenuItem</code>
  141.      */
  142.     protected void init(String text, Icon icon) {
  143.         if(text != null) {
  144.             setText(text);
  145.         }
  146.        
  147.         if(icon != null) {
  148.             setIcon(icon);
  149.         }
  150.        
  151.         // Listen for Focus events
  152.         addFocusListener(new MenuItemFocusListener());
  153. setBorderPainted(false);
  154.         setFocusPainted(false);
  155.         setHorizontalTextPosition(JButton.TRAILING);
  156.         setHorizontalAlignment(JButton.LEADING);
  157. updateUI();
  158.     }
  159.     private static class MenuItemFocusListener implements FocusListener,
  160.         Serializable {
  161.         public void focusGained(FocusEvent event) {}
  162.         public void focusLost(FocusEvent event) {
  163.             // When focus is lost, repaint if  
  164.             // the focus information is painted
  165.             JMenuItem mi = (JMenuItem)event.getSource();
  166.             if(mi.isFocusPainted()) {
  167.                 mi.repaint();
  168.             }
  169.         }
  170.     }
  171.        
  172.    
  173.     /**
  174.      * Sets the look and feel object that renders this component.
  175.      *
  176.      * @param ui  the <code>JMenuItemUI</code> L&F object
  177.      * @see UIDefaults#getUI
  178.      * @beaninfo
  179.      *        bound: true
  180.      *       hidden: true
  181.      *    attribute: visualUpdate true
  182.      *  description: The UI object that implements the Component's LookAndFeel.  
  183.      */
  184.     public void setUI(MenuItemUI ui) {
  185.         super.setUI(ui);
  186.     }
  187.    
  188.     /**
  189.      * Resets the UI property with a value from the current look and feel.
  190.      *
  191.      * @see JComponent#updateUI
  192.      */
  193.     public void updateUI() {
  194.         setUI((MenuItemUI)UIManager.getUI(this));
  195.     }
  196.     /**
  197.      * Returns the suffix used to construct the name of the L&F class used to
  198.      * render this component.
  199.      *
  200.      * @return the string "MenuItemUI"
  201.      * @see JComponent#getUIClassID
  202.      * @see UIDefaults#getUI
  203.      */
  204.     public String getUIClassID() {
  205.         return uiClassID;
  206.     }
  207.     /**
  208.      * Identifies the menu item as "armed". If the mouse button is
  209.      * released while it is over this item, the menu's action event
  210.      * will fire. If the mouse button is released elsewhere, the
  211.      * event will not fire and the menu item will be disarmed.
  212.      *  
  213.      * @param b true to arm the menu item so it can be selected
  214.      * @beaninfo
  215.      *    description: Mouse release will fire an action event
  216.      *         hidden: true
  217.      */
  218.     public void setArmed(boolean b) {
  219.         ButtonModel model = (ButtonModel) getModel();
  220.         boolean oldValue = model.isArmed();
  221.         if ((accessibleContext != null) && (oldValue != b)) {
  222.             if (b) {
  223.                 accessibleContext.firePropertyChange(
  224.                         AccessibleContext.ACCESSIBLE_STATE_PROPERTY,
  225.                         null,
  226.                         AccessibleState.ARMED);
  227.             } else {
  228.                 accessibleContext.firePropertyChange(
  229.                         AccessibleContext.ACCESSIBLE_STATE_PROPERTY,
  230.                         AccessibleState.ARMED,
  231.                         null);
  232.             }
  233.         }
  234.         if(model.isArmed() != b) {
  235.             model.setArmed(b);
  236.         }
  237.     }
  238.     /**
  239.      * Returns whether the menu item is "armed".
  240.      *  
  241.      * @return true if the menu item is armed, and it can be selected
  242.      * @see #setArmed
  243.      */
  244.     public boolean isArmed() {
  245.         ButtonModel model = (ButtonModel) getModel();
  246.         return model.isArmed();
  247.     }
  248.     /**
  249.      * Enables or disables the menu item.
  250.      *
  251.      * @param b  true to enable the item
  252.      * @beaninfo
  253.      *    description: Does the component react to user interaction
  254.      *          bound: true
  255.      *      preferred: true
  256.      */
  257.     public void setEnabled(boolean b) {
  258.         // Make sure we aren't armed!
  259.         if (b == false)
  260.             setArmed(false);
  261.         super.setEnabled(b);
  262.     }
  263.     /**
  264.      * Returns true since <code>Menu</code>s, by definition,  
  265.      * should always be on top of all other windows.  If the menu is
  266.      * in an internal frame false is returned due to the rollover effect
  267.      * for windows laf where the menu is not always on top.
  268.      */
  269.     // package private
  270.     boolean alwaysOnTop() {
  271.         // Fix for bug #4482165
  272.         if (SwingUtilities.getAncestorOfClass(JInternalFrame.class, this) !=
  273.                 null) {
  274.             return false;
  275.         }
  276. return true;
  277.     }
  278.     /* The keystroke which acts as the menu item's accelerator
  279.      */
  280.     private KeyStroke accelerator;
  281.     /**
  282.      * Sets the key combination which invokes the menu item's
  283.      * action listeners without navigating the menu hierarchy. It is the
  284.      * UI's responsibility to install the correct action.  Note that  
  285.      * when the keyboard accelerator is typed, it will work whether or
  286.      * not the menu is currently displayed.
  287.      *
  288.      * @param keyStroke the <code>KeyStroke</code> which will
  289.      *  serve as an accelerator  
  290.      * @beaninfo  
  291.      *     description: The keystroke combination which will invoke the  
  292.      *                  JMenuItem's actionlisteners without navigating the
  293.      *   menu hierarchy  
  294.      *           bound: true
  295.      *       preferred: true
  296.      */
  297.     public void setAccelerator(KeyStroke keyStroke) {
  298. KeyStroke oldAccelerator = accelerator;
  299.         this.accelerator = keyStroke;
  300. firePropertyChange("accelerator", oldAccelerator, accelerator);
  301.     }
  302.     /**
  303.      * Returns the <code>KeyStroke</code> which serves as an accelerator  
  304.      * for the menu item.
  305.      * @return a <code>KeyStroke</code> object identifying the
  306.      *  accelerator key
  307.      */
  308.     public KeyStroke getAccelerator() {
  309.         return this.accelerator;
  310.     }
  311.     /**
  312.      * Factory method which sets the <code>ActionEvent</code> source's
  313.      * properties according to values from the <code>Action</code> instance.
  314.      * The properties which are set may differ for subclasses.
  315.      * By default, this method sets the same properties as
  316.      * <code>AbstractButton.configurePropertiesFromAction()</code>, plus
  317.      * <code>Accelerator</code>.
  318.      *
  319.      * @param a the <code>Action</code> from which to get the properties,
  320.      *  or <code>null</code>
  321.      * @since 1.3
  322.      * @see Action
  323.      */
  324.     protected void configurePropertiesFromAction(Action a) {
  325.         super.configurePropertiesFromAction(a);
  326.         KeyStroke ks = (a==null) ? null :
  327.             (KeyStroke)a.getValue(Action.ACCELERATOR_KEY);
  328.         setAccelerator(ks==null ? null : ks);
  329.     }
  330.     /**
  331.      * Factory method which creates the <code>PropertyChangeListener</code>
  332.      * used to update the <code>ActionEvent</code> source as properties
  333.      * change on its <code>Action</code> instance.  
  334.      * Subclasses may override this in order to provide their own
  335.      * <code>PropertyChangeListener</code> if the set of
  336.      * properties which should be kept up to date differs.
  337.      * <p>
  338.      * Note that <code>PropertyChangeListeners</code> should avoid holding
  339.      * strong references to the <code>ActionEvent</code> source,
  340.      * as this may hinder garbage collection of the <code>ActionEvent</code>
  341.      * source and all components in its containment hierarchy.   
  342.      *
  343.      * @param a the <code>Action</code> from which to get the properties,
  344.      *  or <code>null</code>
  345.      *
  346.      * @since 1.3
  347.      * @see Action
  348.      */
  349.     protected PropertyChangeListener createActionPropertyChangeListener(Action a) {
  350.         return new AbstractActionPropertyChangeListener(this, a){
  351.     public void propertyChange(PropertyChangeEvent e) {    
  352.  String propertyName = e.getPropertyName();
  353.  JMenuItem mi = (JMenuItem)getTarget();
  354.  if (mi == null) {   //WeakRef GC'ed in 1.2
  355.      Action action = (Action)e.getSource();
  356.      action.removePropertyChangeListener(this);
  357.  } else {
  358.      if (e.getPropertyName().equals(Action.NAME)) {
  359.   String text = (String) e.getNewValue();
  360.   mi.setText(text);
  361.   mi.repaint();
  362.      } else if (propertyName.equals("enabled" )) {
  363.   Boolean enabledState = (Boolean) e.getNewValue();
  364.   mi.setEnabled(enabledState.booleanValue());
  365.   mi.repaint();
  366.      } else if (e.getPropertyName().equals(Action.SMALL_ICON)) {
  367.   Icon icon = (Icon) e.getNewValue();
  368.   mi.setIcon(icon);
  369.   mi.invalidate();
  370.   mi.repaint();
  371.      } else if (e.getPropertyName().equals(Action.MNEMONIC_KEY)) {
  372.   Integer mn = (Integer) e.getNewValue();
  373.   mi.setMnemonic(mn.intValue());
  374.   mi.invalidate();
  375.   mi.repaint();
  376.      }
  377.  }
  378.     }
  379. };
  380.     }
  381.     /**
  382.      * Processes a mouse event forwarded from the
  383.      * <code>MenuSelectionManager</code> and changes the menu
  384.      * selection, if necessary, by using the
  385.      * <code>MenuSelectionManager</code>'s API.
  386.      * <p>
  387.      * Note: you do not have to forward the event to sub-components.
  388.      * This is done automatically by the <code>MenuSelectionManager</code>.
  389.      *
  390.      * @param e   a <code>MouseEvent</code>
  391.      * @param path  the <code>MenuElement</code> path array
  392.      * @param manager   the <code>MenuSelectionManager</code>
  393.      */
  394.     public void processMouseEvent(MouseEvent e,MenuElement path[],MenuSelectionManager manager) {
  395. processMenuDragMouseEvent(
  396.   new MenuDragMouseEvent(e.getComponent(), e.getID(),
  397.     e.getWhen(),
  398.     e.getModifiers(), e.getX(), e.getY(),
  399.     e.getClickCount(), e.isPopupTrigger(),
  400.     path, manager));
  401.     }
  402.     /**
  403.      * Processes a key event forwarded from the  
  404.      * <code>MenuSelectionManager</code> and changes the menu selection,
  405.      * if necessary, by using <code>MenuSelectionManager</code>'s API.
  406.      * <p>
  407.      * Note: you do not have to forward the event to sub-components.
  408.      * This is done automatically by the <code>MenuSelectionManager</code>.
  409.      *
  410.      * @param e  a <code>KeyEvent</code>
  411.      * @param path the <code>MenuElement</code> path array
  412.      * @param manager   the <code>MenuSelectionManager</code>
  413.      */
  414.     public void processKeyEvent(KeyEvent e,MenuElement path[],MenuSelectionManager manager) {
  415. if (DEBUG) {
  416.     System.out.println("in JMenuItem.processKeyEvent/3 for " + getText() +
  417.       "  " + KeyStroke.getKeyStrokeForEvent(e));
  418. }
  419.         MenuKeyEvent mke = new MenuKeyEvent(e.getComponent(), e.getID(),
  420.          e.getWhen(), e.getModifiers(),
  421.          e.getKeyCode(), e.getKeyChar(),
  422.          path, manager);
  423.         processMenuKeyEvent(mke);
  424.    
  425.         if (mke.isConsumed())  {
  426.             e.consume();
  427.         }
  428.     }
  429.     /**
  430.      * Handles mouse drag in a menu.
  431.      *
  432.      * @param e  a <code>MenuDragMouseEvent</code> object
  433.      */
  434.     public void processMenuDragMouseEvent(MenuDragMouseEvent e) {
  435. switch (e.getID()) {
  436. case MouseEvent.MOUSE_ENTERED:
  437.     fireMenuDragMouseEntered(e); break;
  438. case MouseEvent.MOUSE_EXITED:
  439.     fireMenuDragMouseExited(e); break;
  440. case MouseEvent.MOUSE_DRAGGED:
  441.     fireMenuDragMouseDragged(e); break;
  442. case MouseEvent.MOUSE_RELEASED:
  443.     fireMenuDragMouseReleased(e); break;
  444. default:
  445.     break;
  446. }
  447.     }
  448.     /**
  449.      * Handles a keystroke in a menu.
  450.      *
  451.      * @param e  a <code>MenuKeyEvent</code> object
  452.      */
  453.     public void processMenuKeyEvent(MenuKeyEvent e) {
  454. if (DEBUG) {
  455.     System.out.println("in JMenuItem.processMenuKeyEvent for " + getText()+
  456.       "  " + KeyStroke.getKeyStrokeForEvent(e));
  457. }
  458. switch (e.getID()) {
  459. case KeyEvent.KEY_PRESSED:
  460.     fireMenuKeyPressed(e); break;
  461. case KeyEvent.KEY_RELEASED:
  462.     fireMenuKeyReleased(e); break;
  463. case KeyEvent.KEY_TYPED:
  464.     fireMenuKeyTyped(e); break;
  465. default:
  466.     break;
  467. }
  468.     }
  469.     /**
  470.      * Notifies all listeners that have registered interest for
  471.      * notification on this event type.  
  472.      *
  473.      * @param event a <code>MenuMouseDragEvent</code>
  474.      * @see EventListenerList
  475.      */
  476.     protected void fireMenuDragMouseEntered(MenuDragMouseEvent event) {
  477.         // Guaranteed to return a non-null array
  478.         Object[] listeners = listenerList.getListenerList();
  479.         // Process the listeners last to first, notifying
  480.         // those that are interested in this event
  481.         for (int i = listeners.length-2; i>=0; i-=2) {
  482.             if (listeners[i]==MenuDragMouseListener.class) {
  483.                 // Lazily create the event:
  484.                 ((MenuDragMouseListener)listeners[i+1]).menuDragMouseEntered(event);
  485.             }         
  486.         }
  487.     } 
  488.     /**
  489.      * Notifies all listeners that have registered interest for
  490.      * notification on this event type.   
  491.      *
  492.      * @param event a <code>MenuDragMouseEvent</code>
  493.      * @see EventListenerList
  494.      */
  495.     protected void fireMenuDragMouseExited(MenuDragMouseEvent event) {
  496.         // Guaranteed to return a non-null array
  497.         Object[] listeners = listenerList.getListenerList();
  498.         // Process the listeners last to first, notifying
  499.         // those that are interested in this event
  500.         for (int i = listeners.length-2; i>=0; i-=2) {
  501.             if (listeners[i]==MenuDragMouseListener.class) {
  502.                 // Lazily create the event:
  503.                 ((MenuDragMouseListener)listeners[i+1]).menuDragMouseExited(event);
  504.             }         
  505.         }
  506.     } 
  507.     /**
  508.      * Notifies all listeners that have registered interest for
  509.      * notification on this event type.
  510.      *
  511.      * @param event a <code>MenuDragMouseEvent</code>
  512.      * @see EventListenerList
  513.      */
  514.     protected void fireMenuDragMouseDragged(MenuDragMouseEvent event) {
  515.         // Guaranteed to return a non-null array
  516.         Object[] listeners = listenerList.getListenerList();
  517.         // Process the listeners last to first, notifying
  518.         // those that are interested in this event
  519.         for (int i = listeners.length-2; i>=0; i-=2) {
  520.             if (listeners[i]==MenuDragMouseListener.class) {
  521.                 // Lazily create the event:
  522.                 ((MenuDragMouseListener)listeners[i+1]).menuDragMouseDragged(event);
  523.             }         
  524.         }
  525.     } 
  526.     /**
  527.      * Notifies all listeners that have registered interest for
  528.      * notification on this event type.  
  529.      *
  530.      * @param event a <code>MenuDragMouseEvent</code>
  531.      * @see EventListenerList
  532.      */
  533.     protected void fireMenuDragMouseReleased(MenuDragMouseEvent event) {
  534.         // Guaranteed to return a non-null array
  535.         Object[] listeners = listenerList.getListenerList();
  536.         // Process the listeners last to first, notifying
  537.         // those that are interested in this event
  538.         for (int i = listeners.length-2; i>=0; i-=2) {
  539.             if (listeners[i]==MenuDragMouseListener.class) {
  540.                 // Lazily create the event:
  541.                 ((MenuDragMouseListener)listeners[i+1]).menuDragMouseReleased(event);
  542.             }         
  543.         }
  544.     } 
  545.     /**
  546.      * Notifies all listeners that have registered interest for
  547.      * notification on this event type.  
  548.      *
  549.      * @param a <code>MenuKeyEvent</code>
  550.      * @see EventListenerList
  551.      */
  552.     protected void fireMenuKeyPressed(MenuKeyEvent event) {
  553. if (DEBUG) {
  554.     System.out.println("in JMenuItem.fireMenuKeyPressed for " + getText()+
  555.       "  " + KeyStroke.getKeyStrokeForEvent(event));
  556. }
  557.         // Guaranteed to return a non-null array
  558.         Object[] listeners = listenerList.getListenerList();
  559.         // Process the listeners last to first, notifying
  560.         // those that are interested in this event
  561.         for (int i = listeners.length-2; i>=0; i-=2) {
  562.             if (listeners[i]==MenuKeyListener.class) {
  563.                 // Lazily create the event:
  564.                 ((MenuKeyListener)listeners[i+1]).menuKeyPressed(event);
  565.             }         
  566.         }
  567.     } 
  568.     /**
  569.      * Notifies all listeners that have registered interest for
  570.      * notification on this event type.  
  571.      *
  572.      * @param a <code>MenuKeyEvent</code>
  573.      * @see EventListenerList
  574.      */
  575.     protected void fireMenuKeyReleased(MenuKeyEvent event) {
  576. if (DEBUG) {
  577.     System.out.println("in JMenuItem.fireMenuKeyReleased for " + getText()+
  578.       "  " + KeyStroke.getKeyStrokeForEvent(event));
  579. }
  580.         // Guaranteed to return a non-null array
  581.         Object[] listeners = listenerList.getListenerList();
  582.         // Process the listeners last to first, notifying
  583.         // those that are interested in this event
  584.         for (int i = listeners.length-2; i>=0; i-=2) {
  585.             if (listeners[i]==MenuKeyListener.class) {
  586.                 // Lazily create the event:
  587.                 ((MenuKeyListener)listeners[i+1]).menuKeyReleased(event);
  588.             }         
  589.         }
  590.     } 
  591.     /**
  592.      * Notifies all listeners that have registered interest for
  593.      * notification on this event type.  
  594.      *
  595.      * @param event a <code>MenuKeyEvent</code>
  596.      * @see EventListenerList
  597.      */
  598.     protected void fireMenuKeyTyped(MenuKeyEvent event) {
  599. if (DEBUG) {
  600.     System.out.println("in JMenuItem.fireMenuKeyTyped for " + getText()+
  601.       "  " + KeyStroke.getKeyStrokeForEvent(event));
  602. }
  603.         // Guaranteed to return a non-null array
  604.         Object[] listeners = listenerList.getListenerList();
  605.         // Process the listeners last to first, notifying
  606.         // those that are interested in this event
  607.         for (int i = listeners.length-2; i>=0; i-=2) {
  608.             if (listeners[i]==MenuKeyListener.class) {
  609.                 // Lazily create the event:
  610.                 ((MenuKeyListener)listeners[i+1]).menuKeyTyped(event);
  611.             }         
  612.         }
  613.     } 
  614.     /**
  615.      * Called by the <code>MenuSelectionManager</code> when the
  616.      * <code>MenuElement</code> is selected or unselected.
  617.      *  
  618.      * @param isIncluded  true if this menu item is on the part of the menu
  619.      *                    path that changed, false if this menu is part of the
  620.      *                    a menu path that changed, but this particular part of
  621.      *                    that path is still the same
  622.      * @see MenuSelectionManager#setSelectedPath(MenuElement[])
  623.      */
  624.     public void menuSelectionChanged(boolean isIncluded) {
  625.         setArmed(isIncluded);
  626.     }
  627.     /**
  628.      * This method returns an array containing the sub-menu
  629.      * components for this menu component.
  630.      *
  631.      * @return an array of <code>MenuElement</code>s
  632.      */
  633.     public MenuElement[] getSubElements() {
  634.         return new MenuElement[0];
  635.     }
  636.    
  637.     /**
  638.      * Returns the <code>java.awt.Component</code> used to paint
  639.      * this object. The returned component will be used to convert
  640.      * events and detect if an event is inside a menu component.
  641.      *
  642.      * @return the <code>Component</code> that paints this menu item
  643.      */
  644.     public Component getComponent() {
  645.         return this;
  646.     }
  647.     /**
  648.      * Adds a <code>MenuDragMouseListener</code> to the menu item.
  649.      *
  650.      * @param l the <code>MenuDragMouseListener</code> to be added
  651.      */
  652.     public void addMenuDragMouseListener(MenuDragMouseListener l) {
  653.         listenerList.add(MenuDragMouseListener.class, l);
  654.     }
  655.     /**
  656.      * Removes a <code>MenuDragMouseListener</code> from the menu item.
  657.      *
  658.      * @param l the <code>MenuDragMouseListener</code> to be removed
  659.      */
  660.     public void removeMenuDragMouseListener(MenuDragMouseListener l) {
  661.         listenerList.remove(MenuDragMouseListener.class, l);
  662.     }
  663.     /**
  664.      * Returns an array of all the <code>MenuDragMouseListener</code>s added
  665.      * to this JMenuItem with addMenuDragMouseListener().
  666.      *  
  667.      * @return all of the <code>MenuDragMouseListener</code>s added or an empty
  668.      *         array if no listeners have been added
  669.      * @since 1.4
  670.      */
  671.     public MenuDragMouseListener[] getMenuDragMouseListeners() {
  672.         return (MenuDragMouseListener[])listenerList.getListeners(
  673.                 MenuDragMouseListener.class);
  674.     }
  675.     /**
  676.      * Adds a <code>MenuKeyListener</code> to the menu item.
  677.      *
  678.      * @param l the <code>MenuKeyListener</code> to be added
  679.      */
  680.     public void addMenuKeyListener(MenuKeyListener l) {
  681.         listenerList.add(MenuKeyListener.class, l);
  682.     }
  683.     /**
  684.      * Removes a <code>MenuKeyListener</code> from the menu item.
  685.      *
  686.      * @param l the <code>MenuKeyListener</code> to be removed
  687.      */
  688.     public void removeMenuKeyListener(MenuKeyListener l) {
  689.         listenerList.remove(MenuKeyListener.class, l);
  690.     }
  691.     /**
  692.      * Returns an array of all the <code>MenuKeyListener</code>s added
  693.      * to this JMenuItem with addMenuKeyListener().
  694.      *  
  695.      * @return all of the <code>MenuKeyListener</code>s added or an empty
  696.      *         array if no listeners have been added
  697.      * @since 1.4
  698.      */
  699.     public MenuKeyListener[] getMenuKeyListeners() {
  700.         return (MenuKeyListener[])listenerList.getListeners(
  701.                 MenuKeyListener.class);
  702.     }
  703.     /**
  704.      * See JComponent.readObject() for information about serialization
  705.      * in Swing.
  706.      */
  707.     private void readObject(ObjectInputStream s)
  708. throws IOException, ClassNotFoundException
  709.     {
  710.         s.defaultReadObject();
  711. if (getUIClassID().equals(uiClassID)) {
  712.     updateUI();
  713. }
  714.     }
  715.     private void writeObject(ObjectOutputStream s) throws IOException {
  716.         s.defaultWriteObject();
  717.         if (getUIClassID().equals(uiClassID)) {
  718.             byte count = JComponent.getWriteObjCounter(this);
  719.             JComponent.setWriteObjCounter(this, --count);
  720.             if (count == 0 && ui != null) {
  721.                 ui.installUI(this);
  722.             }
  723.         }
  724.     }
  725.     /**
  726.      * Returns a string representation of this <code>JMenuItem</code>.
  727.      * This method is intended to be used only for debugging purposes,
  728.      * and the content and format of the returned string may vary between       
  729.      * implementations. The returned string may be empty but may not  
  730.      * be <code>null</code>.
  731.      *  
  732.      * @return  a string representation of this <code>JMenuItem</code>
  733.      */
  734.     protected String paramString() {
  735. return super.paramString();
  736.     }
  737. /////////////////
  738. // Accessibility support
  739. ////////////////
  740.     /**
  741.      * Returns the <code>AccessibleContext</code> associated with this  
  742.      * <code>JMenuItem</code>. For <code>JMenuItem</code>s,
  743.      * the <code>AccessibleContext</code> takes the form of an  
  744.      * <code>AccessibleJMenuItem</code>.  
  745.      * A new AccessibleJMenuItme instance is created if necessary.
  746.      *
  747.      * @return an <code>AccessibleJMenuItem</code> that serves as the  
  748.      *         <code>AccessibleContext</code> of this <code>JMenuItem</code>
  749.      */
  750.     public AccessibleContext getAccessibleContext() {
  751.         if (accessibleContext == null) {
  752.             accessibleContext = new AccessibleJMenuItem();
  753.         }
  754.         return accessibleContext;
  755.     }
  756.     /**
  757.      * This class implements accessibility support for the  
  758.      * <code>JMenuItem</code> class.  It provides an implementation of the  
  759.      * Java Accessibility API appropriate to menu item user-interface  
  760.      * elements.
  761.      * <p>
  762.      * <strong>Warning:</strong>
  763.      * Serialized objects of this class will not be compatible with
  764.      * future Swing releases. The current serialization support is
  765.      * appropriate for short term storage or RMI between applications running
  766.      * the same version of Swing.  As of 1.4, support for long term storage
  767.      * of all JavaBeans<sup><font size="-2">TM</font></sup>
  768.      * has been added to the <code>java.beans</code> package.
  769.      * Please see {@link java.beans.XMLEncoder}.
  770.      */
  771.     protected class AccessibleJMenuItem extends AccessibleAbstractButton implements ChangeListener {
  772. private boolean isArmed = false;
  773. private boolean hasFocus = false;
  774. private boolean isPressed = false;
  775. private boolean isSelected = false;
  776.         AccessibleJMenuItem() {
  777.             super();
  778.             JMenuItem.this.addChangeListener(this);
  779.         }
  780.         /**
  781.          * Get the role of this object.
  782.          *
  783.          * @return an instance of AccessibleRole describing the role of the  
  784.          * object
  785.          */
  786.         public AccessibleRole getAccessibleRole() {
  787.             return AccessibleRole.MENU_ITEM;
  788.         }
  789.         /**
  790.          * Supports the change listener interface and fires property changes.
  791.          */
  792.         public void stateChanged(ChangeEvent e) {
  793.             firePropertyChange(AccessibleContext.ACCESSIBLE_VISIBLE_DATA_PROPERTY,
  794.                                Boolean.valueOf(false), Boolean.valueOf(true));
  795.             if (JMenuItem.this.getModel().isArmed()) {
  796.  if (!isArmed) {
  797.      isArmed = true;
  798.      firePropertyChange(
  799.                 AccessibleContext.ACCESSIBLE_STATE_PROPERTY,
  800.                         null, AccessibleState.ARMED);
  801.  }
  802.             } else {
  803.  if (isArmed) {
  804.      isArmed = false;
  805.      firePropertyChange(
  806.                 AccessibleContext.ACCESSIBLE_STATE_PROPERTY,
  807.                         AccessibleState.ARMED, null);
  808.  }
  809.     }
  810.             if (JMenuItem.this.isFocusOwner()) {
  811.  if (!hasFocus) {
  812.      hasFocus = true;
  813.      firePropertyChange(
  814.                 AccessibleContext.ACCESSIBLE_STATE_PROPERTY,
  815.                         null, AccessibleState.FOCUSED);
  816.  }
  817.             } else {
  818.  if (hasFocus) {
  819.      hasFocus = false;
  820.      firePropertyChange(
  821.                 AccessibleContext.ACCESSIBLE_STATE_PROPERTY,
  822.                         AccessibleState.FOCUSED, null);
  823.  }
  824.     }
  825.             if (JMenuItem.this.getModel().isPressed()) {
  826.  if (!isPressed) {
  827.      isPressed = true;
  828.      firePropertyChange(
  829.                 AccessibleContext.ACCESSIBLE_STATE_PROPERTY,
  830.                         null, AccessibleState.PRESSED);
  831.  }
  832.             } else {
  833.  if (isPressed) {
  834.      isPressed = false;
  835.      firePropertyChange(
  836.                 AccessibleContext.ACCESSIBLE_STATE_PROPERTY,
  837.                         AccessibleState.PRESSED, null);
  838.  }
  839.     }
  840.             if (JMenuItem.this.getModel().isSelected()) {
  841.  if (!isSelected) {
  842.      isSelected = true;
  843.      firePropertyChange(
  844.                 AccessibleContext.ACCESSIBLE_STATE_PROPERTY,
  845.                         null, AccessibleState.CHECKED);
  846.  }
  847.             } else {
  848.  if (isSelected) {
  849.      isSelected = false;
  850.      firePropertyChange(
  851.                 AccessibleContext.ACCESSIBLE_STATE_PROPERTY,
  852.                         AccessibleState.CHECKED, null);
  853.  }
  854.     }
  855.         }
  856.     } // inner class AccessibleJMenuItem
  857. }


---------------
trainoo.com, c'est fini
n°599582
urd-sama
waste of space
Posté le 30-12-2003 à 21:07:13  profilanswer
 

putain vous faites chier avec vos km de code :o

n°599583
*syl*
--&gt; []
Posté le 30-12-2003 à 21:08:24  profilanswer
 

urd-sama a écrit :

putain vous faites chier avec vos km de code :o

En + personne va le lire :o

n°599585
nraynaud
lol
Posté le 30-12-2003 à 21:10:55  profilanswer
 

urd-sama a écrit :

putain vous faites chier avec vos km de code :o

spa nous, c'est Georges Saab et David Karlton, mais je te rassure depuis y'en a un qui s'est reconverti dans les voitures et les avions et l'autre dans les hotels de luxe.


---------------
trainoo.com, c'est fini
n°599587
the real m​oins moins
Posté le 30-12-2003 à 21:17:02  profilanswer
 
n°599588
the real m​oins moins
Posté le 30-12-2003 à 21:17:22  profilanswer
 

skeye a écrit :


:/
C'était pratique, pourtant!:o

ça t'arrive de l'oublier? :heink:


---------------
Hey toi, tu veux acheter des minifigurines Lego, non ?
mood
Publicité
Posté le 30-12-2003 à 21:17:22  profilanswer
 

n°599590
skeye
Posté le 30-12-2003 à 21:18:28  profilanswer
 

the real moins moins a écrit :

ça t'arrive de l'oublier? :heink:


nan, mais si je paume mon marktapage ca me permet de scroller plus vite! [:skeye]


---------------
Can't buy what I want because it's free -
n°599591
veryfree
Posté le 30-12-2003 à 21:22:21  profilanswer
 

et si on se faisait un counter Strike [:dawa] ?.

n°599592
drasche
Posté le 30-12-2003 à 21:23:31  profilanswer
 

moi jretourne à mon Transport Tycoon :o


---------------
Whichever format the fan may want to listen is fine with us – vinyl, wax cylinders, shellac, 8-track, iPod, cloud storage, cranial implants – just as long as it’s loud and rockin' (Billy Gibbons, ZZ Top)
n°599593
antp
Super Administrateur
Champion des excuses bidons
Posté le 30-12-2003 à 21:24:23  profilanswer
 

drasche a écrit :

moi jretourne à mon Transport Tycoon :o


 
Bon choix :o
Ça me fait penser que j'ai commencé une partie avec le DBSet, c'est chouette, ça change des trains qu'on utilise depuis des années :)


---------------
mes programmes ·· les voitures dans les films ·· apprenez à écrire
n°599597
mareek
Et de 3 \o/
Posté le 30-12-2003 à 21:28:00  profilanswer
 

cherrytree a écrit :


Je signale par ce post monomanique que je me retiens de poster une connerie.


existe pas dans le larousse :o
 
 


je crois qu'il t'en reste encore sur la joue
 

nraynaud a écrit :


Harko, tu veux devenir mon ami ?


[:rofl]
 


pareil [:icon10]
 
 
NP: Placebo - Protect me from what I want (VF)
 

drasche a écrit :


:non:
 
on dit ça aussi en Gelbique :o


paysoùçaparlepasfrançaissisme :o
 

gizmo a écrit :

le silence a un prix: 52,68 ? :o
reste à me débarasser de ce petit ventilo sur ma radeon SDR pour avoir enfin la vrai paix.
 
Au fait, tant que j'y suis, y a des carte graphiques actuelles sans ventilateur?


La plupart des cartes entrée de gamme (GFFX5200 et R9000) n'ont pas de ventilo et si t'es un peu bricoleur tu peux toujours monter un rad zalman passif
 

skeye a écrit :

(dites, votre pseudo apparait toujours en bleu dans le forum pour vous, ou bien noir moche comme les autres?)


en noir (c'ets noir il n'y a plus d'espoir)
 

nraynaud a écrit :


ça doit être le code généré pour les innerclasses :

Code :
  1. /*
  2. * @(#)JMenuItem.java 1.107 02/02/11
  3. *
  4. * Copyright 2002 Sun Microsystems, Inc. All rights reserved.
  5. * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
  6. */
  7. package javax.swing;
  8. import java.util.EventListener;
  9. import java.awt.*;
  10. import java.awt.event.*;
  11. import java.awt.image.*;
  12. import java.beans.PropertyChangeEvent;
  13. import java.beans.PropertyChangeListener;
  14. import java.io.Serializable;
  15. import java.io.ObjectOutputStream;
  16. import java.io.ObjectInputStream;
  17. import java.io.IOException;
  18. import javax.swing.plaf.*;
  19. import javax.swing.plaf.basic.*;
  20. import javax.swing.event.*;
  21. import javax.accessibility.*;
  22. /**
  23. * An implementation of an item in a menu. A menu item is essentially a button
  24. * sitting in a list. When the user selects the "button", the action
  25. * associated with the menu item is performed. A <code>JMenuItem</code>
  26. * contained in a <code>JPopupMenu</code> performs exactly that function.
  27. * <p>
  28. * For further documentation and for examples, see
  29. * <a
  30. href="http://java.sun.com/docs/books/tutorial/uiswing/components/menu.html">How to Use Menus</a>
  31. * in <em>The Java Tutorial.</em>
  32. * For the keyboard keys used by this component in the standard Look and
  33. * Feel (L&F) renditions, see the
  34. * <a href="doc-files/Key-Index.html#JMenuItem"><code>JMenuItem</code> key assignments</a>.
  35. * <p>
  36. * <strong>Warning:</strong>
  37. * Serialized objects of this class will not be compatible with
  38. * future Swing releases. The current serialization support is
  39. * appropriate for short term storage or RMI between applications running
  40. * the same version of Swing.  As of 1.4, support for long term storage
  41. * of all JavaBeans<sup><font size="-2">TM</font></sup>
  42. * has been added to the <code>java.beans</code> package.
  43. * Please see {@link java.beans.XMLEncoder}.
  44. *
  45. * @beaninfo
  46. *   attribute: isContainer false
  47. * description: An item which can be selected in a menu.
  48. *
  49. * @version 1.107 02/11/02
  50. * @author Georges Saab
  51. * @author David Karlton
  52. * @see JPopupMenu
  53. * @see JMenu
  54. * @see JCheckBoxMenuItem
  55. * @see JRadioButtonMenuItem
  56. */
  57. public class JMenuItem extends AbstractButton implements Accessible,MenuElement  {
  58.     /**
  59.      * @see #getUIClassID
  60.      * @see #readObject
  61.      */
  62.     private static final String uiClassID = "MenuItemUI";
  63.     /* diagnostic aids -- should be false for production builds. */
  64.     private static final boolean TRACE =   false; // trace creates and disposes
  65.     private static final boolean VERBOSE = false; // show reuse hits/misses
  66.     private static final boolean DEBUG =   false// show bad params, misc.
  67.     /**
  68.      * Creates a <code>JMenuItem</code> with no set text or icon.
  69.      */
  70.     public JMenuItem() {
  71.         this(null, (Icon)null);
  72.     }
  73.     /**
  74.      * Creates a <code>JMenuItem</code> with the specified icon.
  75.      *
  76.      * @param icon the icon of the <code>JMenuItem</code>
  77.      */
  78.     public JMenuItem(Icon icon) {
  79.         this(null, icon);
  80.     }
  81.     /**
  82.      * Creates a <code>JMenuItem</code> with the specified text.
  83.      *
  84.      * @param text the text of the <code>JMenuItem</code>
  85.      */
  86.     public JMenuItem(String text) {
  87.         this(text, (Icon)null);
  88.     }
  89.    
  90.     /**
  91.      * Creates a menu item whose properties are taken from the  
  92.      * specified <code>Action</code>.
  93.      *
  94.      * @param a the action of the <code>JMenuItem</code>
  95.      * @since 1.3
  96.      */
  97.     public JMenuItem(Action a) {
  98.         this();
  99. setAction(a);
  100.     }
  101.     /**
  102.      * Creates a <code>JMenuItem</code> with the specified text and icon.
  103.      *
  104.      * @param text the text of the <code>JMenuItem</code>
  105.      * @param icon the icon of the <code>JMenuItem</code>
  106.      */
  107.     public JMenuItem(String text, Icon icon) {
  108.         setModel(new DefaultButtonModel());
  109.         init(text, icon);
  110.         initFocusability();
  111.     }
  112.     /**
  113.      * Creates a <code>JMenuItem</code> with the specified text and
  114.      * keyboard mnemonic.
  115.      *
  116.      * @param text the text of the <code>JMenuItem</code>
  117.      * @param mnemonic the keyboard mnemonic for the <code>JMenuItem</code>
  118.      */
  119.     public JMenuItem(String text, int mnemonic) {
  120.         setModel(new DefaultButtonModel());
  121.         init(text, null);
  122.         setMnemonic(mnemonic);
  123.         initFocusability();
  124.     }
  125.     /**
  126.      * Inititalizes the focusability of the the <code>JMenuItem</code>.
  127.      * <code>JMenuItem</code>'s are focusable, but subclasses may
  128.      * want to be, this provides them the opportunity to override this
  129.      * and invoke something else, or nothing at all. Refer to
  130.      * {@link javax.swing.JMenu#initFocusability} for the motivation of
  131.      * this.
  132.      */
  133.     void initFocusability() {
  134. setFocusable(false);
  135.     }
  136.     /**
  137.      * Initializes the menu item with the specified text and icon.
  138.      *
  139.      * @param text the text of the <code>JMenuItem</code>
  140.      * @param icon the icon of the <code>JMenuItem</code>
  141.      */
  142.     protected void init(String text, Icon icon) {
  143.         if(text != null) {
  144.             setText(text);
  145.         }
  146.        
  147.         if(icon != null) {
  148.             setIcon(icon);
  149.         }
  150.        
  151.         // Listen for Focus events
  152.         addFocusListener(new MenuItemFocusListener());
  153. setBorderPainted(false);
  154.         setFocusPainted(false);
  155.         setHorizontalTextPosition(JButton.TRAILING);
  156.         setHorizontalAlignment(JButton.LEADING);
  157. updateUI();
  158.     }
  159.     private static class MenuItemFocusListener implements FocusListener,
  160.         Serializable {
  161.         public void focusGained(FocusEvent event) {}
  162.         public void focusLost(FocusEvent event) {
  163.             // When focus is lost, repaint if  
  164.             // the focus information is painted
  165.             JMenuItem mi = (JMenuItem)event.getSource();
  166.             if(mi.isFocusPainted()) {
  167.                 mi.repaint();
  168.             }
  169.         }
  170.     }
  171.        
  172.    
  173.     /**
  174.      * Sets the look and feel object that renders this component.
  175.      *
  176.      * @param ui  the <code>JMenuItemUI</code> L&F object
  177.      * @see UIDefaults#getUI
  178.      * @beaninfo
  179.      *        bound: true
  180.      *       hidden: true
  181.      *    attribute: visualUpdate true
  182.      *  description: The UI object that implements the Component's LookAndFeel.  
  183.      */
  184.     public void setUI(MenuItemUI ui) {
  185.         super.setUI(ui);
  186.     }
  187.    
  188.     /**
  189.      * Resets the UI property with a value from the current look and feel.
  190.      *
  191.      * @see JComponent#updateUI
  192.      */
  193.     public void updateUI() {
  194.         setUI((MenuItemUI)UIManager.getUI(this));
  195.     }
  196.     /**
  197.      * Returns the suffix used to construct the name of the L&F class used to
  198.      * render this component.
  199.      *
  200.      * @return the string "MenuItemUI"
  201.      * @see JComponent#getUIClassID
  202.      * @see UIDefaults#getUI
  203.      */
  204.     public String getUIClassID() {
  205.         return uiClassID;
  206.     }
  207.     /**
  208.      * Identifies the menu item as "armed". If the mouse button is
  209.      * released while it is over this item, the menu's action event
  210.      * will fire. If the mouse button is released elsewhere, the
  211.      * event will not fire and the menu item will be disarmed.
  212.      *  
  213.      * @param b true to arm the menu item so it can be selected
  214.      * @beaninfo
  215.      *    description: Mouse release will fire an action event
  216.      *         hidden: true
  217.      */
  218.     public void setArmed(boolean b) {
  219.         ButtonModel model = (ButtonModel) getModel();
  220.         boolean oldValue = model.isArmed();
  221.         if ((accessibleContext != null) && (oldValue != b)) {
  222.             if (b) {
  223.                 accessibleContext.firePropertyChange(
  224.                         AccessibleContext.ACCESSIBLE_STATE_PROPERTY,
  225.                         null,
  226.                         AccessibleState.ARMED);
  227.             } else {
  228.                 accessibleContext.firePropertyChange(
  229.                         AccessibleContext.ACCESSIBLE_STATE_PROPERTY,
  230.                         AccessibleState.ARMED,
  231.                         null);
  232.             }
  233.         }
  234.         if(model.isArmed() != b) {
  235.             model.setArmed(b);
  236.         }
  237.     }
  238.     /**
  239.      * Returns whether the menu item is "armed".
  240.      *  
  241.      * @return true if the menu item is armed, and it can be selected
  242.      * @see #setArmed
  243.      */
  244.     public boolean isArmed() {
  245.         ButtonModel model = (ButtonModel) getModel();
  246.         return model.isArmed();
  247.     }
  248.     /**
  249.      * Enables or disables the menu item.
  250.      *
  251.      * @param b  true to enable the item
  252.      * @beaninfo
  253.      *    description: Does the component react to user interaction
  254.      *          bound: true
  255.      *      preferred: true
  256.      */
  257.     public void setEnabled(boolean b) {
  258.         // Make sure we aren't armed!
  259.         if (b == false)
  260.             setArmed(false);
  261.         super.setEnabled(b);
  262.     }
  263.     /**
  264.      * Returns true since <code>Menu</code>s, by definition,  
  265.      * should always be on top of all other windows.  If the menu is
  266.      * in an internal frame false is returned due to the rollover effect
  267.      * for windows laf where the menu is not always on top.
  268.      */
  269.     // package private
  270.     boolean alwaysOnTop() {
  271.         // Fix for bug #4482165
  272.         if (SwingUtilities.getAncestorOfClass(JInternalFrame.class, this) !=
  273.                 null) {
  274.             return false;
  275.         }
  276. return true;
  277.     }
  278.     /* The keystroke which acts as the menu item's accelerator
  279.      */
  280.     private KeyStroke accelerator;
  281.     /**
  282.      * Sets the key combination which invokes the menu item's
  283.      * action listeners without navigating the menu hierarchy. It is the
  284.      * UI's responsibility to install the correct action.  Note that  
  285.      * when the keyboard accelerator is typed, it will work whether or
  286.      * not the menu is currently displayed.
  287.      *
  288.      * @param keyStroke the <code>KeyStroke</code> which will
  289.      *  serve as an accelerator  
  290.      * @beaninfo  
  291.      *     description: The keystroke combination which will invoke the  
  292.      *                  JMenuItem's actionlisteners without navigating the
  293.      *   menu hierarchy  
  294.      *           bound: true
  295.      *       preferred: true
  296.      */
  297.     public void setAccelerator(KeyStroke keyStroke) {
  298. KeyStroke oldAccelerator = accelerator;
  299.         this.accelerator = keyStroke;
  300. firePropertyChange("accelerator", oldAccelerator, accelerator);
  301.     }
  302.     /**
  303.      * Returns the <code>KeyStroke</code> which serves as an accelerator  
  304.      * for the menu item.
  305.      * @return a <code>KeyStroke</code> object identifying the
  306.      *  accelerator key
  307.      */
  308.     public KeyStroke getAccelerator() {
  309.         return this.accelerator;
  310.     }
  311.     /**
  312.      * Factory method which sets the <code>ActionEvent</code> source's
  313.      * properties according to values from the <code>Action</code> instance.
  314.      * The properties which are set may differ for subclasses.
  315.      * By default, this method sets the same properties as
  316.      * <code>AbstractButton.configurePropertiesFromAction()</code>, plus
  317.      * <code>Accelerator</code>.
  318.      *
  319.      * @param a the <code>Action</code> from which to get the properties,
  320.      *  or <code>null</code>
  321.      * @since 1.3
  322.      * @see Action
  323.      */
  324.     protected void configurePropertiesFromAction(Action a) {
  325.         super.configurePropertiesFromAction(a);
  326.         KeyStroke ks = (a==null) ? null :
  327.             (KeyStroke)a.getValue(Action.ACCELERATOR_KEY);
  328.         setAccelerator(ks==null ? null : ks);
  329.     }
  330.     /**
  331.      * Factory method which creates the <code>PropertyChangeListener</code>
  332.      * used to update the <code>ActionEvent</code> source as properties
  333.      * change on its <code>Action</code> instance.  
  334.      * Subclasses may override this in order to provide their own
  335.      * <code>PropertyChangeListener</code> if the set of
  336.      * properties which should be kept up to date differs.
  337.      * <p>
  338.      * Note that <code>PropertyChangeListeners</code> should avoid holding
  339.      * strong references to the <code>ActionEvent</code> source,
  340.      * as this may hinder garbage collection of the <code>ActionEvent</code>
  341.      * source and all components in its containment hierarchy.   
  342.      *
  343.      * @param a the <code>Action</code> from which to get the properties,
  344.      *  or <code>null</code>
  345.      *
  346.      * @since 1.3
  347.      * @see Action
  348.      */
  349.     protected PropertyChangeListener createActionPropertyChangeListener(Action a) {
  350.         return new AbstractActionPropertyChangeListener(this, a){
  351.     public void propertyChange(PropertyChangeEvent e) {    
  352.  String propertyName = e.getPropertyName();
  353.  JMenuItem mi = (JMenuItem)getTarget();
  354.  if (mi == null) {   //WeakRef GC'ed in 1.2
  355.      Action action = (Action)e.getSource();
  356.      action.removePropertyChangeListener(this);
  357.  } else {
  358.      if (e.getPropertyName().equals(Action.NAME)) {
  359.   String text = (String) e.getNewValue();
  360.   mi.setText(text);
  361.   mi.repaint();
  362.      } else if (propertyName.equals("enabled" )) {
  363.   Boolean enabledState = (Boolean) e.getNewValue();
  364.   mi.setEnabled(enabledState.booleanValue());
  365.   mi.repaint();
  366.      } else if (e.getPropertyName().equals(Action.SMALL_ICON)) {
  367.   Icon icon = (Icon) e.getNewValue();
  368.   mi.setIcon(icon);
  369.   mi.invalidate();
  370.   mi.repaint();
  371.      } else if (e.getPropertyName().equals(Action.MNEMONIC_KEY)) {
  372.   Integer mn = (Integer) e.getNewValue();
  373.   mi.setMnemonic(mn.intValue());
  374.   mi.invalidate();
  375.   mi.repaint();
  376.      }
  377.  }
  378.     }
  379. };
  380.     }
  381.     /**
  382.      * Processes a mouse event forwarded from the
  383.      * <code>MenuSelectionManager</code> and changes the menu
  384.      * selection, if necessary, by using the
  385.      * <code>MenuSelectionManager</code>'s API.
  386.      * <p>
  387.      * Note: you do not have to forward the event to sub-components.
  388.      * This is done automatically by the <code>MenuSelectionManager</code>.
  389.      *
  390.      * @param e   a <code>MouseEvent</code>
  391.      * @param path  the <code>MenuElement</code> path array
  392.      * @param manager   the <code>MenuSelectionManager</code>
  393.      */
  394.     public void processMouseEvent(MouseEvent e,MenuElement path[],MenuSelectionManager manager) {
  395. processMenuDragMouseEvent(
  396.   new MenuDragMouseEvent(e.getComponent(), e.getID(),
  397.     e.getWhen(),
  398.     e.getModifiers(), e.getX(), e.getY(),
  399.     e.getClickCount(), e.isPopupTrigger(),
  400.     path, manager));
  401.     }
  402.     /**
  403.      * Processes a key event forwarded from the  
  404.      * <code>MenuSelectionManager</code> and changes the menu selection,
  405.      * if necessary, by using <code>MenuSelectionManager</code>'s API.
  406.      * <p>
  407.      * Note: you do not have to forward the event to sub-components.
  408.      * This is done automatically by the <code>MenuSelectionManager</code>.
  409.      *
  410.      * @param e  a <code>KeyEvent</code>
  411.      * @param path the <code>MenuElement</code> path array
  412.      * @param manager   the <code>MenuSelectionManager</code>
  413.      */
  414.     public void processKeyEvent(KeyEvent e,MenuElement path[],MenuSelectionManager manager) {
  415. if (DEBUG) {
  416.     System.out.println("in JMenuItem.processKeyEvent/3 for " + getText() +
  417.       "  " + KeyStroke.getKeyStrokeForEvent(e));
  418. }
  419.         MenuKeyEvent mke = new MenuKeyEvent(e.getComponent(), e.getID(),
  420.          e.getWhen(), e.getModifiers(),
  421.          e.getKeyCode(), e.getKeyChar(),
  422.          path, manager);
  423.         processMenuKeyEvent(mke);
  424.    
  425.         if (mke.isConsumed())  {
  426.             e.consume();
  427.         }
  428.     }
  429.     /**
  430.      * Handles mouse drag in a menu.
  431.      *
  432.      * @param e  a <code>MenuDragMouseEvent</code> object
  433.      */
  434.     public void processMenuDragMouseEvent(MenuDragMouseEvent e) {
  435. switch (e.getID()) {
  436. case MouseEvent.MOUSE_ENTERED:
  437.     fireMenuDragMouseEntered(e); break;
  438. case MouseEvent.MOUSE_EXITED:
  439.     fireMenuDragMouseExited(e); break;
  440. case MouseEvent.MOUSE_DRAGGED:
  441.     fireMenuDragMouseDragged(e); break;
  442. case MouseEvent.MOUSE_RELEASED:
  443.     fireMenuDragMouseReleased(e); break;
  444. default:
  445.     break;
  446. }
  447.     }
  448.     /**
  449.      * Handles a keystroke in a menu.
  450.      *
  451.      * @param e  a <code>MenuKeyEvent</code> object
  452.      */
  453.     public void processMenuKeyEvent(MenuKeyEvent e) {
  454. if (DEBUG) {
  455.     System.out.println("in JMenuItem.processMenuKeyEvent for " + getText()+
  456.       "  " + KeyStroke.getKeyStrokeForEvent(e));
  457. }
  458. switch (e.getID()) {
  459. case KeyEvent.KEY_PRESSED:
  460.     fireMenuKeyPressed(e); break;
  461. case KeyEvent.KEY_RELEASED:
  462.     fireMenuKeyReleased(e); break;
  463. case KeyEvent.KEY_TYPED:
  464.     fireMenuKeyTyped(e); break;
  465. default:
  466.     break;
  467. }
  468.     }
  469.     /**
  470.      * Notifies all listeners that have registered interest for
  471.      * notification on this event type.  
  472.      *
  473.      * @param event a <code>MenuMouseDragEvent</code>
  474.      * @see EventListenerList
  475.      */
  476.     protected void fireMenuDragMouseEntered(MenuDragMouseEvent event) {
  477.         // Guaranteed to return a non-null array
  478.         Object[] listeners = listenerList.getListenerList();
  479.         // Process the listeners last to first, notifying
  480.         // those that are interested in this event
  481.         for (int i = listeners.length-2; i>=0; i-=2) {
  482.             if (listeners[i]==MenuDragMouseListener.class) {
  483.                 // Lazily create the event:
  484.                 ((MenuDragMouseListener)listeners[i+1]).menuDragMouseEntered(event);
  485.             }         
  486.         }
  487.     } 
  488.     /**
  489.      * Notifies all listeners that have registered interest for
  490.      * notification on this event type.   
  491.      *
  492.      * @param event a <code>MenuDragMouseEvent</code>
  493.      * @see EventListenerList
  494.      */
  495.     protected void fireMenuDragMouseExited(MenuDragMouseEvent event) {
  496.         // Guaranteed to return a non-null array
  497.         Object[] listeners = listenerList.getListenerList();
  498.         // Process the listeners last to first, notifying
  499.         // those that are interested in this event
  500.         for (int i = listeners.length-2; i>=0; i-=2) {
  501.             if (listeners[i]==MenuDragMouseListener.class) {
  502.                 // Lazily create the event:
  503.                 ((MenuDragMouseListener)listeners[i+1]).menuDragMouseExited(event);
  504.             }         
  505.         }
  506.     } 
  507.     /**
  508.      * Notifies all listeners that have registered interest for
  509.      * notification on this event type.
  510.      *
  511.      * @param event a <code>MenuDragMouseEvent</code>
  512.      * @see EventListenerList
  513.      */
  514.     protected void fireMenuDragMouseDragged(MenuDragMouseEvent event) {
  515.         // Guaranteed to return a non-null array
  516.         Object[] listeners = listenerList.getListenerList();
  517.         // Process the listeners last to first, notifying
  518.         // those that are interested in this event
  519.         for (int i = listeners.length-2; i>=0; i-=2) {
  520.             if (listeners[i]==MenuDragMouseListener.class) {
  521.                 // Lazily create the event:
  522.                 ((MenuDragMouseListener)listeners[i+1]).menuDragMouseDragged(event);
  523.             }         
  524.         }
  525.     } 
  526.     /**
  527.      * Notifies all listeners that have registered interest for
  528.      * notification on this event type.  
  529.      *
  530.      * @param event a <code>MenuDragMouseEvent</code>
  531.      * @see EventListenerList
  532.      */
  533.     protected void fireMenuDragMouseReleased(MenuDragMouseEvent event) {
  534.         // Guaranteed to return a non-null array
  535.         Object[] listeners = listenerList.getListenerList();
  536.         // Process the listeners last to first, notifying
  537.         // those that are interested in this event
  538.         for (int i = listeners.length-2; i>=0; i-=2) {
  539.             if (listeners[i]==MenuDragMouseListener.class) {
  540.                 // Lazily create the event:
  541.                 ((MenuDragMouseListener)listeners[i+1]).menuDragMouseReleased(event);
  542.             }         
  543.         }
  544.     } 
  545.     /**
  546.      * Notifies all listeners that have registered interest for
  547.      * notification on this event type.  
  548.      *
  549.      * @param a <code>MenuKeyEvent</code>
  550.      * @see EventListenerList
  551.      */
  552.     protected void fireMenuKeyPressed(MenuKeyEvent event) {
  553. if (DEBUG) {
  554.     System.out.println("in JMenuItem.fireMenuKeyPressed for " + getText()+
  555.       "  " + KeyStroke.getKeyStrokeForEvent(event));
  556. }
  557.         // Guaranteed to return a non-null array
  558.         Object[] listeners = listenerList.getListenerList();
  559.         // Process the listeners last to first, notifying
  560.         // those that are interested in this event
  561.         for (int i = listeners.length-2; i>=0; i-=2) {
  562.             if (listeners[i]==MenuKeyListener.class) {
  563.                 // Lazily create the event:
  564.                 ((MenuKeyListener)listeners[i+1]).menuKeyPressed(event);
  565.             }         
  566.         }
  567.     } 
  568.     /**
  569.      * Notifies all listeners that have registered interest for
  570.      * notification on this event type.  
  571.      *
  572.      * @param a <code>MenuKeyEvent</code>
  573.      * @see EventListenerList
  574.      */
  575.     protected void fireMenuKeyReleased(MenuKeyEvent event) {
  576. if (DEBUG) {
  577.     System.out.println("in JMenuItem.fireMenuKeyReleased for " + getText()+
  578.       "  " + KeyStroke.getKeyStrokeForEvent(event));
  579. }
  580.         // Guaranteed to return a non-null array
  581.         Object[] listeners = listenerList.getListenerList();
  582.         // Process the listeners last to first, notifying
  583.         // those that are interested in this event
  584.         for (int i = listeners.length-2; i>=0; i-=2) {
  585.             if (listeners[i]==MenuKeyListener.class) {
  586.                 // Lazily create the event:
  587.                 ((MenuKeyListener)listeners[i+1]).menuKeyReleased(event);
  588.             }         
  589.         }
  590.     } 
  591.     /**
  592.      * Notifies all listeners that have registered interest for
  593.      * notification on this event type.  
  594.      *
  595.      * @param event a <code>MenuKeyEvent</code>
  596.      * @see EventListenerList
  597.      */
  598.     protected void fireMenuKeyTyped(MenuKeyEvent event) {
  599. if (DEBUG) {
  600.     System.out.println("in JMenuItem.fireMenuKeyTyped for " + getText()+
  601.       "  " + KeyStroke.getKeyStrokeForEvent(event));
  602. }
  603.         // Guaranteed to return a non-null array
  604.         Object[] listeners = listenerList.getListenerList();
  605.         // Process the listeners last to first, notifying
  606.         // those that are interested in this event
  607.         for (int i = listeners.length-2; i>=0; i-=2) {
  608.             if (listeners[i]==MenuKeyListener.class) {
  609.                 // Lazily create the event:
  610.                 ((MenuKeyListener)listeners[i+1]).menuKeyTyped(event);
  611.             }         
  612.         }
  613.     } 
  614.     /**
  615.      * Called by the <code>MenuSelectionManager</code> when the
  616.      * <code>MenuElement</code> is selected or unselected.
  617.      *  
  618.      * @param isIncluded  true if this menu item is on the part of the menu
  619.      *                    path that changed, false if this menu is part of the
  620.      *                    a menu path that changed, but this particular part of
  621.      *                    that path is still the same
  622.      * @see MenuSelectionManager#setSelectedPath(MenuElement[])
  623.      */
  624.     public void menuSelectionChanged(boolean isIncluded) {
  625.         setArmed(isIncluded);
  626.     }
  627.     /**
  628.      * This method returns an array containing the sub-menu
  629.      * components for this menu component.
  630.      *
  631.      * @return an array of <code>MenuElement</code>s
  632.      */
  633.     public MenuElement[] getSubElements() {
  634.         return new MenuElement[0];
  635.     }
  636.    
  637.     /**
  638.      * Returns the <code>java.awt.Component</code> used to paint
  639.      * this object. The returned component will be used to convert
  640.      * events and detect if an event is inside a menu component.
  641.      *
  642.      * @return the <code>Component</code> that paints this menu item
  643.      */
  644.     public Component getComponent() {
  645.         return this;
  646.     }
  647.     /**
  648.      * Adds a <code>MenuDragMouseListener</code> to the menu item.
  649.      *
  650.      * @param l the <code>MenuDragMouseListener</code> to be added
  651.      */
  652.     public void addMenuDragMouseListener(MenuDragMouseListener l) {
  653.         listenerList.add(MenuDragMouseListener.class, l);
  654.     }
  655.     /**
  656.      * Removes a <code>MenuDragMouseListener</code> from the menu item.
  657.      *
  658.      * @param l the <code>MenuDragMouseListener</code> to be removed
  659.      */
  660.     public void removeMenuDragMouseListener(MenuDragMouseListener l) {
  661.         listenerList.remove(MenuDragMouseListener.class, l);
  662.     }
  663.     /**
  664.      * Returns an array of all the <code>MenuDragMouseListener</code>s added
  665.      * to this JMenuItem with addMenuDragMouseListener().
  666.      *  
  667.      * @return all of the <code>MenuDragMouseListener</code>s added or an empty
  668.      *         array if no listeners have been added
  669.      * @since 1.4
  670.      */
  671.     public MenuDragMouseListener[] getMenuDragMouseListeners() {
  672.         return (MenuDragMouseListener[])listenerList.getListeners(
  673.                 MenuDragMouseListener.class);
  674.     }
  675.     /**
  676.      * Adds a <code>MenuKeyListener</code> to the menu item.
  677.      *
  678.      * @param l the <code>MenuKeyListener</code> to be added
  679.      */
  680.     public void addMenuKeyListener(MenuKeyListener l) {
  681.         listenerList.add(MenuKeyListener.class, l);
  682.     }
  683.     /**
  684.      * Removes a <code>MenuKeyListener</code> from the menu item.
  685.      *
  686.      * @param l the <code>MenuKeyListener</code> to be removed
  687.      */
  688.     public void removeMenuKeyListener(MenuKeyListener l) {
  689.         listenerList.remove(MenuKeyListener.class, l);
  690.     }
  691.     /**
  692.      * Returns an array of all the <code>MenuKeyListener</code>s added
  693.      * to this JMenuItem with addMenuKeyListener().
  694.      *  
  695.      * @return all of the <code>MenuKeyListener</code>s added or an empty
  696.      *         array if no listeners have been added
  697.      * @since 1.4
  698.      */
  699.     public MenuKeyListener[] getMenuKeyListeners() {
  700.         return (MenuKeyListener[])listenerList.getListeners(
  701.                 MenuKeyListener.class);
  702.     }
  703.     /**
  704.      * See JComponent.readObject() for information about serialization
  705.      * in Swing.
  706.      */
  707.     private void readObject(ObjectInputStream s)
  708. throws IOException, ClassNotFoundException
  709.     {
  710.         s.defaultReadObject();
  711. if (getUIClassID().equals(uiClassID)) {
  712.     updateUI();
  713. }
  714.     }
  715.     private void writeObject(ObjectOutputStream s) throws IOException {
  716.         s.defaultWriteObject();
  717.         if (getUIClassID().equals(uiClassID)) {
  718.             byte count = JComponent.getWriteObjCounter(this);
  719.             JComponent.setWriteObjCounter(this, --count);
  720.             if (count == 0 && ui != null) {
  721.                 ui.installUI(this);
  722.             }
  723.         }
  724.     }
  725.     /**
  726.      * Returns a string representation of this <code>JMenuItem</code>.
  727.      * This method is intended to be used only for debugging purposes,
  728.      * and the content and format of the returned string may vary between       
  729.      * implementations. The returned string may be empty but may not  
  730.      * be <code>null</code>.
  731.      *  
  732.      * @return  a string representation of this <code>JMenuItem</code>
  733.      */
  734.     protected String paramString() {
  735. return super.paramString();
  736.     }
  737. /////////////////
  738. // Accessibility support
  739. ////////////////
  740.     /**
  741.      * Returns the <code>AccessibleContext</code> associated with this  
  742.      * <code>JMenuItem</code>. For <code>JMenuItem</code>s,
  743.      * the <code>AccessibleContext</code> takes the form of an  
  744.      * <code>AccessibleJMenuItem</code>.  
  745.      * A new AccessibleJMenuItme instance is created if necessary.
  746.      *
  747.      * @return an <code>AccessibleJMenuItem</code> that serves as the  
  748.      *         <code>AccessibleContext</code> of this <code>JMenuItem</code>
  749.      */
  750.     public AccessibleContext getAccessibleContext() {
  751.         if (accessibleContext == null) {
  752.             accessibleContext = new AccessibleJMenuItem();
  753.         }
  754.         return accessibleContext;
  755.     }
  756.     /**
  757.      * This class implements accessibility support for the  
  758.      * <code>JMenuItem</code> class.  It provides an implementation of the  
  759.      * Java Accessibility API appropriate to menu item user-interface  
  760.      * elements.
  761.      * <p>
  762.      * <strong>Warning:</strong>
  763.      * Serialized objects of this class will not be compatible with
  764.      * future Swing releases. The current serialization support is
  765.      * appropriate for short term storage or RMI between applications running
  766.      * the same version of Swing.  As of 1.4, support for long term storage
  767.      * of all JavaBeans<sup><font size="-2">TM</font></sup>
  768.      * has been added to the <code>java.beans</code> package.
  769.      * Please see {@link java.beans.XMLEncoder}.
  770.      */
  771.     protected class AccessibleJMenuItem extends AccessibleAbstractButton implements ChangeListener {
  772. private boolean isArmed = false;
  773. private boolean hasFocus = false;
  774. private boolean isPressed = false;
  775. private boolean isSelected = false;
  776.         AccessibleJMenuItem() {
  777.             super();
  778.             JMenuItem.this.addChangeListener(this);
  779.         }
  780.         /**
  781.          * Get the role of this object.
  782.          *
  783.          * @return an instance of AccessibleRole describing the role of the  
  784.          * object
  785.          */
  786.         public AccessibleRole getAccessibleRole() {
  787.             return AccessibleRole.MENU_ITEM;
  788.         }
  789.         /**
  790.          * Supports the change listener interface and fires property changes.
  791.          */
  792.         public void stateChanged(ChangeEvent e) {
  793.             firePropertyChange(AccessibleContext.ACCESSIBLE_VISIBLE_DATA_PROPERTY,
  794.                                Boolean.valueOf(false), Boolean.valueOf(true));
  795.             if (JMenuItem.this.getModel().isArmed()) {
  796.  if (!isArmed) {
  797.      isArmed = true;
  798.      firePropertyChange(
  799.                 AccessibleContext.ACCESSIBLE_STATE_PROPERTY,
  800.                         null, AccessibleState.ARMED);
  801.  }
  802.             } else {
  803.  if (isArmed) {
  804.      isArmed = false;
  805.      firePropertyChange(
  806.                 AccessibleContext.ACCESSIBLE_STATE_PROPERTY,
  807.                         AccessibleState.ARMED, null);
  808.  }
  809.     }
  810.             if (JMenuItem.this.isFocusOwner()) {
  811.  if (!hasFocus) {
  812.      hasFocus = true;
  813.      firePropertyChange(
  814.                 AccessibleContext.ACCESSIBLE_STATE_PROPERTY,
  815.                         null, AccessibleState.FOCUSED);
  816.  }
  817.             } else {
  818.  if (hasFocus) {
  819.      hasFocus = false;
  820.      firePropertyChange(
  821.                 AccessibleContext.ACCESSIBLE_STATE_PROPERTY,
  822.                         AccessibleState.FOCUSED, null);
  823.  }
  824.     }
  825.             if (JMenuItem.this.getModel().isPressed()) {
  826.  if (!isPressed) {
  827.      isPressed = true;
  828.      firePropertyChange(
  829.                 AccessibleContext.ACCESSIBLE_STATE_PROPERTY,
  830.                         null, AccessibleState.PRESSED);
  831.  }
  832.             } else {
  833.  if (isPressed) {
  834.      isPressed = false;
  835.      firePropertyChange(
  836.                 AccessibleContext.ACCESSIBLE_STATE_PROPERTY,
  837.                         AccessibleState.PRESSED, null);
  838.  }
  839.     }
  840.             if (JMenuItem.this.getModel().isSelected()) {
  841.  if (!isSelected) {
  842.      isSelected = true;
  843.      firePropertyChange(
  844.                 AccessibleContext.ACCESSIBLE_STATE_PROPERTY,
  845.                         null, AccessibleState.CHECKED);
  846.  }
  847.             } else {
  848.  if (isSelected) {
  849.      isSelected = false;
  850.      firePropertyChange(
  851.                 AccessibleContext.ACCESSIBLE_STATE_PROPERTY,
  852.                         AccessibleState.CHECKED, null);
  853.  }
  854.     }
  855.         }
  856.     } // inner class AccessibleJMenuItem
  857. }




 
devant la faible production journalière de ce topic en ces périodes de fêtes, je me vois dans l'obligation de quoter ce genre de post pour étoffer un peu mon super reply :o


---------------
"I wonder if the internal negative pressure in self pumping toothpaste tubes is adjusted for different market altitudes." John Carmack
n°599598
antp
Super Administrateur
Champion des excuses bidons
Posté le 30-12-2003 à 21:31:54  profilanswer
 

[:toad666] c'est pas une raison pour quoter ce pavé de code


Message édité par antp le 30-12-2003 à 21:32:17

---------------
mes programmes ·· les voitures dans les films ·· apprenez à écrire
n°599599
the real m​oins moins
Posté le 30-12-2003 à 21:33:17  profilanswer
 

mareek a écrit :


existe pas dans le larousse :o

c'est quand tu sors un plat du four d'une seule main.
 
 
(faux edit: oh le porc il a quoté nraynaud)


---------------
Hey toi, tu veux acheter des minifigurines Lego, non ?
n°599600
mareek
Et de 3 \o/
Posté le 30-12-2003 à 21:35:10  profilanswer
 

mareek a écrit :

NP: Placebo - Protect me from what I want (VF)  


tiens c'est bizarre, je trouve pas la version que j'ai entendu à la radio :??:


---------------
"I wonder if the internal negative pressure in self pumping toothpaste tubes is adjusted for different market altitudes." John Carmack
n°599601
nraynaud
lol
Posté le 30-12-2003 à 21:35:39  profilanswer
 

mareek a écrit :


existe pas dans le larousse :o


Citation :

Manique ou Manicle, n. f. Manchon de cuir que les cordonniers, les bourreliers, etc., se mettent autours de la main pour empêcher qu'elle ne soit blessée par le fil dont ils se servent ou l'halêne

sans doute un néologisme pléonasmique pompeux pour manique.


---------------
trainoo.com, c'est fini
n°599602
urd-sama
waste of space
Posté le 30-12-2003 à 21:35:51  profilanswer
 

j'ai l'horrible impression d'avoir déjà vécu cette scène [:totoz]

n°599603
gizmo
Posté le 30-12-2003 à 21:37:22  profilanswer
 

urd-sama a écrit :

j'ai l'horrible impression d'avoir déjà vécu cette scène [:totoz]


Celle où tu es heureuse? pas possible :o

n°599604
*syl*
--&gt; []
Posté le 30-12-2003 à 21:37:24  profilanswer
 

antp a écrit :

[:toad666] c'est pas une raison pour quoter ce pavé de code

Il voulait peut-être battre son record de taille de post [:spamafote]

n°599605
nraynaud
lol
Posté le 30-12-2003 à 21:38:18  profilanswer
 

urd-sama a écrit :

j'ai l'horrible impression d'avoir déjà vécu cette scène [:totoz]

Tu lis souvent le code des classes du JDK ? auquel cas se serait probable.


---------------
trainoo.com, c'est fini
n°599606
mareek
Et de 3 \o/
Posté le 30-12-2003 à 21:38:41  profilanswer
 

urd-sama a écrit :

j'ai l'horrible impression d'avoir déjà vécu cette scène [:totoz]


c'est un bug de la matrice [:spamafote]


---------------
"I wonder if the internal negative pressure in self pumping toothpaste tubes is adjusted for different market altitudes." John Carmack
n°599607
urd-sama
waste of space
Posté le 30-12-2003 à 21:41:47  profilanswer
 

nraynaud a écrit :

Tu lis souvent le code des classes du JDK ? auquel cas se serait probable.


un très long code, antp qui gueule, on m'appelle pour aller matter la tv [:totoz]
 
gizmo> qu'est-ce que je t'ai fais aujourd'hui bon sang [:xx_xx]
mareek> [:totoz]

n°599608
gizmo
Posté le 30-12-2003 à 21:44:12  profilanswer
 

urd-sama a écrit :


gizmo> qu'est-ce que je t'ai fais aujourd'hui bon sang [:xx_xx]


rien, si ce n'est tendre des perche longue comme c'est pas permis. J'ai résisté à toute les autres, ici j'ai craqué [:spamafote]
 
PS: le second degré, ca fait pas de mal de temps en temps...

n°599609
nraynaud
lol
Posté le 30-12-2003 à 21:44:34  profilanswer
 

mareek a écrit :


c'est un bug de la matrice [:spamafote]

Code :
  1. // <pre>
  2. // Copyright 2001 Ken Perlin
  3. package render;
  4. //----- SIMPLE CLASS TO HANDLE BASIC 3D MATRIX OPERATIONS -----
  5. /**
  6.    Provides functionality for 4x4 3D matrix manipulations.
  7.    It's thread-safe.
  8.    @author Ken Perlin 2001
  9. */
  10. public class Matrix {
  11.    private String notice = "Copyright 2001 Ken Perlin. All rights reserved.";
  12.    private static double identity[] = new double[16];
  13.    static {
  14.       for (int i = 0; i < 4; i++)
  15.          for (int j = 0; j < 4; j++) {
  16.             identity[(i << 2) + j] = (i == j ? 1 : 0);
  17.          }
  18.    }
  19.    private double mMatrix[] = new double[16];
  20.    private double tmp[] = new double[16];
  21.    private double tmp2[] = new double[16];
  22.    /**
  23.       Default constructor.
  24.    */
  25.    public Matrix() {
  26.    }
  27.    /**
  28.       Constructor takes an array of 16 elements to populate the 4x4 matrix.
  29.       @param a 4x4 quaternion values
  30.    */
  31.    public Matrix(double a[]) {
  32.       if (a.length == 4) { // quaternion
  33.          double Nq = a[0] * a[0] + a[1] * a[1] + a[2] * a[2] + a[3] * a[3];
  34.          double s = (Nq > 0.0) ? (2.0 / Nq) : 0.0;
  35.          double xs = a[0] * s, ys = a[1] * s, zs = a[2] * s;
  36.          double wx = a[3] * xs, wy = a[3] * ys, wz = a[3] * zs;
  37.          double xx = a[0] * xs, xy = a[0] * ys, xz = a[0] * zs;
  38.          double yy = a[1] * ys, yz = a[1] * zs, zz = a[2] * zs;
  39.          mMatrix[(0 << 2) + 0] = 1.0 - (yy + zz);
  40.          mMatrix[(1 << 2) + 0] = xy + wz;
  41.          mMatrix[(2 << 2) + 0] = xz - wy;
  42.          mMatrix[(0 << 2) + 1] = xy - wz;
  43.          mMatrix[(1 << 2) + 1] = 1.0 - (xx + zz);
  44.          mMatrix[(2 << 2) + 1] = yz + wx;
  45.          mMatrix[(0 << 2) + 2] = xz + wy;
  46.          mMatrix[(1 << 2) + 2] = yz - wx;
  47.          mMatrix[(2 << 2) + 2] = 1.0 - (xx + yy);
  48.          mMatrix[(0 << 2) + 3] = mMatrix[(1 << 2) + 3] = mMatrix[(2 << 2) + 3] = mMatrix[(3 << 2) + 0] = mMatrix[(3 << 2) + 1] = mMatrix[(3 << 2) + 2] = 0.0;
  49.          mMatrix[(3 << 2) + 3] = 1.0;
  50.       } else {
  51.          System.arraycopy(a, 0, mMatrix, 0, 16);
  52.       }
  53.    }
  54.    /**
  55.       Returns matrix value at m[i, j].
  56.       @param i row index
  57.       @param j column index
  58.       @return value at specified location
  59.    */
  60.    public final double get(int i, int j) {
  61.       return mMatrix[(i << 2) + j];
  62.    }
  63.    /**
  64.       Sets matrix value at m[i,j] to d.
  65.       @param i row index
  66.       @param j column index
  67.       @param d the new value
  68.    */
  69.    public final void set(int i, int j, double d) {
  70.       mMatrix[(i << 2) + j] = d;
  71.    }
  72.    /**  
  73.        Returns the actual array containing the matrix (not thread-safe).
  74.        @return the actual matrix array of 16 elements
  75.        @see #get
  76.    */
  77.    public final double[] getUnsafe() {
  78.       return mMatrix;
  79.    }
  80.    /**
  81.       Returns a copy of matrix (thread-safe)/
  82.       @return a copy of the matrix array (16 elements).
  83.       @see #getUnsafe
  84.    */
  85.    public final double[] get() {
  86.       double m[] = new double[16];
  87.       System.arraycopy(mMatrix, 0, m, 0, 16);
  88.       return m;
  89.    }
  90.    /**
  91.       Sets the desired matrix to the identity matrix.
  92.       @param m the matrix to be modified
  93.    */
  94.    public static final void identity(Matrix m) {
  95.       System.arraycopy(identity, 0, m.getUnsafe(), 0, 16);
  96.    }
  97.    /**
  98.       Sets the object matrix to the identity matrix.
  99.    */
  100.    public final void identity() {
  101.       System.arraycopy(identity, 0, mMatrix, 0, 16);
  102.    }
  103.    /**
  104.       Sets the desired matrix array to the identity matrix.
  105.       @param m matrix array
  106.    */
  107.    private static void identity(double[] m) {
  108.       System.arraycopy(identity, 0, m, 0, 16);
  109.    }
  110.    /**
  111.       Copies contents from matrix src to the object matrix.
  112.       @param src original matrix to be copied
  113.    */
  114.    public final void copy(Matrix src) {
  115.       System.arraycopy(src.getUnsafe(), 0, mMatrix, 0, 16);
  116.    }
  117.    private void preMultiply(double b[]) {
  118.       double dst[] = getUnsafe();
  119.       System.arraycopy(mMatrix, 0, tmp, 0, 16);
  120.       for (int i = 0; i < 4; i++)
  121.          for (int j = 0; j < 4; j++) {
  122.             dst[(i << 2) + j] = 0.0;
  123.             dst[(i << 2) + j] += tmp[(i << 2) + 0] * b[(0 << 2) + j];
  124.             dst[(i << 2) + j] += tmp[(i << 2) + 1] * b[(1 << 2) + j];
  125.             dst[(i << 2) + j] += tmp[(i << 2) + 2] * b[(2 << 2) + j];
  126.             dst[(i << 2) + j] += tmp[(i << 2) + 3] * b[(3 << 2) + j];
  127.          }
  128.    }
  129.    /**
  130.       Premultiplies the object matrix by mb and stores the result in the object;
  131.       As a result, the translation, scaling and rotation operations  
  132.       contained in mb are effectively performed before those in the object .  
  133.       @param mb the multiplier matrix
  134.    */
  135.    public final void preMultiply(Matrix mb) {
  136.       preMultiply(mb.getUnsafe());
  137.    }
  138.    private void postMultiply(double b[]) {
  139.       double dst[] = getUnsafe();
  140.       System.arraycopy(mMatrix, 0, tmp, 0, 16);
  141.       for (int i = 0; i < 4; i++)
  142.          for (int j = 0; j < 4; j++) {
  143.             dst[(i << 2) + j] = 0;
  144.             dst[(i << 2) + j] += b[(i << 2) + 0] * tmp[(0 << 2) + j];
  145.             dst[(i << 2) + j] += b[(i << 2) + 1] * tmp[(1 << 2) + j];
  146.             dst[(i << 2) + j] += b[(i << 2) + 2] * tmp[(2 << 2) + j];
  147.             dst[(i << 2) + j] += b[(i << 2) + 3] * tmp[(3 << 2) + j];
  148.          }
  149.    }
  150.    /**  
  151.         Postmultiplies the object matrix by mb and stores the result in the  
  152.         object matrix;
  153.         As a result, the translation, scaling and rotation operations  
  154.         contained in mb are effectively performed after those in the object
  155.         matrix .  
  156.         @param mb the multiplier matrix
  157.     */
  158.    public final void postMultiply(Matrix mb) {
  159.       postMultiply(mb.getUnsafe());
  160.    }
  161.    //----- ROUTINES TO ROTATE AND TRANSLATE MATRICES -----
  162.    /**
  163.         Applies a translation by x, y, z to the obeject matrix. The shape or  
  164.         orientation of the object are not affected.  
  165.         @param x amount of translation along the x axis
  166.         @param y amount of translation along the y axis
  167.         @param z amount of translation along the z axis
  168.      */
  169.    public final void translate(double x, double y, double z) {
  170.       makeTranslationMatrix(tmp2, x, y, z);
  171.       preMultiply(tmp2);
  172.    }
  173.    /**  
  174.     Modifies the object matrix to rotate about the X axis by angle theta.
  175.          @param theta angle of rotation in radians
  176.      */
  177.    public final void rotateX(double theta) {
  178.       makeRotationMatrix(tmp2, 1, 2, theta);
  179.       preMultiply(tmp2);
  180.    }
  181.    /**  
  182.     Modifies the object matrix to rotate about the Y axis by angle theta.
  183.          @param theta angle of rotation in radians
  184.      */
  185.    public final void rotateY(double theta) {
  186.       makeRotationMatrix(tmp2, 2, 0, theta);
  187.       preMultiply(tmp2);
  188.    }
  189.    /**  
  190.     Modifies the object matrix to rotate about the Z axis by angle theta.
  191.          @param theta angle of rotation in radians
  192.      */
  193.    public final void rotateZ(double theta) {
  194.       makeRotationMatrix(tmp2, 0, 1, theta);
  195.       preMultiply(tmp2);
  196.    }
  197.    /**
  198.       Modifies the object matrix to rotate by angle theta about axis x,y,z.
  199.      @param theta angle of rotation in radians
  200.      @param x 1st coord of rotation axis
  201.      @param y 2nd coord of rotation axis
  202.      @param z 3rd coord of rotation axis
  203.      */
  204.    public final void rotate(double theta, double x, double y, double z) {
  205.       double unY = Math.atan2(y, x);
  206.       double unX = Math.atan2(Math.sqrt(x * x + y * y), z);
  207.       rotateZ(unY);
  208.       rotateY(unX);
  209.       rotateZ(theta);
  210.       rotateY(-unX);
  211.       rotateZ(-unY);
  212.    }
  213.    /**  
  214.     Scales the transformation matrix by x,y,z in the respective  
  215.     directions.  
  216.           @param x scale factor along the x axis
  217.     @param y scale factor along the y axis
  218.     @param z scale factor along the z axis
  219.       */
  220.    public final void scale(double x, double y, double z) {
  221.       makeScaleMatrix(tmp2, x, y, z);
  222.       preMultiply(tmp2);
  223.    }
  224.    //----- INVERTING A 4x4 THAT WAS CREATED BY TRANSLATIONS+ROTATIONS+SCALES
  225.    /**
  226.       Inverts the 4x4 matrix and stores the result in the object
  227.       matrix.   
  228.       @param msrc original matrix to be inverted
  229.    */
  230.    public final void invert(Matrix msrc) {
  231.       double src[] = msrc.getUnsafe();
  232.       double dst[] = mMatrix;
  233.       // COMPUTE ADJOINT COFACTOR MATRIX FOR THE ROTATION+SCALE 3x3
  234.       for (int i = 0; i < 3; i++)
  235.          for (int j = 0; j < 3; j++) {
  236.             int i0 = (i + 1) % 3;
  237.             int i1 = (i + 2) % 3;
  238.             int j0 = (j + 1) % 3;
  239.             int j1 = (j + 2) % 3;
  240.             dst[(j << 2) + i] = src[(i0 << 2) + j0] * src[(i1 << 2) + j1] - src[(i0 << 2) + j1] * src[(i1 << 2) + j0];
  241.          }
  242.       // RENORMALIZE BY DETERMINANT TO GET ROTATION+SCALE 3x3 INVERSE
  243.       double determinant = src[(0 << 2) + 0] * dst[(0 << 2) + 0] + src[(1 << 2) + 0] * dst[(0 << 2) + 1] + src[(2 << 2) + 0] * dst[(0 << 2) + 2];
  244.       double invd = 1.0 / determinant;
  245.       for (int i = 0; i < 3; i++)
  246.          for (int j = 0; j < 3; j++)
  247.             dst[(i << 2) + j] *= invd;
  248.       // COMPUTE INVERSE TRANSLATION
  249.       for (int i = 0; i < 3; i++)
  250.          dst[(i << 2) + 3] = -dst[(i << 2) + 0] * src[(0 << 2) + 3] - dst[(i << 2) + 1] * src[(1 << 2) + 3] - dst[(i << 2) + 2] * src[(2 << 2) + 3];
  251.    }
  252.    //----- FOR DEBUGGING -----
  253.    /**
  254.          Converts the transformation matrix to a String.
  255.          @param m matrix to be translated to text
  256.          @return a textual representation of the matrix
  257.       */
  258.    public final String toString(Matrix mm) {
  259.       double m[] = mm.getUnsafe();
  260.       String s = "{";
  261.       for (int i = 0; i < 4; i++) {
  262.          s += "{";
  263.          for (int j = 0; j < 4; j++) {
  264.             int n = (int) (100 * m[(i << 2) + j]);
  265.             s += (n / 100.) + (j == 3 ? "" : "," );
  266.          }
  267.          s += "}" + (i == 3 ? "" : "," );
  268.       }
  269.       return s + "}";
  270.    }
  271.    //----- ROUTINES TO GENERATE TRANSFORMATION MATRICES -----
  272.    private static void makeTranslationMatrix(double m[], double x, double y, double z) {
  273.       identity(m);
  274.       m[(0 << 2) + 3] = x;
  275.       m[(1 << 2) + 3] = y;
  276.       m[(2 << 2) + 3] = z;
  277.    }
  278.    private static void makeRotationMatrix(double m[], int i, int j, double theta) {
  279.       identity(m);
  280.       m[(i << 2) + i] = m[(j << 2) + j] = Math.cos(theta);
  281.       m[(i << 2) + j] = -Math.sin(theta);
  282.       m[(j << 2) + i] = -m[(i << 2) + j];
  283.    }
  284.    private static void makeScaleMatrix(double m[], double x, double y, double z) {
  285.       identity(m);
  286.       m[(0 << 2) + 0] *= x;
  287.       m[(1 << 2) + 1] *= y;
  288.       m[(2 << 2) + 2] *= z;
  289.    }
  290.    public String toString() {
  291.       int k = 0;
  292.       String s = new String("[ " );
  293.       for (int i = 0; i < 4; i++) {
  294.          s += "\t[ ";
  295.          for (int j = 0; j < 4; j++)
  296.             s += String.valueOf(mMatrix[k++]) + " ";
  297.          s += "]\n";
  298.       }
  299.       s += "]";
  300.       return s;
  301.    }
  302. }

à quelle ligne ?


---------------
trainoo.com, c'est fini
n°599610
the real m​oins moins
Posté le 30-12-2003 à 21:47:51  profilanswer
 

super j'ai un process java qui tourne sur mon serveur depuis 66h a 40% de cpu.
me disait bien que c'etait un peu lent ces derniers temps.
y'a moyen de savoir ce que c'est plus precisement?


---------------
Hey toi, tu veux acheter des minifigurines Lego, non ?
n°599611
the real m​oins moins
Posté le 30-12-2003 à 21:48:56  profilanswer
 

 PID USERNAME PRI NICE  SIZE    RES STATE    TIME   WCPU    CPU COMMAND
32213 greg      64   0   348K   108K RUN      3:37 60.84% 60.84% mv

z'ont un peu de mal mes disques on dirait
(mv d'un fichier de 700mo)


---------------
Hey toi, tu veux acheter des minifigurines Lego, non ?
n°599612
nraynaud
lol
Posté le 30-12-2003 à 21:49:55  profilanswer
 

the real moins moins a écrit :

super j'ai un process java qui tourne sur mon serveur depuis 66h a 40% de cpu.
me disait bien que c'etait un peu lent ces derniers temps.
y'a moyen de savoir ce que c'est plus precisement?

plantes-lui ton débugger dans le fion, tu pourras en savoir un peu plus ?


---------------
trainoo.com, c'est fini
n°599614
the real m​oins moins
Posté le 30-12-2003 à 21:52:21  profilanswer
 

nraynaud a écrit :

plantes-lui ton débugger dans le fion, tu pourras en savoir un peu plus ?

euh sans avoir demarré la vm en mode debug, je sens que ça va pas marcher des masses :D
j'ai killé. m'en fous. ça doit etre un build qu'est parti en couille, je fais quasi rien d'autre en java sur cette machine.


---------------
Hey toi, tu veux acheter des minifigurines Lego, non ?
n°599619
nraynaud
lol
Posté le 30-12-2003 à 22:11:05  profilanswer
 

the real moins moins a écrit :

j'ai killé. m'en fous.

Merde ! la dialyse du grand-père !


---------------
trainoo.com, c'est fini
n°599623
nraynaud
lol
Posté le 30-12-2003 à 22:31:41  profilanswer
 

http://linuxfr.org/2003/12/30/14966.html
n'importe quoi.


---------------
trainoo.com, c'est fini
n°599624
schnapsman​n
Zaford Beeblefect
Posté le 30-12-2003 à 22:48:45  profilanswer
 


 
rien à foutre, je cross compile un noyau linux régulièrement avec  VS.NET  [:power600]


---------------
From now on, you will speak only when spoken to, and the first and last words out of your filthy sewers will be "Sir!"
n°599631
darklord
You're welcome
Posté le 30-12-2003 à 23:04:05  profilanswer
 

:hello:

n°599633
Loom the G​loom
Even coders get the blues...
Posté le 30-12-2003 à 23:16:35  profilanswer
 

[:dodo]


---------------
Music|Market|Feed|Loom|DVD
n°599635
nraynaud
lol
Posté le 30-12-2003 à 23:17:31  profilanswer
 

pareil draschage, A+


---------------
trainoo.com, c'est fini
n°599637
drasche
Posté le 30-12-2003 à 23:54:32  profilanswer
 

t'es trop tard pour te drascher là :o
à cette heure-ci on parle d'aller dormir :o


---------------
Whichever format the fan may want to listen is fine with us – vinyl, wax cylinders, shellac, 8-track, iPod, cloud storage, cranial implants – just as long as it’s loud and rockin' (Billy Gibbons, ZZ Top)
n°599638
*syl*
--&gt; []
Posté le 30-12-2003 à 23:56:40  profilanswer
 

drasche a écrit :

t'es trop tard pour te drascher là :o
à cette heure-ci on parle d'aller dormir :o

:??:  
La soirée ne fait que débuter ! :D  
 
 
 
 
 
Nan j'rigole, j'vais pas tarder non plus :D

n°599640
drasche
Posté le 30-12-2003 à 23:58:05  profilanswer
 


se drascher = aller pieuter avant 22 heures :o (parce qu'il fut un temps où je postais mon bonne nuit à 21h30 :ange:


---------------
Whichever format the fan may want to listen is fine with us – vinyl, wax cylinders, shellac, 8-track, iPod, cloud storage, cranial implants – just as long as it’s loud and rockin' (Billy Gibbons, ZZ Top)
n°599641
*syl*
--&gt; []
Posté le 31-12-2003 à 00:02:08  profilanswer
 

drasche a écrit :


se drascher = aller pieuter avant 22 heures :o (parce qu'il fut un temps où je postais mon bonne nuit à 21h30 :ange:

Nan mais c'est bon, je l'savais, le :??: c'était en rapport avec la phrase du dessous :lol:

mood
Publicité
Posté le   profilanswer
 

 Page :   1  2  3  4  5  ..  2269  2270  2271  ..  26992  26993  26994  26995  26996  26997

Aller à :
Ajouter une réponse
 

Sujets relatifs
Plus de sujets relatifs à : [blabla@olympe] Le topic du modo, dieu de la fibre et du monde


Copyright © 1997-2025 Groupe LDLC (Signaler un contenu illicite / Données personnelles)