~ubuntu-branches/ubuntu/trusty/libswingx-java/trusty

« back to all changes in this revision

Viewing changes to src/java/org/jdesktop/swingx/icon/EmptyIcon.java

  • Committer: Bazaar Package Importer
  • Author(s): Damien Raude-Morvan
  • Date: 2011-03-06 00:28:45 UTC
  • mfrom: (4.1.5 sid)
  • Revision ID: james.westby@ubuntu.com-20110306002845-escned3cbqp5qx0t
Tags: 1:1.6.2-1
* New upstream release.
* Switch to maven as build system:
  - d/control: drop ant, add maven-debian-helper
  - d/rules: use maven.mk
* d/patches/pom.diff: drop, uneeded since upstream fixed its dependencies.
* d/watch: update to use java.net directly.
* d/rules: force debian version for JARs (Closes: #603495).
* d/copyright: Update to lastest DEP-5 r166.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/*
2
 
 * $Id: EmptyIcon.java 1997 2007-05-20 21:17:52Z kschaefe $
3
 
 *
4
 
 * Copyright 2004 Sun Microsystems, Inc., 4150 Network Circle,
5
 
 * Santa Clara, California 95054, U.S.A. All rights reserved.
6
 
 *
7
 
 * This library is free software; you can redistribute it and/or
8
 
 * modify it under the terms of the GNU Lesser General Public
9
 
 * License as published by the Free Software Foundation; either
10
 
 * version 2.1 of the License, or (at your option) any later version.
11
 
 * 
12
 
 * This library is distributed in the hope that it will be useful,
13
 
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14
 
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
15
 
 * Lesser General Public License for more details.
16
 
 * 
17
 
 * You should have received a copy of the GNU Lesser General Public
18
 
 * License along with this library; if not, write to the Free Software
19
 
 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
20
 
 */
21
 
package org.jdesktop.swingx.icon;
22
 
 
23
 
import java.awt.Component;
24
 
import java.awt.Graphics;
25
 
import java.io.Serializable;
26
 
 
27
 
import javax.swing.Icon;
28
 
 
29
 
/**
30
 
 * An empty icon with arbitrary width and height.
31
 
 */
32
 
public final class EmptyIcon implements Icon, Serializable {
33
 
 
34
 
  private int width;
35
 
  private int height;
36
 
  
37
 
  public EmptyIcon() {
38
 
    this(0, 0);
39
 
  }
40
 
  
41
 
  public EmptyIcon(int width, int height) {
42
 
    this.width = width;
43
 
    this.height = height;
44
 
  }
45
 
 
46
 
  public int getIconHeight() {
47
 
    return height;
48
 
  }
49
 
 
50
 
  public int getIconWidth() {
51
 
    return width;
52
 
  }
53
 
 
54
 
  public void paintIcon(Component c, Graphics g, int x, int y) {
55
 
  }
56
 
 
57
 
}