|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.awt.Component java.awt.Container javax.swing.JComponent uic.widgets.GroupBox
public class GroupBox
Nested Class Summary | |
---|---|
static class |
GroupBox.AbstractCollapsableBorder
For a collapsable groupBox we show a border that, when clicked, will collapse the groupbox. |
static interface |
GroupBox.PreviewHeader
This interface is needed to be implemented on borders and headers for collapsable GroupBoxes. |
Nested classes/interfaces inherited from class javax.swing.JComponent |
---|
JComponent.AccessibleJComponent |
Nested classes/interfaces inherited from class java.awt.Container |
---|
Container.AccessibleAWTContainer |
Nested classes/interfaces inherited from class java.awt.Component |
---|
Component.AccessibleAWTComponent, Component.BltBufferStrategy, Component.FlipBufferStrategy |
Field Summary | |
---|---|
static String |
CONFIG_BORDER_FILL
|
static String |
CONFIG_BORDER_TYPE
|
static int |
FRAMESHADOW_PLAIN
|
static int |
FRAMESHADOW_RAISED
|
static int |
FRAMESHADOW_SUNKEN
|
static int |
FRAMESHAPE_BEVEL
|
static int |
FRAMESHAPE_ETCHED
|
static int |
FRAMESHAPE_NOFRAME
|
Fields inherited from class javax.swing.JComponent |
---|
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW |
Fields inherited from class java.awt.Component |
---|
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT |
Fields inherited from interface java.awt.image.ImageObserver |
---|
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
Constructor Summary | |
---|---|
GroupBox(LayoutManager layout,
String title)
Instanciate a GroupBox which is a box with a titled border around it. |
|
GroupBox(String title)
Instanciate a GroupBox which is a box with a titled border around it. |
Method Summary | |
---|---|
AccessibleContext |
getAccessibleContext()
|
boolean |
getCollapsed()
Return if the groupBox is curently collapsed. |
Font |
getFont()
|
LayoutManager |
getLayout()
|
String |
getUIClassID()
|
boolean |
isArmed()
Returns if the component has been selected to be activated. |
boolean |
isCollapsable()
|
boolean |
isGhosted()
A groupbox itself does not get disabled, only its content will, this method returns if it is ghosted. |
void |
keyTypedSlot(char c,
int modifiers,
KeyEvent event)
|
void |
paint(Graphics g)
|
void |
repaintHeader()
|
void |
setBorder(Border border)
|
void |
setCollapsable(boolean on)
Setting the groupbox to collapsable will allow the user to make the groupbox smaller. |
void |
setCollapsed(boolean collapsed)
set the collapsed state of this groupbox. |
void |
setCollapsedHeader(GroupBox.PreviewHeader panel)
For the collapsable functionality; set the Header panel that shows the summary. |
void |
setContentBorder(GroupBox.AbstractCollapsableBorder border)
For the collapsable functionality; set the border that shows the 'collapse' button. |
void |
setEnabled(boolean enabled)
Sets whether or not this GroupBox is enabled. |
void |
setFlat(boolean flat)
|
void |
setFrameShadow(int frameShadow)
|
void |
setFrameShape(int frameShape)
|
void |
setLayout(LayoutManager mgr)
|
void |
setTitle(String title)
Sets a new title for this groupBox. |
void |
setValue(String value)
For a collapsed groupbox the value will be shown, this can be different from the title. |
void |
updateUI()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final int FRAMESHADOW_PLAIN
public static final int FRAMESHADOW_RAISED
public static final int FRAMESHADOW_SUNKEN
public static final int FRAMESHAPE_NOFRAME
public static final int FRAMESHAPE_ETCHED
public static final int FRAMESHAPE_BEVEL
public static final String CONFIG_BORDER_TYPE
public static final String CONFIG_BORDER_FILL
Constructor Detail |
---|
public GroupBox(String title)
title
- the title shown on the top of the box.public GroupBox(LayoutManager layout, String title)
title
- the title shown on the top of the box.Method Detail |
---|
public void setFlat(boolean flat)
public void setCollapsable(boolean on)
on
- enable/disable collapsable.public void updateUI()
updateUI
in class JComponent
public boolean isCollapsable()
public void repaintHeader()
public void keyTypedSlot(char c, int modifiers, KeyEvent event)
public void setContentBorder(GroupBox.AbstractCollapsableBorder border)
setCollapsable()
method will call this one
under water; you will only want to call this one if you want to set a specific border
without listening to the user preferences.
border
- the border.setCollapsable(boolean)
public void setCollapsedHeader(GroupBox.PreviewHeader panel)
setCollapsable()
method will call this one
under water; you will only want to call this one if you want to set a specific panel
without listening to the user preferences.
panel
- the panel that is visible when the groupBox is collapsed.
IllegalArgumentException
- if the panel does not extend a JComponent.setCollapsable(boolean)
public boolean getCollapsed()
setCollapsable(boolean)
public void setCollapsed(boolean collapsed)
IllegalStateException
- when setCollapsable()
has not been called with true.setCollapsable(boolean)
public void paint(Graphics g)
paint
in class JComponent
public void setTitle(String title)
title
- the new title.public void setValue(String value)
setCollapsable
) the header
can show a different text from the title; we propose to put the a summary of the groupbox
in here.
public void setLayout(LayoutManager mgr)
setLayout
in class Container
public LayoutManager getLayout()
getLayout
in class Container
public void setBorder(Border border)
setBorder
in class JComponent
public void setFrameShape(int frameShape)
public void setFrameShadow(int frameShadow)
public boolean isArmed()
public boolean isGhosted()
public String getUIClassID()
getUIClassID
in class JComponent
public void setEnabled(boolean enabled)
setEnabled
in class JComponent
enabled
- true if this component should be enabled, false if it should be disabled.JComponent.setEnabled(boolean)
public Font getFont()
getFont
in interface MenuContainer
getFont
in class Component
public AccessibleContext getAccessibleContext()
getAccessibleContext
in interface Accessible
getAccessibleContext
in class JComponent
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |