[jsword-svn] common/java/swing/org/crosswire/common/swing/plaf s
jswordcvs at crosswire.org
jswordcvs at crosswire.org
Sun Aug 21 13:37:52 MST 2005
Update of /cvs/jsword/common/java/swing/org/crosswire/common/swing/plaf
In directory www.crosswire.org:/tmp/cvs-serv23270/java/swing/org/crosswire/common/swing/plaf
Modified Files:
WindowsLFCustoms.java OtherLFCustoms.java
MetalPanelBorder.java package.html MetalLFCustoms.java
Added Files:
MetalBorderlessTabbedPaneUI.java
WindowsBorderlessTabbedPaneUI.java
Log Message:
Willie Thean's laf changes.
Added ability to specify proxy for http download.
Changed default logging to INFO.
Index: OtherLFCustoms.java
===================================================================
RCS file: /cvs/jsword/common/java/swing/org/crosswire/common/swing/plaf/OtherLFCustoms.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** OtherLFCustoms.java 12 Aug 2005 10:17:37 -0000 1.1
--- OtherLFCustoms.java 21 Aug 2005 20:37:49 -0000 1.2
***************
*** 21,29 ****
*/
package org.crosswire.common.swing.plaf;
import javax.swing.BorderFactory;
import javax.swing.UIManager;
import javax.swing.border.Border;
-
/**
* Customizations for other LF other than Windows and Metal.
--- 21,29 ----
*/
package org.crosswire.common.swing.plaf;
+
import javax.swing.BorderFactory;
import javax.swing.UIManager;
import javax.swing.border.Border;
/**
* Customizations for other LF other than Windows and Metal.
--- NEW FILE: WindowsBorderlessTabbedPaneUI.java ---
/**
* Distribution License:
* JSword is free software; you can redistribute it and/or modify it under
* the terms of the GNU Lesser General Public License, version 2.1 as published by
* the Free Software Foundation. This program is distributed in the hope
* that it will be useful, but WITHOUT ANY WARRANTY; without even the
* implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
* See the GNU Lesser General Public License for more details.
*
* The License is available on the internet at:
* http://www.gnu.org/copyleft/lgpl.html
* or by writing to:
* Free Software Foundation, Inc.
* 59 Temple Place - Suite 330
* Boston, MA 02111-1307, USA
*
* Copyright: 2005
* The copyright to this program is held by it's authors.
*/
package org.crosswire.common.swing.plaf;
import com.sun.java.swing.plaf.windows.WindowsTabbedPaneUI;
import java.awt.Insets;
import javax.swing.JComponent;
import javax.swing.SwingConstants;
import javax.swing.plaf.ComponentUI;
/**
* Provides customization to WindowsLF Tabbed panes.
*
* @see gnu.lgpl.License for license details.
* The copyright to this program is held by it's authors.
* @author Willie Thean [williethean at yahoo dot com]
*/
public class WindowsBorderlessTabbedPaneUI extends WindowsTabbedPaneUI
{
public static ComponentUI createUI(JComponent c) {
return new WindowsBorderlessTabbedPaneUI();
}
/**
* Return the content border insets based on <CODE>tabPlacement</CODE>.
* E.g.
* <CODE>tabPlacement</CODE> = SwingConstants.TOP returns new Insets(1, 0, 0, 0)
* <CODE>tabPlacement</CODE> = SwingConstants.RIGHT returns new Insets(0, 0, 0, 1)
* @param tabPlacement tab placement of the tabbed pane
* @return an Inset instance based on <CODE>tabPlacement</CODE>
*/
protected Insets getContentBorderInsets(int tabPlacement)
{
if (tabPlacement == SwingConstants.TOP)
{
return new Insets(1, 0, 0, 0);
}
else if (tabPlacement == SwingConstants.LEFT)
{
return new Insets(0, 1, 0, 0);
}
else if (tabPlacement == SwingConstants.BOTTOM)
{
return new Insets(0, 0, 1, 0);
}
else if (tabPlacement == SwingConstants.RIGHT)
{
return new Insets(0, 0, 0, 1);
}
else {
return new Insets(0, 0, 0, 0);
}
}
}
Index: MetalLFCustoms.java
===================================================================
RCS file: /cvs/jsword/common/java/swing/org/crosswire/common/swing/plaf/MetalLFCustoms.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** MetalLFCustoms.java 12 Aug 2005 10:17:37 -0000 1.1
--- MetalLFCustoms.java 21 Aug 2005 20:37:49 -0000 1.2
***************
*** 22,26 ****
package org.crosswire.common.swing.plaf;
- import java.awt.Insets;
import javax.swing.BorderFactory;
import javax.swing.UIManager;
--- 22,25 ----
***************
*** 55,59 ****
Object[] metalUIDefaults = new Object[] {
! "TabbedPane.contentBorderInsets", new Insets(1, 0, 0, 0), //$NON-NLS-1$
"SplitPane.dividerSize", new Integer(5), //$NON-NLS-1$
"SelectPanel.border", panelSelectBorder //$NON-NLS-1$
--- 54,58 ----
Object[] metalUIDefaults = new Object[] {
! "BibleViewPane.TabbedPaneUI", MetalBorderlessTabbedPaneUI.createUI(null), //$NON-NLS-1$
"SplitPane.dividerSize", new Integer(5), //$NON-NLS-1$
"SelectPanel.border", panelSelectBorder //$NON-NLS-1$
Index: package.html
===================================================================
RCS file: /cvs/jsword/common/java/swing/org/crosswire/common/swing/plaf/package.html,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** package.html 12 Aug 2005 10:17:37 -0000 1.1
--- package.html 21 Aug 2005 20:37:49 -0000 1.2
***************
*** 1 ****
! Provides for improved Look and Feel for Tabs.
--- 1,8 ----
! <html>
! <body>
!
! <p>Provides for improved Look and Feel for Tabs.</p>
!
! </body>
! </html>
!
--- NEW FILE: MetalBorderlessTabbedPaneUI.java ---
/**
* Distribution License:
* JSword is free software; you can redistribute it and/or modify it under
* the terms of the GNU Lesser General Public License, version 2.1 as published by
* the Free Software Foundation. This program is distributed in the hope
* that it will be useful, but WITHOUT ANY WARRANTY; without even the
* implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
* See the GNU Lesser General Public License for more details.
*
* The License is available on the internet at:
* http://www.gnu.org/copyleft/lgpl.html
* or by writing to:
* Free Software Foundation, Inc.
* 59 Temple Place - Suite 330
* Boston, MA 02111-1307, USA
*
* Copyright: 2005
* The copyright to this program is held by it's authors.
*/
package org.crosswire.common.swing.plaf;
import java.awt.Insets;
import javax.swing.JComponent;
import javax.swing.plaf.ComponentUI;
import javax.swing.plaf.metal.MetalTabbedPaneUI;
/**
* Provides customization to MetalLF Tabbed panes.
*
* @see gnu.lgpl.License for license details.
* The copyright to this program is held by it's authors.
* @author Willie Thean [williethean at yahoo dot com]
*/
public class MetalBorderlessTabbedPaneUI extends MetalTabbedPaneUI
{
public static ComponentUI createUI(JComponent x)
{
return new MetalBorderlessTabbedPaneUI();
}
/**
* Return a new Insets(0, 0, 0, 0). <CODE>tabPlacement</CODE>. is ignored.
* @param tabPlacement ignored
* @return a new Insets(0, 0, 0, 0)
*/
protected Insets getContentBorderInsets(int tabPlacement)
{
return new Insets(0, 0, 0, 0);
}
}
Index: MetalPanelBorder.java
===================================================================
RCS file: /cvs/jsword/common/java/swing/org/crosswire/common/swing/plaf/MetalPanelBorder.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** MetalPanelBorder.java 12 Aug 2005 10:17:37 -0000 1.1
--- MetalPanelBorder.java 21 Aug 2005 20:37:49 -0000 1.2
***************
*** 29,33 ****
import javax.swing.plaf.metal.MetalLookAndFeel;
-
/**
* A class that provides a border that matches MetalBorders.ScrollPaneBorder.
--- 29,32 ----
Index: WindowsLFCustoms.java
===================================================================
RCS file: /cvs/jsword/common/java/swing/org/crosswire/common/swing/plaf/WindowsLFCustoms.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** WindowsLFCustoms.java 12 Aug 2005 10:17:37 -0000 1.1
--- WindowsLFCustoms.java 21 Aug 2005 20:37:49 -0000 1.2
***************
*** 21,26 ****
*/
package org.crosswire.common.swing.plaf;
import java.awt.Color;
! import java.awt.Insets;
import javax.swing.BorderFactory;
import javax.swing.UIManager;
--- 21,27 ----
*/
package org.crosswire.common.swing.plaf;
+
import java.awt.Color;
!
import javax.swing.BorderFactory;
import javax.swing.UIManager;
***************
*** 28,32 ****
import javax.swing.border.LineBorder;
-
/**
* Customizations to Windows LF for tabs.
--- 29,32 ----
***************
*** 66,70 ****
Object[] windowsUIDefaults = new Object[]
{
! "TabbedPane.contentBorderInsets", new Insets(1, 0, 0, 0), //$NON-NLS-1$
"TabbedPanePanel.border", tabbedPanePanelBorder, //$NON-NLS-1$
"StandardBorder.color", standardBorderColor, //$NON-NLS-1$
--- 66,70 ----
Object[] windowsUIDefaults = new Object[]
{
! "BibleViewPane.TabbedPaneUI", WindowsBorderlessTabbedPaneUI.createUI(null), //$NON-NLS-1$
"TabbedPanePanel.border", tabbedPanePanelBorder, //$NON-NLS-1$
"StandardBorder.color", standardBorderColor, //$NON-NLS-1$
More information about the jsword-svn
mailing list