home *** CD-ROM | disk | FTP | other *** search
/ Chip 1998 November / Chip_1998-11_cd.bin / tema / Cafe / jfc.bin / MotifProgressBarUI.java < prev    next >
Text File  |  1998-02-26  |  3KB  |  93 lines

  1. /*
  2.  * @(#)MotifProgressBarUI.java    1.4 98/02/02
  3.  * 
  4.  * Copyright (c) 1997 Sun Microsystems, Inc. All Rights Reserved.
  5.  * 
  6.  * This software is the confidential and proprietary information of Sun
  7.  * Microsystems, Inc. ("Confidential Information").  You shall not
  8.  * disclose such Confidential Information and shall use it only in
  9.  * accordance with the terms of the license agreement you entered into
  10.  * with Sun.
  11.  * 
  12.  * SUN MAKES NO REPRESENTATIONS OR WARRANTIES ABOUT THE SUITABILITY OF THE
  13.  * SOFTWARE, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
  14.  * IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
  15.  * PURPOSE, OR NON-INFRINGEMENT. SUN SHALL NOT BE LIABLE FOR ANY DAMAGES
  16.  * SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR DISTRIBUTING
  17.  * THIS SOFTWARE OR ITS DERIVATIVES.
  18.  * 
  19.  */
  20.  
  21. package com.sun.java.swing.plaf.motif;
  22.  
  23. import java.awt.*;
  24. import com.sun.java.swing.*;
  25. import com.sun.java.swing.event.*;
  26. import com.sun.java.swing.plaf.*;
  27. import java.io.Serializable;
  28.  
  29. import com.sun.java.swing.plaf.basic.BasicProgressBarUI;
  30.  
  31.  
  32. /**
  33.  * A Motif ProgressBarUI.  
  34.  * <p>
  35.  * Warning: serialized objects of this class will not be compatible with
  36.  * future swing releases.  The current serialization support is appropriate
  37.  * for short term storage or RMI between Swing1.0 applications.  It will
  38.  * not be possible to load serialized Swing1.0 objects with future releases
  39.  * of Swing.  The JDK1.2 release of Swing will be the compatibility
  40.  * baseline for the serialized form of Swing objects.
  41.  *
  42.  * @version 1.4 02/02/98
  43.  * @author Jeff Dinkins
  44.  */
  45. public class MotifProgressBarUI extends BasicProgressBarUI 
  46. {
  47.     static final Dimension PREFERRED_INNER_HORIZONTAL = new Dimension(146, 12);
  48.     static final Dimension PREFERRED_INNER_VERTICAL = new Dimension(12, 146);
  49.  
  50.     /**
  51.      * Creates the ProgressBar's UI
  52.      */
  53.     public static ComponentUI createUI(JComponent x) {
  54.     return new MotifProgressBarUI();
  55.     }
  56.  
  57.     /**
  58.      * The default size of a horizontal progress bar
  59.      */
  60.     public Dimension getPreferredInnerHorizontal() {
  61.     return PREFERRED_INNER_HORIZONTAL;
  62.     }
  63.  
  64.     /**
  65.      * The default size of a vertical progress bar
  66.      */
  67.     public Dimension getPreferredInnerVertical() {
  68.     return PREFERRED_INNER_VERTICAL;
  69.     }
  70.  
  71.     /**
  72.      * Don't leave space between the interior and the border
  73.      */
  74.     public int getBorderBuffer() {
  75.     return 0;
  76.     }
  77.  
  78.     /**
  79.      * The default length of a cell
  80.      */
  81.     public int getCellLength() {
  82.     return 9;
  83.     }
  84.  
  85.     /**
  86.      * Don't leave any gap between cells
  87.      */
  88.     public int getCellSpacing() {
  89.     return 0;
  90.     }
  91.  
  92. }
  93.