Java Doc for TitledTab.java in  » Swing-Library » InfoNode-Tabbed-Panel » net » infonode » tabbedpanel » titledtab » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Swing Library » InfoNode Tabbed Panel » net.infonode.tabbedpanel.titledtab 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


net.infonode.tabbedpanel.Tab
   net.infonode.tabbedpanel.titledtab.TitledTab

TitledTab
public class TitledTab extends Tab implements IconProvider(Code)

A TitledTab is a tab that has support for text, icon and a custom Swing component (called title component). Titled tab supports several properties that makes it possible to change the look (borders, colors, insets), layout (up, down, left, right).

Titled tab has a line based layout, i.e. the text, icon and title component are laid out in a line. The layout of the tab can be rotated, i.e. the text and the icon will be rotated 90, 180 or 270 degrees. The title component will not be rotated but moved so that the line layout will persist.

A titled tab has 3 rendering states:

  • Normal - The tab is selectable but not yet selected
  • Highlighted - The tab is either highlighted or selected
  • Disabled - The tab is disabled and cannot be selected or highlighted
Most of the properties for the tab can be configured for each of the tab rendering states.

Note: If only the normal state properties have been configured, the highlighted and disabled state will automatically use the same properties as for the normal state, see TitledTabProperties and TitledTabStateProperties .

TitledTab implements the net.infonode.gui.icon.IconProvider interface and overloads toString() so that both text and icon for the normal state is shown in the tab drop down list in a tabbed panel.

TitledTab supports mouse hovering. A HoverListener can be set in the TitledTabProperties . The hover listener receives a HoverEvent when the mouse enters or exits the tab. The hover event's source will be the affected titled tab.


author:
   $Author: jesper $
version:
   $Revision: 1.88 $
See Also:   TitledTabProperties
See Also:   TitledTabStateProperties



Constructor Summary
public  TitledTab(String text, Icon icon, JComponent contentComponent, JComponent titleComponent)
     Constructs a TitledTab with a text, icon, content component and title component.
Parameters:
  text - text or null for no text.

Method Summary
public synchronized  voidaddMouseListener(MouseListener l)
     Adds a MouseListener to receive mouse events from this TitledTab.
public synchronized  voidaddMouseMotionListener(MouseMotionListener l)
     Adds a MouseMotionListener to receive mouse events from this TitledTab.
public  booleancontains(int x, int y)
    
public  JComponentgetDisabledStateTitleComponent()
    
public  JComponentgetHighlightedStateTitleComponent()
    
public  IcongetIcon()
    
public synchronized  MouseListener[]getMouseListeners()
    
public synchronized  MouseMotionListener[]getMouseMotionListeners()
    
public  JComponentgetNormalStateTitleComponent()
    
public  TitledTabPropertiesgetProperties()
    
public  ShapegetShape()
     Gets the Shape for the current active rendering state.
public  StringgetText()
    
public  booleaninside(int x, int y)
    
public synchronized  voidremoveMouseListener(MouseListener l)
    
public synchronized  voidremoveMouseMotionListener(MouseMotionListener l)
    
public  voidsetDisabledStateTitleComponent(JComponent titleComponent)
    
public  voidsetEnabled(boolean enabled)
    

Sets if this TitledTab should be enabled or disabled

Note: since ITP 1.5.0 this method will change the enabled property in the TitledTabProperties for this tab.

public  voidsetHighlighted(boolean highlighted)
    
public  voidsetHighlightedStateTitleComponent(JComponent titleComponent)
    
public  voidsetIcon(Icon icon)
    
public  voidsetNormalStateTitleComponent(JComponent titleComponent)
    
public  voidsetOpaque(boolean opaque)
    
protected  voidsetTabbedPanel(TabbedPanel tabbedPanel)
    
public  voidsetText(String text)
    
public  voidsetTitleComponent(JComponent titleComponent)
    
public  voidsetUI(PanelUI ui)
    
public  StringtoString()
     Gets the text for the normal state.
public  voidupdateUI()
    


Constructor Detail
TitledTab
public TitledTab(String text, Icon icon, JComponent contentComponent, JComponent titleComponent)(Code)
Constructs a TitledTab with a text, icon, content component and title component.
Parameters:
  text - text or null for no text. The text will be applied to thenormal state properties
Parameters:
  icon - icon or null for no icon. The icon will be applied to thenormal state properties
Parameters:
  contentComponent - content component or null for no content component
Parameters:
  titleComponent - title component or null for no title component. The titlecomponent will be applied to all the states
See Also:   net.infonode.tabbedpanel.TabFactory




Method Detail
addMouseListener
public synchronized void addMouseListener(MouseListener l)(Code)
Adds a MouseListener to receive mouse events from this TitledTab.
Parameters:
  l - the MouseListener



addMouseMotionListener
public synchronized void addMouseMotionListener(MouseMotionListener l)(Code)
Adds a MouseMotionListener to receive mouse events from this TitledTab.
Parameters:
  l - the MouseMotionListener



contains
public boolean contains(int x, int y)(Code)



getDisabledStateTitleComponent
public JComponent getDisabledStateTitleComponent()(Code)
Gets the title component for the disabled state title component or null if no title component



getHighlightedStateTitleComponent
public JComponent getHighlightedStateTitleComponent()(Code)
Gets the title component for the highlighted state title component or null if no title component



getIcon
public Icon getIcon()(Code)
Gets the icon for the normal state the icon or null if none



getMouseListeners
public synchronized MouseListener[] getMouseListeners()(Code)
Gets the mouse listeners the mouse listeners



getMouseMotionListeners
public synchronized MouseMotionListener[] getMouseMotionListeners()(Code)
Gets the mouse motion listeners the mouse motion listeners



getNormalStateTitleComponent
public JComponent getNormalStateTitleComponent()(Code)
Gets the title component for the normal state title component or null if no title component



getProperties
public TitledTabProperties getProperties()(Code)
Gets the TitledTabProperties the TitledTabProperties for this TitledTab



getShape
public Shape getShape()(Code)
Gets the Shape for the current active rendering state. the Shape for the active rendering state, null if no special shape
since:
   ITP 1.2.0



getText
public String getText()(Code)
Gets the text for the normal state the text or null if no text



inside
public boolean inside(int x, int y)(Code)



removeMouseListener
public synchronized void removeMouseListener(MouseListener l)(Code)
Removes a MouseListener
Parameters:
  l - the MouseListener to remove



removeMouseMotionListener
public synchronized void removeMouseMotionListener(MouseMotionListener l)(Code)
Removes a MouseMotionListener
Parameters:
  l - the MouseMotionListener to remove



setDisabledStateTitleComponent
public void setDisabledStateTitleComponent(JComponent titleComponent)(Code)
Sets the disabled state title component
Parameters:
  titleComponent - the title component or null for no title component



setEnabled
public void setEnabled(boolean enabled)(Code)

Sets if this TitledTab should be enabled or disabled

Note: since ITP 1.5.0 this method will change the enabled property in the TitledTabProperties for this tab. Enabled/disabled can be controlled by modifying the property or this method.


Parameters:
  enabled - true for enabled, otherwise false



setHighlighted
public void setHighlighted(boolean highlighted)(Code)

Sets if this TitledTab should be highlighted or not.

Note: This will only have effect if this TitledTab is enabled and a member of a tabbed panel.


Parameters:
  highlighted - true for highlight, otherwise false



setHighlightedStateTitleComponent
public void setHighlightedStateTitleComponent(JComponent titleComponent)(Code)
Sets the highlighted state title component
Parameters:
  titleComponent - the title component or null for no title component



setIcon
public void setIcon(Icon icon)(Code)
Sets the icon for the normal state
Parameters:
  icon - the icon or null for no icon



setNormalStateTitleComponent
public void setNormalStateTitleComponent(JComponent titleComponent)(Code)
Sets the normal state title component
Parameters:
  titleComponent - the title component or null for no title component



setOpaque
public void setOpaque(boolean opaque)(Code)



setTabbedPanel
protected void setTabbedPanel(TabbedPanel tabbedPanel)(Code)



setText
public void setText(String text)(Code)
Sets the text for the normal state
Parameters:
  text - the text or null for no text



setTitleComponent
public void setTitleComponent(JComponent titleComponent)(Code)

Sets the title component.

This method is a convenience method for setting the same title component for all states.


Parameters:
  titleComponent - the title component or null for no title component



setUI
public void setUI(PanelUI ui)(Code)



toString
public String toString()(Code)
Gets the text for the normal state. Same as getText(). the text or null if no text
See Also:   TitledTab.getText
since:
   ITP 1.1.0



updateUI
public void updateUI()(Code)



Methods inherited from net.infonode.tabbedpanel.Tab
public void addNotify()(Code)(Java Doc)
public void addTabListener(TabListener listener)(Code)(Java Doc)
public JComponent getContentComponent()(Code)(Java Doc)
public JComponent[] getEventComponents()(Code)(Java Doc)
public JComponent getFocusableComponent()(Code)(Java Doc)
public int getIndex()(Code)(Java Doc)
public Shape getShape()(Code)(Java Doc)
public TabbedPanel getTabbedPanel()(Code)(Java Doc)
public boolean isHighlighted()(Code)(Java Doc)
public boolean isSelected()(Code)(Java Doc)
public void removeNotify()(Code)(Java Doc)
public void removeTabListener(TabListener listener)(Code)(Java Doc)
public void setEnabled(boolean enabled)(Code)(Java Doc)
public void setEventComponent(JComponent eventComponent)(Code)(Java Doc)
public void setEventComponents(JComponent[] eventComponents)(Code)(Java Doc)
public void setFocusableComponent(JComponent focusableComponent)(Code)(Java Doc)
public void setHighlighted(boolean highlighted)(Code)(Java Doc)
public void setSelected(boolean selected)(Code)(Java Doc)
protected void setTabbedPanel(TabbedPanel tabbedPanel)(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.