/[classpath]/classpath/javax/swing/plaf/basic/BasicOptionPaneUI.java
ViewVC logotype

Diff of /classpath/javax/swing/plaf/basic/BasicOptionPaneUI.java

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.10.2.1 by gnu_andrew, Sat Jan 15 17:02:21 2005 UTC revision 1.10.2.2 by gnu_andrew, Thu Apr 28 23:00:14 2005 UTC
# Line 1  Line 1 
1  /* BasicOptionPaneUI.java --  /* BasicOptionPaneUI.java --
2     Copyright (C) 2004 Free Software Foundation, Inc.     Copyright (C) 2004, 2005 Free Software Foundation, Inc.
3    
4  This file is part of GNU Classpath.  This file is part of GNU Classpath.
5    
# Line 439  public class BasicOptionPaneUI extends O Line 439  public class BasicOptionPaneUI extends O
439    protected JOptionPane optionPane;    protected JOptionPane optionPane;
440    
441    /** The size of the icons. */    /** The size of the icons. */
442    private static int iconSize = 36;    // FIXME: wrong name for a constant.
443      private static final int iconSize = 36;
444    
445    /** The foreground color for the message area. */    /** The foreground color for the message area. */
446    private transient Color messageForeground;    private transient Color messageForeground;
# Line 451  public class BasicOptionPaneUI extends O Line 452  public class BasicOptionPaneUI extends O
452    private transient Border buttonBorder;    private transient Border buttonBorder;
453    
454    /** The string used to describe OK buttons. */    /** The string used to describe OK buttons. */
455    private static String OK_STRING = "OK";    // FIXME: wrong name for a constant.
456      private static final String OK_STRING = "OK";
457    
458    /** The string used to describe Yes buttons. */    /** The string used to describe Yes buttons. */
459    private static String YES_STRING = "Yes";    // FIXME: wrong name for a constant.
460      private static final String YES_STRING = "Yes";
461    
462    /** The string used to describe No buttons. */    /** The string used to describe No buttons. */
463    private static String NO_STRING = "No";    // FIXME: wrong name for a constant.
464      private static final String NO_STRING = "No";
465    
466    /** The string used to describe Cancel buttons. */    /** The string used to describe Cancel buttons. */
467    private static String CANCEL_STRING = "Cancel";    // FIXME: wrong name for a constant.
468      private static final String CANCEL_STRING = "Cancel";
469    
470    /** The container for the message area. */    /** The container for the message area.
471    private transient Container messageAreaContainer;     * This is package-private to avoid an accessor method. */
472      transient Container messageAreaContainer;
473    /** The container for the buttons. */  
474    private transient Container buttonContainer;    /** The container for the buttons.
475       * This is package-private to avoid an accessor method.  */
476      transient Container buttonContainer;
477    
478    /**    /**
479     * A helper class that implements Icon. This is used temporarily until     * A helper class that implements Icon. This is used temporarily until
# Line 846  public class BasicOptionPaneUI extends O Line 853  public class BasicOptionPaneUI extends O
853      messageArea.setLayout(new BorderLayout());      messageArea.setLayout(new BorderLayout());
854      addIcon(messageArea);      addIcon(messageArea);
855    
856      JPanel rightSide = new JPanel()      JPanel rightSide = new JPanel();
       {  
         public Dimension getPreferredSize()  
         {  
           int w = Math.max(optionPane.getSize().width, minimumWidth);  
           Insets i = optionPane.getInsets();  
           Dimension orig = super.getPreferredSize();  
           Dimension value = new Dimension(w - i.left - i.right - iconSize,  
                                           orig.height);  
           return value;  
         }  
       };  
857      rightSide.setLayout(new GridBagLayout());      rightSide.setLayout(new GridBagLayout());
858      GridBagConstraints con = createConstraints();      GridBagConstraints con = createConstraints();
859    
# Line 1238  public class BasicOptionPaneUI extends O Line 1234  public class BasicOptionPaneUI extends O
1234    /**    /**
1235     * This method resets the value in the inputComponent to the     * This method resets the value in the inputComponent to the
1236     * initialSelectionValue property.     * initialSelectionValue property.
1237       * This is package-private to avoid an accessor method.
1238     */     */
1239    private void resetSelectedValue()    void resetSelectedValue()
1240    {    {
1241      if (inputComponent != null)      if (inputComponent != null)
1242        {        {

Legend:
Removed from v.1.10.2.1  
changed lines
  Added in v.1.10.2.2

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26