|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.tbee.swing.JPanelUtils
public class JPanelUtils
| Field Summary | |
|---|---|
static int |
DIRECTION_DIAGONAL_LTBR
|
static int |
DIRECTION_DIAGONAL_RTBL
|
static int |
DIRECTION_HORIZONTAL
|
static int |
DIRECTION_VERTICAL
|
| Constructor Summary | |
|---|---|
JPanelUtils()
|
|
| Method Summary | |
|---|---|
static JPanel |
addMarginAround(Component component,
int top,
int left,
int bottom,
int right)
Create a panel with an empty room around it |
static JPanel |
addMarginAround(int top,
int left,
int bottom,
int right,
Component component)
Create a panel with an empty room around it |
static JPanel |
addToEast(Component center,
Component other)
|
static JPanel |
addToEast(Component center,
Component other,
boolean opaque)
|
static JPanel |
addToNorth(Component center,
Component other)
|
static JPanel |
addToNorth(Component center,
Component other,
boolean opaque)
|
static JPanel |
addToSouth(Component center,
Component other)
|
static JPanel |
addToSouth(Component center,
Component other,
boolean opaque)
|
static JPanel |
addToWest(Component center,
Component other)
|
static JPanel |
addToWest(Component center,
Component other,
boolean opaque)
|
static JPanel |
createBorderLayoutPanel()
|
static JPanel |
createBorderLayoutPanel(Component center,
Component north,
Component east,
Component south,
Component west)
Create a panel in which the components are laid out BorderLayout |
static JPanel |
createBorderLayoutPanel(Component center,
Component north,
Component east,
Component south,
Component west,
boolean opaque)
|
static JPanel |
createBorderLayoutPanel(Component center,
Component north,
Component east,
Component south,
Component west,
boolean opaque,
int hgap,
int vgap)
Create a panel in which the components are laid out by BorderLayout |
static JPanel |
createBorderLayoutPanel(Component center,
Component north,
Component east,
Component south,
Component west,
int hgap,
int vgap)
|
static JPanel |
createBorderLayoutPanel(int hgap,
int vgap)
Create a panel in which the components are laid out BorderLayout |
static JPanel |
createGradientPanel()
Create panel with gradient |
static JPanel |
createGradientPanel(Color c1,
Color c2,
int direction)
Create panel with gradient |
static JPanel |
createGradientPanelAerith()
Use the Aerith colors (http://aerith.dev.java.net/), which is a more classy black / grey look |
static JPanel |
createGradientPanelAerith(Component c)
|
static JPanel |
createGridPanel(int cols)
|
static JPanel |
createGridPanel(int cols,
Component... components)
|
static JPanel |
createHorizontalButtonPanel()
|
static JPanel |
createHorizontalButtonPanel(Component... components)
|
static JPanel |
createHorizontalPanel()
Create a panel in which the components are laid out horizontally You can also use Box.createHorizontalBox() |
static JPanel |
createHorizontalPanel(Component... components)
Create a panel in which the components are laid out horizontally. |
static JPanel |
createHorizontalPanel(int spacing,
Component... components)
Create a panel in which the components are laid out horizontally. |
static JPanel |
createHorizontalSplitterPanel()
Create a panel that support SplitterBars |
static JPanel |
createHorizontalSplitterPanel(Object... components)
Create a panel that support SplitterBars |
static JPanel |
createPanel()
Create a transparent panel |
static JPanel |
createPanel(LayoutManager layout)
Create a panel and set the layout manager |
static JPanel |
createPortletLookPanel(JLabel title,
Color borderColor,
JComponent component)
create a panel with title, border and shadow |
static JPanel |
createPortletLookPanel(String title,
JComponent component)
create a panel with title, border and shadow |
static JPanel |
createVerticalButtonPanel()
|
static JPanel |
createVerticalButtonPanel(Component... components)
|
static JScrollPane |
createVerticalFlowJScrollPane()
Create a scrollpane that only has a vertical scrollbar and will layout components in lines and then down. |
static JScrollPane |
createVerticalFlowJScrollPane(Component... components)
Create a scrollpane that only has a vertical scrollbar and will layout components in lines and then down. |
static JPanel |
createVerticalPanel()
Create a panel in which the components are laid out vertically You can also use Box.createVerticalBox(), this will only have no inner spacing. |
static JPanel |
createVerticalPanel(Component... components)
Create a panel in which the components are laid out vertically Each component is given a small empty border to make sure it is a few pixels apart from the other (BoxLayout does not have a spacing). |
static JPanel |
createVerticalPanel(int spacing,
Component... components)
Create a panel in which the components are laid out vertically Each component is given a small empty border to make sure it is a few pixels apart from the other (BoxLayout does not have a spacing). |
static JPanel |
createVerticalSplitterPanel()
Create a panel that support SplitterBars |
static JPanel |
createVerticalSplitterPanel(Object... components)
Create a panel that support SplitterBars |
static Container |
makeItTheBackground(Container container,
JPanel panel)
A small utility function that adds the panel as the only component to the container and then returns the panel as the new container. |
static Container |
makeItTheBackground(Container container,
JPanel panel,
int top,
int left,
int bottom,
int right)
A small utility function that adds the panel as the only component to the container, insert an second panel inside that has a border, and then returns the inner most panel as the new container. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int DIRECTION_HORIZONTAL
public static final int DIRECTION_VERTICAL
public static final int DIRECTION_DIAGONAL_LTBR
public static final int DIRECTION_DIAGONAL_RTBL
| Constructor Detail |
|---|
public JPanelUtils()
| Method Detail |
|---|
public static JPanel createPanel()
public static JPanel addMarginAround(Component component,
int top,
int left,
int bottom,
int right)
component - top - left - bottom - right -
public static JPanel addMarginAround(int top,
int left,
int bottom,
int right,
Component component)
component - top - left - bottom - right -
public static JPanel createPanel(LayoutManager layout)
public static JPanel createHorizontalPanel()
public static JPanel createHorizontalPanel(Component... components)
public static JPanel createHorizontalPanel(int spacing,
Component... components)
public static JPanel createVerticalPanel()
public static JPanel createVerticalPanel(Component... components)
public static JPanel createVerticalPanel(int spacing,
Component... components)
public static JPanel createBorderLayoutPanel(int hgap,
int vgap)
center - north - east - south - west -
public static JPanel createBorderLayoutPanel()
public static JPanel createBorderLayoutPanel(Component center,
Component north,
Component east,
Component south,
Component west)
center - north - east - south - west -
public static JPanel createBorderLayoutPanel(Component center,
Component north,
Component east,
Component south,
Component west,
boolean opaque,
int hgap,
int vgap)
center - north - east - south - west - opaque -
public static JPanel createBorderLayoutPanel(Component center,
Component north,
Component east,
Component south,
Component west,
int hgap,
int vgap)
public static JPanel createBorderLayoutPanel(Component center,
Component north,
Component east,
Component south,
Component west,
boolean opaque)
public static JPanel addToEast(Component center,
Component other,
boolean opaque)
public static JPanel addToNorth(Component center,
Component other,
boolean opaque)
public static JPanel addToWest(Component center,
Component other,
boolean opaque)
public static JPanel addToSouth(Component center,
Component other,
boolean opaque)
public static JPanel addToEast(Component center,
Component other)
public static JPanel addToNorth(Component center,
Component other)
public static JPanel addToWest(Component center,
Component other)
public static JPanel addToSouth(Component center,
Component other)
public static JScrollPane createVerticalFlowJScrollPane()
public static JScrollPane createVerticalFlowJScrollPane(Component... components)
public static JPanel createHorizontalSplitterPanel()
public static JPanel createHorizontalSplitterPanel(Object... components)
public static JPanel createVerticalSplitterPanel()
public static JPanel createVerticalSplitterPanel(Object... components)
public static JPanel createVerticalButtonPanel()
public static JPanel createVerticalButtonPanel(Component... components)
public static JPanel createHorizontalButtonPanel()
public static JPanel createHorizontalButtonPanel(Component... components)
public static JPanel createGridPanel(int cols)
public static JPanel createGridPanel(int cols,
Component... components)
public static Container makeItTheBackground(Container container,
JPanel panel)
container - panel -
public static Container makeItTheBackground(Container container,
JPanel panel,
int top,
int left,
int bottom,
int right)
container - panel - top - left - bottom - right -
public static JPanel createGradientPanel()
public static JPanel createGradientPanel(Color c1,
Color c2,
int direction)
public static JPanel createGradientPanelAerith()
public static JPanel createGradientPanelAerith(Component c)
public static JPanel createPortletLookPanel(String title,
JComponent component)
public static JPanel createPortletLookPanel(JLabel title,
Color borderColor,
JComponent component)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||