home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Programming Languages Suite
/
ProgLangD.iso
/
VCAFE.3.0A
/
Sample.bin
/
BigContrastMetalTheme.java
< prev
next >
Wrap
Text File
|
1998-06-30
|
3KB
|
82 lines
/*
* @(#)BigContrastMetalTheme.java 1.4 98/03/10
*
* Copyright (c) 1997 Sun Microsystems, Inc. All Rights Reserved.
*
* This software is the confidential and proprietary information of Sun
* Microsystems, Inc. ("Confidential Information"). You shall not
* disclose such Confidential Information and shall use it only in
* accordance with the terms of the license agreement you entered into
* with Sun.
*
* SUN MAKES NO REPRESENTATIONS OR WARRANTIES ABOUT THE SUITABILITY OF THE
* SOFTWARE, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
* IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
* PURPOSE, OR NON-INFRINGEMENT. SUN SHALL NOT BE LIABLE FOR ANY DAMAGES
* SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR DISTRIBUTING
* THIS SOFTWARE OR ITS DERIVATIVES.
*
*/
import com.sun.java.swing.plaf.*;
import com.sun.java.swing.plaf.metal.*;
import com.sun.java.swing.*;
import com.sun.java.swing.border.*;
import java.awt.*;
/**
* This class describes a theme using "green" colors.
*
* @version 1.4 03/10/98
* @author Steve Wilson
*/
public class BigContrastMetalTheme extends ContrastMetalTheme {
public String getName() { return "Low Vision"; }
private final FontUIResource controlFont = new FontUIResource("Dialog", Font.BOLD, 24);
private final FontUIResource systemFont = new FontUIResource("Dialog", Font.PLAIN, 24);
private final FontUIResource windowTitleFont = new FontUIResource("Dialog", Font.BOLD, 24);
private final FontUIResource userFont = new FontUIResource("SansSerif", Font.PLAIN, 24);
private final FontUIResource smallFont = new FontUIResource("Dialog", Font.PLAIN, 20);
public FontUIResource getControlTextFont() { return controlFont;}
public FontUIResource getSystemTextFont() { return systemFont;}
public FontUIResource getUserTextFont() { return userFont;}
public FontUIResource getMenuTextFont() { return controlFont;}
public FontUIResource getWindowTitleFont() { return windowTitleFont;}
public FontUIResource getSubTextFont() { return smallFont;}
public void addCustomEntriesToTable(UIDefaults table) {
super.addCustomEntriesToTable(table);
final int internalFrameIconSize = 22;
table.put("InternalFrameTitlePane.closeIcon", MetalIconFactory.getInternalFrameCloseIcon(internalFrameIconSize));
table.put("InternalFrameTitlePane.maximizeIcon", MetalIconFactory.getInternalFrameMaximizeIcon(internalFrameIconSize));
table.put("InternalFrameTitlePane.iconizeIcon", MetalIconFactory.getInternalFrameMinimizeIcon(internalFrameIconSize));
table.put("InternalFrameTitlePane.altMaximizeIcon", MetalIconFactory.getInternalFrameAltMaximizeIcon(internalFrameIconSize));
Border blackLineBorder = new BorderUIResource( new MatteBorder( 2,2,2,2, Color.black) );
Border textBorder = blackLineBorder;
table.put( "ToolTip.border", blackLineBorder);
table.put( "TitledBorder.border", blackLineBorder);
table.put( "TextField.border", textBorder);
table.put( "PasswordField.border", textBorder);
table.put( "TextArea.border", textBorder);
table.put( "TextPane.font", textBorder);
table.put( "ScrollPane.border", blackLineBorder);
table.put( "ScrollBar.width", new Integer(25) );
}
}