jdk/src/share/classes/javax/swing/plaf/metal/MetalInternalFrameUI.java
changeset 25178 dbab904451e9
parent 23715 54ae9dd9df73
equal deleted inserted replaced
25177:487a5e71f6dd 25178:dbab904451e9
    45   private static final PropertyChangeListener metalPropertyChangeListener =
    45   private static final PropertyChangeListener metalPropertyChangeListener =
    46         new MetalPropertyChangeHandler();
    46         new MetalPropertyChangeHandler();
    47 
    47 
    48   private static final Border handyEmptyBorder = new EmptyBorder(0,0,0,0);
    48   private static final Border handyEmptyBorder = new EmptyBorder(0,0,0,0);
    49 
    49 
       
    50   /**
       
    51    * The property {@code JInternalFrame.isPalette}.
       
    52    */
    50   protected static String IS_PALETTE   = "JInternalFrame.isPalette";
    53   protected static String IS_PALETTE   = "JInternalFrame.isPalette";
    51   private static String IS_PALETTE_KEY = "JInternalFrame.isPalette";
    54   private static String IS_PALETTE_KEY = "JInternalFrame.isPalette";
    52   private static String FRAME_TYPE     = "JInternalFrame.frameType";
    55   private static String FRAME_TYPE     = "JInternalFrame.frameType";
    53   private static String NORMAL_FRAME   = "normal";
    56   private static String NORMAL_FRAME   = "normal";
    54   private static String PALETTE_FRAME  = "palette";
    57   private static String PALETTE_FRAME  = "palette";
    55   private static String OPTION_DIALOG  = "optionDialog";
    58   private static String OPTION_DIALOG  = "optionDialog";
    56 
    59 
       
    60 
       
    61   /**
       
    62    * Constructs a new {@code MetalInternalFrameUI} instance.
       
    63    *
       
    64    * @param b an internal frame
       
    65    */
    57   public MetalInternalFrameUI(JInternalFrame b)   {
    66   public MetalInternalFrameUI(JInternalFrame b)   {
    58     super(b);
    67     super(b);
    59   }
    68   }
    60 
    69 
       
    70   /**
       
    71    * Constructs a new {@code MetalInternalFrameUI} instance.
       
    72    *
       
    73    * @param c a component
       
    74    * @return a new {@code MetalInternalFrameUI} instance
       
    75    */
    61   public static ComponentUI createUI(JComponent c)    {
    76   public static ComponentUI createUI(JComponent c)    {
    62       return new MetalInternalFrameUI( (JInternalFrame) c);
    77       return new MetalInternalFrameUI( (JInternalFrame) c);
    63   }
    78   }
    64 
    79 
    65   public void installUI(JComponent c) {
    80   public void installUI(JComponent c) {
   150           LookAndFeel.installBorder(frame, "InternalFrame.border");
   165           LookAndFeel.installBorder(frame, "InternalFrame.border");
   151           ((MetalInternalFrameTitlePane)titlePane).setPalette( false );
   166           ((MetalInternalFrameTitlePane)titlePane).setPalette( false );
   152       }
   167       }
   153   }
   168   }
   154 
   169 
       
   170   /**
       
   171    * If {@code isPalette} is {@code true}, sets palette border and title
       
   172    *
       
   173    * @param isPalette if {@code true}, sets palette border and title
       
   174    */
   155   // this should be deprecated - jcs
   175   // this should be deprecated - jcs
   156   public void setPalette(boolean isPalette) {
   176   public void setPalette(boolean isPalette) {
   157     if (isPalette) {
   177     if (isPalette) {
   158         LookAndFeel.installBorder(frame, "InternalFrame.paletteBorder");
   178         LookAndFeel.installBorder(frame, "InternalFrame.paletteBorder");
   159     } else {
   179     } else {