Java Doc for WindowsComboBoxUI.java in  » Swing-Library » jgoodies-looks » com » jgoodies » looks » windows » 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 » jgoodies looks » com.jgoodies.looks.windows 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


com.jgoodies.looks.windows.WindowsComboBoxUI

WindowsComboBoxUI
public class WindowsComboBoxUI extends com.sun.java.swing.plaf.windows.WindowsComboBoxUI (Code)
The JGoodies Windows Look&Feel implementation of javax.swing.plaf.ComboBoxUI . Corrects the editor insets for editable combo boxes as well as the render insets for non-editable combos. And it has the same height as text fields - unless you change the renderer.

Also, this class offers to use the combo's popup prototype display value to compute the popup menu width. This is an optional feature of the JGoodies Windows L&f implemented via a client property key.
author:
   Karsten Lentzsch
version:
   $Revision: 1.19 $
See Also:   Options.COMBO_POPUP_PROTOTYPE_DISPLAY_VALUE_KEY





Method Summary
protected  voidconfigureEditor()
    
protected  JButtoncreateArrowButton()
     Creates the arrow button that is to be used in the combo box.

Overridden to paint black triangles.

protected  ComboBoxEditorcreateEditor()
     Creates the editor that is to be used in editable combo boxes.
protected  LayoutManagercreateLayoutManager()
     Creates a layout manager for managing the components which make up the combo box.

Overriden to use a layout that has a fixed width arrow button.

protected  ComboPopupcreatePopup()
     Creates a ComboPopup that honors the optional combo popup display value that is used to compute the popup menu width.
protected  ListCellRenderercreateRenderer()
     Creates the default renderer that will be used in a non-editiable combo box.
public static  ComponentUIcreateUI(JComponent b)
    
public  DimensiongetMinimumSize(JComponent c)
     The minumum size is the size of the display area plus insets plus the button.
public  DimensiongetPreferredSize(JComponent c)
     Delegates to #getMinimumSize(Component).
protected  voidinstallListeners()
    
public  voidinstallUI(JComponent c)
    
protected  booleanisRendererBorderRemovable(JComponent rendererComponent)
     Checks and answer whether the border of the given renderer component can be removed temporarily, so the combo's selection background will be consistent with the default renderer and native appearance. This test is invoked from #paintCurrentValue.

It is safe to remove an EmptyBorder if the component doesn't override #update, #paint and #paintBorder. Since we know the default renderer, we can remove its border.

Custom renderers may set a hint to make their border removable. To do so, set the client property "isBorderRemovable" to Boolean.TRUE.

public  voidpaintCurrentValue(Graphics g, Rectangle bounds, boolean hasFocus)
     Paints the currently selected item.
protected  RectanglerectangleForCurrentValue()
     Returns the area that is reserved for drawing the currently selected item.
protected  voiduninstallListeners()
    



Method Detail
configureEditor
protected void configureEditor()(Code)



createArrowButton
protected JButton createArrowButton()(Code)
Creates the arrow button that is to be used in the combo box.

Overridden to paint black triangles.




createEditor
protected ComboBoxEditor createEditor()(Code)
Creates the editor that is to be used in editable combo boxes. This method only gets called if a custom editor has not already been installed in the JComboBox.



createLayoutManager
protected LayoutManager createLayoutManager()(Code)
Creates a layout manager for managing the components which make up the combo box.

Overriden to use a layout that has a fixed width arrow button. an instance of a layout manager




createPopup
protected ComboPopup createPopup()(Code)
Creates a ComboPopup that honors the optional combo popup display value that is used to compute the popup menu width.



createRenderer
protected ListCellRenderer createRenderer()(Code)
Creates the default renderer that will be used in a non-editiable combo box. A default renderer will used only if a renderer has not been explicitly set with setRenderer.

This method differs from the superclass implementation in that it uses an empty border with the default left and right text insets, the same as used by a combo box editor. a ListCellRender used for the combo box
See Also:   javax.swing.JComboBox.setRenderer




createUI
public static ComponentUI createUI(JComponent b)(Code)



getMinimumSize
public Dimension getMinimumSize(JComponent c)(Code)
The minumum size is the size of the display area plus insets plus the button.



getPreferredSize
public Dimension getPreferredSize(JComponent c)(Code)
Delegates to #getMinimumSize(Component). Overridden to return the same result in JDK 1.5 as in JDK 1.4.



installListeners
protected void installListeners()(Code)



installUI
public void installUI(JComponent c)(Code)



isRendererBorderRemovable
protected boolean isRendererBorderRemovable(JComponent rendererComponent)(Code)
Checks and answer whether the border of the given renderer component can be removed temporarily, so the combo's selection background will be consistent with the default renderer and native appearance. This test is invoked from #paintCurrentValue.

It is safe to remove an EmptyBorder if the component doesn't override #update, #paint and #paintBorder. Since we know the default renderer, we can remove its border.

Custom renderers may set a hint to make their border removable. To do so, set the client property "isBorderRemovable" to Boolean.TRUE. If this client property is set, its value will be returned. If it is not set, true is returned if and only if the component's border is an EmptyBorder.
Parameters:
  rendererComponent - the renderer component to check true if the component's border can be removed, false if not
See Also:   WindowsComboBoxUI.paintCurrentValue(Graphics,Rectangle,boolean)




paintCurrentValue
public void paintCurrentValue(Graphics g, Rectangle bounds, boolean hasFocus)(Code)
Paints the currently selected item.



rectangleForCurrentValue
protected Rectangle rectangleForCurrentValue()(Code)
Returns the area that is reserved for drawing the currently selected item.



uninstallListeners
protected void uninstallListeners()(Code)



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