001 /* 002 * $Id: ErrorPaneUI.java 3105 2008-10-16 21:09:43Z rah003 $ 003 * 004 * Copyright 2004 Sun Microsystems, Inc., 4150 Network Circle, 005 * Santa Clara, California 95054, U.S.A. All rights reserved. 006 * 007 * This library is free software; you can redistribute it and/or 008 * modify it under the terms of the GNU Lesser General Public 009 * License as published by the Free Software Foundation; either 010 * version 2.1 of the License, or (at your option) any later version. 011 * 012 * This library is distributed in the hope that it will be useful, 013 * but WITHOUT ANY WARRANTY; without even the implied warranty of 014 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 015 * Lesser General Public License for more details. 016 * 017 * You should have received a copy of the GNU Lesser General Public 018 * License along with this library; if not, write to the Free Software 019 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 020 */ 021 022 package org.jdesktop.swingx.plaf; 023 024 import java.awt.Component; 025 import java.awt.Dimension; 026 027 import javax.swing.JDialog; 028 import javax.swing.JFrame; 029 import javax.swing.JInternalFrame; 030 import javax.swing.plaf.PanelUI; 031 032 /** 033 * The ComponentUI for a JXErrorPane. 034 * <p> 035 * 036 * @author rbair 037 */ 038 public abstract class ErrorPaneUI extends PanelUI { 039 /** 040 * Creates new ErrorPane wrapped in the frame window centered at provided owner component. 041 * @param owner component to center created error frame at. 042 * @return New ErrorPane instance wrapped in JFrame. 043 */ 044 public abstract JFrame getErrorFrame(Component owner); 045 046 /** 047 * Creates new ErrorPane wrapped in the dialog window centered at provided owner component. 048 * @param owner component to center created error dialog at. 049 * @return New ErrorPane instance wrapped in JDialog. 050 */ 051 public abstract JDialog getErrorDialog(Component owner); 052 053 /** 054 * Creates new ErrorPane wrapped in the internal frame window centered at provided owner component. 055 * @param owner component to center created error frame at. 056 * @return New ErrorPane instance wrapped in JInternalFrame. 057 */ 058 public abstract JInternalFrame getErrorInternalFrame(Component owner); 059 /** 060 * Calculates default prefered size for JXErrorPane on given platform/LAF. 061 * @return Preferred size. 062 */ 063 public abstract Dimension calculatePreferredSize(); 064 }