Java Doc for JETAToolbox.java in  » Swing-Library » abeille-forms-designer » com » jeta » open » gui » utils » 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 » abeille forms designer » com.jeta.open.gui.utils 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   com.jeta.open.gui.utils.JETAToolbox

JETAToolbox
public class JETAToolbox (Code)
Some common utility functions for GUI stuff.
author:
   Jeff Tassin


Field Summary
final public static  StringAPPLICATION_FRAME
    
final public static  StringWINDOWS_LF
    


Method Summary
public static  voidaddItems(JComboBox cbox, Object[] items)
    
public static  intcalculateAverageTextWidth(Component comp, int numCharacters)
     Calculates the width of an average string of text.
public static  voidcalculateReasonableComponentSize(Dimension d)
     Sets the size of the dimension to some reasonable value.
public static  voidcenterFrame(Window frame, float xpctWidth, float ypctWidth)
     This method centers and sizes a frame window on the screen.
public static  voidcenterWindow(Window frame)
     This method centers a window window on the screen.
public static  voidcenterWindowChangeWidth(Window frame, float xpctWidth)
     This method centers a window window and changes the width on the screen. The caller must pass the x percentages of screen width.
public static  voidcopyToClipboard(String str)
    
public static  DialogcreateDialog(Class dlgclass, Component owner, boolean bModal)
     This method creates a dialog of the type class.
public static  intgetFrameBorderThickness()
    
public static  intgetTitleBarHeight()
    
public static  JETADialoginvokeDialog(JETAPanel view, Component owner, String title)
     Creates and displays a model JETADialog using the given view as the content pane.
public static  JETADialoginvokeDialog(JETAPanel view, Component owner, String title, JComponent initialFocus)
     Creates and displays a model JETADialog using the given view as the content pane.
public static  booleanisAquaLookAndFeel()
     Returns true if running OS X Aqua look and feel.
public static  booleanisOSX()
    
public static  booleanisWindows()
    
public static  booleanisWindowsLookAndFeel()
     true if we are currently in the windows look and feel.
public static  voidsetReasonableWindowSize(Component window, Dimension d)
     Sets the size of the given window to the passed in dimension.

Field Detail
APPLICATION_FRAME
final public static String APPLICATION_FRAME(Code)



WINDOWS_LF
final public static String WINDOWS_LF(Code)





Method Detail
addItems
public static void addItems(JComboBox cbox, Object[] items)(Code)
Adds an array or collection of items to a combo box



calculateAverageTextWidth
public static int calculateAverageTextWidth(Component comp, int numCharacters)(Code)
Calculates the width of an average string of text.
Parameters:
  comp - the component whose font metrics will determine the width
Parameters:
  numCharacters - the number of characters to use to calculate the length



calculateReasonableComponentSize
public static void calculateReasonableComponentSize(Dimension d)(Code)
Sets the size of the dimension to some reasonable value. If the given dimension is larger than the screen size, then we set the window to 80% of the screen size. Otherwise, we leave it alone
Parameters:
  d - the dimension of the window to set



centerFrame
public static void centerFrame(Window frame, float xpctWidth, float ypctWidth)(Code)
This method centers and sizes a frame window on the screen. The caller must pass the x and y percentages of screen width/height.



centerWindow
public static void centerWindow(Window frame)(Code)
This method centers a window window on the screen. The caller must pass the x and y percentages of screen width/height.



centerWindowChangeWidth
public static void centerWindowChangeWidth(Window frame, float xpctWidth)(Code)
This method centers a window window and changes the width on the screen. The caller must pass the x percentages of screen width. The height remains unchanged



copyToClipboard
public static void copyToClipboard(String str)(Code)
Copies to the clipboard the given string



createDialog
public static Dialog createDialog(Class dlgclass, Component owner, boolean bModal)(Code)
This method creates a dialog of the type class. It assumes that the dialog will have constructors that have the following form: ctor( JDialog owner, boolean bmodal ) ctor( Frame owner, boolean bmodal ) This method interogates the owner object. If this object is a JDialog or Frame, then we call the appropriate constructor for the class. If this object is a JComponent, then we get the objects owner window and determine if that is a JDialog or Frame.
Parameters:
  dlgclass - the class of the dialog we want to create
Parameters:
  owner - the owner of the new dialog. This object can be indirectly anowner. For example, you can pass in a JPanel as the owner.This method will detect this and get the appropriate owner ofthe JPanel
Parameters:
  bModal - true if you want the dialog to be modal



getFrameBorderThickness
public static int getFrameBorderThickness()(Code)
the thickness (in pixels) of the border on a frame or dialogwindow Currently, this is hard coded until I figure out a way toget this value.



getTitleBarHeight
public static int getTitleBarHeight()(Code)
the height (in pixels) of the titlebar on a frame or dialogwindow Currently, this is hard coded until I figure out a way toget this value.



invokeDialog
public static JETADialog invokeDialog(JETAPanel view, Component owner, String title)(Code)
Creates and displays a model JETADialog using the given view as the content pane. The dialog is centered on the screen and it's modal parent is set to null.



invokeDialog
public static JETADialog invokeDialog(JETAPanel view, Component owner, String title, JComponent initialFocus)(Code)
Creates and displays a model JETADialog using the given view as the content pane. The dialog is centered on the screen and it's modal parent is set to null.
Parameters:
  view - the main content panel for the dialog
Parameters:
  title - the dialog's title
Parameters:
  initialFocus - the component that will have the initial focus



isAquaLookAndFeel
public static boolean isAquaLookAndFeel()(Code)
Returns true if running OS X Aqua look and feel.



isOSX
public static boolean isOSX()(Code)
true if running Mac OS X



isWindows
public static boolean isWindows()(Code)
true if running Windows



isWindowsLookAndFeel
public static boolean isWindowsLookAndFeel()(Code)
true if we are currently in the windows look and feel. This L&Fhas different focus issues with the popup



setReasonableWindowSize
public static void setReasonableWindowSize(Component window, Dimension d)(Code)
Sets the size of the given window to the passed in dimension. However, if the given dimension is larger than the screen size, then we set the window to 80% of the screen size
Parameters:
  window - the window whose size we are setting
Parameters:
  d - the dimension of the window to set



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.