~ubuntu-branches/ubuntu/vivid/kunststoff/vivid

« back to all changes in this revision

Viewing changes to src/com/incors/plaf/kunststoff/KunststoffInternalFrameTitlePane.java

  • Committer: Bazaar Package Importer
  • Author(s): Torsten Werner
  • Date: 2007-05-14 20:24:15 UTC
  • Revision ID: james.westby@ubuntu.com-20070514202415-00ophg1zvus0kmqw
Tags: upstream-2.0.2
ImportĀ upstreamĀ versionĀ 2.0.2

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
package com.incors.plaf.kunststoff;
 
2
 
 
3
/*
 
4
 * This code was developed by Jerason Banes (jbanes@techie.com).
 
5
 * It is published under the terms of the GNU Lesser General Public License.
 
6
 */
 
7
 
 
8
import java.awt.*;
 
9
 
 
10
import javax.swing.*;
 
11
import javax.swing.plaf.metal.*;
 
12
 
 
13
public class KunststoffInternalFrameTitlePane extends MetalInternalFrameTitlePane {
 
14
 
 
15
  public KunststoffInternalFrameTitlePane(JInternalFrame frame) {
 
16
    super(frame);
 
17
  }
 
18
 
 
19
  public void paintComponent(Graphics g) {
 
20
    super.paintComponent(g);
 
21
 
 
22
    // paint reflection
 
23
    Color colorReflection = KunststoffLookAndFeel.getComponentGradientColorReflection();
 
24
    Color colorReflectionFaded = KunststoffUtilities.getTranslucentColor(colorReflection, 0);
 
25
    Rectangle rectReflection = new Rectangle(0, 1, this.getWidth(), this.getHeight()/2);;
 
26
    KunststoffUtilities.drawGradient(g, colorReflection, colorReflectionFaded, rectReflection, true);
 
27
 
 
28
    // paint shadow
 
29
    Color colorShadow = KunststoffLookAndFeel.getComponentGradientColorShadow();
 
30
    Color colorShadowFaded = KunststoffUtilities.getTranslucentColor(colorShadow, 0);
 
31
    Rectangle rectShadow = new Rectangle(0, this.getHeight()/2, this.getWidth(), this.getHeight()/2+1);
 
32
    KunststoffUtilities.drawGradient(g, colorShadowFaded, colorShadow, rectShadow, true);
 
33
  }
 
34
}