Coverage Report - org.argouml.ui.JasonsBigTheme
 
Classes in this File Line Coverage Branch Coverage Complexity
JasonsBigTheme
52%
13/25
N/A
1
 
 1  
 /* $Id: JasonsBigTheme.java 17841 2010-01-12 19:17:52Z linus $
 2  
  *****************************************************************************
 3  
  * Copyright (c) 2009 Contributors - see below
 4  
  * All rights reserved. This program and the accompanying materials
 5  
  * are made available under the terms of the Eclipse Public License v1.0
 6  
  * which accompanies this distribution, and is available at
 7  
  * http://www.eclipse.org/legal/epl-v10.html
 8  
  *
 9  
  * Contributors:
 10  
  *    tfmorris
 11  
  *****************************************************************************
 12  
  *
 13  
  * Some portions of this file was previously release using the BSD License:
 14  
  */
 15  
 
 16  
 // Copyright (c) 1996-2006 The Regents of the University of California. All
 17  
 // Rights Reserved. Permission to use, copy, modify, and distribute this
 18  
 // software and its documentation without fee, and without a written
 19  
 // agreement is hereby granted, provided that the above copyright notice
 20  
 // and this paragraph appear in all copies.  This software program and
 21  
 // documentation are copyrighted by The Regents of the University of
 22  
 // California. The software program and documentation are supplied "AS
 23  
 // IS", without any accompanying services from The Regents. The Regents
 24  
 // does not warrant that the operation of the program will be
 25  
 // uninterrupted or error-free. The end-user understands that the program
 26  
 // was developed for research purposes and is advised not to rely
 27  
 // exclusively on the program for any reason.  IN NO EVENT SHALL THE
 28  
 // UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT,
 29  
 // SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, INCLUDING LOST PROFITS,
 30  
 // ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF
 31  
 // THE UNIVERSITY OF CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF
 32  
 // SUCH DAMAGE. THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY
 33  
 // WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
 34  
 // MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE
 35  
 // PROVIDED HEREUNDER IS ON AN "AS IS" BASIS, AND THE UNIVERSITY OF
 36  
 // CALIFORNIA HAS NO OBLIGATIONS TO PROVIDE MAINTENANCE, SUPPORT,
 37  
 // UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
 38  
 
 39  
 package org.argouml.ui;
 40  
 
 41  
 import java.awt.Font;
 42  
 import javax.swing.plaf.ColorUIResource;
 43  
 import javax.swing.plaf.FontUIResource;
 44  
 import javax.swing.plaf.metal.MetalTheme;
 45  
 
 46  
 /**
 47  
  * This class defines a variation on the default Metal Theme.
 48  
  */
 49  900
 public class JasonsBigTheme extends MetalTheme {
 50  
 
 51  900
     private final ColorUIResource primary1 = new ColorUIResource(102, 102, 153);
 52  900
     private final ColorUIResource primary2 = new ColorUIResource(153, 153, 204);
 53  900
     private final ColorUIResource primary3 = new ColorUIResource(204, 204, 255);
 54  
 
 55  900
     private final ColorUIResource secondary1 =
 56  
         new ColorUIResource(102, 102, 102);
 57  900
     private final ColorUIResource secondary2 =
 58  
         new ColorUIResource(153, 153, 153);
 59  900
     private final ColorUIResource secondary3 =
 60  
         new ColorUIResource(204, 204, 204);
 61  
 
 62  900
     private final FontUIResource controlFont =
 63  
         new FontUIResource("SansSerif", Font.PLAIN, 14);
 64  900
     private final FontUIResource systemFont =
 65  
         new FontUIResource("Dialog", Font.PLAIN, 14);
 66  900
     private final FontUIResource windowTitleFont =
 67  
         new FontUIResource("SansSerif", Font.BOLD, 14);
 68  900
     private final FontUIResource userFont =
 69  
         new FontUIResource("SansSerif", Font.PLAIN, 14);
 70  900
     private final FontUIResource smallFont =
 71  
         new FontUIResource("Dialog", Font.PLAIN, 12);
 72  
 
 73  
     /*
 74  
      * @see javax.swing.plaf.metal.MetalTheme#getName()
 75  
      */
 76  19
     public String getName() { return "Large Fonts"; }
 77  
 
 78  
     // these are blue in Metal Default Theme
 79  
     /*
 80  
      * @see javax.swing.plaf.metal.MetalTheme#getPrimary1()
 81  
      */
 82  0
     protected ColorUIResource getPrimary1() { return primary1; }
 83  
 
 84  
     /*
 85  
      * @see javax.swing.plaf.metal.MetalTheme#getPrimary2()
 86  
      */
 87  0
     protected ColorUIResource getPrimary2() { return primary2; }
 88  
 
 89  
     /*
 90  
      * @see javax.swing.plaf.metal.MetalTheme#getPrimary3()
 91  
      */
 92  0
     protected ColorUIResource getPrimary3() { return primary3; }
 93  
 
 94  
     // these are gray in Metal Default Theme
 95  
     /*
 96  
      * @see javax.swing.plaf.metal.MetalTheme#getSecondary1()
 97  
      */
 98  0
     protected ColorUIResource getSecondary1() { return secondary1; }
 99  
 
 100  
     /*
 101  
      * @see javax.swing.plaf.metal.MetalTheme#getSecondary2()
 102  
      */
 103  0
     protected ColorUIResource getSecondary2() { return secondary2; }
 104  
 
 105  
     /*
 106  
      * @see javax.swing.plaf.metal.MetalTheme#getSecondary3()
 107  
      */
 108  0
     protected ColorUIResource getSecondary3() { return secondary3; }
 109  
 
 110  
     /*
 111  
      * @see javax.swing.plaf.metal.MetalTheme#getControlTextFont()
 112  
      */
 113  0
     public FontUIResource getControlTextFont() { return controlFont; }
 114  
 
 115  
     /*
 116  
      * @see javax.swing.plaf.metal.MetalTheme#getSystemTextFont()
 117  
      */
 118  0
     public FontUIResource getSystemTextFont() { return systemFont; }
 119  
 
 120  
     /*
 121  
      * @see javax.swing.plaf.metal.MetalTheme#getUserTextFont()
 122  
      */
 123  0
     public FontUIResource getUserTextFont() { return userFont; }
 124  
 
 125  
     /*
 126  
      * @see javax.swing.plaf.metal.MetalTheme#getMenuTextFont()
 127  
      */
 128  0
     public FontUIResource getMenuTextFont() { return controlFont; }
 129  
 
 130  
     /*
 131  
      * @see javax.swing.plaf.metal.MetalTheme#getSubTextFont()
 132  
      */
 133  0
     public FontUIResource getSubTextFont() { return smallFont; }
 134  
 
 135  
     /*
 136  
      * @see javax.swing.plaf.metal.MetalTheme#getWindowTitleFont()
 137  
      */
 138  0
     public FontUIResource getWindowTitleFont() { return windowTitleFont; }
 139  
 }