|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.airavata.common.utils.SwingUtil
public class SwingUtil
| Field Summary | |
|---|---|
static Cursor |
CROSSHAIR_CURSOR
Cross hair cursor. |
static Cursor |
DEFAULT_CURSOR
Default cursor. |
static Cursor |
HAND_CURSOR
Hand cursor. |
static Dimension |
MINIMUM_SIZE
Minimum size, zero. |
static Cursor |
MOVE_CURSOR
Move cursor. |
static int |
PAD
The default distance between components. |
static Cursor |
WAIT_CURSOR
Wait cursor. |
static int |
WEIGHT_EQUALLY
Weight all rows or columns equally. |
static int |
WEIGHT_NONE
Wight none of rows or eolumns. |
| Constructor Summary | |
|---|---|
SwingUtil()
|
|
| Method Summary | |
|---|---|
static void |
addPlaceHolder(JTextField field,
String placeHolderText)
|
static Image |
createImage(String filename)
Creates an image from an image contained in the "images" directory. |
static ImageIcon |
createImageIcon(String filename)
Creates an icon from an image contained in the "images" directory. |
static Frame |
getFrame(Component component)
Return the Frame of a specified component if any. |
static URL |
getImageURL(String filename)
|
static void |
layoutToGrid(Container parent,
double[] rowWeights,
double[] columnWeights)
|
static void |
layoutToGrid(Container parent,
int numRow,
int numColumn,
int weightedRow,
int weightedColumn)
Layouts the child components of a specified parent component using GridBagLayout. |
static void |
layoutToGrid(Container parent,
List<Double> rowWeights,
List<Double> columnWeights)
|
static void |
makeSpringCompactGrid(Container parent,
int rows,
int cols)
Aligns the first rows * cols components of parent in a grid. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final Dimension MINIMUM_SIZE
public static final int PAD
public static final Cursor DEFAULT_CURSOR
public static final Cursor HAND_CURSOR
public static final Cursor CROSSHAIR_CURSOR
public static final Cursor MOVE_CURSOR
public static final Cursor WAIT_CURSOR
public static final int WEIGHT_NONE
public static final int WEIGHT_EQUALLY
| Constructor Detail |
|---|
public SwingUtil()
| Method Detail |
|---|
public static ImageIcon createImageIcon(String filename)
filename -
public static Image createImage(String filename)
filename -
public static URL getImageURL(String filename)
public static Frame getFrame(Component component)
component - the specified component
public static void layoutToGrid(Container parent,
int numRow,
int numColumn,
int weightedRow,
int weightedColumn)
parent - The specified parent componentnumRow - The number of rowsnumColumn - The number of columnsweightedRow - The row to weightweightedColumn - The column to weight
public static void layoutToGrid(Container parent,
double[] rowWeights,
double[] columnWeights)
parent - rowWeights - columnWeights -
public static void layoutToGrid(Container parent,
List<Double> rowWeights,
List<Double> columnWeights)
parent - rowWeights - columnWeights -
public static void makeSpringCompactGrid(Container parent,
int rows,
int cols)
rows * cols components of parent in a grid. Each
component in a column is as wide as the maximum preferred width of the components in that column; height is
similarly determined for each row. The parent is made just big enough to fit them all.
parent - rows - number of rowscols - number of columns
public static void addPlaceHolder(JTextField field,
String placeHolderText)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||