| java.lang.Object org.isqlviewer.swing.CompoundIcon
CompoundIcon | public class CompoundIcon implements Icon(Code) | | Simple Icon implementation of using two existing icons as one side by side.
author: Mark A. Kobold version: 1.0 |
Constructor Summary | |
public | CompoundIcon(Icon leftIcon, Icon rightIcon) Default constructor for this object. |
Method Summary | |
public int | getIconHeight() | public int | getIconWidth() | public Icon | getLeftIcon() Returns the instance of the icon drawn on thr left side. | public Icon | getRightIcon() Returns the instance of the icon drawn on thr right side. | public boolean | isOverIcon(int x, int y) This method is used to see if the relative coordinates are contained in the left icon.
If the left icon is null this method will always return false.
Parameters: x - relative x coordinate of this compond icon. Parameters: y - relative y coordinate of this compond icon. | public void | paintIcon(Component c, Graphics g, int x, int y) | public void | setLeftIcon(Icon icon) Replaces the icon on the left side. | public void | setRightIcon(Icon icon) Replaces the icon on the right side. |
iconGap | protected int iconGap(Code) | | |
CompoundIcon | public CompoundIcon(Icon leftIcon, Icon rightIcon)(Code) | | Default constructor for this object.
Either parameter for this method can be null if need be however if both icons are null this won't show much ?
Parameters: leftIcon - icon to be shown on the left side. Parameters: rightIcon - icon to be shown on the right side. |
getLeftIcon | public Icon getLeftIcon()(Code) | | Returns the instance of the icon drawn on thr left side.
Icon shown on the left. |
getRightIcon | public Icon getRightIcon()(Code) | | Returns the instance of the icon drawn on thr right side.
Icon shown on the right. |
isOverIcon | public boolean isOverIcon(int x, int y)(Code) | | This method is used to see if the relative coordinates are contained in the left icon.
If the left icon is null this method will always return false.
Parameters: x - relative x coordinate of this compond icon. Parameters: y - relative y coordinate of this compond icon. boolean if x and y are within the bounds of the left icon. |
setLeftIcon | public void setLeftIcon(Icon icon)(Code) | | Replaces the icon on the left side.
Parameters: Icon - to be shown on the left. |
setRightIcon | public void setRightIcon(Icon icon)(Code) | | Replaces the icon on the right side.
Parameters: Icon - to be shown on the right. |
|
|