Package jpa.tools.swing
Class SwingHelper
- java.lang.Object
-
- jpa.tools.swing.SwingHelper
-
public class SwingHelper extends java.lang.ObjectAssorted utility methods.- Author:
- Pinaki Poddar
-
-
Constructor Summary
Constructors Constructor Description SwingHelper()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static javax.swing.AbstractButtongetSelectedButton(javax.swing.ButtonGroup group)static java.lang.StringgetTimeString(long value, java.util.concurrent.TimeUnit unit)static voidposition(java.awt.Component c, java.awt.Component parent)Position the given component at the center of the given parent component or physical screen.static voidprint(java.awt.Component c, java.lang.String format, java.io.File output)static voidsetLookAndFeel(int fontSize)static java.lang.StringtoString(java.util.concurrent.TimeUnit unit)
-
-
-
Method Detail
-
position
public static void position(java.awt.Component c, java.awt.Component parent)Position the given component at the center of the given parent component or physical screen.- Parameters:
c- the component to be positionedparent- the component whose center will match the center of the given component. If null, the given component will match the screen center.
-
getTimeString
public static java.lang.String getTimeString(long value, java.util.concurrent.TimeUnit unit)
-
toString
public static java.lang.String toString(java.util.concurrent.TimeUnit unit)
-
print
public static void print(java.awt.Component c, java.lang.String format, java.io.File output)
-
getSelectedButton
public static javax.swing.AbstractButton getSelectedButton(javax.swing.ButtonGroup group)
-
setLookAndFeel
public static void setLookAndFeel(int fontSize) throws java.lang.Exception- Throws:
java.lang.Exception
-
-