Java Doc for QuaquaUtilities.java in  » Swing-Library » substance-look-feel » contrib » ch » randelshofer » quaqua » 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 » substance look feel » contrib.ch.randelshofer.quaqua 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   javax.swing.plaf.basic.BasicGraphicsUtils
      contrib.ch.randelshofer.quaqua.QuaquaUtilities

QuaquaUtilities
public class QuaquaUtilities extends BasicGraphicsUtils implements SwingConstants(Code)
Utility class for the Quaqua LAF.
author:
   Werner Randelshofer, Staldenmattweg 2, CH-6405 Immensee, Switzerland
version:
   3.1 2006-09-04 Added method compositeRequestFocus.
version:
  
3.0.5 2006-08-20 Method endGraphics must not set
version:
   KEY_TEXT_ANTIALIASING to null.
version:
  
3.0.4 2006-02-19 Catch Throwable in method setWindowAlpha instead
version:
   of catching NoSuchMethodException.
version:
  
3.0.3 2006-01-08 Don't set Window alpha, when running on
version:
   Java 1.4.2_05 on Mac OS X 10.3.5. Because this only has the effect of turning
version:
   the background color of the Window to white.
version:
  
3.0.2 2005-12-10 Method isOnActiveWindow() did not reliably
version:
   return true.
version:
  
3.0.1 2005-11-12 Fixed NPE in method repaint border.
version:
  
3.0 2005-09-24 Removed all reflection helper methods. Moved Sheet
version:
   helper methods out into class Sheets.
version:
  
2.6 2005-09-17 Method isOnFocusedWindow returns true, if
version:
   the window returns false on "getFocusableWindowState".
version:
  
2.5 2005-03-13 Renamed method isFrameActive to isOnActiveFrame.
version:
  
2.4 2004-12-28 Method createBufferdImage added. Method
version:
   isOnActiveWindow() renamed to isFrameActive().
version:
  
2.3 2004-12-14 Method getUI added.
version:
  
2.2.1 2004-12-01 Methods setDragEnabled and getDragEnabled never
version:
   worked because the attempted to get method objects on the wrong class.
version:
  
2.2 2004-09-19 Refined algorithm of method isFrameActive.
version:
  
2.1 2004-07-04 Methods repaintBorder, beginFont, endFont and
version:
   isFocused added.
version:
  
2.0 2004-04-27 Renamed from QuaquaGraphicUtils to QuaquaUtilities.
version:
   Added method isFrameActive(Component).
version:
  
1.1.1 2003-10-08 Diagnostic output to System.out removed.
version:
  
1.1 2003-10-05 Methods getModifiersText and getModifiersUnicode
version:
   added.
version:
  
1.0 2003-07-19 Created.




Method Summary
final public static  ObjectbeginGraphics(Graphics2D graphics2d)
    
public static  ComponentcompositeRequestFocus(Component component)
     Copied from BasicLookAndFeel.
public static  voidconfigureGraphics(Graphics gr)
    
public static  BufferedImagecreateBufferedImage(URL location)
    
public static  TexturePaintcreateTexturePaint(URL location)
    
public static  voiddrawStringUnderlineCharAt(Graphics g, String text, int underlinedIndex, int x, int y)
     Draw a string with the graphics g at location (x, y) just like g.drawString would. The character at index underlinedIndex in text will be underlined.
final public static  voidendGraphics(Graphics2D graphics2d, Object oldHints)
    
static  intfindDisplayedMnemonicIndex(String text, int mnemonic)
     Returns index of the first occurrence of mnemonic within string text.
public static  StringgetKeyModifiersText(int modifiers, boolean leftToRight)
     Returns a Mac OS X specific String describing the modifier key(s), such as "Shift", or "Ctrl+Shift".
static  StringgetKeyModifiersUnicode(int modifiers, boolean leftToRight)
    
public static  intgetLeftSideBearing(Font f, String string)
    
final public static  booleanisFocused(Component component)
    
static  booleanisHeadless()
    
public static  booleanisLeftToRight(Component c)
    
public static  booleanisOnActiveWindow(Component c)
     Returns true if the component is on a Dialog or a Frame, which is active, or if it is on a Window, which is focused.
public static  StringlayoutCompoundLabel(JComponent c, FontMetrics fm, String text, Icon icon, int verticalAlignment, int horizontalAlignment, int verticalTextPosition, int horizontalTextPosition, Rectangle viewR, Rectangle iconR, Rectangle textR, int textIconGap)
     Compute and return the location of the icons origin, the location of origin of the text baseline, and a possibly clipped version of the compound labels string.
public static  StringlayoutCompoundLabel(FontMetrics fm, String text, Icon icon, int verticalAlignment, int horizontalAlignment, int verticalTextPosition, int horizontalTextPosition, Rectangle viewR, Rectangle iconR, Rectangle textR, int textIconGap)
     Compute and return the location of the icons origin, the location of origin of the text baseline, and a possibly clipped version of the compound labels string.
static  voidprovideErrorFeedback(Component component)
     Invoked when the user attempts an invalid operation, such as pasting into an uneditable JTextField that has focus.
public static  voidrepaintBorder(JComponent component)
    



Method Detail
beginGraphics
final public static Object beginGraphics(Graphics2D graphics2d)(Code)



compositeRequestFocus
public static Component compositeRequestFocus(Component component)(Code)
Copied from BasicLookAndFeel.



configureGraphics
public static void configureGraphics(Graphics gr)(Code)



createBufferedImage
public static BufferedImage createBufferedImage(URL location)(Code)



createTexturePaint
public static TexturePaint createTexturePaint(URL location)(Code)



drawStringUnderlineCharAt
public static void drawStringUnderlineCharAt(Graphics g, String text, int underlinedIndex, int x, int y)(Code)
Draw a string with the graphics g at location (x, y) just like g.drawString would. The character at index underlinedIndex in text will be underlined. If index is beyond the bounds of text (including < 0), nothing will be underlined.
Parameters:
  g - Graphics to draw with
Parameters:
  text - String to draw
Parameters:
  underlinedIndex - Index of character in text to underline
Parameters:
  x - x coordinate to draw at
Parameters:
  y - y coordinate to draw at
since:
   1.4



endGraphics
final public static void endGraphics(Graphics2D graphics2d, Object oldHints)(Code)



findDisplayedMnemonicIndex
static int findDisplayedMnemonicIndex(String text, int mnemonic)(Code)
Returns index of the first occurrence of mnemonic within string text. Matching algorithm is not case-sensitive.
Parameters:
  text - The text to search through, may be null
Parameters:
  mnemonic - The mnemonic to find the character for. index into the string if exists, otherwise -1



getKeyModifiersText
public static String getKeyModifiersText(int modifiers, boolean leftToRight)(Code)
Returns a Mac OS X specific String describing the modifier key(s), such as "Shift", or "Ctrl+Shift". string a text description of the combination of modifierkeys that were held down during the event



getKeyModifiersUnicode
static String getKeyModifiersUnicode(int modifiers, boolean leftToRight)(Code)



getLeftSideBearing
public static int getLeftSideBearing(Font f, String string)(Code)



isFocused
final public static boolean isFocused(Component component)(Code)



isHeadless
static boolean isHeadless()(Code)



isLeftToRight
public static boolean isLeftToRight(Component c)(Code)



isOnActiveWindow
public static boolean isOnActiveWindow(Component c)(Code)
Returns true if the component is on a Dialog or a Frame, which is active, or if it is on a Window, which is focused. Always returns true, if the component has no parent window.



layoutCompoundLabel
public static String layoutCompoundLabel(JComponent c, FontMetrics fm, String text, Icon icon, int verticalAlignment, int horizontalAlignment, int verticalTextPosition, int horizontalTextPosition, Rectangle viewR, Rectangle iconR, Rectangle textR, int textIconGap)(Code)
Compute and return the location of the icons origin, the location of origin of the text baseline, and a possibly clipped version of the compound labels string. Locations are computed relative to the viewR rectangle. The JComponents orientation (LEADING/TRAILING) will also be taken into account and translated into LEFT/RIGHT values accordingly.



layoutCompoundLabel
public static String layoutCompoundLabel(FontMetrics fm, String text, Icon icon, int verticalAlignment, int horizontalAlignment, int verticalTextPosition, int horizontalTextPosition, Rectangle viewR, Rectangle iconR, Rectangle textR, int textIconGap)(Code)
Compute and return the location of the icons origin, the location of origin of the text baseline, and a possibly clipped version of the compound labels string. Locations are computed relative to the viewR rectangle. This layoutCompoundLabel() does not know how to handle LEADING/TRAILING values in horizontalTextPosition (they will default to RIGHT) and in horizontalAlignment (they will default to CENTER). Use the other version of layoutCompoundLabel() instead.



provideErrorFeedback
static void provideErrorFeedback(Component component)(Code)
Invoked when the user attempts an invalid operation, such as pasting into an uneditable JTextField that has focus. The default implementation beeps. Subclasses that wish different behavior should override this and provide the additional feedback.
Parameters:
  component - Component the error occured in, may be nullindicating the error condition is not directlyassociated with a Component.



repaintBorder
public static void repaintBorder(JComponent component)(Code)



Methods inherited from javax.swing.plaf.basic.BasicGraphicsUtils
public static void drawBezel(Graphics g, int x, int y, int w, int h, boolean isPressed, boolean isDefault, Color shadow, Color darkShadow, Color highlight, Color lightHighlight)(Code)(Java Doc)
public static void drawDashedRect(Graphics g, int x, int y, int width, int height)(Code)(Java Doc)
public static void drawEtchedRect(Graphics g, int x, int y, int w, int h, Color shadow, Color darkShadow, Color highlight, Color lightHighlight)(Code)(Java Doc)
public static void drawGroove(Graphics g, int x, int y, int w, int h, Color shadow, Color highlight)(Code)(Java Doc)
public static void drawLoweredBezel(Graphics g, int x, int y, int w, int h, Color shadow, Color darkShadow, Color highlight, Color lightHighlight)(Code)(Java Doc)
public static void drawString(Graphics g, String text, int underlinedChar, int x, int y)(Code)(Java Doc)
public static void drawStringUnderlineCharAt(Graphics g, String text, int underlinedIndex, int x, int y)(Code)(Java Doc)
public static Insets getEtchedInsets()(Code)(Java Doc)
public static Insets getGrooveInsets()(Code)(Java Doc)
public static Dimension getPreferredButtonSize(AbstractButton b, int textIconGap)(Code)(Java Doc)

Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(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.