org.xnap.commons.gui
Class CloseableTabbedPane.TabTitleIcon

java.lang.Object
  extended by org.xnap.commons.gui.CloseableTabbedPane.TabTitleIcon
All Implemented Interfaces:
Icon, CloseableTabbedPane.TabTitle
Enclosing class:
CloseableTabbedPane

protected class CloseableTabbedPane.TabTitleIcon
extends Object
implements Icon, CloseableTabbedPane.TabTitle

Provides an Icon that can displays a text that can have an icon to its left and an EventIcon to its right.


Constructor Summary
CloseableTabbedPane.TabTitleIcon(String title, Component comp)
           
CloseableTabbedPane.TabTitleIcon(String title, Component comp, Icon leftIcon)
           
 
Method Summary
protected  Rectangle computeTextRect(Graphics g, int x, int y)
           
 void disable()
           
protected  void drawTitleAndRightIcon(Component c, Graphics g, int x, int y, int offset)
           
 int getIconHeight()
           
 int getIconWidth()
           
 String getTitle()
           
 void paintIcon(Component c, Graphics g, int x, int y)
          Overwrites paintIcon to get hold of the coordinates of the icon.
 void setButtonVisible(boolean b)
           
 void setTitle(String newTitle)
           
 void updateUI()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CloseableTabbedPane.TabTitleIcon

public CloseableTabbedPane.TabTitleIcon(String title,
                                        Component comp,
                                        Icon leftIcon)

CloseableTabbedPane.TabTitleIcon

public CloseableTabbedPane.TabTitleIcon(String title,
                                        Component comp)
Method Detail

updateUI

public void updateUI()
Specified by:
updateUI in interface CloseableTabbedPane.TabTitle

setTitle

public void setTitle(String newTitle)
Specified by:
setTitle in interface CloseableTabbedPane.TabTitle

getTitle

public String getTitle()
Specified by:
getTitle in interface CloseableTabbedPane.TabTitle

getIconHeight

public int getIconHeight()
Specified by:
getIconHeight in interface Icon

getIconWidth

public int getIconWidth()
Specified by:
getIconWidth in interface Icon

paintIcon

public void paintIcon(Component c,
                      Graphics g,
                      int x,
                      int y)
Overwrites paintIcon to get hold of the coordinates of the icon.

Specified by:
paintIcon in interface Icon

computeTextRect

protected Rectangle computeTextRect(Graphics g,
                                    int x,
                                    int y)

drawTitleAndRightIcon

protected void drawTitleAndRightIcon(Component c,
                                     Graphics g,
                                     int x,
                                     int y,
                                     int offset)

setButtonVisible

public void setButtonVisible(boolean b)
Specified by:
setButtonVisible in interface CloseableTabbedPane.TabTitle

disable

public void disable()
Specified by:
disable in interface CloseableTabbedPane.TabTitle


Copyright © 2004-2007 XNap Commons Team. All Rights Reserved.