jodd.swingspy
Class SwingUtil

java.lang.Object
  extended by jodd.swingspy.SwingUtil

public class SwingUtil
extends java.lang.Object

Some common swing utilities.


Constructor Summary
SwingUtil()
           
 
Method Summary
static void center(javax.swing.JDialog dialog)
          Center JDialog.
static void center(javax.swing.JFrame frame)
          Center JFrame.
static void enableJDK5AntiAliasedText()
          Turns on anti-aliased text.
static void enforceJEditorPaneFont(javax.swing.JEditorPane jEditorPane, java.awt.Font font)
          Enforces JEditorPane font.
static void scrollToTop(javax.swing.JScrollPane scrollPane)
          Scrolls scroll pane to the top left corner.
static void scrollToTopLater(javax.swing.JScrollPane scrollPane)
          Scrolls scroll pane to the top left corner a bit later.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SwingUtil

public SwingUtil()
Method Detail

enableJDK5AntiAliasedText

public static void enableJDK5AntiAliasedText()
Turns on anti-aliased text. Call it before any other Swing usage. It works for JDK5.


scrollToTop

public static void scrollToTop(javax.swing.JScrollPane scrollPane)
Scrolls scroll pane to the top left corner.


scrollToTopLater

public static void scrollToTopLater(javax.swing.JScrollPane scrollPane)
Scrolls scroll pane to the top left corner a bit later.

See Also:
scrollToTop(JScrollPane)

center

public static void center(javax.swing.JFrame frame)
Center JFrame.


center

public static void center(javax.swing.JDialog dialog)
Center JDialog.


enforceJEditorPaneFont

public static void enforceJEditorPaneFont(javax.swing.JEditorPane jEditorPane,
                                          java.awt.Font font)
Enforces JEditorPane font. Once the content type of a JEditorPane is set to text/html the font on the Pane starts to be managed by Swing. This method forces using provided font.



Copyright © 2003-2012 Jodd Team