|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectgui.Wrapper
public class Wrapper
The Wrapper class provides convenience static methods for wrapping components and viewables in panels, scrollpanes, and title bordered panels. The methods all have variants that permit sizing of the wrapped component or wrapped viewable.
Method Summary | ||
---|---|---|
static WrapMethod |
createPaneledWrapMethod()
This method is experimental - it may be of little use. |
|
static WrapMethod |
createUnwrappedWrapMethod()
This method is experimental - it may be of little use. |
|
static javax.swing.JPanel |
named(javax.swing.JComponent c)
Wrapper.named(c) returns a title bordered panel containing c. |
|
static javax.swing.JPanel |
named(javax.swing.JComponent c,
int w,
int h)
Wrapper.named(c, w, h) returns a sized title bordered panel containing c. |
|
static javax.swing.JPanel |
named(NamedViewable nv)
Wrapper.named(nv) returns a title bordered panel containing the view component of v. |
|
static javax.swing.JPanel |
named(NamedViewable nv,
int w,
int h)
Wrapper.named(nv, w, h) returns a sized title bordered panel containing the view component of v. |
|
static javax.swing.JPanel |
named(Viewable v)
Wrapper.named(v) returns a title bordered panel containing the view component of v. |
|
static javax.swing.JPanel |
named(Viewable v,
int w,
int h)
Wrapper.named(v, w, h) returns a sized title bordered panel containing the view component of v. |
|
static javax.swing.JPanel |
paneled(javax.swing.JComponent c)
Wrapper.paneled(c) returns a panel containing c. |
|
static javax.swing.JPanel |
paneled(javax.swing.JComponent c,
int w,
int h)
Wrapper.paneled(c, w, h) returns a sized panel containing c. |
|
static javax.swing.JPanel |
paneled(Viewable v)
Wrapper.paneled(v) returns a panel containing the view component of v. |
|
static javax.swing.JPanel |
paneled(Viewable v,
int w,
int h)
Wrapper.paneled(v, w, h) returns a sized panel containing the view component of v. |
|
static javax.swing.JScrollPane |
scrolled(javax.swing.JComponent c)
Wrapper.scrolled(c) returns a scroll pane containing the view component of c. |
|
static javax.swing.JScrollPane |
scrolled(javax.swing.JComponent c,
int w,
int h)
Wrapper.scrolled(c, w, h) returns a sized scroll pane containing c. |
|
static javax.swing.JScrollPane |
scrolled(Viewable v)
Wrapper.scrolled(v) returns a sized scroll pane containing the view component of v. |
|
static javax.swing.JScrollPane |
scrolled(Viewable v,
int w,
int h)
Wrapper.scrolled(v, w, h) returns a sized scroll pane containing the view component of v. |
|
static javax.swing.JPanel |
titled(javax.swing.JComponent c,
java.lang.String ttl)
Wrapper.titled(c, ttl) returns a scroll pane containing c. |
|
static javax.swing.JPanel |
titled(javax.swing.JComponent c,
java.lang.String ttl,
int w,
int h)
Wrapper.titled(c, ttl, w, h) returns a sized title bordered panel containing c. |
|
static javax.swing.JPanel |
titled(Viewable v,
java.lang.String ttl)
Wrapper.titled(v, ttl) returns a title bordered panel containing the view component of v. |
|
static javax.swing.JPanel |
titled(Viewable v,
java.lang.String ttl,
int w,
int h)
Wrapper.titled(v, ttl, w, h) returns a sized title bordered panel containing the view component of v. |
|
static javax.swing.JComponent |
unwrapped(javax.swing.JComponent c)
Wrapper.unwrapped(c) returns c as is. |
|
static
|
unwrapped(T c,
int w,
int h)
Wrapper.unwrapped(c, w, h) returns c with its minimum, preferred, and maximum sizes set to w by h. |
|
static javax.swing.JComponent |
unwrapped(Viewable v)
Wrapper.unwrapped(v) returns the view component of v as is. |
|
static javax.swing.JComponent |
unwrapped(Viewable v,
int w,
int h)
Wrapper.unwrapped(v, w, h) returns the view component of v with its minimum, preferred, and maximum sizes set to w by h. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static javax.swing.JComponent unwrapped(javax.swing.JComponent c)
c
- the component
public static <T extends javax.swing.JComponent> T unwrapped(T c, int w, int h)
c
- the componentw
- the width of the returned componenth
- the height of the returned component
public static javax.swing.JComponent unwrapped(Viewable v)
v
- the viewable whose view component is to be returned
public static javax.swing.JComponent unwrapped(Viewable v, int w, int h)
v
- the viewable whose view component is to be returnedw
- the width of the returned componenth
- the height of the returned component
public static javax.swing.JPanel paneled(javax.swing.JComponent c)
c
- the component to be wrapped
public static javax.swing.JPanel paneled(javax.swing.JComponent c, int w, int h)
c
- the component to be wrappedw
- the width of the returned panelh
- the height of the returned panel
public static javax.swing.JPanel paneled(Viewable v)
v
- the viewable whose view component is to be wrapped
public static javax.swing.JPanel paneled(Viewable v, int w, int h)
v
- the viewable whose view component is to be wrappedw
- the width of the returned panelh
- the height of the returned panel
public static javax.swing.JScrollPane scrolled(javax.swing.JComponent c)
c
- the component to be scrolled
public static javax.swing.JScrollPane scrolled(javax.swing.JComponent c, int w, int h)
c
- the component to be scrolledw
- the width of the returned scroll paneh
- the height of the returned scroll pane
public static javax.swing.JScrollPane scrolled(Viewable v)
v
- the viewable whose view component is to be wrapped
public static javax.swing.JScrollPane scrolled(Viewable v, int w, int h)
v
- the viewable whose view component is to be wrappedw
- the width of the returned scroll paneh
- the height of the returned scroll pane
public static javax.swing.JPanel titled(javax.swing.JComponent c, java.lang.String ttl)
c
- the component to be wrappedttl
- the panel border title
public static javax.swing.JPanel titled(javax.swing.JComponent c, java.lang.String ttl, int w, int h)
c
- the component to be wrappedttl
- the panel border titlew
- the width of the returned panelh
- the height of the returned panel
public static javax.swing.JPanel titled(Viewable v, java.lang.String ttl)
v
- the viewable whose view component is to be wrappedttl
- the panel border title
public static javax.swing.JPanel titled(Viewable v, java.lang.String ttl, int w, int h)
v
- the viewable whose view component is to be wrappedttl
- the panel border titlew
- the width of the returned panelh
- the height of the returned panel
public static javax.swing.JPanel named(javax.swing.JComponent c)
c
- the component to be wrapped
public static javax.swing.JPanel named(javax.swing.JComponent c, int w, int h)
c
- the component to be wrappedw
- the width of the returned panelh
- the height of the returned panel
public static javax.swing.JPanel named(Viewable v)
v
- the viewable whose view component is to be wrapped
public static javax.swing.JPanel named(Viewable v, int w, int h)
v
- the viewable whose view component is to be wrappedw
- the width of the returned panelh
- the height of the returned panel
public static javax.swing.JPanel named(NamedViewable nv)
nv
- the named viewable whose view component is to be wrapped
public static javax.swing.JPanel named(NamedViewable nv, int w, int h)
nv
- the named viewable whose view component is to be wrappedw
- the width of the returned panelh
- the height of the returned panel
public static WrapMethod createPaneledWrapMethod()
public static WrapMethod createUnwrappedWrapMethod()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |