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

项目:OpenJSharp    文件:JOptionPane.java   
/**
 * Requests that the initial value be selected, which will set
 * focus to the initial value. This method
 * should be invoked after the window containing the option pane
 * is made visible.
 */
public void selectInitialValue() {
    OptionPaneUI         ui = getUI();
    if (ui != null) {
        ui.selectInitialValue(this);
    }
}
项目:OpenJSharp    文件:MultiOptionPaneUI.java   
/**
 * Invokes the <code>containsCustomComponents</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>
 */
public boolean containsCustomComponents(JOptionPane a) {
    boolean returnValue =
        ((OptionPaneUI) (uis.elementAt(0))).containsCustomComponents(a);
    for (int i = 1; i < uis.size(); i++) {
        ((OptionPaneUI) (uis.elementAt(i))).containsCustomComponents(a);
    }
    return returnValue;
}
项目:jdk8u-jdk    文件:JOptionPane.java   
/**
 * Requests that the initial value be selected, which will set
 * focus to the initial value. This method
 * should be invoked after the window containing the option pane
 * is made visible.
 */
public void selectInitialValue() {
    OptionPaneUI         ui = getUI();
    if (ui != null) {
        ui.selectInitialValue(this);
    }
}
项目:jdk8u-jdk    文件:MultiOptionPaneUI.java   
/**
 * Invokes the <code>containsCustomComponents</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>
 */
public boolean containsCustomComponents(JOptionPane a) {
    boolean returnValue =
        ((OptionPaneUI) (uis.elementAt(0))).containsCustomComponents(a);
    for (int i = 1; i < uis.size(); i++) {
        ((OptionPaneUI) (uis.elementAt(i))).containsCustomComponents(a);
    }
    return returnValue;
}
项目:openjdk-jdk10    文件:JOptionPane.java   
/**
 * Sets the UI object which implements the {@literal L&F} for this component.
 *
 * @param ui  the <code>OptionPaneUI</code> {@literal L&F} object
 * @see UIDefaults#getUI
 */
@BeanProperty(hidden = true, description
        = "The UI object that implements the optionpane's LookAndFeel")
public void setUI(OptionPaneUI ui) {
    if (this.ui != ui) {
        super.setUI(ui);
        invalidate();
    }
}
项目:openjdk-jdk10    文件:JOptionPane.java   
/**
 * Requests that the initial value be selected, which will set
 * focus to the initial value. This method
 * should be invoked after the window containing the option pane
 * is made visible.
 */
public void selectInitialValue() {
    OptionPaneUI         ui = getUI();
    if (ui != null) {
        ui.selectInitialValue(this);
    }
}
项目:openjdk-jdk10    文件:MultiOptionPaneUI.java   
/**
 * Invokes the <code>containsCustomComponents</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>
 */
public boolean containsCustomComponents(JOptionPane a) {
    boolean returnValue =
        ((OptionPaneUI) (uis.elementAt(0))).containsCustomComponents(a);
    for (int i = 1; i < uis.size(); i++) {
        ((OptionPaneUI) (uis.elementAt(i))).containsCustomComponents(a);
    }
    return returnValue;
}
项目:openjdk9    文件:JOptionPane.java   
/**
 * Sets the UI object which implements the {@literal L&F} for this component.
 *
 * @param ui  the <code>OptionPaneUI</code> {@literal L&F} object
 * @see UIDefaults#getUI
 */
@BeanProperty(hidden = true, description
        = "The UI object that implements the optionpane's LookAndFeel")
public void setUI(OptionPaneUI ui) {
    if (this.ui != ui) {
        super.setUI(ui);
        invalidate();
    }
}
项目:openjdk9    文件:JOptionPane.java   
/**
 * Requests that the initial value be selected, which will set
 * focus to the initial value. This method
 * should be invoked after the window containing the option pane
 * is made visible.
 */
public void selectInitialValue() {
    OptionPaneUI         ui = getUI();
    if (ui != null) {
        ui.selectInitialValue(this);
    }
}
项目:openjdk9    文件:MultiOptionPaneUI.java   
/**
 * Invokes the <code>containsCustomComponents</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>
 */
public boolean containsCustomComponents(JOptionPane a) {
    boolean returnValue =
        ((OptionPaneUI) (uis.elementAt(0))).containsCustomComponents(a);
    for (int i = 1; i < uis.size(); i++) {
        ((OptionPaneUI) (uis.elementAt(i))).containsCustomComponents(a);
    }
    return returnValue;
}
项目:Java8CN    文件:JOptionPane.java   
/**
 * Requests that the initial value be selected, which will set
 * focus to the initial value. This method
 * should be invoked after the window containing the option pane
 * is made visible.
 */
public void selectInitialValue() {
    OptionPaneUI         ui = getUI();
    if (ui != null) {
        ui.selectInitialValue(this);
    }
}
项目:Java8CN    文件:MultiOptionPaneUI.java   
/**
 * Invokes the <code>containsCustomComponents</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>
 */
public boolean containsCustomComponents(JOptionPane a) {
    boolean returnValue =
        ((OptionPaneUI) (uis.elementAt(0))).containsCustomComponents(a);
    for (int i = 1; i < uis.size(); i++) {
        ((OptionPaneUI) (uis.elementAt(i))).containsCustomComponents(a);
    }
    return returnValue;
}
项目:jdk8u_jdk    文件:JOptionPane.java   
/**
 * Requests that the initial value be selected, which will set
 * focus to the initial value. This method
 * should be invoked after the window containing the option pane
 * is made visible.
 */
public void selectInitialValue() {
    OptionPaneUI         ui = getUI();
    if (ui != null) {
        ui.selectInitialValue(this);
    }
}
项目:jdk8u_jdk    文件:MultiOptionPaneUI.java   
/**
 * Invokes the <code>containsCustomComponents</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>
 */
public boolean containsCustomComponents(JOptionPane a) {
    boolean returnValue =
        ((OptionPaneUI) (uis.elementAt(0))).containsCustomComponents(a);
    for (int i = 1; i < uis.size(); i++) {
        ((OptionPaneUI) (uis.elementAt(i))).containsCustomComponents(a);
    }
    return returnValue;
}
项目:lookaside_java-1.8.0-openjdk    文件:JOptionPane.java   
/**
 * Requests that the initial value be selected, which will set
 * focus to the initial value. This method
 * should be invoked after the window containing the option pane
 * is made visible.
 */
public void selectInitialValue() {
    OptionPaneUI         ui = getUI();
    if (ui != null) {
        ui.selectInitialValue(this);
    }
}
项目:lookaside_java-1.8.0-openjdk    文件:MultiOptionPaneUI.java   
/**
 * Invokes the <code>containsCustomComponents</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>
 */
public boolean containsCustomComponents(JOptionPane a) {
    boolean returnValue =
        ((OptionPaneUI) (uis.elementAt(0))).containsCustomComponents(a);
    for (int i = 1; i < uis.size(); i++) {
        ((OptionPaneUI) (uis.elementAt(i))).containsCustomComponents(a);
    }
    return returnValue;
}
项目:javify    文件:MultiOptionPaneUI.java   
/**
 * Calls the {@link OptionPaneUI#selectInitialValue(JOptionPane)} method for
 * all the UI delegates managed by this <code>MultiOptionPaneUI</code>.
 *
 * @param pane  the option pane.
 */
public void selectInitialValue(JOptionPane pane)
{
  Iterator iterator = uis.iterator();
  while (iterator.hasNext())
  {
    OptionPaneUI ui = (OptionPaneUI) iterator.next();
    ui.selectInitialValue(pane);
  }
}
项目:jvm-stm    文件:MultiOptionPaneUI.java   
/**
 * Calls the {@link OptionPaneUI#selectInitialValue(JOptionPane)} method for
 * all the UI delegates managed by this <code>MultiOptionPaneUI</code>.
 * 
 * @param pane  the option pane.
 */
public void selectInitialValue(JOptionPane pane) 
{
  Iterator iterator = uis.iterator();
  while (iterator.hasNext())
  {
    OptionPaneUI ui = (OptionPaneUI) iterator.next();
    ui.selectInitialValue(pane);
  }
}
项目:infobip-open-jdk-8    文件:JOptionPane.java   
/**
 * Requests that the initial value be selected, which will set
 * focus to the initial value. This method
 * should be invoked after the window containing the option pane
 * is made visible.
 */
public void selectInitialValue() {
    OptionPaneUI         ui = getUI();
    if (ui != null) {
        ui.selectInitialValue(this);
    }
}
项目:infobip-open-jdk-8    文件:MultiOptionPaneUI.java   
/**
 * Invokes the <code>containsCustomComponents</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>
 */
public boolean containsCustomComponents(JOptionPane a) {
    boolean returnValue =
        ((OptionPaneUI) (uis.elementAt(0))).containsCustomComponents(a);
    for (int i = 1; i < uis.size(); i++) {
        ((OptionPaneUI) (uis.elementAt(i))).containsCustomComponents(a);
    }
    return returnValue;
}
项目:jdk8u-dev-jdk    文件:JOptionPane.java   
/**
 * Requests that the initial value be selected, which will set
 * focus to the initial value. This method
 * should be invoked after the window containing the option pane
 * is made visible.
 */
public void selectInitialValue() {
    OptionPaneUI         ui = getUI();
    if (ui != null) {
        ui.selectInitialValue(this);
    }
}
项目:jdk8u-dev-jdk    文件:MultiOptionPaneUI.java   
/**
 * Invokes the <code>containsCustomComponents</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>
 */
public boolean containsCustomComponents(JOptionPane a) {
    boolean returnValue =
        ((OptionPaneUI) (uis.elementAt(0))).containsCustomComponents(a);
    for (int i = 1; i < uis.size(); i++) {
        ((OptionPaneUI) (uis.elementAt(i))).containsCustomComponents(a);
    }
    return returnValue;
}
项目:jdk7-jdk    文件:JOptionPane.java   
/**
 * Requests that the initial value be selected, which will set
 * focus to the initial value. This method
 * should be invoked after the window containing the option pane
 * is made visible.
 */
public void selectInitialValue() {
    OptionPaneUI         ui = getUI();
    if (ui != null) {
        ui.selectInitialValue(this);
    }
}
项目:jdk7-jdk    文件:MultiOptionPaneUI.java   
/**
 * Invokes the <code>containsCustomComponents</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>
 */
public boolean containsCustomComponents(JOptionPane a) {
    boolean returnValue =
        ((OptionPaneUI) (uis.elementAt(0))).containsCustomComponents(a);
    for (int i = 1; i < uis.size(); i++) {
        ((OptionPaneUI) (uis.elementAt(i))).containsCustomComponents(a);
    }
    return returnValue;
}
项目:openjdk-source-code-learn    文件:JOptionPane.java   
/**
 * Requests that the initial value be selected, which will set
 * focus to the initial value. This method
 * should be invoked after the window containing the option pane
 * is made visible.
 */
public void selectInitialValue() {
    OptionPaneUI         ui = getUI();
    if (ui != null) {
        ui.selectInitialValue(this);
    }
}
项目:openjdk-source-code-learn    文件:MultiOptionPaneUI.java   
/**
 * Invokes the <code>containsCustomComponents</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>
 */
public boolean containsCustomComponents(JOptionPane a) {
    boolean returnValue =
        ((OptionPaneUI) (uis.elementAt(0))).containsCustomComponents(a);
    for (int i = 1; i < uis.size(); i++) {
        ((OptionPaneUI) (uis.elementAt(i))).containsCustomComponents(a);
    }
    return returnValue;
}
项目:OLD-OpenJDK8    文件:JOptionPane.java   
/**
 * Requests that the initial value be selected, which will set
 * focus to the initial value. This method
 * should be invoked after the window containing the option pane
 * is made visible.
 */
public void selectInitialValue() {
    OptionPaneUI         ui = getUI();
    if (ui != null) {
        ui.selectInitialValue(this);
    }
}
项目:OLD-OpenJDK8    文件:MultiOptionPaneUI.java   
/**
 * Invokes the <code>containsCustomComponents</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>
 */
public boolean containsCustomComponents(JOptionPane a) {
    boolean returnValue =
        ((OptionPaneUI) (uis.elementAt(0))).containsCustomComponents(a);
    for (int i = 1; i < uis.size(); i++) {
        ((OptionPaneUI) (uis.elementAt(i))).containsCustomComponents(a);
    }
    return returnValue;
}
项目:cn1    文件:MultiOptionPaneUI.java   
@Override
public void selectInitialValue(JOptionPane op) {
    for (Object ui : uis) {
        ((OptionPaneUI) ui).selectInitialValue(op);
    }

}
项目:cn1    文件:MultiOptionPaneUI.java   
@Override
public boolean containsCustomComponents(JOptionPane op) {
    for (int i = 1; i < numberOfUIs; i++) {
        ((OptionPaneUI) uis.get(i)).containsCustomComponents(op);
    }
    return ((OptionPaneUI) uis.firstElement()).containsCustomComponents(op);
}
项目:cn1    文件:BasicOptionPaneUITest.java   
public void testContainsCustomComponents() {
    OptionPaneUI ui = null;
    JOptionPane optionPane = null;
    optionPane = new JOptionPane();
    assertFalse(paneUI.containsCustomComponents(optionPane));
    assertFalse(paneUI.containsCustomComponents(null));
    paneUI.hasCustomComponents = true;
    assertTrue(paneUI.containsCustomComponents(optionPane));
    assertTrue(paneUI.containsCustomComponents(null));
    optionPane = new JOptionPane("Message", JOptionPane.ERROR_MESSAGE);
    ui = optionPane.getUI();
    assertFalse(ui.containsCustomComponents(optionPane));
    assertFalse(ui.containsCustomComponents(null));
    optionPane = new JOptionPane(new JButton("Message"), JOptionPane.ERROR_MESSAGE);
    ui = optionPane.getUI();
    assertTrue(ui.containsCustomComponents(optionPane));
    assertTrue(ui.containsCustomComponents(null));
    optionPane = new JOptionPane("Message", JOptionPane.ERROR_MESSAGE,
            JOptionPane.CLOSED_OPTION, null, new Object[] { "1", "2" });
    ui = optionPane.getUI();
    assertFalse(ui.containsCustomComponents(optionPane));
    assertFalse(ui.containsCustomComponents(null));
    optionPane = new JOptionPane("Message", JOptionPane.ERROR_MESSAGE,
            JOptionPane.CLOSED_OPTION, null, new Object[] { new Button("1"), "2" });
    ui = optionPane.getUI();
    assertTrue(ui.containsCustomComponents(optionPane));
    assertTrue(ui.containsCustomComponents(null));
}
项目:JamVM-PH    文件:MultiOptionPaneUI.java   
/**
 * Calls the {@link OptionPaneUI#selectInitialValue(JOptionPane)} method for
 * all the UI delegates managed by this <code>MultiOptionPaneUI</code>.
 * 
 * @param pane  the option pane.
 */
public void selectInitialValue(JOptionPane pane) 
{
  Iterator iterator = uis.iterator();
  while (iterator.hasNext())
  {
    OptionPaneUI ui = (OptionPaneUI) iterator.next();
    ui.selectInitialValue(pane);
  }
}
项目:openjdk-jdk7u-jdk    文件:JOptionPane.java   
/**
 * Requests that the initial value be selected, which will set
 * focus to the initial value. This method
 * should be invoked after the window containing the option pane
 * is made visible.
 */
public void selectInitialValue() {
    OptionPaneUI         ui = getUI();
    if (ui != null) {
        ui.selectInitialValue(this);
    }
}
项目:openjdk-jdk7u-jdk    文件:MultiOptionPaneUI.java   
/**
 * Invokes the <code>containsCustomComponents</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>
 */
public boolean containsCustomComponents(JOptionPane a) {
    boolean returnValue =
        ((OptionPaneUI) (uis.elementAt(0))).containsCustomComponents(a);
    for (int i = 1; i < uis.size(); i++) {
        ((OptionPaneUI) (uis.elementAt(i))).containsCustomComponents(a);
    }
    return returnValue;
}
项目:classpath    文件:MultiOptionPaneUI.java   
/**
 * Calls the {@link OptionPaneUI#selectInitialValue(JOptionPane)} method for
 * all the UI delegates managed by this <code>MultiOptionPaneUI</code>.
 *
 * @param pane  the option pane.
 */
public void selectInitialValue(JOptionPane pane)
{
  Iterator iterator = uis.iterator();
  while (iterator.hasNext())
  {
    OptionPaneUI ui = (OptionPaneUI) iterator.next();
    ui.selectInitialValue(pane);
  }
}
项目:freeVM    文件:BasicOptionPaneUITest.java   
public void testContainsCustomComponents() {
    OptionPaneUI ui = null;
    JOptionPane optionPane = null;
    optionPane = new JOptionPane();
    assertFalse(paneUI.containsCustomComponents(optionPane));
    assertFalse(paneUI.containsCustomComponents(null));
    paneUI.hasCustomComponents = true;
    assertTrue(paneUI.containsCustomComponents(optionPane));
    assertTrue(paneUI.containsCustomComponents(null));
    optionPane = new JOptionPane("Message", JOptionPane.ERROR_MESSAGE);
    ui = optionPane.getUI();
    assertFalse(ui.containsCustomComponents(optionPane));
    assertFalse(ui.containsCustomComponents(null));
    optionPane = new JOptionPane(new JButton("Message"), JOptionPane.ERROR_MESSAGE);
    ui = optionPane.getUI();
    assertTrue(ui.containsCustomComponents(optionPane));
    assertTrue(ui.containsCustomComponents(null));
    optionPane = new JOptionPane("Message", JOptionPane.ERROR_MESSAGE,
            JOptionPane.CLOSED_OPTION, null, new Object[] { "1", "2" });
    ui = optionPane.getUI();
    assertFalse(ui.containsCustomComponents(optionPane));
    assertFalse(ui.containsCustomComponents(null));
    optionPane = new JOptionPane("Message", JOptionPane.ERROR_MESSAGE,
            JOptionPane.CLOSED_OPTION, null, new Object[] { new Button("1"), "2" });
    ui = optionPane.getUI();
    assertTrue(ui.containsCustomComponents(optionPane));
    assertTrue(ui.containsCustomComponents(null));
}
项目:freeVM    文件:MultiOptionPaneUI.java   
@Override
public void selectInitialValue(JOptionPane op) {
    for (Object ui : uis) {
        ((OptionPaneUI) ui).selectInitialValue(op);
    }

}
项目:freeVM    文件:MultiOptionPaneUI.java   
@Override
public boolean containsCustomComponents(JOptionPane op) {
    for (int i = 1; i < numberOfUIs; i++) {
        ((OptionPaneUI) uis.get(i)).containsCustomComponents(op);
    }
    return ((OptionPaneUI) uis.firstElement()).containsCustomComponents(op);
}
项目:freeVM    文件:BasicOptionPaneUITest.java   
public void testContainsCustomComponents() {
    OptionPaneUI ui = null;
    JOptionPane optionPane = null;
    optionPane = new JOptionPane();
    assertFalse(paneUI.containsCustomComponents(optionPane));
    assertFalse(paneUI.containsCustomComponents(null));
    paneUI.hasCustomComponents = true;
    assertTrue(paneUI.containsCustomComponents(optionPane));
    assertTrue(paneUI.containsCustomComponents(null));
    optionPane = new JOptionPane("Message", JOptionPane.ERROR_MESSAGE);
    ui = optionPane.getUI();
    assertFalse(ui.containsCustomComponents(optionPane));
    assertFalse(ui.containsCustomComponents(null));
    optionPane = new JOptionPane(new JButton("Message"), JOptionPane.ERROR_MESSAGE);
    ui = optionPane.getUI();
    assertTrue(ui.containsCustomComponents(optionPane));
    assertTrue(ui.containsCustomComponents(null));
    optionPane = new JOptionPane("Message", JOptionPane.ERROR_MESSAGE,
            JOptionPane.CLOSED_OPTION, null, new Object[] { "1", "2" });
    ui = optionPane.getUI();
    assertFalse(ui.containsCustomComponents(optionPane));
    assertFalse(ui.containsCustomComponents(null));
    optionPane = new JOptionPane("Message", JOptionPane.ERROR_MESSAGE,
            JOptionPane.CLOSED_OPTION, null, new Object[] { new Button("1"), "2" });
    ui = optionPane.getUI();
    assertTrue(ui.containsCustomComponents(optionPane));
    assertTrue(ui.containsCustomComponents(null));
}
项目:openjdk-icedtea7    文件:JOptionPane.java   
/**
 * Requests that the initial value be selected, which will set
 * focus to the initial value. This method
 * should be invoked after the window containing the option pane
 * is made visible.
 */
public void selectInitialValue() {
    OptionPaneUI         ui = getUI();
    if (ui != null) {
        ui.selectInitialValue(this);
    }
}