Java 类javax.swing.plaf.PopupMenuUI 实例源码

项目:cn1    文件:JPopupMenuTest.java   
public void testIsPopupTrigger() {
    class MyPopupMenuUI extends PopupMenuUI {
        public boolean value = false;

        @Override
        public boolean isPopupTrigger(final MouseEvent event) {
            return value;
        }
    }
    ;
    MyPopupMenuUI fakeUI = new MyPopupMenuUI();
    popup.setUI(fakeUI);
    assertSame(fakeUI, popup.getUI());
    fakeUI.value = true;
    assertEquals(fakeUI.value, popup.isPopupTrigger(null));
    fakeUI.value = false;
    assertEquals(fakeUI.value, popup.isPopupTrigger(null));
}
项目:freeVM    文件:JPopupMenuTest.java   
public void testIsPopupTrigger() {
    class MyPopupMenuUI extends PopupMenuUI {
        public boolean value = false;

        @Override
        public boolean isPopupTrigger(final MouseEvent event) {
            return value;
        }
    }
    ;
    MyPopupMenuUI fakeUI = new MyPopupMenuUI();
    popup.setUI(fakeUI);
    assertSame(fakeUI, popup.getUI());
    fakeUI.value = true;
    assertEquals(fakeUI.value, popup.isPopupTrigger(null));
    fakeUI.value = false;
    assertEquals(fakeUI.value, popup.isPopupTrigger(null));
}
项目:freeVM    文件:JPopupMenuTest.java   
public void testIsPopupTrigger() {
    class MyPopupMenuUI extends PopupMenuUI {
        public boolean value = false;

        @Override
        public boolean isPopupTrigger(final MouseEvent event) {
            return value;
        }
    }
    ;
    MyPopupMenuUI fakeUI = new MyPopupMenuUI();
    popup.setUI(fakeUI);
    assertSame(fakeUI, popup.getUI());
    fakeUI.value = true;
    assertEquals(fakeUI.value, popup.isPopupTrigger(null));
    fakeUI.value = false;
    assertEquals(fakeUI.value, popup.isPopupTrigger(null));
}
项目:OpenJSharp    文件:MultiPopupMenuUI.java   
/**
 * Invokes the <code>isPopupTrigger</code> method on each UI handled by this object.
 *
 * @return the value obtained from the first UI, which is
 * the UI obtained from the default <code>LookAndFeel</code>
 * @since 1.3
 */
public boolean isPopupTrigger(MouseEvent a) {
    boolean returnValue =
        ((PopupMenuUI) (uis.elementAt(0))).isPopupTrigger(a);
    for (int i = 1; i < uis.size(); i++) {
        ((PopupMenuUI) (uis.elementAt(i))).isPopupTrigger(a);
    }
    return returnValue;
}
项目:OpenJSharp    文件:MultiPopupMenuUI.java   
/**
 * Invokes the <code>getPopup</code> method on each UI handled by this object.
 *
 * @return the value obtained from the first UI, which is
 * the UI obtained from the default <code>LookAndFeel</code>
 * @since 1.4
 */
public Popup getPopup(JPopupMenu a, int b, int c) {
    Popup returnValue =
        ((PopupMenuUI) (uis.elementAt(0))).getPopup(a,b,c);
    for (int i = 1; i < uis.size(); i++) {
        ((PopupMenuUI) (uis.elementAt(i))).getPopup(a,b,c);
    }
    return returnValue;
}
项目:jdk8u-jdk    文件:MultiPopupMenuUI.java   
/**
 * Invokes the <code>isPopupTrigger</code> method on each UI handled by this object.
 *
 * @return the value obtained from the first UI, which is
 * the UI obtained from the default <code>LookAndFeel</code>
 * @since 1.3
 */
public boolean isPopupTrigger(MouseEvent a) {
    boolean returnValue =
        ((PopupMenuUI) (uis.elementAt(0))).isPopupTrigger(a);
    for (int i = 1; i < uis.size(); i++) {
        ((PopupMenuUI) (uis.elementAt(i))).isPopupTrigger(a);
    }
    return returnValue;
}
项目:jdk8u-jdk    文件:MultiPopupMenuUI.java   
/**
 * Invokes the <code>getPopup</code> method on each UI handled by this object.
 *
 * @return the value obtained from the first UI, which is
 * the UI obtained from the default <code>LookAndFeel</code>
 * @since 1.4
 */
public Popup getPopup(JPopupMenu a, int b, int c) {
    Popup returnValue =
        ((PopupMenuUI) (uis.elementAt(0))).getPopup(a,b,c);
    for (int i = 1; i < uis.size(); i++) {
        ((PopupMenuUI) (uis.elementAt(i))).getPopup(a,b,c);
    }
    return returnValue;
}
项目:openjdk-jdk10    文件:MultiPopupMenuUI.java   
/**
 * Invokes the <code>isPopupTrigger</code> method on each UI handled by this object.
 *
 * @return the value obtained from the first UI, which is
 * the UI obtained from the default <code>LookAndFeel</code>
 * @since 1.3
 */
public boolean isPopupTrigger(MouseEvent a) {
    boolean returnValue =
        ((PopupMenuUI) (uis.elementAt(0))).isPopupTrigger(a);
    for (int i = 1; i < uis.size(); i++) {
        ((PopupMenuUI) (uis.elementAt(i))).isPopupTrigger(a);
    }
    return returnValue;
}
项目:openjdk-jdk10    文件:MultiPopupMenuUI.java   
/**
 * Invokes the <code>getPopup</code> method on each UI handled by this object.
 *
 * @return the value obtained from the first UI, which is
 * the UI obtained from the default <code>LookAndFeel</code>
 * @since 1.4
 */
public Popup getPopup(JPopupMenu a, int b, int c) {
    Popup returnValue =
        ((PopupMenuUI) (uis.elementAt(0))).getPopup(a,b,c);
    for (int i = 1; i < uis.size(); i++) {
        ((PopupMenuUI) (uis.elementAt(i))).getPopup(a,b,c);
    }
    return returnValue;
}
项目:openjdk-jdk10    文件:JPopupMenuOperator.java   
/**
 * Maps {@code JPopupMenu.getUI()} through queue
 */
public PopupMenuUI getUI() {
    return (runMapping(new MapAction<PopupMenuUI>("getUI") {
        @Override
        public PopupMenuUI map() {
            return ((JPopupMenu) getSource()).getUI();
        }
    }));
}
项目:openjdk-jdk10    文件:JPopupMenuOperator.java   
/**
 * Maps {@code JPopupMenu.setUI(PopupMenuUI)} through queue
 */
public void setUI(final PopupMenuUI popupMenuUI) {
    runMapping(new MapVoidAction("setUI") {
        @Override
        public void map() {
            ((JPopupMenu) getSource()).setUI(popupMenuUI);
        }
    });
}
项目:openjdk9    文件:MultiPopupMenuUI.java   
/**
 * Invokes the <code>isPopupTrigger</code> method on each UI handled by this object.
 *
 * @return the value obtained from the first UI, which is
 * the UI obtained from the default <code>LookAndFeel</code>
 * @since 1.3
 */
public boolean isPopupTrigger(MouseEvent a) {
    boolean returnValue =
        ((PopupMenuUI) (uis.elementAt(0))).isPopupTrigger(a);
    for (int i = 1; i < uis.size(); i++) {
        ((PopupMenuUI) (uis.elementAt(i))).isPopupTrigger(a);
    }
    return returnValue;
}
项目:openjdk9    文件:MultiPopupMenuUI.java   
/**
 * Invokes the <code>getPopup</code> method on each UI handled by this object.
 *
 * @return the value obtained from the first UI, which is
 * the UI obtained from the default <code>LookAndFeel</code>
 * @since 1.4
 */
public Popup getPopup(JPopupMenu a, int b, int c) {
    Popup returnValue =
        ((PopupMenuUI) (uis.elementAt(0))).getPopup(a,b,c);
    for (int i = 1; i < uis.size(); i++) {
        ((PopupMenuUI) (uis.elementAt(i))).getPopup(a,b,c);
    }
    return returnValue;
}
项目:openjdk9    文件:JPopupMenuOperator.java   
/**
 * Maps {@code JPopupMenu.getUI()} through queue
 */
public PopupMenuUI getUI() {
    return (runMapping(new MapAction<PopupMenuUI>("getUI") {
        @Override
        public PopupMenuUI map() {
            return ((JPopupMenu) getSource()).getUI();
        }
    }));
}
项目:openjdk9    文件:JPopupMenuOperator.java   
/**
 * Maps {@code JPopupMenu.setUI(PopupMenuUI)} through queue
 */
public void setUI(final PopupMenuUI popupMenuUI) {
    runMapping(new MapVoidAction("setUI") {
        @Override
        public void map() {
            ((JPopupMenu) getSource()).setUI(popupMenuUI);
        }
    });
}
项目:Java8CN    文件:MultiPopupMenuUI.java   
/**
 * Invokes the <code>isPopupTrigger</code> method on each UI handled by this object.
 *
 * @return the value obtained from the first UI, which is
 * the UI obtained from the default <code>LookAndFeel</code>
 * @since 1.3
 */
public boolean isPopupTrigger(MouseEvent a) {
    boolean returnValue =
        ((PopupMenuUI) (uis.elementAt(0))).isPopupTrigger(a);
    for (int i = 1; i < uis.size(); i++) {
        ((PopupMenuUI) (uis.elementAt(i))).isPopupTrigger(a);
    }
    return returnValue;
}
项目:Java8CN    文件:MultiPopupMenuUI.java   
/**
 * Invokes the <code>getPopup</code> method on each UI handled by this object.
 *
 * @return the value obtained from the first UI, which is
 * the UI obtained from the default <code>LookAndFeel</code>
 * @since 1.4
 */
public Popup getPopup(JPopupMenu a, int b, int c) {
    Popup returnValue =
        ((PopupMenuUI) (uis.elementAt(0))).getPopup(a,b,c);
    for (int i = 1; i < uis.size(); i++) {
        ((PopupMenuUI) (uis.elementAt(i))).getPopup(a,b,c);
    }
    return returnValue;
}
项目:jdk8u_jdk    文件:MultiPopupMenuUI.java   
/**
 * Invokes the <code>isPopupTrigger</code> method on each UI handled by this object.
 *
 * @return the value obtained from the first UI, which is
 * the UI obtained from the default <code>LookAndFeel</code>
 * @since 1.3
 */
public boolean isPopupTrigger(MouseEvent a) {
    boolean returnValue =
        ((PopupMenuUI) (uis.elementAt(0))).isPopupTrigger(a);
    for (int i = 1; i < uis.size(); i++) {
        ((PopupMenuUI) (uis.elementAt(i))).isPopupTrigger(a);
    }
    return returnValue;
}
项目:jdk8u_jdk    文件:MultiPopupMenuUI.java   
/**
 * Invokes the <code>getPopup</code> method on each UI handled by this object.
 *
 * @return the value obtained from the first UI, which is
 * the UI obtained from the default <code>LookAndFeel</code>
 * @since 1.4
 */
public Popup getPopup(JPopupMenu a, int b, int c) {
    Popup returnValue =
        ((PopupMenuUI) (uis.elementAt(0))).getPopup(a,b,c);
    for (int i = 1; i < uis.size(); i++) {
        ((PopupMenuUI) (uis.elementAt(i))).getPopup(a,b,c);
    }
    return returnValue;
}
项目:lookaside_java-1.8.0-openjdk    文件:MultiPopupMenuUI.java   
/**
 * Invokes the <code>isPopupTrigger</code> method on each UI handled by this object.
 *
 * @return the value obtained from the first UI, which is
 * the UI obtained from the default <code>LookAndFeel</code>
 * @since 1.3
 */
public boolean isPopupTrigger(MouseEvent a) {
    boolean returnValue =
        ((PopupMenuUI) (uis.elementAt(0))).isPopupTrigger(a);
    for (int i = 1; i < uis.size(); i++) {
        ((PopupMenuUI) (uis.elementAt(i))).isPopupTrigger(a);
    }
    return returnValue;
}
项目:lookaside_java-1.8.0-openjdk    文件:MultiPopupMenuUI.java   
/**
 * Invokes the <code>getPopup</code> method on each UI handled by this object.
 *
 * @return the value obtained from the first UI, which is
 * the UI obtained from the default <code>LookAndFeel</code>
 * @since 1.4
 */
public Popup getPopup(JPopupMenu a, int b, int c) {
    Popup returnValue =
        ((PopupMenuUI) (uis.elementAt(0))).getPopup(a,b,c);
    for (int i = 1; i < uis.size(); i++) {
        ((PopupMenuUI) (uis.elementAt(i))).getPopup(a,b,c);
    }
    return returnValue;
}
项目:jailer    文件:JScrollC2Menu.java   
@Override
public void updateUI() {
    setUI((MenuItemUI) UIManager.getUI(this));

    if(popupMenu != null) {
        popupMenu.setUI((PopupMenuUI) UIManager.getUI(popupMenu));
    }
}
项目:jailer    文件:JScrollMenu.java   
@Override
public void updateUI() {
    setUI((MenuItemUI) UIManager.getUI(this));

    if (popupMenu != null) {
        popupMenu.setUI((PopupMenuUI) UIManager.getUI(popupMenu));
    }
}
项目:WorldGrower    文件:TiledImageJMenu.java   
public TiledImageJMenu(String text, ImageInfoReader imageInfoReader) {
    super(text);
    tileImage = getTiledImage(imageInfoReader);
    getPopupMenu().setUI(new PopupMenuUI() {

        @Override
        public void paint(Graphics g, JComponent c) {
            TiledImagePainter.paintComponent(c, g, tileImage);
            super.paint(g, c);
        }
    });
}
项目:AppWoksUtils    文件:JScrollMenu.java   
@Override
public void updateUI() {
    setUI((MenuItemUI) UIManager.getUI(this));

    if(popupMenu != null) {
        popupMenu.setUI((PopupMenuUI) UIManager.getUI(popupMenu));
    }
}
项目:infobip-open-jdk-8    文件:MultiPopupMenuUI.java   
/**
 * Invokes the <code>isPopupTrigger</code> method on each UI handled by this object.
 *
 * @return the value obtained from the first UI, which is
 * the UI obtained from the default <code>LookAndFeel</code>
 * @since 1.3
 */
public boolean isPopupTrigger(MouseEvent a) {
    boolean returnValue =
        ((PopupMenuUI) (uis.elementAt(0))).isPopupTrigger(a);
    for (int i = 1; i < uis.size(); i++) {
        ((PopupMenuUI) (uis.elementAt(i))).isPopupTrigger(a);
    }
    return returnValue;
}
项目:infobip-open-jdk-8    文件:MultiPopupMenuUI.java   
/**
 * Invokes the <code>getPopup</code> method on each UI handled by this object.
 *
 * @return the value obtained from the first UI, which is
 * the UI obtained from the default <code>LookAndFeel</code>
 * @since 1.4
 */
public Popup getPopup(JPopupMenu a, int b, int c) {
    Popup returnValue =
        ((PopupMenuUI) (uis.elementAt(0))).getPopup(a,b,c);
    for (int i = 1; i < uis.size(); i++) {
        ((PopupMenuUI) (uis.elementAt(i))).getPopup(a,b,c);
    }
    return returnValue;
}
项目:jdk8u-dev-jdk    文件:MultiPopupMenuUI.java   
/**
 * Invokes the <code>isPopupTrigger</code> method on each UI handled by this object.
 *
 * @return the value obtained from the first UI, which is
 * the UI obtained from the default <code>LookAndFeel</code>
 * @since 1.3
 */
public boolean isPopupTrigger(MouseEvent a) {
    boolean returnValue =
        ((PopupMenuUI) (uis.elementAt(0))).isPopupTrigger(a);
    for (int i = 1; i < uis.size(); i++) {
        ((PopupMenuUI) (uis.elementAt(i))).isPopupTrigger(a);
    }
    return returnValue;
}
项目:jdk8u-dev-jdk    文件:MultiPopupMenuUI.java   
/**
 * Invokes the <code>getPopup</code> method on each UI handled by this object.
 *
 * @return the value obtained from the first UI, which is
 * the UI obtained from the default <code>LookAndFeel</code>
 * @since 1.4
 */
public Popup getPopup(JPopupMenu a, int b, int c) {
    Popup returnValue =
        ((PopupMenuUI) (uis.elementAt(0))).getPopup(a,b,c);
    for (int i = 1; i < uis.size(); i++) {
        ((PopupMenuUI) (uis.elementAt(i))).getPopup(a,b,c);
    }
    return returnValue;
}
项目:jdk7-jdk    文件:MultiPopupMenuUI.java   
/**
 * Invokes the <code>isPopupTrigger</code> method on each UI handled by this object.
 *
 * @return the value obtained from the first UI, which is
 * the UI obtained from the default <code>LookAndFeel</code>
 * @since 1.3
 */
public boolean isPopupTrigger(MouseEvent a) {
    boolean returnValue =
        ((PopupMenuUI) (uis.elementAt(0))).isPopupTrigger(a);
    for (int i = 1; i < uis.size(); i++) {
        ((PopupMenuUI) (uis.elementAt(i))).isPopupTrigger(a);
    }
    return returnValue;
}
项目:jdk7-jdk    文件:MultiPopupMenuUI.java   
/**
 * Invokes the <code>getPopup</code> method on each UI handled by this object.
 *
 * @return the value obtained from the first UI, which is
 * the UI obtained from the default <code>LookAndFeel</code>
 * @since 1.4
 */
public Popup getPopup(JPopupMenu a, int b, int c) {
    Popup returnValue =
        ((PopupMenuUI) (uis.elementAt(0))).getPopup(a,b,c);
    for (int i = 1; i < uis.size(); i++) {
        ((PopupMenuUI) (uis.elementAt(i))).getPopup(a,b,c);
    }
    return returnValue;
}
项目:openjdk-source-code-learn    文件:MultiPopupMenuUI.java   
/**
 * Invokes the <code>isPopupTrigger</code> method on each UI handled by this object.
 *
 * @return the value obtained from the first UI, which is
 * the UI obtained from the default <code>LookAndFeel</code>
 * @since 1.3
 */
public boolean isPopupTrigger(MouseEvent a) {
    boolean returnValue =
        ((PopupMenuUI) (uis.elementAt(0))).isPopupTrigger(a);
    for (int i = 1; i < uis.size(); i++) {
        ((PopupMenuUI) (uis.elementAt(i))).isPopupTrigger(a);
    }
    return returnValue;
}
项目:openjdk-source-code-learn    文件:MultiPopupMenuUI.java   
/**
 * Invokes the <code>getPopup</code> method on each UI handled by this object.
 *
 * @return the value obtained from the first UI, which is
 * the UI obtained from the default <code>LookAndFeel</code>
 * @since 1.4
 */
public Popup getPopup(JPopupMenu a, int b, int c) {
    Popup returnValue =
        ((PopupMenuUI) (uis.elementAt(0))).getPopup(a,b,c);
    for (int i = 1; i < uis.size(); i++) {
        ((PopupMenuUI) (uis.elementAt(i))).getPopup(a,b,c);
    }
    return returnValue;
}
项目:OLD-OpenJDK8    文件:MultiPopupMenuUI.java   
/**
 * Invokes the <code>isPopupTrigger</code> method on each UI handled by this object.
 *
 * @return the value obtained from the first UI, which is
 * the UI obtained from the default <code>LookAndFeel</code>
 * @since 1.3
 */
public boolean isPopupTrigger(MouseEvent a) {
    boolean returnValue =
        ((PopupMenuUI) (uis.elementAt(0))).isPopupTrigger(a);
    for (int i = 1; i < uis.size(); i++) {
        ((PopupMenuUI) (uis.elementAt(i))).isPopupTrigger(a);
    }
    return returnValue;
}
项目:OLD-OpenJDK8    文件:MultiPopupMenuUI.java   
/**
 * Invokes the <code>getPopup</code> method on each UI handled by this object.
 *
 * @return the value obtained from the first UI, which is
 * the UI obtained from the default <code>LookAndFeel</code>
 * @since 1.4
 */
public Popup getPopup(JPopupMenu a, int b, int c) {
    Popup returnValue =
        ((PopupMenuUI) (uis.elementAt(0))).getPopup(a,b,c);
    for (int i = 1; i < uis.size(); i++) {
        ((PopupMenuUI) (uis.elementAt(i))).getPopup(a,b,c);
    }
    return returnValue;
}
项目:cn1    文件:MultiPopupMenuUI.java   
@Override
public Popup getPopup(JPopupMenu popup, int x, int y) {
    for (int i = 1; i < numberOfUIs; i++) {
        ((PopupMenuUI) uis.get(i)).getPopup(popup, x, y);
    }
    return ((PopupMenuUI) uis.firstElement()).getPopup(popup, x, y);        
}
项目:cn1    文件:MultiPopupMenuUI.java   
@Override
public boolean isPopupTrigger(MouseEvent event) {
    for (int i = 1; i < numberOfUIs; i++) {
        ((PopupMenuUI) uis.get(i)).isPopupTrigger(event);
    }
    return ((PopupMenuUI) uis.firstElement()).isPopupTrigger(event);    
}
项目:openjdk-jdk7u-jdk    文件:MultiPopupMenuUI.java   
/**
 * Invokes the <code>isPopupTrigger</code> method on each UI handled by this object.
 *
 * @return the value obtained from the first UI, which is
 * the UI obtained from the default <code>LookAndFeel</code>
 * @since 1.3
 */
public boolean isPopupTrigger(MouseEvent a) {
    boolean returnValue =
        ((PopupMenuUI) (uis.elementAt(0))).isPopupTrigger(a);
    for (int i = 1; i < uis.size(); i++) {
        ((PopupMenuUI) (uis.elementAt(i))).isPopupTrigger(a);
    }
    return returnValue;
}
项目:openjdk-jdk7u-jdk    文件:MultiPopupMenuUI.java   
/**
 * Invokes the <code>getPopup</code> method on each UI handled by this object.
 *
 * @return the value obtained from the first UI, which is
 * the UI obtained from the default <code>LookAndFeel</code>
 * @since 1.4
 */
public Popup getPopup(JPopupMenu a, int b, int c) {
    Popup returnValue =
        ((PopupMenuUI) (uis.elementAt(0))).getPopup(a,b,c);
    for (int i = 1; i < uis.size(); i++) {
        ((PopupMenuUI) (uis.elementAt(i))).getPopup(a,b,c);
    }
    return returnValue;
}
项目:freeVM    文件:MultiPopupMenuUI.java   
@Override
public Popup getPopup(JPopupMenu popup, int x, int y) {
    for (int i = 1; i < numberOfUIs; i++) {
        ((PopupMenuUI) uis.get(i)).getPopup(popup, x, y);
    }
    return ((PopupMenuUI) uis.firstElement()).getPopup(popup, x, y);        
}