public class SwingFactory
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
ID
CVS ID
|
Constructor and Description |
---|
SwingFactory() |
Modifier and Type | Method and Description |
---|---|
static javax.swing.JComponent |
addBorderTitle(java.lang.String title,
javax.swing.JComponent component)
Wrap a component with a titled border, returning the component.
|
static void |
constrain(java.awt.Container container,
java.awt.Component component,
int row,
int col) |
static void |
constrain(java.awt.Container container,
java.awt.Component component,
int row,
int col,
int rspan,
int cspan) |
static void |
constrain(java.awt.Container container,
java.awt.Component component,
int row,
int col,
int rspan,
int cspan,
int anchor,
int fill) |
static void |
constrain(java.awt.Container container,
java.awt.Component component,
int row,
int col,
int rspan,
int cspan,
int anchor,
int fill,
double wx,
double wy) |
static void |
constrain(java.awt.Container container,
java.awt.Component component,
int row,
int col,
int rspan,
int cspan,
int anchor,
int fill,
double wx,
double wy,
int padx,
int pady) |
static void |
constrain(java.awt.Container container,
java.awt.Component component,
int row,
int col,
int rspan,
int cspan,
int anchor,
int fill,
double wx,
double wy,
int mx,
int padx,
int pady,
int my,
int mt,
int mb) |
static javax.swing.Box |
createHorizontalBox(java.awt.Component... components)
Create a box, stacking all components horizontally, and making sure each
will stretch fill all of the height in the box.
|
static javax.swing.Box |
createVerticalBox(java.awt.Component... components)
Create a box, stacking all components vertically, and making sure each
will stretch fill all of the width in the box.
|
static javax.swing.JDialog |
createWarningDialog(javax.swing.JFrame frame,
java.lang.String message)
Create a warning dialog for display from a given frame.
|
static void |
expand(javax.swing.JTree tree,
javax.swing.tree.TreePath treePath)
Make sure that a TreePath in a JTree is expanded and visible.
|
static java.awt.Dimension |
getScreenSize()
Return pixel dimensions of screen (desktop).
|
static javax.swing.JComponent |
setBorderTitle(java.lang.String title,
javax.swing.JComponent component)
Give a component a titled border, returning the component.
|
public static final java.lang.String ID
public static java.awt.Dimension getScreenSize()
public static javax.swing.JComponent setBorderTitle(java.lang.String title, javax.swing.JComponent component)
title
- Short title for displaycomponent
- The swing componentpublic static javax.swing.JComponent addBorderTitle(java.lang.String title, javax.swing.JComponent component)
title
- Short title for displaycomponent
- The swing componentpublic static javax.swing.Box createVerticalBox(java.awt.Component... components)
components
- Components for boxpublic static javax.swing.Box createHorizontalBox(java.awt.Component... components)
components
- Components for boxpublic static javax.swing.JDialog createWarningDialog(javax.swing.JFrame frame, java.lang.String message)
frame
- The parent frame of the dialogmessage
- Warning text for displaypublic static void expand(javax.swing.JTree tree, javax.swing.tree.TreePath treePath)
tree
- The treetreePath
- Path to TreeNodepublic static void constrain(java.awt.Container container, java.awt.Component component, int row, int col)
container
- component
- row
- col
- public static void constrain(java.awt.Container container, java.awt.Component component, int row, int col, int rspan, int cspan)
container
- component
- row
- col
- rspan
- cspan
- public static void constrain(java.awt.Container container, java.awt.Component component, int row, int col, int rspan, int cspan, int anchor, int fill)
container
- component
- row
- col
- rspan
- cspan
- anchor
- fill
- public static void constrain(java.awt.Container container, java.awt.Component component, int row, int col, int rspan, int cspan, int anchor, int fill, double wx, double wy)
container
- component
- row
- col
- rspan
- cspan
- anchor
- fill
- wx
- wy
- public static void constrain(java.awt.Container container, java.awt.Component component, int row, int col, int rspan, int cspan, int anchor, int fill, double wx, double wy, int padx, int pady)
container
- component
- row
- col
- rspan
- cspan
- anchor
- fill
- wx
- wy
- padx
- pady
- public static void constrain(java.awt.Container container, java.awt.Component component, int row, int col, int rspan, int cspan, int anchor, int fill, double wx, double wy, int mx, int padx, int pady, int my, int mt, int mb)
container
- component
- row
- col
- rspan
- cspan
- anchor
- fill
- wx
- wy
- mx
- padx
- pady
- my
- mt
- mb
- Copyright \ (C) Arizona Board of Regents on behalf of the \ Planetary Image Research Laboratory, Lunar and \ Planetary Laboratory at the University of Arizona