Java Doc for GUIUtil.java in  » GIS » openjump » com » vividsolutions » jump » workbench » ui » 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 » GIS » openjump » com.vividsolutions.jump.workbench.ui 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   com.vividsolutions.jump.workbench.ui.GUIUtil

GUIUtil
public class GUIUtil (Code)

Inner Class :public static class FileChooserWithOverwritePrompting extends JFileChooser
Inner Class :public static class Location

Field Summary
final public static  FileFilterALL_FILES_FILTER
    
final public static  Stringdbf
    
final public static  StringdbfDesc
    
final public static  Stringfme
    
final public static  StringfmeDesc
    
final public static  Stringgml
    
final public static  StringgmlDesc
    
final public static  Stringjml
    
final public static  StringjmlDesc
    
final public static  Stringshp
    
final public static  StringshpDesc
    
final public static  Stringshx
    
final public static  StringshxDesc
    
final public static  Stringwkt
    
final public static  StringwktDesc
    
final public static  StringwktaDesc
    
final public static  Stringxml
    
final public static  StringxmlDesc
    

Constructor Summary
public  GUIUtil()
    

Method Summary
public static  Point2Dadd(Point2D a, Point2D b)
    
public static  voidaddInternalFrameListener(JDesktopPane pane, InternalFrameListener listener)
     Listens to all internal frames (current and future) in a JDesktopPane.
public static  ColoralphaColor(Color color, int alpha)
    
public static  voidcentre(Component componentToMove, Component componentToCentreOn)
    
public static  voidcentreOnScreen(Component componentToMove)
    
public static  voidcentreOnWindow(Component componentToMove)
    
public static  voidchooseGoodColumnWidths(JTable table)
     Sets the column widths based on the first row.
public static  CursorcreateCursor(Image image, Point hotSpot)
    
public static  CursorcreateCursorFromIcon(Image iconImage)
    
public static  FileFiltercreateFileFilter(String description, String[] extensions)
    
Parameters:
  extensions - e.g.
public static  JFileChoosercreateJFileChooserWithExistenceChecking()
    
public static  JFileChoosercreateJFileChooserWithOverwritePrompting()
    
public static  JFileChoosercreateJFileChooserWithOverwritePrompting(String ext)
    
public static  TimercreateRestartableSingleEventTimer(int delay, ActionListener listener)
     Returns a Timer that fires once, after the delay.
public static  ValidatingTextFieldcreateSyncdTextField(JSlider s)
    
public static  ValidatingTextFieldcreateSyncdTextField(JSlider s, int columns)
    
public static  voiddispose(JInternalFrame internalFrame, JDesktopPane desktopPane)
     Ensures that the next frame is activated when #dispose is called explicitly, in JDK 1.4.
public static  voiddoNotRoundDoubles(JTable table)
    
final public static  StringescapeHTML(String value, boolean escapeSpaces, boolean escapeNewlines)
     Returns a string suitable for embedding as HTML.
public static  voidfixClicks(Component c)
     Fix for Sun Java Bug 4398733: if you click in an inactive JInternalFrame, the mousePressed and mouseReleased events will be fired, but not the mouseClicked event.
public static  voidfixEditableComboBox(JComboBox cb)
     Workaround for Java Bug 4648654 "REGRESSION: Editable JComboBox focus misbehaves under Windows look and feel, proposed by Kleopatra (fastegal@addcom.de).
public static  TransferablegetContents(Clipboard clipboard)
     The JVM's clipboard implementation is buggy (see bugs 4644554 and 4522198 in Sun's Java bug database).
public static  ComponentgetDescendantOfClass(Class c, Container container)
    
public static  StringgetExtension(File f)
    
public static  voidhandleThrowable(Throwable t, Component parent)
    
public static  voidhighlightForDebugging(JComponent component, Color color)
     Highlights a given component with a given color.
public static  voidinvokeOnEventThread(Runnable r)
     GUI operations should be performed only on the AWT event dispatching thread.
public static  Listitems(JComboBox comboBox)
    
public static  JTextAreamakeTabMoveFocus(JTextArea textArea)
     Based on Green, Roedy.
public static  Point2Dmultiply(Point2D v, double x)
    
public static  StringnameWithoutExtension(File file)
    
public static  voidremoveChoosableFileFilters(JFileChooser fc)
    
public static  ImageIconresize(ImageIcon icon, int extent)
    
public static  File[]selectedFiles(JFileChooser chooser)
    
public static  voidsetLocation(Component componentToMove, Location location, Component other)
    
public static  voidsetSelectedWithClick(JCheckBox checkBox, boolean selected)
     Calls #doClick so that events are fired.
public static  voidshrinkFont(JComponent component)
    
public static  Point2Dsubtract(Point2D a, Point2D b)
    
public static  intswingThreadPriority()
    
public static  voidsync(JSlider s, ValidatingTextField t)
    
public static  voidsync(JSlider s1, JSlider s2)
    
public static  voidsync(JCheckBox c1, JCheckBox c2)
    
public static  voidsyncEnabledStates(JComponent c1, JComponent c2)
    
public static  ImageIcontoDisabledIcon(ImageIcon icon)
    
public static  DocumentListenertoDocumentListener(ActionListener listener)
    
public static  InternalFrameListenertoInternalFrameListener(ActionListener listener)
    
public static  ListDataListenertoListDataListener(ActionListener listener)
    
public static  ColortoSimulatedTransparency(Color color)
    
public static  ImageIcontoSmallIcon(ImageIcon icon)
     Resizes icon to 16 x 16.
public static  ComponenttopCard(Container c)
    
public static  doubletrueAscent(TextLayout layout)
     Returns the distance from the baseline to the top of the text's bounding box.
public static  StringtruncateString(String s, int maxLength)
    

Field Detail
ALL_FILES_FILTER
final public static FileFilter ALL_FILES_FILTER(Code)



dbf
final public static String dbf(Code)



dbfDesc
final public static String dbfDesc(Code)



fme
final public static String fme(Code)



fmeDesc
final public static String fmeDesc(Code)



gml
final public static String gml(Code)



gmlDesc
final public static String gmlDesc(Code)



jml
final public static String jml(Code)



jmlDesc
final public static String jmlDesc(Code)



shp
final public static String shp(Code)



shpDesc
final public static String shpDesc(Code)



shx
final public static String shx(Code)



shxDesc
final public static String shxDesc(Code)



wkt
final public static String wkt(Code)



wktDesc
final public static String wktDesc(Code)



wktaDesc
final public static String wktaDesc(Code)



xml
final public static String xml(Code)



xmlDesc
final public static String xmlDesc(Code)




Constructor Detail
GUIUtil
public GUIUtil()(Code)




Method Detail
add
public static Point2D add(Point2D a, Point2D b)(Code)



addInternalFrameListener
public static void addInternalFrameListener(JDesktopPane pane, InternalFrameListener listener)(Code)
Listens to all internal frames (current and future) in a JDesktopPane.



alphaColor
public static Color alphaColor(Color color, int alpha)(Code)



centre
public static void centre(Component componentToMove, Component componentToCentreOn)(Code)
Centres the first component on the second
Parameters:
  componentToMove - Description of the Parameter
Parameters:
  componentToCentreOn - Description of the Parameter



centreOnScreen
public static void centreOnScreen(Component componentToMove)(Code)
Centres the component on the screen
Parameters:
  componentToMove - Description of the Parameter



centreOnWindow
public static void centreOnWindow(Component componentToMove)(Code)
Centres the component on its window
Parameters:
  componentToMove - Description of the Parameter



chooseGoodColumnWidths
public static void chooseGoodColumnWidths(JTable table)(Code)
Sets the column widths based on the first row.
Parameters:
  table - Description of the Parameter



createCursor
public static Cursor createCursor(Image image, Point hotSpot)(Code)



createCursorFromIcon
public static Cursor createCursorFromIcon(Image iconImage)(Code)



createFileFilter
public static FileFilter createFileFilter(String description, String[] extensions)(Code)

Parameters:
  extensions - e.g. txt



createJFileChooserWithExistenceChecking
public static JFileChooser createJFileChooserWithExistenceChecking()(Code)



createJFileChooserWithOverwritePrompting
public static JFileChooser createJFileChooserWithOverwritePrompting()(Code)



createJFileChooserWithOverwritePrompting
public static JFileChooser createJFileChooserWithOverwritePrompting(String ext)(Code)



createRestartableSingleEventTimer
public static Timer createRestartableSingleEventTimer(int delay, ActionListener listener)(Code)
Returns a Timer that fires once, after the delay. The delay can be restarted by restarting the Timer.



createSyncdTextField
public static ValidatingTextField createSyncdTextField(JSlider s)(Code)



createSyncdTextField
public static ValidatingTextField createSyncdTextField(JSlider s, int columns)(Code)



dispose
public static void dispose(JInternalFrame internalFrame, JDesktopPane desktopPane)(Code)
Ensures that the next frame is activated when #dispose is called explicitly, in JDK 1.4. JDK 1.3 didn't have this problem.



doNotRoundDoubles
public static void doNotRoundDoubles(JTable table)(Code)



escapeHTML
final public static String escapeHTML(String value, boolean escapeSpaces, boolean escapeNewlines)(Code)
Returns a string suitable for embedding as HTML. That is, all characters which have a special meaning in HTML are escaped as character codes.

Based on code from Jason Sherman. See http://www.w3schools.com/html/html_asciiref.asp




fixClicks
public static void fixClicks(Component c)(Code)
Fix for Sun Java Bug 4398733: if you click in an inactive JInternalFrame, the mousePressed and mouseReleased events will be fired, but not the mouseClicked event.



fixEditableComboBox
public static void fixEditableComboBox(JComboBox cb)(Code)
Workaround for Java Bug 4648654 "REGRESSION: Editable JComboBox focus misbehaves under Windows look and feel, proposed by Kleopatra (fastegal@addcom.de). Also see Java Bug 4673880 "REGRESSION: Modified editable JComboBox in Windows LAF does not release focus." This bug started occurring in Java 1.4.0.
Parameters:
  cb - Description of the Parameter



getContents
public static Transferable getContents(Clipboard clipboard)(Code)
The JVM's clipboard implementation is buggy (see bugs 4644554 and 4522198 in Sun's Java bug database). This method is a workaround that returns null if an exception is thrown, as suggested in the bug reports.



getDescendantOfClass
public static Component getDescendantOfClass(Class c, Container container)(Code)



getExtension
public static String getExtension(File f)(Code)



handleThrowable
public static void handleThrowable(Throwable t, Component parent)(Code)



highlightForDebugging
public static void highlightForDebugging(JComponent component, Color color)(Code)
Highlights a given component with a given color. Great for GridBagLayout debugging.



invokeOnEventThread
public static void invokeOnEventThread(Runnable r) throws InterruptedException, InvocationTargetException(Code)
GUI operations should be performed only on the AWT event dispatching thread. Blocks until the Runnable is finished.



items
public static List items(JComboBox comboBox)(Code)



makeTabMoveFocus
public static JTextArea makeTabMoveFocus(JTextArea textArea)(Code)
Based on Green, Roedy. "Java Glossary : focus". Available from http://mindprod.com/jgloss/focus.html. Internet; accessed 8 March 2004.



multiply
public static Point2D multiply(Point2D v, double x)(Code)



nameWithoutExtension
public static String nameWithoutExtension(File file)(Code)



removeChoosableFileFilters
public static void removeChoosableFileFilters(JFileChooser fc)(Code)



resize
public static ImageIcon resize(ImageIcon icon, int extent)(Code)



selectedFiles
public static File[] selectedFiles(JFileChooser chooser)(Code)
Work around Java Bug 4437688 "JFileChooser.getSelectedFile() returns nothing when a file is selected" [Jon Aquino]



setLocation
public static void setLocation(Component componentToMove, Location location, Component other)(Code)



setSelectedWithClick
public static void setSelectedWithClick(JCheckBox checkBox, boolean selected)(Code)
Calls #doClick so that events are fired.



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



subtract
public static Point2D subtract(Point2D a, Point2D b)(Code)



swingThreadPriority
public static int swingThreadPriority()(Code)



sync
public static void sync(JSlider s, ValidatingTextField t)(Code)

See Also:   GUIUtil.createSyncdTextField(JSlider s,int columns)



sync
public static void sync(JSlider s1, JSlider s2)(Code)



sync
public static void sync(JCheckBox c1, JCheckBox c2)(Code)



syncEnabledStates
public static void syncEnabledStates(JComponent c1, JComponent c2)(Code)



toDisabledIcon
public static ImageIcon toDisabledIcon(ImageIcon icon)(Code)



toDocumentListener
public static DocumentListener toDocumentListener(ActionListener listener)(Code)



toInternalFrameListener
public static InternalFrameListener toInternalFrameListener(ActionListener listener)(Code)



toListDataListener
public static ListDataListener toListDataListener(ActionListener listener)(Code)



toSimulatedTransparency
public static Color toSimulatedTransparency(Color color)(Code)

Parameters:
  color - a Color with possibly an alpha less than 255 a Color with alpha equal to 255, but equivalent to the originaltranslucent colour on a white background



toSmallIcon
public static ImageIcon toSmallIcon(ImageIcon icon)(Code)
Resizes icon to 16 x 16.



topCard
public static Component topCard(Container c)(Code)



trueAscent
public static double trueAscent(TextLayout layout)(Code)
Returns the distance from the baseline to the top of the text's bounding box. Unlike the usual ascent, which is independent of the actual text. Note that "True ascent" is not a standard term.



truncateString
public static String truncateString(String s, int maxLength)(Code)



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.