public class CloseTabIcon
extends java.lang.Object
implements javax.swing.Icon
Constructor and Description |
---|
CloseTabIcon()
Creates new "X" Icon.
|
CloseTabIcon(javax.swing.Icon fileIcon)
Creates new "X" Icon with an extra icon next to it.
|
Modifier and Type | Method and Description |
---|---|
java.awt.Rectangle |
getBounds()
Returns the bounding rectangle of this icon.
|
javax.swing.Icon |
getExtraIcon()
Returns the extra-icon, which is to be displayed next to this icon.
|
int |
getHeight()
Returns the height of this icon.
|
int |
getIconHeight() |
int |
getIconWidth() |
int |
getWidth()
Returns the width of this icon.
|
int |
getXPos()
Returns the x-coordinate of the position of this icon.
|
int |
getYPos()
Returns the y-coordinate of the position of this icon.
|
void |
paintIcon(java.awt.Component component,
java.awt.Graphics graphics,
int x,
int y) |
protected void |
setExtraIcon(javax.swing.Icon extraIcon)
Sets the extra-icon to be displayed next to this icon.
|
protected void |
setHeight(int height)
Sets the height of this icon.
|
protected void |
setWidth(int width)
Sets the width of this icon.
|
protected void |
setXPos(int xPos)
Sets the x-coordinate of the position of this icon.
|
protected void |
setYPos(int yPos)
Sets the y-coordinate of the position of this icon.
|
public CloseTabIcon()
public CloseTabIcon(javax.swing.Icon fileIcon)
fileIcon
- the Icon-object to be placed next to this icon.Icon
public void paintIcon(java.awt.Component component, java.awt.Graphics graphics, int x, int y)
paintIcon
in interface javax.swing.Icon
public int getIconWidth()
getIconWidth
in interface javax.swing.Icon
public int getIconHeight()
getIconHeight
in interface javax.swing.Icon
public java.awt.Rectangle getBounds()
Rectangle
public int getXPos()
public int getYPos()
public int getWidth()
public int getHeight()
public javax.swing.Icon getExtraIcon()
protected void setXPos(int xPos)
xPos
- the x-coordinate of the position of this icon.protected void setYPos(int yPos)
yPos
- the y-coordinate of the position of this icon.protected void setWidth(int width)
This method should be called only within the constructor-methods.
width
- the width of this icon.protected void setHeight(int height)
This method should be called only within the constructor-methods.
height
- the height of this icon.protected void setExtraIcon(javax.swing.Icon extraIcon)
This method should be called only within the constructor-methods.
extraIcon
- the extra icon to display.Copyright © 2014. All Rights Reserved.