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


org.netbeans.swing.tabcontrol.TabDisplayerUI
   org.netbeans.swing.tabcontrol.plaf.AbstractTabDisplayerUI

All known Subclasses:   org.netbeans.swing.tabcontrol.plaf.BasicTabDisplayerUI,  org.netbeans.swing.tabcontrol.plaf.BasicSlidingTabDisplayerUI,  org.netbeans.swing.tabcontrol.plaf.ToolbarTabDisplayerUI,
AbstractTabDisplayerUI
abstract public class AbstractTabDisplayerUI extends TabDisplayerUI (Code)
Base class for the implementations of TabDisplayerUI in this package. Uses TabLayoutModel for managing the layout of the tabs. Defines an SPI for UI delegates for TabDisplayer.

For most use cases, it will make more sense to subclass BasicTabDisplayerUI or BasicScrollingTabDisplayerUI, which handle most of the logic any implementation will need.
See Also:   BasicTabDisplayerUI
See Also:   BasicScrollingTabDisplayerUI
author:
   Tim Boudreau


Inner Class :protected class DisplayerPropertyChangeListener implements PropertyChangeListener
Inner Class :protected class DisplayerHierarchyListener implements HierarchyListener
Inner Class :protected class ModelListener implements ComplexListDataListener,ChangeListener

Field Summary
protected  ComponentListenercomponentListener
     Component listener - mainly used to detach listeners when the component is hidden, and reattach them when it is shown.
protected  HierarchyListenerhierarchyListener
    
protected  TabLayoutModellayoutModel
     Layout model, which will be initialized in installUI() by calling createLayoutModel.
protected  ModelListenermodelListener
     Listener on the TabDataModel.
protected  MouseListenermouseListener
     Mouse listener (which may optionally implement MouseWheelListener and MouseMotionListener), which handles mouse events over the tab, triggering selection model changes, repaints, etc.
protected  PropertyChangeListenerpropertyChangeListener
     A property change listener to listen on any changes from the component which should trigger repainting or other operations.
protected  ChangeListenerselectionListener
     A change listener which listens on the selection model and repaints as needed when the selection changes.

Constructor Summary
public  AbstractTabDisplayerUI(TabDisplayer displayer)
    

Method Summary
protected  ComponentListenercreateComponentListener()
     Create a ComponentListener that may be needed to handle resize, show, hide, etc.
protected  FontcreateFont()
    
protected  HierarchyListenercreateHierarchyListener()
    
abstract protected  TabLayoutModelcreateLayoutModel()
    
protected  ModelListenercreateModelListener()
     Create a listener on the data model that triggers repaints on appropriate changes.
abstract protected  MouseListenercreateMouseListener()
     Create the mouse listener that will be responsible for changing the selection on mouse events, triggering repaints on mouse enter/exit/motion, etc.
protected  PropertyChangeListenercreatePropertyChangeListener()
    
abstract protected  ChangeListenercreateSelectionListener()
     Create a ChangeListener to be attached to the selection model.
protected  SingleSelectionModelcreateSelectionModel()
    
public  intdropIndexOfPoint(Point p)
     A very basic implementation of dropIndexOfPoint, which simply iterates all of the tab rectangles to see if they contain the point.
protected  voidinstall()
     Called after creating the layout model, selection model and mouse listener, but before installing the mouse listener and selection model.
final protected  voidinstallListeners()
     Installs the mouse listener returned by createMouseListener into the control.
final public  voidinstallUI(JComponent c)
     installUI is final to ensure listeners, etc.
protected  voidmodelChanged()
     Convenience method called by ModelListener.stateChanged() when the data model changes. Eliminates the need for custom subclasses where the only purpose is to discard some small amount of cached data.
public  voidregisterShortcuts(JComponent comp)
    
protected  PointtoDropPoint(Point location)
     Converts a point into a point in the coordinate space of the tabs area, for determining what index a drop operation should affect.
protected  voiduninstall()
     Called after uninstalling the mouse listener and selection model, but before references to that or the layout model or displayer have been nulled.
final protected  voiduninstallListeners()
     Installs the mouse listener returned by createMouseListener into the control.
final public  voiduninstallUI(JComponent c)
     This method is final - subclasses that need to deinitialize should override uninstall(), and remove any listeners, null any unneeded references, etc.
public  voidunregisterShortcuts(JComponent comp)
    

Field Detail
componentListener
protected ComponentListener componentListener(Code)
Component listener - mainly used to detach listeners when the component is hidden, and reattach them when it is shown. Also used by BasicScrollingTabDisplayerUI to trigger re-layouts of scrolled tabs when the size of the component changes.



hierarchyListener
protected HierarchyListener hierarchyListener(Code)



layoutModel
protected TabLayoutModel layoutModel(Code)
Layout model, which will be initialized in installUI() by calling createLayoutModel. The layout model provides tab coordinates.



modelListener
protected ModelListener modelListener(Code)
Listener on the TabDataModel. Responsible for repainting on model changes. Note that DefaultTabSelectionModel also listens on the model and automatically updates the selected index if, say, tabs are inserted before the currently selected tab.



mouseListener
protected MouseListener mouseListener(Code)
Mouse listener (which may optionally implement MouseWheelListener and MouseMotionListener), which handles mouse events over the tab, triggering selection model changes, repaints, etc.



propertyChangeListener
protected PropertyChangeListener propertyChangeListener(Code)
A property change listener to listen on any changes from the component which should trigger repainting or other operations. The default implementation simply listens for changes in the active property to trigger a repaint.



selectionListener
protected ChangeListener selectionListener(Code)
A change listener which listens on the selection model and repaints as needed when the selection changes.




Constructor Detail
AbstractTabDisplayerUI
public AbstractTabDisplayerUI(TabDisplayer displayer)(Code)
Creates a new instance of AbstractTabDisplayerUI




Method Detail
createComponentListener
protected ComponentListener createComponentListener()(Code)
Create a ComponentListener that may be needed to handle resize, show, hide, etc. Returns null by default.



createFont
protected Font createFont()(Code)



createHierarchyListener
protected HierarchyListener createHierarchyListener()(Code)



createLayoutModel
abstract protected TabLayoutModel createLayoutModel()(Code)
Create an instance of TabLayoutModel which will provide coordinates for tabs



createModelListener
protected ModelListener createModelListener()(Code)
Create a listener on the data model that triggers repaints on appropriate changes.



createMouseListener
abstract protected MouseListener createMouseListener()(Code)
Create the mouse listener that will be responsible for changing the selection on mouse events, triggering repaints on mouse enter/exit/motion, etc. The installation code will detect if the resulting listener also implements MouseWheelListener or MouseMotionListener, and if so, will add it as such. A mouse listener, which may also implement MouseMotionListener and/orMouseWheelListener



createPropertyChangeListener
protected PropertyChangeListener createPropertyChangeListener()(Code)
Create a PropertyChangeListener which listens on any interesting properties of the control



createSelectionListener
abstract protected ChangeListener createSelectionListener()(Code)
Create a ChangeListener to be attached to the selection model. This listener will be responsible for repainting the appropriate areas on selection changes. A changeListener that will be notified of selection changes



createSelectionModel
protected SingleSelectionModel createSelectionModel()(Code)
Creates an instance of DefaultTabSelectionModel



dropIndexOfPoint
public int dropIndexOfPoint(Point p)(Code)
A very basic implementation of dropIndexOfPoint, which simply iterates all of the tab rectangles to see if they contain the point. It is preferred to override this and provide a more efficient implementation unless the UI is not designed to display more than a few tabs.
Parameters:
  p - A point The index, or -1 if none



install
protected void install()(Code)
Called after creating the layout model, selection model and mouse listener, but before installing the mouse listener and selection model. Subclasses may use this method to do anything they need to do at ui install time.



installListeners
final protected void installListeners()(Code)
Installs the mouse listener returned by createMouseListener into the control. If the mouse listener implements MouseMotionListener or MouseWheelListener, it will be installed as such as well.



installUI
final public void installUI(JComponent c)(Code)
installUI is final to ensure listeners, etc. are created and attached. Subclasses that need to perform initialization on install should override install(), and refer to the displayer instance field, which will be initialized here.
Parameters:
  c - An instance of TabDisplayer



modelChanged
protected void modelChanged()(Code)
Convenience method called by ModelListener.stateChanged() when the data model changes. Eliminates the need for custom subclasses where the only purpose is to discard some small amount of cached data. The default implementation simply calls displayer.repaint().



registerShortcuts
public void registerShortcuts(JComponent comp)(Code)
Does nothing, no shortcuts



toDropPoint
protected Point toDropPoint(Point location)(Code)
Converts a point into a point in the coordinate space of the tabs area, for determining what index a drop operation should affect.
Parameters:
  location - A point in the coordinate space of the container A point in the coordinate space of the tab display area



uninstall
protected void uninstall()(Code)
Called after uninstalling the mouse listener and selection model, but before references to that or the layout model or displayer have been nulled. Subclasses may use this method to do any cleanup they need to do at uninstall time.



uninstallListeners
final protected void uninstallListeners()(Code)
Installs the mouse listener returned by createMouseListener into the control. If the mouse listener implements MouseMotionListener or MouseWheelListener, it will be removed as such as well.



uninstallUI
final public void uninstallUI(JComponent c)(Code)
This method is final - subclasses that need to deinitialize should override uninstall(), and remove any listeners, null any unneeded references, etc.
Parameters:
  c -



unregisterShortcuts
public void unregisterShortcuts(JComponent comp)(Code)
Does nothing, no shortcuts



Fields inherited from org.netbeans.swing.tabcontrol.TabDisplayerUI
final protected TabDisplayer displayer(Code)(Java Doc)
protected SingleSelectionModel selectionModel(Code)(Java Doc)

Methods inherited from org.netbeans.swing.tabcontrol.TabDisplayerUI
abstract protected void cancelRequestAttention(int tab)(Code)(Java Doc)
public Image createImageOfTab(int index)(Code)(Java Doc)
abstract protected SingleSelectionModel createSelectionModel()(Code)(Java Doc)
abstract public int dropIndexOfPoint(Point p)(Code)(Java Doc)
public Icon getButtonIcon(int buttonId, int buttonState)(Code)(Java Doc)
abstract public Polygon getExactTabIndication(int index)(Code)(Java Doc)
abstract public Polygon getInsertTabIndication(int index)(Code)(Java Doc)
abstract public Rectangle getTabRect(int index, Rectangle destination)(Code)(Java Doc)
public void installUI(JComponent c)(Code)(Java Doc)
public void makeTabVisible(int index)(Code)(Java Doc)
public void postTabAction(TabActionEvent e)(Code)(Java Doc)
abstract public void registerShortcuts(JComponent comp)(Code)(Java Doc)
abstract protected void requestAttention(int tab)(Code)(Java Doc)
final protected boolean shouldPerformAction(String command, int tab, MouseEvent event)(Code)(Java Doc)
abstract public int tabForCoordinate(Point p)(Code)(Java Doc)
public void uninstallUI(JComponent c)(Code)(Java Doc)
abstract public void unregisterShortcuts(JComponent comp)(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.