Java Doc for TabDataModel.java in  » IDE-Netbeans » library » org » netbeans » swing » tabcontrol » 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 » IDE Netbeans » library » org.netbeans.swing.tabcontrol 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


org.netbeans.swing.tabcontrol.TabDataModel

All known Subclasses:   org.netbeans.swing.tabcontrol.DefaultTabDataModel,
TabDataModel
public interface TabDataModel (Code)
A data model representing a set of tabs and their associated data. Allows for atomic add/remove/modification operations any of which are guaranteed to fire only one event on completion. Note that for modification operations (setText(), setIcon, setIconsAndText, no event will be fired unless data is actually changed - calling these methods with the same values that the tabs already have will not generate events. The isWidthChanged method for generated events will return true for events which can affect the area needed to display a tab (such as text or icon width changes).

Note: The standard UI implementations which use this model make no provisions for thread-safety. All changes fired from a TabDataModel should happen on the AWT event thread.
author:
   Tim Boudreau





Method Summary
public  voidaddChangeListener(ChangeListener listener)
     The model will fire a change event whenever a modification occurs that could require a repaint.
public  voidaddComplexListDataListener(ComplexListDataListener listener)
    
public  voidaddTab(int index, TabData data)
    
public  voidaddTabs(int start, TabData[] data)
    
public  voidaddTabs(int[] indices, TabData[] data)
    
public  TabDatagetTab(int index)
    
public  java.util.List<TabData>getTabs()
    
public  intindexOf(TabData td)
     Fetch the index of a tab matching the passed TabData object.
public  voidremoveChangeListener(ChangeListener listener)
     The model will fire a change event whenever a modification occurs that could require a repaint.
public  voidremoveComplexListDataListener(ComplexListDataListener listener)
    
public  voidremoveTab(int index)
    
public  voidremoveTabs(int[] indices)
    
public  voidremoveTabs(int start, int end)
    
public  voidsetIcon(int index, Icon i)
     Set the icon for a given tab.
public  voidsetIcon(int[] indices, Icon[] icons)
     Atomically set the icons for a set of indices.
public  voidsetIconsAndText(int[] indices, String[] txt, Icon[] icons)
     Atomically set the icons and text simultaneously for more than one tab. Fires a single list data event with the indexes of any tabs in which the data was actually changed.
public  voidsetTab(int index, TabData data)
    
public  voidsetTabs(TabData[] data)
    
public  voidsetText(int index, String txt)
     Set the text for a given tab.
public  voidsetText(int[] indices, String[] txt)
     Atomically set the text for a number of tabs.
public  intsize()
     The number of tabs contained in the model.



Method Detail
addChangeListener
public void addChangeListener(ChangeListener listener)(Code)
The model will fire a change event whenever a modification occurs that could require a repaint. This method is only here for the prototype - eventually the UI delegate should listen for ComplexDataNN events and optimize repaints based on the actual areas affected.



addComplexListDataListener
public void addComplexListDataListener(ComplexListDataListener listener)(Code)
Add a data listener
Parameters:
  listener - The listener



addTab
public void addTab(int index, TabData data)(Code)
Add a single tab at the specified location



addTabs
public void addTabs(int start, TabData[] data)(Code)
Atomically add a set of tabs at the specified index
Parameters:
  start - The insert point for new tabs
Parameters:
  data - The tab data to insert



addTabs
public void addTabs(int[] indices, TabData[] data)(Code)
Add the specified tabs at the specified indices
Parameters:
  indices - The indices at which tabs will be added
Parameters:
  data - The tabs to add, in order corresponding to the indicesparameter



getTab
public TabData getTab(int index)(Code)
Retrieve data for a given tab
Parameters:
  index - The index for which to retrieve tab data Data describing the tab



getTabs
public java.util.List<TabData> getTabs()(Code)
Retrieve all the tab data contained in the model as a List a List of TabData objects



indexOf
public int indexOf(TabData td)(Code)
Fetch the index of a tab matching the passed TabData object. Note that the tooltip property of the passed TabData object is not used to test equality. See also org.netbeans.core.windows.ui.TabData.equals()



removeChangeListener
public void removeChangeListener(ChangeListener listener)(Code)
The model will fire a change event whenever a modification occurs that could require a repaint. This method is only here for the prototype - eventually the UI delegate should listen for ComplexDataNN events and optimize repaints based on the actual areas affected.



removeComplexListDataListener
public void removeComplexListDataListener(ComplexListDataListener listener)(Code)
Remove a data listener
Parameters:
  listener - The listener



removeTab
public void removeTab(int index)(Code)
Remove the tab at the specified index
Parameters:
  index - The tab index



removeTabs
public void removeTabs(int[] indices)(Code)
Remove the tabs at the specified indices
Parameters:
  indices - The indices at which tabs should be removed



removeTabs
public void removeTabs(int start, int end)(Code)
Remove a range of tabs
Parameters:
  start - the start index
Parameters:
  end - the end index



setIcon
public void setIcon(int index, Icon i)(Code)
Set the icon for a given tab. Will trigger a list data event, and the resulting event's widthChanged property will be set appropriately if the displayed width has changed.
Parameters:
  index - The index to set the icon for
Parameters:
  i - The icon to use for the tab



setIcon
public void setIcon(int[] indices, Icon[] icons)(Code)
Atomically set the icons for a set of indices. Fires a single list data event with the indexes of any tabs in which the data was actually changed. If the passed data perfectly match the existing data, no event will be fired.
Parameters:
  indices - The indices for which the corresponding icons should bechanged
Parameters:
  icons - The replacement icons. This array must be the same lengthas the indices parameter



setIconsAndText
public void setIconsAndText(int[] indices, String[] txt, Icon[] icons)(Code)
Atomically set the icons and text simultaneously for more than one tab. Fires a single list data event with the indexes of any tabs in which the data was actually changed. If the passed data perfectly match the existing data, no event will be fired.1
Parameters:
  indices - The indices which should have their data changed
Parameters:
  txt - The replacement text values corresponding to the passedindices
Parameters:
  icons - The replacement icons corresponding to the passed indices



setTab
public void setTab(int index, TabData data)(Code)
Set the tab data for a given tab to the passed value
Parameters:
  index - The index of the tab to be changed
Parameters:
  data - The new tab data for this index



setTabs
public void setTabs(TabData[] data)(Code)
Replace the entire set of tabs represented by the model



setText
public void setText(int index, String txt)(Code)
Set the text for a given tab. Triggers a list data event.
Parameters:
  index - The index of the tab
Parameters:
  txt - The replacement text



setText
public void setText(int[] indices, String[] txt)(Code)
Atomically set the text for a number of tabs. Fires a single list data event with the indexes of any tabs in which the data was actually changed. If the passed data perfectly match the existing data, no event will be fired.1
Parameters:
  indices - The indices of the tabs to change
Parameters:
  txt - The text values for the tabs



size
public int size()(Code)
The number of tabs contained in the model. The number of tabs



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